From: Bruno Haible Date: Mon, 3 Apr 2006 11:18:36 +0000 (+0000) Subject: Treat --keyword= like --keyword. X-Git-Tag: v0.15~264 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4296e713585107f4137c142cd188eafb03383af;p=thirdparty%2Fgettext.git Treat --keyword= like --keyword. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index cd03d46cd..3567cd380 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,7 @@ +2006-04-01 Bruno Haible + + * xgettext.c (main): Treat --keyword= like --keyword. + 2006-03-28 Bruno Haible * filters.h: New file. diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 1fbda0b35..2c0be2b15 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -386,28 +386,28 @@ main (int argc, char *argv[]) join_existing = true; break; case 'k': - if (optarg == NULL || *optarg != '\0') - { - x_c_keyword (optarg); - x_objc_keyword (optarg); - x_sh_keyword (optarg); - x_python_keyword (optarg); - x_lisp_keyword (optarg); - x_elisp_keyword (optarg); - x_librep_keyword (optarg); - x_scheme_keyword (optarg); - x_java_keyword (optarg); - x_csharp_keyword (optarg); - x_awk_keyword (optarg); - x_tcl_keyword (optarg); - x_perl_keyword (optarg); - x_php_keyword (optarg); - x_glade_keyword (optarg); - if (optarg == NULL) - no_default_keywords = true; - else - some_additional_keywords = true; - } + if (optarg != NULL && *optarg == '\0') + /* Make "--keyword=" work like "--keyword" and "-k". */ + optarg = NULL; + x_c_keyword (optarg); + x_objc_keyword (optarg); + x_sh_keyword (optarg); + x_python_keyword (optarg); + x_lisp_keyword (optarg); + x_elisp_keyword (optarg); + x_librep_keyword (optarg); + x_scheme_keyword (optarg); + x_java_keyword (optarg); + x_csharp_keyword (optarg); + x_awk_keyword (optarg); + x_tcl_keyword (optarg); + x_perl_keyword (optarg); + x_php_keyword (optarg); + x_glade_keyword (optarg); + if (optarg == NULL) + no_default_keywords = true; + else + some_additional_keywords = true; break; case 'l': /* Accepted for backward compatibility with 0.10.35. */