static bool
check_format (bool is_input)
{
- const char *posint_required = _("Positive width required");
- const char *nonneg_required = _("Nonnegative width required");
- const char *unexpected_element = _("Unexpected element %qc in format "
- "string at %L");
- const char *unexpected_end = _("Unexpected end of format string");
- const char *zero_width = _("Zero width in format descriptor");
+ const char *posint_required
+ = G_("Positive width required in format string at %L");
+ const char *nonneg_required
+ = G_("Nonnegative width required in format string at %L");
+ const char *unexpected_element
+ = G_("Unexpected element %qc in format string at %L");
+ const char *unexpected_end
+ = G_("Unexpected end of format string in format string at %L");
+ const char *zero_width
+ = G_("Zero width in format descriptor in format string at %L");
const char *error = NULL;
format_token t, u;
goto fail;
if (t != FMT_LPAREN)
{
- error = _("Missing leading left parenthesis");
+ error = G_("Missing leading left parenthesis in format string at %L");
goto syntax;
}
level++;
goto format_item;
}
- error = _("Left parenthesis required after %<*%>");
+ error = G_("Left parenthesis required after %<*%> in format string "
+ "at %L");
goto syntax;
case FMT_POSINT:
goto fail;
if (t != FMT_P)
{
- error = _("Expected P edit descriptor");
+ error = G_("Expected P edit descriptor in format string at %L");
goto syntax;
}
case FMT_P:
/* P requires a prior number. */
- error = _("P descriptor requires leading scale factor");
+ error = G_("P descriptor requires leading scale factor in format "
+ "string at %L");
goto syntax;
case FMT_X:
&& t != FMT_F && t != FMT_E && t != FMT_EN && t != FMT_ES
&& t != FMT_D && t != FMT_G && t != FMT_RPAREN && t != FMT_SLASH)
{
- error = _("Comma required after P descriptor");
+ error = G_("Comma required after P descriptor in format string "
+ "at %L");
goto syntax;
}
if (t != FMT_COMMA)
if (t == FMT_ERROR)
goto fail;
}
- if (t != FMT_F && t != FMT_E && t != FMT_EN && t != FMT_ES && t != FMT_D
- && t != FMT_G && t != FMT_RPAREN && t != FMT_SLASH)
+ if (t != FMT_F && t != FMT_E && t != FMT_EN && t != FMT_ES
+ && t != FMT_D && t != FMT_G && t != FMT_RPAREN && t != FMT_SLASH)
{
- error = _("Comma required after P descriptor");
+ error = G_("Comma required after P descriptor in format string "
+ "at %L");
goto syntax;
}
}
t = format_lex ();
if (t != FMT_POSINT)
{
- error = _("Positive width required with T descriptor");
+ error = G_("Positive width required with T descriptor in format "
+ "string at %L");
goto syntax;
}
break;
u = format_lex ();
if (u == FMT_E)
{
- error = _("E specifier not allowed with g0 descriptor");
+ error = G_("E specifier not allowed with g0 descriptor in "
+ "format string at %L");
goto syntax;
}
saved_token = u;
if (u == FMT_ERROR)
goto fail;
if (u != FMT_E)
- {
- saved_token = u;
- }
+ saved_token = u;
else
{
u = format_lex ();
goto fail;
if (u != FMT_POSINT)
{
- error = _("Positive exponent width required");
+ error = G_("Positive exponent width required in format string "
+ "at %L");
goto syntax;
}
}
goto dtio_vlist;
if (t != FMT_RPAREN)
{
- error = _("Right parenthesis expected at %C");
+ error = G_("Right parenthesis expected at %C in format string "
+ "at %L");
goto syntax;
}
goto between_desc;
/* Warn if -std=legacy, otherwise error. */
if (gfc_option.warn_std != 0)
{
- error = _("Period required in format specifier");
+ error = G_("Period required in format specifier in format "
+ "string at %L");
goto syntax;
}
if (mode != MODE_FORMAT)
if (t == FMT_ERROR)
goto fail;
if (t != FMT_PERIOD)
- {
- saved_token = t;
- }
+ saved_token = t;
else
{
t = format_lex ();
if (error == unexpected_element)
gfc_error (error, error_element, &format_locus);
else
- gfc_error ("%s in format string at %L", error, &format_locus);
+ gfc_error (error, &format_locus);
fail:
rv = false;