(main): In append mode, sort the tags file after writing it.

This commit is contained in:
Francesco Potortì 2005-09-27 20:18:49 +00:00
parent 43f15d4afe
commit b950971271
2 changed files with 9 additions and 7 deletions

View file

@ -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)

View file

@ -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;
}