[BACK]Return to suff.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/suff.c between version 1.9 and 1.10

version 1.9, 1998/07/02 21:32:10 version 1.10, 1998/07/03 18:51:14
Line 168 
Line 168 
 static void SuffUnRef __P((ClientData, ClientData));  static void SuffUnRef __P((ClientData, ClientData));
 static void SuffFree __P((ClientData));  static void SuffFree __P((ClientData));
 static void SuffInsert __P((Lst, Suff *));  static void SuffInsert __P((Lst, Suff *));
 static void SuffRemove __P((Lst, Suff *));  static Suff *SuffRemove __P((Lst, Suff *));
 static Boolean SuffParseTransform __P((char *, Suff **, Suff **));  static Boolean SuffParseTransform __P((char *, Suff **, Suff **));
 static int SuffRebuildGraph __P((ClientData, ClientData));  static int SuffRebuildGraph __P((ClientData, ClientData));
 static int SuffAddSrc __P((ClientData, ClientData));  static int SuffAddSrc __P((ClientData, ClientData));
Line 370 
Line 370 
     if (s == emptySuff)      if (s == emptySuff)
         emptySuff = NULL;          emptySuff = NULL;
   
   #ifdef notdef
       /* We don't delete suffixes in order, so we cannot use this */
       if (s->refCount)
           Punt("Internal error deleting suffix `%s' with refcount = %d", s->name,
               s->refCount);
   #endif
   
     Lst_Destroy (s->ref, NOFREE);      Lst_Destroy (s->ref, NOFREE);
     Lst_Destroy (s->children, NOFREE);      Lst_Destroy (s->children, NOFREE);
     Lst_Destroy (s->parents, NOFREE);      Lst_Destroy (s->parents, NOFREE);
Line 392 
Line 399 
  *      suffix is possibly freed   *      suffix is possibly freed
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  */   */
 static void  static Suff *
 SuffRemove(l, s)  SuffRemove(l, s)
     Lst l;      Lst l;
     Suff *s;      Suff *s;
 {  {
     SuffUnRef((ClientData) l, (ClientData) s);      SuffUnRef((ClientData) l, (ClientData) s);
     if (s->refCount == 0)      if (s->refCount == 0) {
           SuffUnRef ((ClientData) sufflist, (ClientData) s);
         SuffFree((ClientData) s);          SuffFree((ClientData) s);
           s = NULL;
       }
       return (s);
 }  }
   
 /*-  /*-
Line 691 
Line 702 
          * We'll be called twice when the next target is seen, but .c and .o           * We'll be called twice when the next target is seen, but .c and .o
          * are only linked once...           * are only linked once...
          */           */
         if (t != suffNull)          s = SuffRemove(t->children, s);
             SuffRemove(t->children, s);  
   
         /*          /*
          * Remove the target from the source's parents list           * Remove the target from the source's parents list
          */           */
         if (s != suffNull)          if (s != NULL)
             SuffRemove(s->parents, t);              SuffRemove(s->parents, t);
     } else if ((gn->type & OP_TRANSFORM) && DEBUG(SUFF)) {      } else if ((gn->type & OP_TRANSFORM) && DEBUG(SUFF)) {
         printf("transformation %s complete\n", gn->name);          printf("transformation %s complete\n", gn->name);

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