# HG changeset patch # User Francesco Potort # Date 1127852295 0 # Node ID fbae8bd411de5b17fb121dd6a09cd12456e7ce92 # Parent ad24f42046b1d11e402fd52810b47e4a8f6eb175 (main): In append mode, sort the tags file after writing it. diff -r ad24f42046b1 -r fbae8bd411de lib-src/etags.c --- a/lib-src/etags.c Tue Sep 27 18:48:59 2005 +0000 +++ b/lib-src/etags.c Tue Sep 27 20:18:15 2005 +0000 @@ -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 @@ 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; }