xmlNodePtr n2;
bool found = false;
- if (n->type != XML_ELEMENT_NODE
- || !xmlStrEqual (n->name, BAD_CAST "pluralRules"))
- continue;
-
- if (!xmlHasProp (n, BAD_CAST "locales"))
- {
- error_at_line (0, 0,
- logical_filename,
- xmlGetLineNo (n),
- _("The element <%s> does not have attribute <%s>"),
- "pluralRules", "locales");
- continue;
- }
-
- cp = locales = xmlGetProp (n, BAD_CAST "locales");
- while (*cp != '\0')
- {
- while (c_isspace (*cp))
- cp++;
- if (xmlStrncmp (cp, BAD_CAST locale, locale_length) == 0
- && (*(cp + locale_length) == '\0'
- || c_isspace (*(cp + locale_length))))
- {
- found = true;
- break;
- }
- while (*cp && !c_isspace (*cp))
- cp++;
- }
- xmlFree (locales);
-
- if (!found)
- continue;
-
- for (n2 = n->children; n2; n2 = n2->next)
+ if (n->type == XML_ELEMENT_NODE
+ && xmlStrEqual (n->name, BAD_CAST "pluralRules"))
{
- if (n2->type != XML_ELEMENT_NODE
- || !xmlStrEqual (n2->name, BAD_CAST "pluralRule"))
- continue;
-
- if (!xmlHasProp (n2, BAD_CAST "count"))
+ if (!xmlHasProp (n, BAD_CAST "locales"))
{
error_at_line (0, 0,
logical_filename,
- xmlGetLineNo (n2),
+ xmlGetLineNo (n),
_("The element <%s> does not have attribute <%s>"),
- "pluralRule", "count");
- break;
+ "pluralRules", "locales");
+ }
+ else
+ {
+ cp = locales = xmlGetProp (n, BAD_CAST "locales");
+ while (*cp != '\0')
+ {
+ while (c_isspace (*cp))
+ cp++;
+ if (xmlStrncmp (cp, BAD_CAST locale, locale_length) == 0
+ && (*(cp + locale_length) == '\0'
+ || c_isspace (*(cp + locale_length))))
+ {
+ found = true;
+ break;
+ }
+ while (*cp && !c_isspace (*cp))
+ cp++;
+ }
+ xmlFree (locales);
+
+ if (found)
+ for (n2 = n->children; n2; n2 = n2->next)
+ {
+ if (n2->type == XML_ELEMENT_NODE
+ && xmlStrEqual (n2->name, BAD_CAST "pluralRule"))
+ {
+ if (!xmlHasProp (n2, BAD_CAST "count"))
+ {
+ error_at_line (0, 0,
+ logical_filename,
+ xmlGetLineNo (n2),
+ _("The element <%s> does not have attribute <%s>"),
+ "pluralRule", "count");
+ break;
+ }
+
+ xmlChar *count = xmlGetProp (n2, BAD_CAST "count");
+ xmlChar *content = xmlNodeGetContent (n2);
+ sb_xappendf (&buffer, "%s: %s; ", count, content);
+ xmlFree (count);
+ xmlFree (content);
+ }
+ }
}
-
- xmlChar *count = xmlGetProp (n2, BAD_CAST "count");
- xmlChar *content = xmlNodeGetContent (n2);
- sb_xappendf (&buffer, "%s: %s; ", count, content);
- xmlFree (count);
- xmlFree (content);
}
}
ngettext ("found %d fatal error", "found %d fatal errors",
nerrors),
nerrors);
- continue;
}
+ else
+ {
+ /* Convert the messages to Unicode. */
+ iconv_message_list (mlp, NULL, po_charset_utf8, NULL,
+ textmode_xerror_handler);
- /* Convert the messages to Unicode. */
- iconv_message_list (mlp, NULL, po_charset_utf8, NULL,
- textmode_xerror_handler);
-
- msgfmt_operand_list_append (operands, language, mlp);
+ msgfmt_operand_list_append (operands, language, mlp);
+ }
}
string_list_destroy (&languages);
if (mb_iseq (mbc, '"'))
break;
if (mb_iseq (mbc, '\\'))
+ buf[bufpos++] = control_sequence (ps);
+ else
{
- buf[bufpos++] = control_sequence (ps);
- continue;
+ /* Add mbc to the accumulator. */
+ memcpy_small (&buf[bufpos], mb_ptr (mbc), mb_len (mbc));
+ bufpos += mb_len (mbc);
}
-
- /* Add mbc to the accumulator. */
- memcpy_small (&buf[bufpos], mb_ptr (mbc), mb_len (mbc));
- bufpos += mb_len (mbc);
}
buf[bufpos] = '\0';
}
str += length;
- continue;
}
-
- if (state == 1)
+ else if (state == 1)
{
switch (uc)
{
}
str += length;
- continue;
}
-
- if (state == 2)
+ else if (state == 2)
{
switch (uc)
{
}
str += length;
- continue;
}
-
- if (state == 4)
+ else if (state == 4)
{
switch (uc)
{
}
str += length;
- continue;
}
}
flag_context_list_table,
token.string, strlen (token.string)));
free (token.string);
- continue;
+ break;
case token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH)
next_is_argument = false;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rparen:
arglist_parser_done (argparser, arg);
next_is_argument = false;
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_string:
{
next_is_argument = false;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_i18nstring:
{
next_is_argument = false;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_semicolon:
/* An argument list ends, and a new statement begins. */
flag_context_list_iterator_advance (
&context_iter));
state = 0;
- continue;
+ break;
case token_type_eof:
arglist_parser_done (argparser, arg);
next_is_argument = false;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
default:
abort ();
token.string, token_string_len + 1));
}
free (token.string);
- continue;
+ break;
case xgettext_token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH)
next_context_iter = null_context_list_iterator;
selectorcall_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case xgettext_token_type_rparen:
arglist_parser_done (argparser, arg);
next_context_iter = passthrough_context_list_iterator;
selectorcall_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case xgettext_token_type_colon:
if (objc_extensions)
selectorcall_context_iter = null_context_list_iterator;
}
state = 0;
- continue;
+ break;
case xgettext_token_type_string_literal:
{
next_context_iter = null_context_list_iterator;
selectorcall_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case xgettext_token_type_other:
next_context_iter = null_context_list_iterator;
selectorcall_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case xgettext_token_type_eof:
arglist_parser_done (argparser, arg);
next_context_iter = flag_context_list_iterator (context_list);
free (sum);
- continue;
+ break;
}
case token_type_lparen:
paren_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rparen:
if (terminator == token_type_rparen)
_("')' found where '}' was expected"));
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_lbrace:
if (++brace_nesting_depth > MAX_NESTING_DEPTH)
brace_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rbrace:
if (terminator == token_type_rbrace)
_("'}' found where ')' was expected"));
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_comma:
arg++;
&context_iter));
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_string_literal:
case token_type_template:
drop_reference (token.comment);
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_eof:
arglist_parser_done (argparser, arg);
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
default:
abort ();
}
free (sum);
- continue;
+ break;
}
case token_type_lparen:
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rparen:
if (terminator == token_type_rparen)
_("')' found where '}' was expected"));
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_lbrace:
if (++brace_nesting_depth > MAX_NESTING_DEPTH)
brace_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rbrace:
if (terminator == token_type_rbrace)
_("'}' found where ')' was expected"));
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_comma:
arg++;
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_conditional:
/* In an expression A ? B : C, each of A, B, C is a distinct
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_colon:
/* In an expression A ? B : C, each of A, B, C is a distinct
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_assign:
/* In an expression A = B, A and B are distinct sub-regions.
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_plus:
case token_type_operator:
inner_region->inherit_from_parent_region = false;
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_string_literal:
{
drop_reference (token.comment);
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_semicolon:
arglist_parser_done (argparser, arg);
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
}
else
return false;
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
default:
abort ();
flag_context_list_table,
token.string, strlen (token.string)));
free (token.string);
- continue;
+ break;
case token_type_lparen:
if (++paren_nesting_depth > MAX_NESTING_DEPTH)
paren_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rparen:
if (delim == token_type_rparen || delim == token_type_eof)
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_comma:
arg++;
&context_iter));
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_lbracket:
if (++bracket_nesting_depth > MAX_NESTING_DEPTH)
bracket_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rbracket:
if (delim == token_type_rbracket || delim == token_type_eof)
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_lbrace:
if (++brace_nesting_depth > MAX_NESTING_DEPTH)
brace_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rbrace:
if (delim == token_type_rbrace || delim == token_type_eof)
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_string:
case token_type_template:
drop_reference (token.comment);
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_xml_element_start:
if (++xml_element_nesting_depth > MAX_NESTING_DEPTH)
xml_element_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_xml_element_end:
if (delim == token_type_xml_element_end || delim == token_type_eof)
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_eof:
arglist_parser_done (argparser, arg);
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
default:
abort ();
flag_context_list_table,
token.string, strlen (token.string)));
free (token.string);
- continue;
+ break;
case token_type_lparen:
if (++paren_nesting_depth > MAX_NESTING_DEPTH)
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_lbracket:
if (++bracket_nesting_depth > MAX_NESTING_DEPTH)
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_comma:
arg++;
&context_iter));
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_eof:
arglist_parser_done (argparser, arg);
drop_reference (token.comment);
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_dot:
case token_type_doubledot:
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
default:
abort ();
flag_context_list_table,
token.string, strlen (token.string)));
free (token.string);
- continue;
+ break;
case token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH)
nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rparen:
arglist_parser_done (argparser, arg);
&context_iter));
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_string_literal:
{
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_eof:
arglist_parser_done (argparser, arg);
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
default:
abort ();
flag_context_list_table,
token.string, strlen (token.string)));
free (token.string);
- continue;
+ break;
case token_type_lparen:
if (++(xp->paren_nesting_depth) > MAX_NESTING_DEPTH)
xp->paren_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rparen:
if (delim == token_type_rparen || delim == token_type_eof)
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_comma:
arg++;
&context_iter));
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_lbracket:
if (++(xp->bracket_nesting_depth) > MAX_NESTING_DEPTH)
xp->bracket_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rbracket:
if (delim == token_type_rbracket || delim == token_type_eof)
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_string_literal:
{
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_dot:
case token_type_operator1:
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_eof:
arglist_parser_done (argparser, arg);
flag_context_list_table,
token.string, strlen (token.string)));
free (token.string);
- continue;
+ break;
case token_type_lparen:
if (++paren_nesting_depth > MAX_NESTING_DEPTH)
paren_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rparen:
if (delim == token_type_rparen || delim == token_type_eof)
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_comma:
arg++;
&context_iter));
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_lbracket:
if (++bracket_nesting_depth > MAX_NESTING_DEPTH)
bracket_nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rbracket:
if (delim == token_type_rbracket || delim == token_type_eof)
}
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_string:
case token_type_498:
drop_reference (token.comment);
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_eof:
arglist_parser_done (argparser, arg);
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
default:
abort ();
flag_context_list_table,
token.string, strlen (token.string)));
free (token.string);
- continue;
+ break;
case token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH)
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_comma:
arg++;
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_question:
/* In an expression A ? B : C, each of A, B, C is a distinct
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_colon:
/* In an expression A ? B : C, each of A, B, C is a distinct
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_assign:
/* In an expression A = B, A and B are distinct sub-regions.
inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_plus:
case token_type_arithmetic_operator:
inner_region->inherit_from_parent_region = false;
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_semicolon:
arglist_parser_done (argparser, arg);
drop_reference (token.comment);
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_return:
next_context_iter = passthrough_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_character_constant:
case token_type_lbrace:
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
default:
abort ();
nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_string_literal:
if (state == 1)
state = 0;
}
next_context_iter = null_context_list_iterator;
- continue;
+ break;
case token_type_symbol:
next_context_iter =
token.string, strlen (token.string)));
free_token (&token);
state = 0;
- continue;
+ break;
case token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH)
nesting_depth--;
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_rparen:
unref_region (inner_region);
flag_context_list_iterator_advance (
&context_iter));
next_context_iter = passthrough_context_list_iterator;
- continue;
+ break;
case token_type_other:
next_context_iter = null_context_list_iterator;
state = 0;
- continue;
+ break;
case token_type_eof:
unref_region (inner_region);