summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.bin/xx.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/.bin/xx.c b/.bin/xx.c
index 9b8f5d0f..00b55391 100755
--- a/.bin/xx.c
+++ b/.bin/xx.c
@@ -3,6 +3,7 @@ exec clang -Weverything -Wno-vla $@ -o $(dirname $0)/xx $0
 #endif
 
 #include <ctype.h>
+#include <err.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -50,10 +51,7 @@ int main(int argc, char **argv) {
         path = argv[optind];
 
     FILE *file = path ? fopen(path, "r") : stdin;
-    if (!file) {
-        perror(path);
-        return EX_NOINPUT;
-    }
+    if (!file) err(EX_NOINPUT, "%s", path);
 
     uint8_t buf[cols];
     size_t offset = 0, len = 0, i;
@@ -92,9 +90,6 @@ int main(int argc, char **argv) {
         if (len < sizeof(buf)) break;
     }
 
-    if (ferror(file)) {
-        perror(path);
-        return EX_IOERR;
-    }
+    if (ferror(file)) err(EX_IOERR, "%s", path);
     return EX_OK;
 }
='decoration'> 2062.63June McEnroe 2021-08-29Update to Linux man-pages 5.13 2062.53Štěpán Němec 2021-08-26Update to NetBSD 9.2 2062.52June McEnroe 2021-08-26Support DESTDIR in install/uninstallJune McEnroe 2021-08-26Add version number generatorJune McEnroe 2021-08-22Add ISC license headerJune McEnroe 2021-08-22Update to Linux man-pages 5.12Štěpán Němec 2021-06-21Add manuals for macOS 11.3June McEnroe 2021-05-08Update to OpenBSD 6.9June McEnroe 2021-04-26Update to Linux man-pages 5.11June McEnroe 2021-04-26Update to FreeBSD 13.0June McEnroe 2021-01-27Completely rewrite how manuals are fetched and installedJune McEnroe 2020-12-14Update to man-pages-posix 2017-aJune McEnroe 2020-12-14Update to OpenBSD 6.8June McEnroe 2020-12-14Update to NetBSD 9.1June McEnroe 2020-12-14Update to man-pages 5.09June McEnroe 2020-12-14Update to FreeBSD 12.2June McEnroe 2020-06-08Update to OpenBSD 6.7June McEnroe 2020-05-04Add hack for macOS to search extra man sectionsJune McEnroe 2020-05-04Don't clear MANSECTJune McEnroe