/[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.11 - (hide annotations)
Sun Aug 15 16:58:22 2004 UTC (13 years, 2 months ago) by bertho
Branch: MAIN
CVS Tags: REL_1_5_0
Changes since 1.10: +2 -0 lines
File MIME type: text/plain
- Added drawing of partial trees. You now can select a subtree based on a
  revision number, branch number or symbolic tag to show only that part of the
  tree. New config option branch_subtree selects which part is shown. If the
  subtree is empty, then the whole tree is shown.

- Most error and warning messages are now displayed in the graph, instead of
  being written to stderr. This enables you to see an image eventhough errors
  might be present. The old method would generate a corrupt image.
  New configuration options include msg_color and msg_font to control the looks
  of it. Messages are always printed at the bottom of the image.

- Fixed a bug in the folding code where subtrees would not fold correctly.

- Added diff links in the map-generation for detected merges so that you can
  get the differences in merge-operations. The options map_merge_href and
  map_merge_alt must be set accordingly.
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 bertho 1.6 struct __revision_t; /* Forward */
25    
26 bertho 1.1 typedef struct __rev_t
27     {
28     char *branch;
29     char *rev;
30     int isbranch;
31     } rev_t;
32    
33     typedef struct __revs_t
34     {
35     rev_t **revs;
36     int nrevs;
37     } revs_t;
38    
39     typedef struct __tag_t
40     {
41 bertho 1.6 char *tag;
42     rev_t *rev;
43     struct __revision_t *logrev; /* backpointer to logical revision */
44 bertho 1.7 int yofs; /* Internal drawing offset to center of the tag */
45 bertho 1.10 int ignore; /* This tag is marked ignored for drawing */
46 bertho 1.1 } tag_t;
47    
48     typedef struct __tags_t
49     {
50     tag_t **tags;
51     int ntags;
52     } tags_t;
53    
54 bertho 1.6 typedef struct __merge_t
55     {
56     tag_t *to; /* This tag is destination of a merge */
57     tag_t *from; /* This tag is origin of a merge */
58     } merge_t;
59    
60 bertho 1.1 typedef struct __idrev_t
61     {
62     char *id;
63     rev_t *rev;
64     } idrev_t;
65    
66     typedef struct __idrevs_t
67     {
68     idrev_t **idrevs;
69     int nidrevs;
70     } idrevs_t;
71    
72     typedef struct __ids_t
73     {
74     char **ids;
75     int nids;
76     } ids_t;
77    
78     typedef struct __dtext_t
79     {
80     rev_t *rev; /* Diff/log revision */
81     char *log; /* The log entry */
82     char *text; /* Diff text (only set if lexer send it) */
83     } dtext_t;
84    
85     typedef struct __dtexts_t
86     {
87     dtext_t **dtexts;
88     int ndtexts;
89     } dtexts_t;
90    
91     typedef struct __delta_t
92     {
93     rev_t *rev; /* Delta revision */
94     char *date;
95     char *author;
96     char *state;
97     revs_t *branches;
98     rev_t *next; /* Next delta in this branch */
99     int flag; /* Set if assigned a branch to prevent infinite recursion */
100     } delta_t;
101    
102     typedef struct __deltas_t
103     {
104     delta_t **deltas;
105     int ndeltas;
106     } deltas_t;
107    
108     typedef struct __branch_t /* Logical branch structure */
109     {
110     struct __revision_t **revs;
111     int nrevs;
112     struct __revision_t *branchpoint; /* Backlink to revision that spawned the branch */
113 bertho 1.8 rev_t *branch; /* Branch id */
114     tag_t **tags; /* Symbolic tags */
115 bertho 1.1 int ntags;
116 bertho 1.11 int subtree_draw; /* Set if subtree drawing should draw this branch */
117 bertho 1.8 int folded; /* Set if this branch is folded in another box */
118 bertho 1.11 struct __branch_t *folded_to; /* Set to the branch where this one is folded into */
119 bertho 1.8 struct __branch_t **folds; /* List of other branches folded into this one */
120     int nfolds;
121     int fw; /* Max width of the branch number if folds present */
122     int w, h; /* BBox width/height */
123     int cx, y; /* BBox center-top position */
124     int tw, th; /* Total BBox width/height */
125 bertho 1.1 } branch_t;
126    
127     typedef struct __revision_t /* Logical revision structure */
128     {
129     delta_t *delta;
130     dtext_t *dtext;
131     rev_t *rev; /* Shortcut to delta->rev */
132 bertho 1.2 char *revtext; /* Expanded text to draw */
133 bertho 1.1 branch_t *branch; /* The branch this revision belongs to */
134     branch_t **branches; /* Branches from this revision */
135     int nbranches;
136     tag_t **tags; /* Symbolic tags */
137     int ntags;
138     int w, h; /* BBox width/height */
139     int cx, y; /* BBox center-top position */
140 bertho 1.3 int stripped; /* Set if we jumped revisions due to strip_untagged */
141 bertho 1.1 } revision_t;
142    
143     typedef struct __rcsfile_t
144     {
145     char *root; /* The CVS root directory */
146     char *module; /* The CVS module */
147     char *file; /* The CVS filename */
148     rev_t *head; /* Head revision */
149     rev_t *branch; /* Active branch (NULL if main trunk) */
150     ids_t *access; /* Access identifier(s) (NULL if none) */
151     tags_t *tags; /* Symbolic tags (NULL if none) */
152     idrevs_t *locks; /* Locks revisions (NULL if no locks) */
153     int strict; /* Locking strategy */
154     char *comment; /* File comment (NULL if none) */
155     char *expand; /* Keyword substitution (NULL if none, i.e. -kv) */
156     deltas_t *deltas; /* Delta admin */
157     char *desc; /* Eh... description of file? */
158     dtexts_t *dtexts; /* Diffs and logs */
159    
160     /* Logical structure */
161     delta_t **sdelta; /* Sorted delta on revision */
162     int nsdelta;
163     dtext_t **sdtext; /* Sorted dtext on revision */
164     int nsdtext;
165     revision_t **srev; /* Sorted list of all revisions */
166     int nsrev;
167     branch_t **branches; /* List of branches */
168     branch_t *active; /* The active branch (translated branch of admin) */
169     int nbranches;
170 bertho 1.6 merge_t *merges; /* Merge tags from->to description */
171     int nmerges;
172 bertho 1.1 int tw, th; /* Total BBox width/height */
173     } rcsfile_t;
174    
175     void set_id(void); /* Next scan is for an id */
176 bertho 1.9 void set_author(void); /* Next scan is for an author */
177 bertho 1.1 void set_sym(void); /* Next scan is for a symbol */
178     void set_skip(void); /* Everyting until ';' dropped */
179     void set_skipstr(void); /* Next string must be dropped */
180    
181     int rcslex(void);
182     int rcsparse(void);
183    
184     extern FILE *rcsin;
185     extern rcsfile_t *rcsfile;
186    
187     #endif

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0