diff 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
line wrap: on
line diff
--- a/lib-src/etags.c	Mon Jan 16 06:59:21 2006 +0000
+++ b/lib-src/etags.c	Mon Jan 16 08:37:27 2006 +0000
@@ -41,7 +41,7 @@
  * configuration file containing regexp definitions for etags.
  */
 
-char pot_etags_version[] = "@(#) pot revision number is 17.14";
+char pot_etags_version[] = "@(#) pot revision number is 17.15";
 
 #define	TRUE	1
 #define	FALSE	0
@@ -479,7 +479,7 @@
 
 /* STDIN is defined in LynxOS system headers */
 #ifdef STDIN
-#undef STDIN
+# undef STDIN
 #endif
 
 #define STDIN 0x1001		/* returned by getopt_long on --parse-stdin */
@@ -994,9 +994,9 @@
   if (CTAGS)
     {
       puts ("-v, --vgrind\n\
-        Generates an index of items intended for human consumption,\n\
-        similar to the output of vgrind.  The index is sorted, and\n\
-        gives the page number of each item.");
+        Print on the standard output an index of items intended for\n\
+        human consumption, similar to the output of vgrind.  The index\n\
+        is sorted, and gives the page number of each item.");
       puts ("-w, --no-warn\n\
         Suppress warning messages about entries defined in multiple\n\
         files.");
@@ -1428,7 +1428,8 @@
 
   if (!CTAGS || cxref_style)
     {
-      put_entries (nodehead);	/* write the remaining tags (ETAGS) */
+      /* Write the remaining tags to tagf (ETAGS) or stdout (CXREF). */
+      put_entries (nodehead);
       free_tree (nodehead);
       nodehead = NULL;
       if (!CTAGS)
@@ -1442,10 +1443,11 @@
 
 	  while (nincluded_files-- > 0)
 	    fprintf (tagf, "\f\n%s,include\n", *included_files++);
+
+	  if (fclose (tagf) == EOF)
+	    pfatal (tagfile);
 	}
 
-      if (fclose (tagf) == EOF)
-	pfatal (tagfile);
       exit (EXIT_SUCCESS);
     }