diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-30 11:43:20 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-30 11:43:20 +0000 |
| commit | df111dde6ea37525b407e0f833d46fbb0acb6fac (patch) | |
| tree | b2ae1307691d7613f3f4f648bb426f741e3cf66d /usr.bin/ctags | |
| parent | 5b6c090658e59d6b47e78fc56bd52a81ae94865f (diff) | |
Notes
Diffstat (limited to 'usr.bin/ctags')
| -rw-r--r-- | usr.bin/ctags/ctags.c | 6 | ||||
| -rw-r--r-- | usr.bin/ctags/tree.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c index 04ac8ac4f2897..08de5aaac7c3a 100644 --- a/usr.bin/ctags/ctags.c +++ b/usr.bin/ctags/ctags.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include <err.h> #include <limits.h> +#include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -97,6 +98,8 @@ main(argc, argv) int ch; /* getopts char */ char *cmd; + setlocale(LC_ALL, ""); + aflag = uflag = NO; tflag = YES; while ((ch = getopt(argc, argv, "BFTadf:tuwvx")) != -1) @@ -142,6 +145,9 @@ main(argc, argv) if (!argc) usage(); + if (!xflag) + setlocale(LC_COLLATE, "C"); + init(); for (exit_val = step = 0; step < argc; ++step) diff --git a/usr.bin/ctags/tree.c b/usr.bin/ctags/tree.c index 9dc20218925ad..77a57787665c5 100644 --- a/usr.bin/ctags/tree.c +++ b/usr.bin/ctags/tree.c @@ -104,7 +104,7 @@ add_node(node, cur_node) { int dif; - dif = strcmp(node->entry, cur_node->entry); + dif = strcoll(node->entry, cur_node->entry); if (!dif) { if (node->file == cur_node->file) { if (!wflag) |
