home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / xdiff 1.0 / xdiff1.0.src / xdiff.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-08  |  896 b   |  51 lines  |  [TEXT/MPS ]

  1. /*
  2.  * File xdiff.h
  3.  *
  4.  * Tim Krauskopf
  5.  *
  6.  * Storage declarations for diff operations
  7.  *
  8.  */
  9.  
  10. #include "stdio.h"
  11. #include "memory.h"
  12.  
  13. #define malloc(A) NewPtr(A)
  14. #define free(A) DisposPtr( (Ptr) A)
  15.  
  16.  
  17. typedef int int32;
  18. typedef unsigned int uint32;
  19.  
  20. struct lndiff {            /* data about segments in file */
  21.      int32
  22.         id,                /* unique checksum for line */
  23.         num;            /* segment number */
  24.     char
  25.         *ld;            /* data for line */
  26. };
  27.  
  28.  struct stdiff {
  29.      int32
  30.         len,            /* file length */
  31.         lines,            /* number of lines */
  32.         tsum,            /* total checksum of all lines */
  33.         curstart;        /* wrap around point to use */
  34.     int
  35.         fd;                /* file descriptor */
  36.     char
  37.         fn[256],        /* file name */
  38.         *store;            /* malloced space for text storage */
  39.     struct lndiff
  40.         *lstore;        /* malloced array of segment data elements */
  41.         
  42. };
  43.  
  44. typedef struct stdiff diffile;
  45.  
  46. #ifdef MASTERDEF
  47. int linealloc=3000;
  48.  
  49. #else
  50. extern int linealloc;
  51. #endif