comparison lib-src/etags.c @ 90261:7beb78bc1f8e

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 616-696) - Add lisp/mh-e/.arch-inventory - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords. - lisp/gnus/ChangeLog: Remove duplicate entry * gnus--rel--5.10 (patch 147-181) - Update from CVS - Merge from emacs--cvs-trunk--0 - Update from CVS: lisp/mml.el (mml-preview): Doc fix. - Update from CVS: texi/message.texi: Fix default values. - Update from CVS: texi/gnus.texi (RSS): Addition.
author Miles Bader <miles@gnu.org>
date Mon, 16 Jan 2006 08:37:27 +0000
parents 0ca0d9181b5e bf8620d8ff03
children c5406394f567
comparison
equal deleted inserted replaced
90260:0ca0d9181b5e 90261:7beb78bc1f8e
39 * If you want to add support for a new language, start by looking at the LUA 39 * If you want to add support for a new language, start by looking at the LUA
40 * language, which is the simplest. Alternatively, consider shipping a 40 * language, which is the simplest. Alternatively, consider shipping a
41 * configuration file containing regexp definitions for etags. 41 * configuration file containing regexp definitions for etags.
42 */ 42 */
43 43
44 char pot_etags_version[] = "@(#) pot revision number is 17.14"; 44 char pot_etags_version[] = "@(#) pot revision number is 17.15";
45 45
46 #define TRUE 1 46 #define TRUE 1
47 #define FALSE 0 47 #define FALSE 0
48 48
49 #ifdef DEBUG 49 #ifdef DEBUG
477 static bool ignoreindent; /* -I: ignore indentation in C */ 477 static bool ignoreindent; /* -I: ignore indentation in C */
478 static bool packages_only; /* --packages-only: in Ada, only tag packages*/ 478 static bool packages_only; /* --packages-only: in Ada, only tag packages*/
479 479
480 /* STDIN is defined in LynxOS system headers */ 480 /* STDIN is defined in LynxOS system headers */
481 #ifdef STDIN 481 #ifdef STDIN
482 #undef STDIN 482 # undef STDIN
483 #endif 483 #endif
484 484
485 #define STDIN 0x1001 /* returned by getopt_long on --parse-stdin */ 485 #define STDIN 0x1001 /* returned by getopt_long on --parse-stdin */
486 static bool parsing_stdin; /* --parse-stdin used */ 486 static bool parsing_stdin; /* --parse-stdin used */
487 487
992 tag file than to use this."); 992 tag file than to use this.");
993 993
994 if (CTAGS) 994 if (CTAGS)
995 { 995 {
996 puts ("-v, --vgrind\n\ 996 puts ("-v, --vgrind\n\
997 Generates an index of items intended for human consumption,\n\ 997 Print on the standard output an index of items intended for\n\
998 similar to the output of vgrind. The index is sorted, and\n\ 998 human consumption, similar to the output of vgrind. The index\n\
999 gives the page number of each item."); 999 is sorted, and gives the page number of each item.");
1000 puts ("-w, --no-warn\n\ 1000 puts ("-w, --no-warn\n\
1001 Suppress warning messages about entries defined in multiple\n\ 1001 Suppress warning messages about entries defined in multiple\n\
1002 files."); 1002 files.");
1003 puts ("-x, --cxref\n\ 1003 puts ("-x, --cxref\n\
1004 Like --vgrind, but in the style of cxref, rather than vgrind.\n\ 1004 Like --vgrind, but in the style of cxref, rather than vgrind.\n\
1426 free (filebuf.buffer); 1426 free (filebuf.buffer);
1427 free (token_name.buffer); 1427 free (token_name.buffer);
1428 1428
1429 if (!CTAGS || cxref_style) 1429 if (!CTAGS || cxref_style)
1430 { 1430 {
1431 put_entries (nodehead); /* write the remaining tags (ETAGS) */ 1431 /* Write the remaining tags to tagf (ETAGS) or stdout (CXREF). */
1432 put_entries (nodehead);
1432 free_tree (nodehead); 1433 free_tree (nodehead);
1433 nodehead = NULL; 1434 nodehead = NULL;
1434 if (!CTAGS) 1435 if (!CTAGS)
1435 { 1436 {
1436 fdesc *fdp; 1437 fdesc *fdp;
1440 if (!fdp->written) 1441 if (!fdp->written)
1441 fprintf (tagf, "\f\n%s,0\n", fdp->taggedfname); 1442 fprintf (tagf, "\f\n%s,0\n", fdp->taggedfname);
1442 1443
1443 while (nincluded_files-- > 0) 1444 while (nincluded_files-- > 0)
1444 fprintf (tagf, "\f\n%s,include\n", *included_files++); 1445 fprintf (tagf, "\f\n%s,include\n", *included_files++);
1446
1447 if (fclose (tagf) == EOF)
1448 pfatal (tagfile);
1445 } 1449 }
1446 1450
1447 if (fclose (tagf) == EOF)
1448 pfatal (tagfile);
1449 exit (EXIT_SUCCESS); 1451 exit (EXIT_SUCCESS);
1450 } 1452 }
1451 1453
1452 if (update) 1454 if (update)
1453 { 1455 {