/[CvsGraph]/cvsgraph/rcs.h
ViewVC logotype

Annotate of /cvsgraph/rcs.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations)
Tue Jan 1 21:03:23 2002 UTC (15 years, 9 months ago) by bertho
Branch: MAIN
Changes since 1.3: +1 -0 lines
File MIME type: text/plain
Major code update to enable some more features. The new formatting scheme is
not yet 100%. This should be close to version 1.2.0.
1 bertho 1.1 /*
2     * CvsGraph graphical representation generator of brances and revisions
3     * of a file in cvs/rcs.
4     *
5     * Copyright (C) 2001 B. Stultiens
6     *
7     * This program is free software; you can redistribute it and/or modify
8     * it under the terms of the GNU General Public License as published by
9     * the Free Software Foundation; either version 2 of the License, or
10     * (at your option) any later version.
11     *
12     * This program is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with this program; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20     */
21     #ifndef __RCS_H
22     #define __RCS_H
23    
24     typedef struct __rev_t
25     {
26     char *branch;
27     char *rev;
28     int isbranch;
29     } rev_t;
30    
31     typedef struct __revs_t
32     {
33     rev_t **revs;
34     int nrevs;
35     } revs_t;
36    
37     typedef struct __tag_t
38     {
39     char *tag;
40     rev_t *rev;
41     } tag_t;
42    
43     typedef struct __tags_t
44     {
45     tag_t **tags;
46     int ntags;
47     } tags_t;
48    
49     typedef struct __idrev_t
50     {
51     char *id;
52     rev_t *rev;
53     } idrev_t;
54    
55     typedef struct __idrevs_t
56     {
57     idrev_t **idrevs;
58     int nidrevs;
59     } idrevs_t;
60    
61     typedef struct __ids_t
62     {
63     char **ids;
64     int nids;
65     } ids_t;
66    
67     typedef struct __dtext_t
68     {
69     rev_t *rev; /* Diff/log revision */
70     char *log; /* The log entry */
71     char *text; /* Diff text (only set if lexer send it) */
72     } dtext_t;
73    
74     typedef struct __dtexts_t
75     {
76     dtext_t **dtexts;
77     int ndtexts;
78     } dtexts_t;
79    
80     typedef struct __delta_t
81     {
82     rev_t *rev; /* Delta revision */
83     char *date;
84     char *author;
85     char *state;
86     revs_t *branches;
87     rev_t *next; /* Next delta in this branch */
88     int flag; /* Set if assigned a branch to prevent infinite recursion */
89     } delta_t;
90    
91     typedef struct __deltas_t
92     {
93     delta_t **deltas;
94     int ndeltas;
95     } deltas_t;
96    
97     struct __revision_t; /* Forward */
98    
99     typedef struct __branch_t /* Logical branch structure */
100     {
101     struct __revision_t **revs;
102     int nrevs;
103     struct __revision_t *branchpoint; /* Backlink to revision that spawned the branch */
104     rev_t *branch;/* Branch id */
105     tag_t **tags; /* Symbolic tags */
106     int ntags;
107     int w, h; /* BBox width/height */
108     int cx, y; /* BBox center-top position */
109     int tw, th; /* Total BBox width/height */
110 bertho 1.4 int flag; /* Layout flag */
111 bertho 1.1 } branch_t;
112    
113     typedef struct __revision_t /* Logical revision structure */
114     {
115     delta_t *delta;
116     dtext_t *dtext;
117     rev_t *rev; /* Shortcut to delta->rev */
118 bertho 1.2 char *revtext; /* Expanded text to draw */
119 bertho 1.1 branch_t *branch; /* The branch this revision belongs to */
120     branch_t **branches; /* Branches from this revision */
121     int nbranches;
122     tag_t **tags; /* Symbolic tags */
123     int ntags;
124     int w, h; /* BBox width/height */
125     int cx, y; /* BBox center-top position */
126 bertho 1.3 int stripped; /* Set if we jumped revisions due to strip_untagged */
127 bertho 1.1 } revision_t;
128    
129     typedef struct __rcsfile_t
130     {
131     char *root; /* The CVS root directory */
132     char *module; /* The CVS module */
133     char *file; /* The CVS filename */
134     rev_t *head; /* Head revision */
135     rev_t *branch; /* Active branch (NULL if main trunk) */
136     ids_t *access; /* Access identifier(s) (NULL if none) */
137     tags_t *tags; /* Symbolic tags (NULL if none) */
138     idrevs_t *locks; /* Locks revisions (NULL if no locks) */
139     int strict; /* Locking strategy */
140     char *comment; /* File comment (NULL if none) */
141     char *expand; /* Keyword substitution (NULL if none, i.e. -kv) */
142     deltas_t *deltas; /* Delta admin */
143     char *desc; /* Eh... description of file? */
144     dtexts_t *dtexts; /* Diffs and logs */
145    
146     /* Logical structure */
147     delta_t **sdelta; /* Sorted delta on revision */
148     int nsdelta;
149     dtext_t **sdtext; /* Sorted dtext on revision */
150     int nsdtext;
151     revision_t **srev; /* Sorted list of all revisions */
152     int nsrev;
153     branch_t **branches; /* List of branches */
154     branch_t *active; /* The active branch (translated branch of admin) */
155     int nbranches;
156     int tw, th; /* Total BBox width/height */
157     } rcsfile_t;
158    
159     void set_id(void); /* Next scan is for an id */
160     void set_sym(void); /* Next scan is for a symbol */
161     void set_skip(void); /* Everyting until ';' dropped */
162     void set_skipstr(void); /* Next string must be dropped */
163    
164     int rcslex(void);
165     int rcsparse(void);
166    
167     extern FILE *rcsin;
168     extern rcsfile_t *rcsfile;
169    
170     #endif

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0