sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 9a903c63dee0735369e41bbb9b3befc6b18b1248
parent 2c424c078a4b4c8782efcc3d619372a9639bbecf
Author: Mattias Andrée <maandree@kth.se>
Date:   Sat Feb  4 22:15:13 +0100

libutil/unescape.c: only print argv0 once on error

Signed-off-by: Mattias Andrée <maandree@kth.se>

Diffstat:
libutil/unescape.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libutil/unescape.c b/libutil/unescape.c @@ -35,7 +35,7 @@ unescape(char *s) (s[m] < 'a' && s[m] > 'f')) break; if (m == i + 2) - eprintf("%s: invalid escape sequence '\\%c'\n", argv0, s[i + 1]); + eprintf("invalid escape sequence '\\%c'\n", s[i + 1]); off += m - i - 1; for (--m, q = 0, factor = 1; m > i + 1; m--) { if (s[m] >= '0' && s[m] <= '9') @@ -49,14 +49,14 @@ unescape(char *s) s[i] = q; break; case '\0': - eprintf("%s: null escape sequence\n", argv0); + eprintf("null escape sequence\n"); default: /* "\O[OOO]" octal escape */ for (m = i + 1; m < i + 1 + 4 && m < len; m++) if (s[m] < '0' || s[m] > '7') break; if (m == i + 1) - eprintf("%s: invalid escape sequence '\\%c'\n", argv0, s[i + 1]); + eprintf("invalid escape sequence '\\%c'\n", s[i + 1]); off += m - i - 1; for (--m, q = 0, factor = 1; m > i; m--) { q += (s[m] - '0') * factor;