From 001083c66cb62fae2fee8c7618cdd14145842cec Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Fri, 18 Mar 2011 13:51:41 +0000 Subject: ARI fixes: Add missing internationalization markups throughout yacc files. * c-exp.y: Ditto. * cp-name-parser.y: Ditto. * f-exp.y: Ditto. * m2-exp.y: Ditto. * objc-exp.y: Ditto. * p-exp.y: Ditto. --- gdb/ChangeLog | 11 +++++++++++ gdb/c-exp.y | 36 ++++++++++++++++++------------------ gdb/cp-name-parser.y | 10 +++++----- gdb/f-exp.y | 12 ++++++------ gdb/m2-exp.y | 42 +++++++++++++++++++++--------------------- gdb/objc-exp.y | 50 +++++++++++++++++++++++++------------------------- gdb/p-exp.y | 36 ++++++++++++++++++------------------ 7 files changed, 104 insertions(+), 93 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 60f9fd7..cb4309d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2011-03-18 Pierre Muller + ARI fixes: Add missing internationalization markups throughout + yacc files. + * c-exp.y: Ditto. + * cp-name-parser.y: Ditto. + * f-exp.y: Ditto. + * m2-exp.y: Ditto. + * objc-exp.y: Ditto. + * p-exp.y: Ditto. + +2011-03-18 Pierre Muller + ARI fixes: Messages should have no trailing new lines. * darwin-nat.c (mach_check_error): Remove trailing new line from warning function call message. diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 5b6ef3e..3a02e9d 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -698,7 +698,7 @@ exp : string_exp case C_STRING_32: if (type != C_STRING && type != $1.tokens[i].type) - error ("Undefined string concatenation."); + error (_("Undefined string concatenation.")); type = $1.tokens[i].type; break; default: @@ -737,7 +737,7 @@ block : BLOCKNAME if ($1.sym) $$ = SYMBOL_BLOCK_VALUE ($1.sym); else - error ("No file or function \"%s\".", + error (_("No file or function \"%s\"."), copy_name ($1.stoken)); } | FILENAME @@ -751,7 +751,7 @@ block : block COLONCOLON name = lookup_symbol (copy_name ($3), $1, VAR_DOMAIN, (int *) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) - error ("No function \"%s\" in specified context.", + error (_("No function \"%s\" in specified context."), copy_name ($3)); $$ = SYMBOL_BLOCK_VALUE (tem); } ; @@ -761,7 +761,7 @@ variable: block COLONCOLON name sym = lookup_symbol (copy_name ($3), $1, VAR_DOMAIN, (int *) NULL); if (sym == 0) - error ("No symbol \"%s\" in specified context.", + error (_("No symbol \"%s\" in specified context."), copy_name ($3)); write_exp_elt_opcode (OP_VAR_VALUE); @@ -778,7 +778,7 @@ qualified_name: TYPENAME COLONCOLON name if (TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_UNION && TYPE_CODE (type) != TYPE_CODE_NAMESPACE) - error ("`%s' is not defined as an aggregate type.", + error (_("`%s' is not defined as an aggregate type."), TYPE_NAME (type)); write_exp_elt_opcode (OP_SCOPE); @@ -794,7 +794,7 @@ qualified_name: TYPENAME COLONCOLON name if (TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_UNION && TYPE_CODE (type) != TYPE_CODE_NAMESPACE) - error ("`%s' is not defined as an aggregate type.", + error (_("`%s' is not defined as an aggregate type."), TYPE_NAME (type)); tmp_token.ptr = (char*) alloca ($4.length + 2); @@ -842,9 +842,9 @@ variable: qualified_name if (msymbol != NULL) write_exp_msymbol (msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. Use the \"file\" command."); + error (_("No symbol table is loaded. Use the \"file\" command.")); else - error ("No symbol \"%s\" in current context.", name); + error (_("No symbol \"%s\" in current context."), name); } ; @@ -894,9 +894,9 @@ variable: name_not_typename if (msymbol != NULL) write_exp_msymbol (msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. Use the \"file\" command."); + error (_("No symbol table is loaded. Use the \"file\" command.")); else - error ("No symbol \"%s\" in current context.", + error (_("No symbol \"%s\" in current context."), copy_name ($1.stoken)); } } @@ -1527,7 +1527,7 @@ parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere) if (c != 'l' && c != 'u' && n != 0) { if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n)) - error ("Numeric constant too large."); + error (_("Numeric constant too large.")); } prevn = n; } @@ -1844,9 +1844,9 @@ parse_string_or_char (char *tokptr, char **outptr, struct typed_stoken *value, if (*tokptr != quote) { if (quote == '"') - error ("Unterminated string in expression."); + error (_("Unterminated string in expression.")); else - error ("Unmatched single quote."); + error (_("Unmatched single quote.")); } ++tokptr; @@ -2218,7 +2218,7 @@ lex_one_token (void) memcpy (err_copy, tokstart, p - tokstart); err_copy[p - tokstart] = 0; - error ("Invalid number \"%s\".", err_copy); + error (_("Invalid number \"%s\"."), err_copy); } lexptr = p; return toktype; @@ -2261,7 +2261,7 @@ lex_one_token (void) if (result == CHAR) { if (host_len == 0) - error ("Empty character constant."); + error (_("Empty character constant.")); else if (host_len > 2 && c == '\'') { ++tokstart; @@ -2269,7 +2269,7 @@ lex_one_token (void) goto tryname; } else if (host_len > 1) - error ("Invalid character constant."); + error (_("Invalid character constant.")); } return result; } @@ -2278,7 +2278,7 @@ lex_one_token (void) if (!(c == '_' || c == '$' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) /* We must have come across a bad character (e.g. ';'). */ - error ("Invalid character '%c' in expression.", c); + error (_("Invalid character '%c' in expression."), c); /* It's a name. See how long it is. */ namelen = 0; @@ -2658,5 +2658,5 @@ yyerror (char *msg) if (prev_lexptr) lexptr = prev_lexptr; - error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); + error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr); } diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y index b31ea24..8736777 100644 --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -1568,14 +1568,14 @@ yylex (void) c = cp_parse_escape (&lexptr); else if (c == '\'') { - yyerror ("empty character constant"); + yyerror (_("empty character constant")); return ERROR; } c = *lexptr++; if (c != '\'') { - yyerror ("invalid character constant"); + yyerror (_("invalid character constant")); return ERROR; } @@ -1699,7 +1699,7 @@ yylex (void) memcpy (err_copy, tokstart, p - tokstart); err_copy[p - tokstart] = 0; - yyerror ("invalid number"); + yyerror (_("invalid number")); return ERROR; } lexptr = p; @@ -1775,14 +1775,14 @@ yylex (void) case '"': /* These can't occur in C++ names. */ - yyerror ("unexpected string literal"); + yyerror (_("unexpected string literal")); return ERROR; } if (!(c == '_' || c == '$' || ISALPHA (c))) { /* We must have come across a bad character (e.g. ';'). */ - yyerror ("invalid character"); + yyerror (_("invalid character")); return ERROR; } diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 7cd6ae1..d9cf3cf 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -517,9 +517,9 @@ variable: name_not_typename if (msymbol != NULL) write_exp_msymbol (msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. Use the \"file\" command."); + error (_("No symbol table is loaded. Use the \"file\" command.")); else - error ("No symbol \"%s\" in current context.", + error (_("No symbol \"%s\" in current context."), copy_name ($1.stoken)); } } @@ -758,7 +758,7 @@ parse_number (p, len, parsed_float, putithere) if (RANGE_CHECK && n != 0) { if ((unsigned_p && (unsigned)prevn >= (unsigned)n)) - range_error("Overflow on numeric constant."); + range_error (_("Overflow on numeric constant.")); } prevn = n; } @@ -1099,7 +1099,7 @@ yylex (void) memcpy (err_copy, tokstart, p - tokstart); err_copy[p - tokstart] = 0; - error ("Invalid number \"%s\".", err_copy); + error (_("Invalid number \"%s\"."), err_copy); } lexptr = p; return toktype; @@ -1133,7 +1133,7 @@ yylex (void) if (!(c == '_' || c == '$' || c ==':' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) /* We must have come across a bad character (e.g. ';'). */ - error ("Invalid character '%c' in expression.", c); + error (_("Invalid character '%c' in expression."), c); namelen = 0; for (c = tokstart[namelen]; @@ -1224,5 +1224,5 @@ yyerror (msg) if (prev_lexptr) lexptr = prev_lexptr; - error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); + error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr); } diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index c27545c..1809af8 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -329,21 +329,21 @@ exp : set ; exp : exp IN set - { error("Sets are not implemented.");} + { error (_("Sets are not implemented."));} ; exp : INCL '(' exp ',' exp ')' - { error("Sets are not implemented.");} + { error (_("Sets are not implemented."));} ; exp : EXCL '(' exp ',' exp ')' - { error("Sets are not implemented.");} + { error (_("Sets are not implemented."));} ; set : '{' arglist '}' - { error("Sets are not implemented.");} + { error (_("Sets are not implemented."));} | type '{' arglist '}' - { error("Sets are not implemented.");} + { error (_("Sets are not implemented."));} ; @@ -562,7 +562,7 @@ fblock : block COLONCOLON BLOCKNAME = lookup_symbol (copy_name ($3), $1, VAR_DOMAIN, 0); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) - error ("No function \"%s\" in specified context.", + error (_("No function \"%s\" in specified context."), copy_name ($3)); $$ = tem; } @@ -586,7 +586,7 @@ variable: block COLONCOLON NAME sym = lookup_symbol (copy_name ($3), $1, VAR_DOMAIN, 0); if (sym == 0) - error ("No symbol \"%s\" in specified context.", + error (_("No symbol \"%s\" in specified context."), copy_name ($3)); write_exp_elt_opcode (OP_VAR_VALUE); @@ -633,9 +633,9 @@ variable: NAME if (msymbol != NULL) write_exp_msymbol (msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. Use the \"symbol-file\" command."); + error (_("No symbol table is loaded. Use the \"symbol-file\" command.")); else - error ("No symbol \"%s\" in current context.", + error (_("No symbol \"%s\" in current context."), copy_name ($1)); } } @@ -692,9 +692,9 @@ parse_number (olen) return FLOAT; } if (p[c] == '.' && base != 10) - error("Floating point numbers must be base 10."); + error (_("Floating point numbers must be base 10.")); if (base == 10 && (p[c] < '0' || p[c] > '9')) - error("Invalid digit \'%c\' in number.",p[c]); + error (_("Invalid digit \'%c\' in number."),p[c]); } while (len-- > 0) @@ -702,7 +702,7 @@ parse_number (olen) c = *p++; n *= base; if( base == 8 && (c == '8' || c == '9')) - error("Invalid digit \'%c\' in octal number.",c); + error (_("Invalid digit \'%c\' in octal number."),c); if (c >= '0' && c <= '9') i = c - '0'; else @@ -723,7 +723,7 @@ parse_number (olen) { if((unsigned_p && (unsigned)prevn >= (unsigned)n) || ((!unsigned_p && number_sign==-1) && -prevn <= -n)) - range_error("Overflow on numeric constant."); + range_error (_("Overflow on numeric constant.")); } prevn=n; } @@ -743,7 +743,7 @@ parse_number (olen) return UINT; } else if((unsigned_p && (n<0))) { - range_error("Overflow on numeric constant -- number too large."); + range_error (_("Overflow on numeric constant -- number too large.")); /* But, this can return if range_check == range_warn. */ } yylval.lval = n; @@ -905,7 +905,7 @@ yylex (void) } } if(c != quote) - error("Unterminated string or character constant."); + error (_("Unterminated string or character constant.")); yylval.sval.ptr = tokstart + 1; yylval.sval.length = namelen - 1; lexptr += namelen + 1; @@ -952,7 +952,7 @@ yylex (void) memcpy (err_copy, tokstart, p - tokstart); err_copy[p - tokstart] = 0; - error ("Invalid number \"%s\".", err_copy); + error (_("Invalid number \"%s\"."), err_copy); } lexptr = p; return toktype; @@ -961,7 +961,7 @@ yylex (void) if (!(c == '_' || c == '$' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) /* We must have come across a bad character (e.g. ';'). */ - error ("Invalid character '%c' in expression.", c); + error (_("Invalid character '%c' in expression."), c); /* It's a name. See how long it is. */ namelen = 0; @@ -1038,14 +1038,14 @@ yylex (void) return BLOCKNAME; case LOC_UNDEF: - error("internal: Undefined class in m2lex()"); + error (_("internal: Undefined class in m2lex()")); case LOC_LABEL: case LOC_UNRESOLVED: - error("internal: Unforseen case in m2lex()"); + error (_("internal: Unforseen case in m2lex()")); default: - error ("unhandled token in m2lex()"); + error (_("unhandled token in m2lex()")); break; } } @@ -1090,5 +1090,5 @@ yyerror (msg) if (prev_lexptr) lexptr = prev_lexptr; - error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); + error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr); } diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y index d2f193a..852adff 100644 --- a/gdb/objc-exp.y +++ b/gdb/objc-exp.y @@ -332,7 +332,7 @@ exp : '[' TYPENAME class = lookup_objc_class (parse_gdbarch, copy_name ($2.stoken)); if (class == 0) - error ("%s is not an ObjC Class", + error (_("%s is not an ObjC Class"), copy_name ($2.stoken)); write_exp_elt_opcode (OP_LONG); write_exp_elt_type (parse_type->builtin_int); @@ -625,7 +625,7 @@ block : BLOCKNAME $$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem), STATIC_BLOCK); else - error ("No file or function \"%s\".", + error (_("No file or function \"%s\"."), copy_name ($1.stoken)); } } @@ -636,7 +636,7 @@ block : block COLONCOLON name = lookup_symbol (copy_name ($3), $1, VAR_DOMAIN, (int *) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) - error ("No function \"%s\" in specified context.", + error (_("No function \"%s\" in specified context."), copy_name ($3)); $$ = SYMBOL_BLOCK_VALUE (tem); } ; @@ -646,7 +646,7 @@ variable: block COLONCOLON name sym = lookup_symbol (copy_name ($3), $1, VAR_DOMAIN, (int *) NULL); if (sym == 0) - error ("No symbol \"%s\" in specified context.", + error (_("No symbol \"%s\" in specified context."), copy_name ($3)); write_exp_elt_opcode (OP_VAR_VALUE); @@ -661,7 +661,7 @@ qualified_name: typebase COLONCOLON name struct type *type = $1; if (TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_UNION) - error ("`%s' is not defined as an aggregate type.", + error (_("`%s' is not defined as an aggregate type."), TYPE_NAME (type)); write_exp_elt_opcode (OP_SCOPE); @@ -675,11 +675,11 @@ qualified_name: typebase COLONCOLON name struct stoken tmp_token; if (TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_UNION) - error ("`%s' is not defined as an aggregate type.", + error (_("`%s' is not defined as an aggregate type."), TYPE_NAME (type)); if (strcmp (type_name_no_tag (type), $4.ptr) != 0) - error ("invalid destructor `%s::~%s'", + error (_("invalid destructor `%s::~%s'"), type_name_no_tag (type), $4.ptr); tmp_token.ptr = (char*) alloca ($4.length + 2); @@ -718,10 +718,10 @@ variable: qualified_name write_exp_msymbol (msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. " - "Use the \"file\" command."); + error (_("No symbol table is loaded. " + "Use the \"file\" command.")); else - error ("No symbol \"%s\" in current context.", + error (_("No symbol \"%s\" in current context."), name); } ; @@ -772,10 +772,10 @@ variable: name_not_typename write_exp_msymbol (msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. " - "Use the \"file\" command."); + error (_("No symbol table is loaded. " + "Use the \"file\" command.")); else - error ("No symbol \"%s\" in current context.", + error (_("No symbol \"%s\" in current context."), copy_name ($1.stoken)); } } @@ -858,7 +858,7 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier. */ | CLASSNAME { if ($1.type == NULL) - error ("No symbol \"%s\" in current context.", + error (_("No symbol \"%s\" in current context."), copy_name($1.stoken)); else $$ = $1.type; @@ -1102,7 +1102,7 @@ parse_number (p, len, parsed_float, putithere) if (c != 'l' && c != 'u' && n != 0) { if ((unsigned_p && (unsigned LONGEST) prevn >= (unsigned LONGEST) n)) - error ("Numeric constant too large."); + error (_("Numeric constant too large.")); } prevn = n; } @@ -1267,7 +1267,7 @@ yylex (void) if (c == '\\') c = parse_escape (parse_gdbarch, &lexptr); else if (c == '\'') - error ("Empty character constant."); + error (_("Empty character constant.")); yylval.typed_val_int.val = c; yylval.typed_val_int.type = parse_type->builtin_char; @@ -1280,12 +1280,12 @@ yylex (void) { lexptr = tokstart + namelen; if (lexptr[-1] != '\'') - error ("Unmatched single quote."); + error (_("Unmatched single quote.")); namelen -= 2; tokstart++; goto tryname; } - error ("Invalid character constant."); + error (_("Invalid character constant.")); } return INT; @@ -1396,7 +1396,7 @@ yylex (void) memcpy (err_copy, tokstart, p - tokstart); err_copy[p - tokstart] = 0; - error ("Invalid number \"%s\".", err_copy); + error (_("Invalid number \"%s\"."), err_copy); } lexptr = p; return toktype; @@ -1434,7 +1434,7 @@ yylex (void) tokptr = strchr(tokstart, '('); if (tokptr == NULL) { - error ("Missing '(' in @selector(...)"); + error (_("Missing '(' in @selector(...)")); } tempbufindex = 0; tokptr++; /* Skip the '('. */ @@ -1449,7 +1449,7 @@ yylex (void) } while ((*tokptr != ')') && (*tokptr != '\0')); if (*tokptr++ != ')') { - error ("Missing ')' in @selector(...)"); + error (_("Missing ')' in @selector(...)")); } tempbuf[tempbufindex] = '\0'; yylval.sval.ptr = tempbuf; @@ -1510,7 +1510,7 @@ yylex (void) } while ((*tokptr != '"') && (*tokptr != '\0')); if (*tokptr++ != '"') { - error ("Unterminated string in expression."); + error (_("Unterminated string in expression.")); } tempbuf[tempbufindex] = '\0'; /* See note above. */ yylval.sval.ptr = tempbuf; @@ -1522,7 +1522,7 @@ yylex (void) if (!(tokchr == '_' || tokchr == '$' || (tokchr >= 'a' && tokchr <= 'z') || (tokchr >= 'A' && tokchr <= 'Z'))) /* We must have come across a bad character (e.g. ';'). */ - error ("Invalid character '%c' in expression.", c); + error (_("Invalid character '%c' in expression."), c); /* It's a name. See how long it is. */ namelen = 0; @@ -1780,8 +1780,8 @@ yyerror (msg) char *msg; { if (*lexptr == '\0') - error("A %s near end of expression.", (msg ? msg : "error")); + error(_("A %s near end of expression."), (msg ? msg : "error")); else - error ("A %s in expression, near `%s'.", (msg ? msg : "error"), + error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr); } diff --git a/gdb/p-exp.y b/gdb/p-exp.y index 2b7cb2a..32c7aca 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -644,7 +644,7 @@ block : BLOCKNAME $$ = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem), STATIC_BLOCK); else - error ("No file or function \"%s\".", + error (_("No file or function \"%s\"."), copy_name ($1.stoken)); } } @@ -655,7 +655,7 @@ block : block COLONCOLON name = lookup_symbol (copy_name ($3), $1, VAR_DOMAIN, (int *) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) - error ("No function \"%s\" in specified context.", + error (_("No function \"%s\" in specified context."), copy_name ($3)); $$ = SYMBOL_BLOCK_VALUE (tem); } ; @@ -665,7 +665,7 @@ variable: block COLONCOLON name sym = lookup_symbol (copy_name ($3), $1, VAR_DOMAIN, (int *) NULL); if (sym == 0) - error ("No symbol \"%s\" in specified context.", + error (_("No symbol \"%s\" in specified context."), copy_name ($3)); write_exp_elt_opcode (OP_VAR_VALUE); @@ -680,7 +680,7 @@ qualified_name: typebase COLONCOLON name struct type *type = $1; if (TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_UNION) - error ("`%s' is not defined as an aggregate type.", + error (_("`%s' is not defined as an aggregate type."), TYPE_NAME (type)); write_exp_elt_opcode (OP_SCOPE); @@ -714,10 +714,10 @@ variable: qualified_name write_exp_msymbol (msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. " - "Use the \"file\" command."); + error (_("No symbol table is loaded. " + "Use the \"file\" command.")); else - error ("No symbol \"%s\" in current context.", + error (_("No symbol \"%s\" in current context."), name); } ; @@ -783,10 +783,10 @@ variable: name_not_typename write_exp_msymbol (msymbol); else if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. " - "Use the \"file\" command."); + error (_("No symbol table is loaded. " + "Use the \"file\" command.")); else - error ("No symbol \"%s\" in current context.", + error (_("No symbol \"%s\" in current context."), copy_name ($1.stoken)); } } @@ -961,7 +961,7 @@ parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere) if (c != 'l' && c != 'u' && n != 0) { if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n)) - error ("Numeric constant too large."); + error (_("Numeric constant too large.")); } prevn = n; } @@ -1188,7 +1188,7 @@ yylex (void) if (c == '\\') c = parse_escape (parse_gdbarch, &lexptr); else if (c == '\'') - error ("Empty character constant."); + error (_("Empty character constant.")); yylval.typed_val_int.val = c; yylval.typed_val_int.type = parse_type->builtin_char; @@ -1201,13 +1201,13 @@ yylex (void) { lexptr = tokstart + namelen; if (lexptr[-1] != '\'') - error ("Unmatched single quote."); + error (_("Unmatched single quote.")); namelen -= 2; tokstart++; uptokstart = uptok(tokstart,namelen); goto tryname; } - error ("Invalid character constant."); + error (_("Invalid character constant.")); } return INT; @@ -1299,7 +1299,7 @@ yylex (void) memcpy (err_copy, tokstart, p - tokstart); err_copy[p - tokstart] = 0; - error ("Invalid number \"%s\".", err_copy); + error (_("Invalid number \"%s\"."), err_copy); } lexptr = p; return toktype; @@ -1372,7 +1372,7 @@ yylex (void) } while ((*tokptr != '"') && (*tokptr != '\0')); if (*tokptr++ != '"') { - error ("Unterminated string in expression."); + error (_("Unterminated string in expression.")); } tempbuf[tempbufindex] = '\0'; /* See note above. */ yylval.sval.ptr = tempbuf; @@ -1384,7 +1384,7 @@ yylex (void) if (!(c == '_' || c == '$' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) /* We must have come across a bad character (e.g. ';'). */ - error ("Invalid character '%c' in expression.", c); + error (_("Invalid character '%c' in expression."), c); /* It's a name. See how long it is. */ namelen = 0; @@ -1739,5 +1739,5 @@ yyerror (msg) if (prev_lexptr) lexptr = prev_lexptr; - error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); + error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr); } -- cgit v1.1