/[CvsGraph]/cvsgraph/rcsy.y
ViewVC logotype

Diff of /cvsgraph/rcsy.y

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

revision 1.7, Thu Aug 5 09:48:32 2004 UTC revision 1.8, Wed Oct 20 19:31:10 2004 UTC
# Line 269  Line 269 
269          ;          ;
270    
271  %%  %%
272  static rev_t *make_rev(char *s)  static rev_t *make_rev(char *s, int isrev)
273  {  {
274          char *cptr;          char *cptr;
275          int dots = 0;          int dots = 0;
# Line 305  Line 305 
305                  assert(cptr != NULL);                  assert(cptr != NULL);
306                  *cptr = '\0';                  *cptr = '\0';
307                  t = strrchr(r->branch, '.');                  t = strrchr(r->branch, '.');
308                  if((t&& !strcmp(t+1, "0")) || (!t && !strcmp(r->branch, "0")))                  if(!isrev && ((t && !strcmp(t+1, "0")) || (!t && !strcmp(r->branch, "0"))))
309                  {                  {
310                          /* Magic branch numbers "x.x.0.x" */                          /* Magic branch numbers "x.x.0.x" */
311                          r->isbranch = 1;                          r->isbranch = 1;
# Line 331  Line 331 
331  {  {
332          tag_t *t = xmalloc(sizeof(*t));          tag_t *t = xmalloc(sizeof(*t));
333          t->tag = s;          t->tag = s;
334          t->rev = make_rev(r);          t->rev = make_rev(r, 0);
335          return t;          return t;
336  }  }
337    
# Line 358  Line 358 
358  {  {
359          idrev_t *t = xmalloc(sizeof(*t));          idrev_t *t = xmalloc(sizeof(*t));
360          t->id = s;          t->id = s;
361          t->rev = make_rev(r);          t->rev = make_rev(r, 1);
362          return t;          return t;
363  }  }
364    
# Line 403  Line 403 
403          revs_t *t = xmalloc(sizeof(*t));          revs_t *t = xmalloc(sizeof(*t));
404          t->nrevs = 1;          t->nrevs = 1;
405          t->revs = xmalloc(sizeof(t->revs[0]));          t->revs = xmalloc(sizeof(t->revs[0]));
406          t->revs[0] = make_rev(s);          t->revs[0] = make_rev(s, 1);
407          return t;          return t;
408  }  }
409    
410  static revs_t *add_revs(revs_t *s, char *t)  static revs_t *add_revs(revs_t *s, char *t)
411  {  {
412          s->revs = xrealloc(s->revs, (s->nrevs+1) * sizeof(s->revs[0]));          s->revs = xrealloc(s->revs, (s->nrevs+1) * sizeof(s->revs[0]));
413          s->revs[s->nrevs] = make_rev(t);          s->revs[s->nrevs] = make_rev(t, 1);
414          s->nrevs++;          s->nrevs++;
415          return s;          return s;
416  }  }
# Line 418  Line 418 
418  static dtext_t *new_dtext(char *n, char *l, char *t)  static dtext_t *new_dtext(char *n, char *l, char *t)
419  {  {
420          dtext_t *d = xmalloc(sizeof(*d));          dtext_t *d = xmalloc(sizeof(*d));
421          d->rev = make_rev(n);          d->rev = make_rev(n, 1);
422          d->log = l;          d->log = l;
423          d->text = t;          d->text = t;
424          return d;          return d;
# Line 437  Line 437 
437  static delta_t *new_delta(char *rev, char *date, char *author, char *state, revs_t *branches, char *next)  static delta_t *new_delta(char *rev, char *date, char *author, char *state, revs_t *branches, char *next)
438  {  {
439          delta_t *d = xmalloc(sizeof(*d));          delta_t *d = xmalloc(sizeof(*d));
440          d->rev = make_rev(rev);          d->rev = make_rev(rev, 1);
441          d->date = date;          d->date = date;
442          d->author = author;          d->author = author;
443          d->state = state;          d->state = state;
444          d->branches = branches;          d->branches = branches;
445          d->next = make_rev(next);          d->next = make_rev(next, 1);
446          return d;          return d;
447  }  }
448    
# Line 460  Line 460 
460                                  idrevs_t *locks, int strict, char *comment, char *expand)                                  idrevs_t *locks, int strict, char *comment, char *expand)
461  {  {
462          rcsfile_t *r = xmalloc(sizeof(*r));          rcsfile_t *r = xmalloc(sizeof(*r));
463          r->head = make_rev(head);          r->head = make_rev(head, 1);
464          r->branch = make_rev(branch);          r->branch = make_rev(branch, 0);
465          r->access = access;          r->access = access;
466          r->tags = tags;          r->tags = tags;
467          r->locks = locks;          r->locks = locks;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0