commit 2f4a1c4bec04ae94b6b19f84512c2f07b8bb252e
parent fc7ea6b72970a2c7d1f38a9ebe6aaaae90ee7ffb
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Sat, 24 Apr 2021 20:00:36 -0700
Simplify warn function
Diffstat:
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/TODO b/TODO
@@ -19,3 +19,4 @@
[?] add support for more color depths (< 24).
[?] add command mode or shell support for viewing
images in a directory (output key to stdout might be enough?).
+[ ] Fix segmentation fault with directory argument.
diff --git a/lel.c b/lel.c
@@ -71,12 +71,7 @@ static void (*view)(unsigned int *, unsigned int *);
static void
warn(char *s)
{
- fputs(getprogname(), stderr);
- if (s)
- fprintf(stderr, ": %s", s);
- if (errno)
- fprintf(stderr, ": %s", strerror(errno));
- fputs(".\n", stderr);
+ perror(s);
}
static void