From: Francesco Potortì Date: Tue, 27 Sep 2005 20:18:49 +0000 (+0000) Subject: (main): In append mode, sort the tags file after writing it. X-Git-Tag: emacs-pretest-22.0.90~6928 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b95097127197d63084c14fd6d8322f724e041776;p=emacs.git (main): In append mode, sort the tags file after writing it. --- 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 (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; }