/[emacs]/emacs/lib-src/etags.c
ViewVC logotype

Diff of /emacs/lib-src/etags.c

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

revision 3.14 by pot, Mon Apr 15 16:04:52 2002 UTC revision 3.15 by pot, Tue Apr 16 00:02:55 2002 UTC
# Line 33  Inc., 59 Temple Place - Suite 330, Bosto Line 33  Inc., 59 Temple Place - Suite 330, Bosto
33   *      Francesco Potort́ <pot@gnu.org> has maintained it since 1993.   *      Francesco Potort́ <pot@gnu.org> has maintained it since 1993.
34   */   */
35    
36  char pot_etags_version[] = "@(#) pot revision number is 15.13";  char pot_etags_version[] = "@(#) pot revision number is 15.15";
37    
38  #define TRUE    1  #define TRUE    1
39  #define FALSE   0  #define FALSE   0
# Line 1530  process_file (file, lang) Line 1530  process_file (file, lang)
1530    if (retval < 0)    if (retval < 0)
1531      pfatal (file);      pfatal (file);
1532    
1533      /* If not Ctags, and if this is not metasource and if it contained no #line
1534         directives, we can write the tags and free curfdp an all nodes pointing to
1535         it. */
1536      if (!CTAGS
1537          && curfdp == fdhead       /* no #line directives in this file */
1538          && !curfdp->lang->metasource)
1539        {
1540          /* Write tags for file curfdp->taggedfname. */
1541          ;
1542        }
1543    
1544   cleanup:   cleanup:
   /* Memory leak here: if this is not metasource and if it contained no #line  
      directives, curfdp could be freed, and so could all nodes pointing to it  
      if not CTAGS. */  
1545    if (compressed_name) free (compressed_name);    if (compressed_name) free (compressed_name);
1546    if (uncompressed_name) free (uncompressed_name);    if (uncompressed_name) free (uncompressed_name);
1547    return;    return;
# Line 1663  find_entries (inf) Line 1671  find_entries (inf)
1671            {            {
1672              fdesc *badfdp = *fdpp;              fdesc *badfdp = *fdpp;
1673    
             *fdpp = badfdp->next; /* remove the bad description from the list */  
             fdpp = &badfdp->next; /* advance the list pointer */  
   
1674              if (DEBUG)              if (DEBUG)
1675                fprintf (stderr,                fprintf (stderr,
1676                         "Removing references to \"%s\" obtained from \"%s\"\n",                         "Removing references to \"%s\" obtained from \"%s\"\n",
# Line 1674  find_entries (inf) Line 1679  find_entries (inf)
1679              /* Delete the tags referring to badfdp. */              /* Delete the tags referring to badfdp. */
1680              invalidate_nodes (badfdp, nodehead);              invalidate_nodes (badfdp, nodehead);
1681    
1682                *fdpp = badfdp->next; /* remove the bad description from the list */
1683    
1684              /* Delete badfdp. */              /* Delete badfdp. */
1685              if (badfdp->infname != NULL) free (badfdp->infname);              if (badfdp->infname != NULL) free (badfdp->infname);
1686              if (badfdp->infabsname != NULL) free (badfdp->infabsname);              if (badfdp->infabsname != NULL) free (badfdp->infabsname);

Legend:
Removed from v.3.14  
changed lines
  Added in v.3.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26