diff options
Diffstat (limited to 'awkgram.c')
-rw-r--r-- | awkgram.c | 43 |
1 files changed, 22 insertions, 21 deletions
@@ -4303,7 +4303,7 @@ regular_print: f->opcode = Op_indirect_func_call; name = estrdup(f->func_name, strlen(f->func_name)); if (is_std_var(name)) - yyerror(_("can not use special variable `%s' for indirect function call"), name); + yyerror(_("cannot use special variable `%s' for indirect function call"), name); indirect_var = variable(f->source_line, name, Node_var_new); t = instruction(Op_push); t->memory = indirect_var; @@ -5439,8 +5439,8 @@ add_srcfile(enum srctype stype, char *src, SRCFILE *thisfile, bool *already_incl } /* use full messages to ease translation */ fatal(stype != SRC_EXTLIB - ? _("can't open source file `%s' for reading (%s)") - : _("can't open shared library `%s' for reading (%s)"), + ? _("cannot open source file `%s' for reading: %s") + : _("cannot open shared library `%s' for reading: %s"), src, errno_val ? strerror(errno_val) : _("reason unknown")); } @@ -5451,7 +5451,7 @@ add_srcfile(enum srctype stype, char *src, SRCFILE *thisfile, bool *already_incl if (stype == SRC_INC || stype == SRC_EXTLIB) { /* eliminate duplicates */ if ((stype == SRC_INC) && (s->stype == SRC_FILE)) - fatal(_("can't include `%s' and use it as a program file"), src); + fatal(_("cannot include `%s' and use it as a program file"), src); if (do_lint) { int line = sourceline; @@ -5475,7 +5475,7 @@ add_srcfile(enum srctype stype, char *src, SRCFILE *thisfile, bool *already_incl } else { /* duplicates are allowed for -f */ if (s->stype == SRC_INC) - fatal(_("can't include `%s' and use it as a program file"), src); + fatal(_("cannot include `%s' and use it as a program file"), src); /* no need to scan for further matches, since * they must be of homogeneous type */ break; @@ -5517,7 +5517,7 @@ include_source(INSTRUCTION *file, void **srcfile_p) if (already_included) return true; error_ln(file->source_line, - _("can't open source file `%s' for reading (%s)"), + _("cannot open source file `%s' for reading: %s"), src, errcode ? strerror(errcode) : _("reason unknown")); return false; } @@ -5577,7 +5577,7 @@ load_library(INSTRUCTION *file, void **srcfile_p) if (already_included) return true; error_ln(file->source_line, - _("can't open shared library `%s' for reading (%s)"), + _("cannot open shared library `%s' for reading: %s"), src, errcode ? strerror(errcode) : _("reason unknown")); return false; } @@ -5755,7 +5755,7 @@ get_src_buf() /* suppress file name and line no. in error mesg */ in = source; source = NULL; - error(_("can't open source file `%s' for reading (%s)"), + error(_("cannot open source file `%s' for reading: %s"), in, strerror(errno)); errcount++; lexeof = true; @@ -5823,7 +5823,7 @@ get_src_buf() n = (*readfunc)(sourcefile->fd, lexptr, sourcefile->bufsize - savelen); if (n == -1) { - error(_("can't read sourcefile `%s' (%s)"), + error(_("cannot read source file `%s': %s"), source, strerror(errno)); errcount++; lexeof = true; @@ -5893,7 +5893,8 @@ check_bad_char(int c) } if (iscntrl(c) && ! isspace(c)) - fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), c & 0xFF); + // This is a PEBKAC error, but we'll be nice and not say so. + fatal(_("error: invalid character '\\%03o' in source code"), c & 0xFF); } /* nextc --- get the next input character */ @@ -6474,9 +6475,9 @@ retry: if (! did_warn_assgn) { did_warn_assgn = true; if (do_lint) - lintwarn(_("POSIX does not allow operator `**='")); + lintwarn(_("POSIX does not allow operator `%s'"), "**="); if (do_lint_old) - lintwarn(_("old awk does not support operator `**='")); + lintwarn(_("operator `%s' is not supported in old awk"), "**="); } yylval = GET_INSTRUCTION(Op_assign_exp); return ASSIGNOP; @@ -6485,9 +6486,9 @@ retry: if (! did_warn_op) { did_warn_op = true; if (do_lint) - lintwarn(_("POSIX does not allow operator `**'")); + lintwarn(_("POSIX does not allow operator `%s'"), "**"); if (do_lint_old) - lintwarn(_("old awk does not support operator `**'")); + lintwarn(_("operator `%s' is not supported in old awk"), "**"); } yylval = GET_INSTRUCTION(Op_exp); return lasttok = '^'; @@ -6522,7 +6523,7 @@ retry: if (nextc(true) == '=') { if (do_lint_old && ! did_warn_assgn) { did_warn_assgn = true; - lintwarn(_("operator `^=' is not supported in old awk")); + lintwarn(_("operator `%s' is not supported in old awk"), "^="); } yylval = GET_INSTRUCTION(Op_assign_exp); return lasttok = ASSIGNOP; @@ -6530,7 +6531,7 @@ retry: pushback(); if (do_lint_old && ! did_warn_op) { did_warn_op = true; - lintwarn(_("operator `^' is not supported in old awk")); + lintwarn(_("operator `%s' is not supported in old awk"), "^"); } yylval = GET_INSTRUCTION(Op_exp); return lasttok = '^'; @@ -7187,7 +7188,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r) ip = arg->lasti; if (ip->opcode == Op_push_i) { if (do_lint) - lintwarn(_("%s: string literal as last arg of substitute has no effect"), + lintwarn(_("%s: string literal as last argument of substitute has no effect"), operator); r->sub_flags |= LITERAL; } else { @@ -7504,7 +7505,7 @@ dump_vars(const char *fname) else if (strcmp(fname, "-") == 0) fp = stdout; else if ((fp = fopen(fname, "w")) == NULL) { - warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno)); + warning(_("could not open `%s' for writing: %s"), fname, strerror(errno)); warning(_("sending variable list to standard error")); fp = stderr; } @@ -7513,7 +7514,7 @@ dump_vars(const char *fname) print_vars(vars, fprintf, fp); efree(vars); if (fp != stdout && fp != stderr && fclose(fp) != 0) - warning(_("%s: close failed (%s)"), fname, strerror(errno)); + warning(_("%s: close failed: %s"), fname, strerror(errno)); } /* dump_funcs --- print all functions */ @@ -7674,10 +7675,10 @@ check_params(char *fname, int pcount, INSTRUCTION *list) if (strcmp(name, fname) == 0) { /* check for function foo(foo) { ... }. bleah. */ error_ln(p->source_line, - _("function `%s': can't use function name as parameter name"), fname); + _("function `%s': cannot use function name as parameter name"), fname); } else if (is_std_var(name)) { error_ln(p->source_line, - _("function `%s': can't use special variable `%s' as a function parameter"), + _("function `%s': cannot use special variable `%s' as a function parameter"), fname, name); } else if (strchr(name, ':') != NULL) error_ln(p->source_line, |