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 |
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; |
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", |
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); |