diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-09-24 01:26:08 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-09-24 01:31:31 +0200 |
| commit | bcac04b4316d64063e743e7a49195173a0c175a0 (patch) | |
| tree | fc29431d21d83e4496da31d32f4f441de41026be /src/util.c | |
| parent | Fix colour distortion (diff) | |
| download | blind-bcac04b4316d64063e743e7a49195173a0c175a0.tar.gz blind-bcac04b4316d64063e743e7a49195173a0c175a0.tar.bz2 blind-bcac04b4316d64063e743e7a49195173a0c175a0.tar.xz | |
Add -% to blind-to-text, blind-colour-srgb, and blind-colour-ciexyz
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -6,6 +6,7 @@ char *argv0; void weprintf(const char *fmt, ...) { + char end; va_list ap; va_start(ap, fmt); @@ -14,9 +15,12 @@ weprintf(const char *fmt, ...) vfprintf(stderr, fmt, ap); - if (fmt[0] && fmt[strlen(fmt)-1] == ':') { + end = *fmt ? strchr(fmt, '\0')[-1] : '\n'; + if (end == ':') { fputc(' ', stderr); perror(NULL); + } else if (end != '\n') { + fputc('\n', stderr); } va_end(ap); |
