aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-02-24 15:10:56 +0100
committerDuncaen <mail@duncano.de>2017-02-24 15:10:56 +0100
commit0370a28d493d29baa75412141a50a86f70ecba08 (patch)
tree56344ecc079a3f27d55b83e355e279e4b7ffd2ca
parent73c833847ee6e3353253633290003139f9e8f73f (diff)
downloadmblaze-0370a28d493d29baa75412141a50a86f70ecba08.tar.gz
msed: prefix error messages
-rw-r--r--msed.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/msed.c b/msed.c
index edb76ea..fe9078c 100644
--- a/msed.c
+++ b/msed.c
@@ -159,13 +159,13 @@ sed(char *file)
}
sep = *e;
if (!sep) {
- fprintf(stderr, "unterminated a command\n");
+ fprintf(stderr, "msed: unterminated a command\n");
exit(1);
}
while (*e && *e != sep)
e++;
if (!(*e == ' ' || *e == ';' || *e == '\n' || !*e)) {
- fprintf(stderr, "unterminated a command\n");
+ fprintf(stderr, "msed: unterminated a command\n");
exit(1);
}
break;
@@ -190,7 +190,7 @@ sed(char *file)
e++;
if (!(*e == ' ' || *e == ';' || *e == '\n' || !*e)) {
- fprintf(stderr, "unterminated s command\n");
+ fprintf(stderr, "msed: unterminated s command\n");
exit(1);
}
@@ -209,7 +209,7 @@ sed(char *file)
break;
default:
- fprintf(stderr, "unknown command: '%c'\n", *e);
+ fprintf(stderr, "msed: unknown command: '%c'\n", *e);
exit(1);
}
}
@@ -253,18 +253,18 @@ sed(char *file)
if (he != hs) {
h = strndup(hs, he-hs);
} else {
- fprintf(stderr, "used command a without header name\n");
+ fprintf(stderr, "msed: used command a without header name\n");
exit(1);
}
e++;
if (*e == ' ' || *e == '\t' || *e == '\n' || *e == ';' || !*e) {
- fprintf(stderr, "no header value for %s\n", h);
+ fprintf(stderr, "msed: no header value for %s\n", h);
exit(1);
} else {
sep = *e;
if (!sep) {
- fprintf(stderr, "unterminated a command\n");
+ fprintf(stderr, "msed: unterminated a command\n");
exit(1);
}
s = ++e;