# HG changeset patch # User Francesco Potort # Date 1167737293 0 # Node ID baea8fa9d2eb2c6ac05a1801ed5bdf9a6173c24d # Parent 58fa0c36a31d079b0748adfba8c6c35afe68d121 (main): Pass the -u option to sort in ctags mode. diff -r 58fa0c36a31d -r baea8fa9d2eb lib-src/etags.c --- a/lib-src/etags.c Tue Jan 02 11:04:57 2007 +0000 +++ b/lib-src/etags.c Tue Jan 02 11:28:13 2007 +0000 @@ -1460,8 +1460,11 @@ if (CTAGS) if (append_to_tagfile || update) { - char cmd[2*BUFSIZ+10]; - sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); + char cmd[2*BUFSIZ+20]; + /* Maybe these should be used: + setenv ("LC_COLLATE", "C", 1); + setenv ("LC_ALL", "C", 1); */ + sprintf (cmd, "sort -u -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); exit (system (cmd)); } return EXIT_SUCCESS;