diff options
author | Francesco Potortì <pot@gnu.org> | 2002-04-16 00:02:55 +0000 |
---|---|---|
committer | Francesco Potortì <pot@gnu.org> | 2002-04-16 00:02:55 +0000 |
commit | 03115db81e20ddb662db232bd29308c2b39fc220 (patch) | |
tree | 86d866b03237385f97f57f8b9bc68be805770736 /lib-src | |
parent | dad4ece6d53af2186f2ef4c0e853bcd40da1342c (diff) | |
download | emacs-03115db81e20ddb662db232bd29308c2b39fc220.tar.gz |
(find_entries): Bug fix in list management.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/etags.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 56d6136e21c..67dc1c651d6 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -33,7 +33,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ * Francesco Potortì <pot@gnu.org> has maintained it since 1993. */ -char pot_etags_version[] = "@(#) pot revision number is 15.13"; +char pot_etags_version[] = "@(#) pot revision number is 15.15"; #define TRUE 1 #define FALSE 0 @@ -1530,10 +1530,18 @@ process_file (file, lang) 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: - /* 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; @@ -1663,9 +1671,6 @@ find_entries (inf) { 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", @@ -1674,6 +1679,8 @@ find_entries (inf) /* 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); if (badfdp->infabsname != NULL) free (badfdp->infabsname); |