aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/main.c b/main.c
index d200b6fd..e49730a7 100644
--- a/main.c
+++ b/main.c
@@ -418,12 +418,12 @@ main(int argc, char **argv)
if ((BINMODE & BINMODE_INPUT) != 0)
if (os_setbinmode(fileno(stdin), O_BINARY) == -1)
- fatal(_("can't set binary mode on stdin (%s)"), strerror(errno));
+ fatal(_("cannot set binary mode on stdin: %s"), strerror(errno));
if ((BINMODE & BINMODE_OUTPUT) != 0) {
if (os_setbinmode(fileno(stdout), O_BINARY) == -1)
- fatal(_("can't set binary mode on stdout (%s)"), strerror(errno));
+ fatal(_("cannot set binary mode on stdout: %s"), strerror(errno));
if (os_setbinmode(fileno(stderr), O_BINARY) == -1)
- fatal(_("can't set binary mode on stderr (%s)"), strerror(errno));
+ fatal(_("cannot set binary mode on stderr: %s"), strerror(errno));
}
#ifdef GAWKDEBUG
@@ -630,10 +630,7 @@ usage(int exitval, FILE *fp)
#endif
/* This is one string to make things easier on translators. */
- /* TRANSLATORS: --help output 5 (end)
- TRANSLATORS: the placeholder indicates the bug-reporting address
- for this application. Please add _another line_ with the
- address for translation bugs.
+ /* TRANSLATORS: --help output (end)
no-wrap */
fputs(_("\nTo report bugs, see node `Bugs' in `gawk.info'\n\
which is section `Reporting Problems and Bugs' in the\n\
@@ -647,8 +644,8 @@ or by using a web forum such as Stack Overflow.\n\n"), fp);
By default it reads standard input and writes standard output.\n\n"), fp);
/* ditto */
- fputs(_("Examples:\n\tgawk '{ sum += $1 }; END { print sum }' file\n\
-\tgawk -F: '{ print $1 }' /etc/passwd\n"), fp);
+ fprintf(fp, _("Examples:\n\t%s '{ sum += $1 }; END { print sum }' file\n\
+\tgawk -F: '{ print $1 }' /etc/passwd\n"), myname);
fflush(fp);
@@ -662,9 +659,9 @@ By default it reads standard input and writes standard output.\n\n"), fp);
die_via_sigpipe();
if (fp == stdout)
- warning(_("error writing standard output (%s)"), strerror(errno));
+ warning(_("error writing standard output: %s"), strerror(errno));
else if (fp == stderr)
- warning(_("error writing standard error (%s)"), strerror(errno));
+ warning(_("error writing standard error: %s"), strerror(errno));
// some other problem than SIGPIPE
exit(EXIT_FAILURE);
@@ -709,7 +706,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.\n");
#endif
/* don't warn about stdout if EPIPE, but do error exit */
if (errno != EPIPE)
- warning(_("error writing standard output (%s)"), strerror(errno));
+ warning(_("error writing standard output: %s"), strerror(errno));
exit(EXIT_FAILURE);
}