home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / csplit21.zip / CSPLIT.H < prev    next >
C/C++ Source or Header  |  1995-11-14  |  2KB  |  55 lines

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