/[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.2 - (show annotations)
Sat Mar 10 02:54:39 2001 UTC (16 years, 9 months ago) by bertho
Branch: MAIN
CVS Tags: REL_1_1_2, REL_1_1_1, REL_1_1_3
Changes since 1.1: +1 -0 lines
File MIME type: text/plain
- Fixed path problems. Cvsroot and module will always have a
  trailing '/' if they are not empty so that simple files
  can be addressed directly from the commandline. This also
  eases expansions.
- Implemented new features:
	* revisions can have custom text
	* background colors of boxes working
	* boxes can have shadow (looks nice)
	* imagemaps generate diff areas between revisions
- Several new config parameters to support above functionality.
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 } branch_t;
111
112 typedef struct __revision_t /* Logical revision structure */
113 {
114 delta_t *delta;
115 dtext_t *dtext;
116 rev_t *rev; /* Shortcut to delta->rev */
117 char *revtext; /* Expanded text to draw */
118 branch_t *branch; /* The branch this revision belongs to */
119 branch_t **branches; /* Branches from this revision */
120 int nbranches;
121 tag_t **tags; /* Symbolic tags */
122 int ntags;
123 int w, h; /* BBox width/height */
124 int cx, y; /* BBox center-top position */
125 } revision_t;
126
127 typedef struct __rcsfile_t
128 {
129 char *root; /* The CVS root directory */
130 char *module; /* The CVS module */
131 char *file; /* The CVS filename */
132 rev_t *head; /* Head revision */
133 rev_t *branch; /* Active branch (NULL if main trunk) */
134 ids_t *access; /* Access identifier(s) (NULL if none) */
135 tags_t *tags; /* Symbolic tags (NULL if none) */
136 idrevs_t *locks; /* Locks revisions (NULL if no locks) */
137 int strict; /* Locking strategy */
138 char *comment; /* File comment (NULL if none) */
139 char *expand; /* Keyword substitution (NULL if none, i.e. -kv) */
140 deltas_t *deltas; /* Delta admin */
141 char *desc; /* Eh... description of file? */
142 dtexts_t *dtexts; /* Diffs and logs */
143
144 /* Logical structure */
145 delta_t **sdelta; /* Sorted delta on revision */
146 int nsdelta;
147 dtext_t **sdtext; /* Sorted dtext on revision */
148 int nsdtext;
149 revision_t **srev; /* Sorted list of all revisions */
150 int nsrev;
151 branch_t **branches; /* List of branches */
152 branch_t *active; /* The active branch (translated branch of admin) */
153 int nbranches;
154 int tw, th; /* Total BBox width/height */
155 } rcsfile_t;
156
157 void set_id(void); /* Next scan is for an id */
158 void set_sym(void); /* Next scan is for a symbol */
159 void set_skip(void); /* Everyting until ';' dropped */
160 void set_skipstr(void); /* Next string must be dropped */
161
162 int rcslex(void);
163 int rcsparse(void);
164
165 extern FILE *rcsin;
166 extern rcsfile_t *rcsfile;
167
168 #endif

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0