[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lib-src/etags.c
From: |
Francesco Potortì |
Subject: |
[Emacs-diffs] Changes to emacs/lib-src/etags.c |
Date: |
Mon, 15 Apr 2002 20:02:56 -0400 |
Index: emacs/lib-src/etags.c
diff -c emacs/lib-src/etags.c:3.14 emacs/lib-src/etags.c:3.15
*** emacs/lib-src/etags.c:3.14 Mon Apr 15 12:04:52 2002
--- emacs/lib-src/etags.c Mon Apr 15 20:02:55 2002
***************
*** 33,39 ****
* Francesco Potortì <address@hidden> has maintained it since 1993.
*/
! char pot_etags_version[] = "@(#) pot revision number is 15.13";
#define TRUE 1
#define FALSE 0
--- 33,39 ----
* Francesco Potortì <address@hidden> has maintained it since 1993.
*/
! char pot_etags_version[] = "@(#) pot revision number is 15.15";
#define TRUE 1
#define FALSE 0
***************
*** 1530,1539 ****
if (retval < 0)
pfatal (file);
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. */
if (compressed_name) free (compressed_name);
if (uncompressed_name) free (uncompressed_name);
return;
--- 1530,1547 ----
if (retval < 0)
pfatal (file);
+ /* If not Ctags, and if this is not metasource and if it contained no #line
+ directives, we can write the tags and free curfdp an all nodes pointing
to
+ it. */
+ if (!CTAGS
+ && curfdp == fdhead /* no #line directives in this file */
+ && !curfdp->lang->metasource)
+ {
+ /* Write tags for file curfdp->taggedfname. */
+ ;
+ }
+
cleanup:
if (compressed_name) free (compressed_name);
if (uncompressed_name) free (uncompressed_name);
return;
***************
*** 1663,1671 ****
{
fdesc *badfdp = *fdpp;
- *fdpp = badfdp->next; /* remove the bad description from the list */
- fdpp = &badfdp->next; /* advance the list pointer */
-
if (DEBUG)
fprintf (stderr,
"Removing references to \"%s\" obtained from \"%s\"\n",
--- 1671,1676 ----
***************
*** 1673,1678 ****
--- 1678,1685 ----
/* Delete the tags referring to badfdp. */
invalidate_nodes (badfdp, nodehead);
+
+ *fdpp = badfdp->next; /* remove the bad description from the list */
/* Delete badfdp. */
if (badfdp->infname != NULL) free (badfdp->infname);