diff options
author | Francesco Potortì <[email protected]> | 2005-09-27 20:18:49 +0000 |
---|---|---|
committer | Francesco Potortì <[email protected]> | 2005-09-27 20:18:49 +0000 |
commit | b95097127197d63084c14fd6d8322f724e041776 (patch) | |
tree | fcc1bb5f4fc23962a4c2c7fd3bf6117444847db6 /lib-src | |
parent | 43f15d4afee5beaaec7a2e8dc8b11ea2f9e3daea (diff) |
(main): In append mode, sort the tags file after writing it.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 1 | ||||
-rw-r--r-- | lib-src/etags.c | 15 |
2 files changed, 9 insertions, 7 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index e8bda4e21b..c2e6ef390e 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 <[email protected]> (tiny change) diff --git a/lib-src/etags.c b/lib-src/etags.c index 357470b4fd..c8102ec154 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; } |