home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / CSPLIT.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  2KB  |  64 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4.  * CSplit.h
  5.  * 08/31/93  Fred Cole     original
  6.  */
  7.  
  8. #ifndef  __STDC__
  9.  #include "dirport.h"
  10. #endif
  11.  
  12. #define VERSION   "2.2"
  13.  
  14. #ifndef B_FALSE
  15. #define B_FALSE 0
  16. #endif
  17.  
  18. #ifndef B_TRUE
  19. #define B_TRUE  1
  20. #endif
  21.  
  22. enum { NOERR = 0, SYNTAX, ABORT, MEMORY, FILEIO, PROCESS };
  23.  
  24. #define FNAMELEN  12    /* 8.3 filename character count     */
  25. #define LLENMAX  128    /* maximum input source line length */
  26. #define PATHMAX   80    /* maximum path length              */
  27. #define MAXFSPEC (PATHMAX + FNAMELEN)
  28.  
  29. #define LENMIN    25    /* minimum source lines per section */
  30. #define LENDEF    90    /* default source lines per section */ /* TS */
  31. #define LENMAX SHRT_MAX /* maximum source lines per section */
  32. #define TABMIN     2    /* minimum spaces per tab char      */
  33. #define TABDEF     4    /* default spaces per tab char      */
  34. #define TABMAX    16    /* maximum spaces per tab char      */
  35. #define WIDMIN    55    /* minimum source chars per line    */
  36. #define WIDDEF    75    /* default source chars per line    */
  37. #define WIDMAX   255    /* maximum source chars per line    */
  38.  
  39. #define SEP_CLEN 10     /* separator character string length */
  40. #define SEP_CDEF '>'    /* default separator character */
  41. #define SEP_BF   "Begin file "
  42. #define SEP_BP   "Begin part "
  43. #define SEP_EF   "End file "
  44. #define SEP_EP   "End part "
  45. #define SEP_ID   "CSplit: "
  46. #define SEP_VR   "Version "
  47.  
  48. typedef struct _slst
  49. {
  50.   char srcfile[MAXFSPEC + 1];     /* path and filename */
  51.   struct _slst *next;
  52. } SLST;
  53.  
  54. SLST *add_list  (char *);
  55. void  cleanup   (void);
  56. char *csp_fgets (char *, int, FILE *, int);
  57. void  disp_help (void);
  58. int   extr_file (char *, char);
  59. void  free_list (void);
  60. int   init_list (int, char **, int);
  61. int   split_src (SLST *, char *, int, int, int, char);
  62. unsigned short updcrc (unsigned short, unsigned char *, unsigned int);
  63. void  initcrctab (void);
  64.