home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / TOOLS2.ZIP / DIFF.H < prev    next >
C/C++ Source or Header  |  1988-06-01  |  1KB  |  49 lines

  1. /**
  2.  
  3.     DIFF.H
  4.     
  5.     Header file for DIFF.C
  6.     
  7. **/
  8.  
  9. /* Constant Values */
  10. #ifndef TRUE
  11. #define TRUE        1
  12. #endif
  13. #ifndef FALSE
  14. #define FALSE        0
  15. #endif
  16.  
  17. #define PAGESIZE    4096    /* default line page size */
  18. #define MASK        0x0FFF    /* 12 bit hash value */
  19. #define MAXLINE        256    /* maximum line length */
  20.  
  21. #define CHANGE        0    /* change a range of lines */
  22. #define DELETE        1    /* delete a range of lines */
  23. #define ADD        2    /* add a range of lines */
  24.  
  25. /* Data Types */
  26.  
  27. typedef int BOOL ;
  28.  
  29. typedef struct 
  30. {
  31.     long addr ;        /* address of string in file */
  32.     unsigned int hash ;    /* hash value for string */
  33.     int linenum ;        /* line number in file */
  34. }
  35. LINE ;
  36.  
  37. /**
  38.     Function prototypes
  39. **/    
  40. static unsigned int Hash(char *);
  41. static LINE *ReadFile(FILE *, int *);
  42. static BOOL CheckHashes(LINE *, LINE *, int); 
  43. static int CheckStrings(FILE *, LINE *, FILE *, LINE *, int);
  44. static void PrintLines(FILE *, LINE *, int , FILE *, LINE *, int);
  45. static void DoDiff(FILE *, LINE *, int, FILE *, LINE *, int, int);
  46. static void banner(void);
  47. void main(int, char **);
  48.  
  49.