home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / network / eqtree / treeload.h < prev   
C/C++ Source or Header  |  1994-01-18  |  1KB  |  57 lines

  1. /*
  2.  * TREELOAD.h
  3.  *
  4.  * Routinen zum einlesen und Bearbeiten von
  5.  * Verzeichnisbäumen.
  6.  *
  7.  * Autor: SG
  8.  * Stand: 25.1.93
  9.  *
  10.  */
  11.  
  12. #ifndef __TREELOAD_H
  13. #define __TREELOAD_H
  14.  
  15. #define INCL_DOS
  16. #define INCL_NOPM
  17. #include <os2.h>
  18.  
  19. #define TREQUAL     0
  20. #define TRNEWER     1
  21. #define TROLDER     2
  22. #define TRNEWSRC    3
  23. #define TRNEWDEST   4
  24.  
  25.  
  26. typedef struct trentry {
  27.     struct trentry *next;
  28.  
  29.     char      *File;
  30.     FDATE      Date;
  31.     FTIME      Time;
  32.     USHORT      Attrib;
  33. } TREntry;
  34.  
  35. typedef struct {
  36.     unsigned long EntryCount;
  37.     TREntry      *LastPos;
  38.     const char      *Base;
  39.     size_t      BaseLen;
  40.     TREntry      *Entries;
  41. } TRTree;
  42.  
  43. typedef int (*TRForEachFunc)(TRTree *Tree,TREntry *File);
  44. typedef int (*TRFuncEntry)(TRTree *TSource,TREntry *Source,TRTree *TDest,TREntry *Dest);
  45.  
  46. TRTree *TRLoadTree(const char *Directory);
  47.  
  48. int TRIsDir(TREntry *entry);
  49.  
  50. int TRForEach(TRTree *Tree,TRForEachFunc Function);
  51.  
  52. int TRCompare(TRTree *Source,TRTree *Dest,TRFuncEntry Functions[]);
  53.  
  54. int TRFree(TRTree *tree);
  55.  
  56. #endif
  57.