--- getopt/trunk/getopt.c 2012/08/12 10:18:02 327 +++ getopt/trunk/getopt.c 2014/11/20 11:27:07 362 @@ -33,11 +33,11 @@ * Version 1.0.6: Tue Jun 27 2000 * No important changes * Version 1.1.0: Tue Jun 30 2000 - * Added NLS support (partly written by Arkadiusz Mikiewicz + * Added NLS support (partly written by Arkadiusz Miƛkiewicz * ) * Version 1.1.4: Mon Nov 7 2005 * Fixed a few type's in the manpage - * Version 1.1.5: Mon Nov 7 2005 + * Version 1.1.5: Sun Aug 12 2012 * Sync with util-linux-2.21, fixed build problems, many new translations */ @@ -199,7 +199,7 @@ if (longopts[longindex].has_arg) printf(" %s", normalize(optarg ? optarg : "")); } else if (opt == NON_OPT) - printf(" %s", normalize(optarg)); + printf(" %s", normalize(optarg ? optarg : "")); else { printf(" -%c", opt); charptr = strchr(optstr, opt); @@ -260,7 +260,7 @@ long_options[long_options_nr].flag = NULL; long_options[long_options_nr].val = 0; - if (long_options_nr) { + if (long_options_nr && name) { /* Not for init! */ long_options[long_options_nr - 1].has_arg = has_arg; long_options[long_options_nr - 1].flag = NULL; @@ -334,7 +334,7 @@ fputs(_(" -Q, --quiet-output No normal output\n"), stderr); fputs(_(" -s, --shell Set shell quoting conventions\n"), stderr); fputs(_(" -T, --test Test for getopt(1) version\n"), stderr); - fputs(_(" -u, --unquote Do not quote the output\n"), stderr); + fputs(_(" -u, --unquoted Do not quote the output\n"), stderr); fputs(_(" -V, --version Output version information\n"), stderr); fputc('\n', stderr);