summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>2005-09-27 20:18:49 +0000
committerFrancesco Potortì <pot@gnu.org>2005-09-27 20:18:49 +0000
commitb95097127197d63084c14fd6d8322f724e041776 (patch)
treefcc1bb5f4fc23962a4c2c7fd3bf6117444847db6 /lib-src
parent43f15d4afee5beaaec7a2e8dc8b11ea2f9e3daea (diff)
downloademacs-b95097127197d63084c14fd6d8322f724e041776.tar.gz
(main): In append mode, sort the tags file after writing it.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog1
-rw-r--r--lib-src/etags.c15
2 files changed, 9 insertions, 7 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index e8bda4e21b9..c2e6ef390ee 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -4,6 +4,7 @@
(prolog_pr): Cast strlen to int before comparison.
(LOOKING_AT, LOOKING_AT_NOCASE): Let the preprocessor check that
the second argument is indeed a literal string.
+ (main): In append mode, sort the tags file after writing it.
2005-09-27 Emanuele Giaquinta <emanuele.giaquinta@gmail.com> (tiny change)
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 357470b4fde..c8102ec1548 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -41,7 +41,7 @@
* configuration file containing regexp definitions for etags.
*/
-char pot_etags_version[] = "@(#) pot revision number is 17.13";
+char pot_etags_version[] = "@(#) pot revision number is 17.14";
#define TRUE 1
#define FALSE 0
@@ -1475,12 +1475,13 @@ main (argc, argv)
if (fclose (tagf) == EOF)
pfatal (tagfile);
- if (update)
- {
- char cmd[2*BUFSIZ+10];
- sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile);
- exit (system (cmd));
- }
+ if (CTAGS)
+ if (append_to_tagfile || update)
+ {
+ char cmd[2*BUFSIZ+10];
+ sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile);
+ exit (system (cmd));
+ }
return EXIT_SUCCESS;
}