home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / cvs-1.8.7-src.tgz / tar.out / fsf / cvs / src / rcs.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  4KB  |  109 lines

  1. /* $CVSid: @(#)rcs.h 1.18 94/09/23 $     */
  2.  
  3. /*
  4.  * Copyright (c) 1992, Brian Berliner and Jeff Polk
  5.  * Copyright (c) 1989-1992, Brian Berliner
  6.  * 
  7.  * You may distribute under the terms of the GNU General Public License as
  8.  * specified in the README file that comes with the CVS 1.4 kit.
  9.  * 
  10.  * RCS source control definitions needed by rcs.c and friends
  11.  */
  12.  
  13. #define    RCS        "rcs"
  14. #define    RCS_CI        "ci"
  15. #define    RCS_CO        "co"
  16. #define    RCS_DIFF    "rcsdiff"
  17. #define    RCS_RCSMERGE    "rcsmerge"
  18. #define    RCS_MERGE_PAT    "^>>>>>>> "    /* runs "grep" with this pattern */
  19. #define    RCSEXT        ",v"
  20. #define RCSPAT        "*,v"
  21. #define    RCSHEAD        "head"
  22. #define    RCSBRANCH    "branch"
  23. #define    RCSSYMBOLS    "symbols"
  24. #define    RCSDATE        "date"
  25. #define    RCSDESC        "desc"
  26. #define RCSEXPAND    "expand"
  27.  
  28. /* Used by the version of death support which resulted from old
  29.    versions of CVS (e.g. 1.5 if you define DEATH_SUPPORT and not
  30.    DEATH_STATE).  Only a hacked up RCS (used by those old versions of
  31.    CVS) will put this into RCS files.  Considered obsolete.  */
  32. #define RCSDEAD        "dead"
  33.  
  34. #define    DATEFORM    "%02d.%02d.%02d.%02d.%02d.%02d"
  35. #define    SDATEFORM    "%d.%d.%d.%d.%d.%d"
  36.  
  37. /*
  38.  * Opaque structure definitions used by RCS specific lookup routines
  39.  */
  40. #define VALID    0x1            /* flags field contains valid data */
  41. #define    INATTIC    0x2            /* RCS file is located in the Attic */
  42. #define PARTIAL 0x4            /* RCS file not completly parsed */
  43.  
  44. struct rcsnode
  45. {
  46.     int refcount;
  47.     int flags;
  48.     char *path;
  49.     char *head;
  50.     char *branch;
  51.     char *symbols_data;
  52.     char *expand;
  53.     List *symbols;
  54.     List *versions;
  55.     long delta_pos;
  56.     List *other;
  57. };
  58.  
  59. typedef struct rcsnode RCSNode;
  60.  
  61. struct rcsversnode
  62. {
  63.     char *version;
  64.     char *date;
  65.     char *author;
  66.     char *next;
  67.     int dead;
  68.     List *branches;
  69.     List *other;
  70. };
  71. typedef struct rcsversnode RCSVers;
  72.  
  73. /*
  74.  * CVS reserves all even-numbered branches for its own use.  "magic" branches
  75.  * (see rcs.c) are contained as virtual revision numbers (within symbolic
  76.  * tags only) off the RCS_MAGIC_BRANCH, which is 0.  CVS also reserves the
  77.  * ".1" branch for vendor revisions.  So, if you do your own branching, you
  78.  * should limit your use to odd branch numbers starting at 3.
  79.  */
  80. #define    RCS_MAGIC_BRANCH    0
  81.  
  82. /*
  83.  * exported interfaces
  84.  */
  85. RCSNode *RCS_parse PROTO((const char *file, const char *repos));
  86. RCSNode *RCS_parsercsfile PROTO((char *rcsfile));
  87. void RCS_fully_parse PROTO((RCSNode *));
  88. char *RCS_check_kflag PROTO((const char *arg));
  89. char *RCS_getdate PROTO((RCSNode * rcs, char *date, int force_tag_match));
  90. char *RCS_gettag PROTO((RCSNode * rcs, char *symtag, int force_tag_match,
  91.             int return_both));
  92. char *RCS_getversion PROTO((RCSNode * rcs, char *tag, char *date,
  93.               int force_tag_match, int return_both));
  94. char *RCS_magicrev PROTO((RCSNode *rcs, char *rev));
  95. int RCS_isbranch PROTO((RCSNode *rcs, const char *rev));
  96. int RCS_nodeisbranch PROTO((RCSNode *rcs, const char *tag));
  97. char *RCS_whatbranch PROTO((RCSNode *rcs, const char *tag));
  98. char *RCS_head PROTO((RCSNode * rcs));
  99. int RCS_datecmp PROTO((char *date1, char *date2));
  100. time_t RCS_getrevtime PROTO((RCSNode * rcs, char *rev, char *date, int fudge));
  101. List *RCS_symbols PROTO((RCSNode *rcs));
  102. void RCS_check_tag PROTO((const char *tag));
  103. void freercsnode PROTO((RCSNode ** rnodep));
  104. char *RCS_getbranch PROTO((RCSNode * rcs, char *tag, int force_tag_match));
  105.  
  106. int RCS_isdead PROTO((RCSNode *, const char *));
  107. char *RCS_getexpand PROTO ((RCSNode *));
  108. int RCS_fast_checkout PROTO ((RCSNode *, char *, char *, char *, char *, int));
  109.