/[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.10, Thu Oct 21 21:40:35 2004 UTC revision 1.11, Mon Jun 13 19:57:10 2005 UTC
# Line 48  Line 48 
48  static dtexts_t *add_dtexts(dtexts_t *s, dtext_t *t);  static dtexts_t *add_dtexts(dtexts_t *s, dtext_t *t);
49  static phrase_t *new_phrase(phrase_type_e pt, char *t);  static phrase_t *new_phrase(phrase_type_e pt, char *t);
50  static phrases_t *add_phrases(phrases_t *s, phrase_t *t);  static phrases_t *add_phrases(phrases_t *s, phrase_t *t);
51    static phrases_t *merge_phrases(phrases_t *s, phrases_t *t);
52  static delta_t *new_delta(char *rev, char *date, char *author, char *state, revs_t *branches, char *next, phrases_t *phrases);  static delta_t *new_delta(char *rev, char *date, char *author, char *state, revs_t *branches, char *next, phrases_t *phrases);
53  static deltas_t *add_deltas(deltas_t *s, delta_t *t);  static deltas_t *add_deltas(deltas_t *s, delta_t *t);
54  static rcsfile_t *new_rcsfile(char *head, char *branch, ids_t *access, tags_t *tags,  static rcsfile_t *new_rcsfile(char *head, char *branch, ids_t *access, tags_t *tags,
# Line 78  Line 79 
79  %token tDESC tLOG tTEXT  %token tDESC tLOG tTEXT
80  %token tOWNER tGROUP tPERMISSIONS tSPECIAL tSYMLINK tHARDLINKS  %token tOWNER tGROUP tPERMISSIONS tSPECIAL tSYMLINK tHARDLINKS
81  %token tNAMESPACE tDEAD tMERGEPOINT  %token tNAMESPACE tDEAD tMERGEPOINT
82  %token tDELTATYPE tCOMMITID tKOPT tFILENAME  %token tDELTATYPE tCOMMITID tKOPT tFILENAME tPROPERTIES
83  %token <str> tNEWPHRASE  %token <str> tNEWPHRASE
84  %token <str> tSTRING tREV tID tSYM  %token <str> tSTRING tREV tID tSYM
85    
# Line 174  Line 175 
175            tAUTHOR { set_author(); } idorstr ';'            tAUTHOR { set_author(); } idorstr ';'
176            tSTATE  { set_id(); } oid ';'            tSTATE  { set_id(); } oid ';'
177            tBRANCHES orevs ';'            tBRANCHES orevs ';'
178              ophrases
179            tNEXT orev ';'            tNEXT orev ';'
180            ophrases                      { $$ = new_delta($1, $3, $7, $11, $14, $17, $19); }            ophrases                      { $$ = new_delta($1, $3, $7, $11, $14, $18, merge_phrases($16, $20)); }
181          ;          ;
182    
183  idorstr : tID                           { $$ = $1; }  idorstr : tID                           { $$ = $1; }
# Line 223  Line 225 
225          | tCOMMITID          | tCOMMITID
226          | tKOPT          | tKOPT
227          | tFILENAME          | tFILENAME
228            | tPROPERTIES
229          ;          ;
230    
231  ostr    : /* Empty */                   { $$ = NULL; }  ostr    : /* Empty */                   { $$ = NULL; }
# Line 470  Line 473 
473          return s;          return s;
474  }  }
475    
476    static phrases_t *merge_phrases(phrases_t *s, phrases_t *t)
477    {
478            if(!t)
479                    return s;
480            if(!s)
481                    return t;
482            s->phrases = xrealloc(s->phrases, (s->nphrases + t->nphrases) * sizeof(s->phrases[0]));
483            memcpy(&s->phrases[s->nphrases], &t->phrases[0], t->nphrases * sizeof(t->phrases[0]));
484            s->nphrases += t->nphrases;
485            /* FIXME: Free t and content; hm, who cares... */
486            return s;
487    }
488    
489  static phrase_t *find_mergepoint(phrases_t *p)  static phrase_t *find_mergepoint(phrases_t *p)
490  {  {
491          int i;          int i;

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0