From: Daiki Ueno Date: Mon, 9 Jun 2014 04:36:18 +0000 (+0900) Subject: msgmerge: Disable --color option in --update mode X-Git-Tag: v0.19.1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29516888a7a2cb6c3d4a23e7c53a6699f2618c84;p=thirdparty%2Fgettext.git msgmerge: Disable --color option in --update mode Suggested by 林V字龍 at: . * msgmerge.c (main): Error out when --color and --update are specified at the same time. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index f492e0076..878d0c5ed 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,11 @@ +2014-06-09 Daiki Ueno + + msgmerge: Disable --color option in --update mode + Suggested by 林V字龍 at: + . + * msgmerge.c (main): Error out when --color and --update are + specified at the same time. + 2014-06-07 Daiki Ueno xgettext: Fix misrecognition of character literals in C and Vala diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c index 7c7add986..d8e02ae10 100644 --- a/gettext-tools/src/msgmerge.c +++ b/gettext-tools/src/msgmerge.c @@ -172,6 +172,7 @@ main (int argc, char **argv) bool do_help; bool do_version; char *output_file; + char *color; msgdomain_list_ty *def; msgdomain_list_ty *result; catalog_input_format_ty input_syntax = &input_format_po; @@ -203,6 +204,7 @@ main (int argc, char **argv) do_help = false; do_version = false; output_file = NULL; + color = NULL; while ((opt = getopt_long (argc, argv, "C:D:eEFhimn:No:pPqsUvVw:", long_options, NULL)) @@ -330,6 +332,7 @@ main (int argc, char **argv) case CHAR_MAX + 9: /* --color */ if (handle_color_option (optarg) || color_test_mode) usage (EXIT_FAILURE); + color = optarg; break; case CHAR_MAX + 10: /* --style */ @@ -384,6 +387,16 @@ There is NO WARRANTY, to the extent permitted by law.\n\ error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"), "--update", "--output-file"); } + if (color != NULL) + { + error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"), + "--update", "--color"); + } + if (style_file_name != NULL) + { + error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"), + "--update", "--style"); + } } else {