From: Bruno Haible Date: Mon, 8 May 2006 13:39:43 +0000 (+0000) Subject: Fix invalid ANSI C syntax. X-Git-Tag: v0.15~190 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd2508cc48343375728e100ca55e04d62eddd4b4;p=thirdparty%2Fgettext.git Fix invalid ANSI C syntax. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 432e12ad3..f1af117a4 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2006-05-07 Bruno Haible + + * x-perl.c (extract_variable): Fix syntax error introduced on + 2005-10-03. + 2006-05-07 Bruno Haible * format-awk.c: Include xvasprintf.h instead of xerror.h. diff --git a/gettext-tools/src/x-perl.c b/gettext-tools/src/x-perl.c index 3dfea728e..7d501c21d 100644 --- a/gettext-tools/src/x-perl.c +++ b/gettext-tools/src/x-perl.c @@ -1512,58 +1512,60 @@ extract_variable (message_list_ty *mlp, token_ty *tp, int first) shapes.shapes[0].argtotal = 0; string_list_init (&shapes.shapes[0].xcomments); - /* Extract a possible string from the key. Before proceeding - we check whether the open curly is followed by a symbol and - then by a right curly. */ - flag_context_list_iterator_ty context_iter = - flag_context_list_iterator ( - flag_context_list_table_lookup ( - flag_context_list_table, - tp->string, strlen (tp->string))); - token_ty *t1 = x_perl_lex (mlp); + { + /* Extract a possible string from the key. Before proceeding + we check whether the open curly is followed by a symbol and + then by a right curly. */ + flag_context_list_iterator_ty context_iter = + flag_context_list_iterator ( + flag_context_list_table_lookup ( + flag_context_list_table, + tp->string, strlen (tp->string))); + token_ty *t1 = x_perl_lex (mlp); #if DEBUG_PERL - fprintf (stderr, "%s:%d: extracting string key\n", - real_file_name, line_number); + fprintf (stderr, "%s:%d: extracting string key\n", + real_file_name, line_number); #endif - if (t1->type == token_type_symbol - || t1->type == token_type_named_op) - { - token_ty *t2 = x_perl_lex (mlp); - if (t2->type == token_type_rbrace) - { - flag_context_ty context; - lex_pos_ty pos; - - context = - inherited_context (null_context, - flag_context_list_iterator_advance ( - &context_iter)); - - pos.line_number = line_number; - pos.file_name = logical_file_name; - - xgettext_current_source_encoding = po_charset_utf8; - remember_a_message (mlp, NULL, xstrdup (t1->string), - context, &pos, savable_comment); - xgettext_current_source_encoding = xgettext_global_source_encoding; - free_token (t2); - free_token (t1); - } - else - { - x_perl_unlex (t2); - } - } - else - { - x_perl_unlex (t1); - if (extract_balanced (mlp, 1, token_type_rbrace, - null_context, context_iter, - 1, arglist_parser_alloc (mlp, &shapes))) - return; - } + if (t1->type == token_type_symbol + || t1->type == token_type_named_op) + { + token_ty *t2 = x_perl_lex (mlp); + if (t2->type == token_type_rbrace) + { + flag_context_ty context; + lex_pos_ty pos; + + context = + inherited_context (null_context, + flag_context_list_iterator_advance ( + &context_iter)); + + pos.line_number = line_number; + pos.file_name = logical_file_name; + + xgettext_current_source_encoding = po_charset_utf8; + remember_a_message (mlp, NULL, xstrdup (t1->string), + context, &pos, savable_comment); + xgettext_current_source_encoding = xgettext_global_source_encoding; + free_token (t2); + free_token (t1); + } + else + { + x_perl_unlex (t2); + } + } + else + { + x_perl_unlex (t1); + if (extract_balanced (mlp, 1, token_type_rbrace, + null_context, context_iter, + 1, arglist_parser_alloc (mlp, &shapes))) + return; + } + } } else {