diff options
Diffstat (limited to 'text-utils/rev.c')
-rw-r--r-- | text-utils/rev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/text-utils/rev.c b/text-utils/rev.c index 00d519695..95545064a 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -94,6 +94,12 @@ int main(int argc, char *argv[]) FILE *fp = stdin; int ch, rval = EXIT_SUCCESS; + static const struct option longopts[] = { + { "version", no_argument, 0, 'V' }, + { "help", no_argument, 0, 'h' }, + { NULL, 0, 0, 0 } + }; + setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); @@ -102,12 +108,6 @@ int main(int argc, char *argv[]) signal(SIGINT, sig_handler); signal(SIGTERM, sig_handler); - static const struct option longopts[] = { - { "version", no_argument, 0, 'V' }, - { "help", no_argument, 0, 'h' }, - { NULL, 0, 0, 0 } - }; - while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1) switch(ch) { case 'V': |