summary refs log tree commit diff
path: root/bin/mtags.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mtags.c')
-rw-r--r--bin/mtags.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/mtags.c b/bin/mtags.c
index 11cd9c8a..5c42f343 100644
--- a/bin/mtags.c
+++ b/bin/mtags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2021  C. McEnroe <june@causal.agency>
+/* Copyright (C) 2021  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -21,7 +21,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sysexits.h>
 #include <unistd.h>
 
 static void escape(FILE *file, const char *str, size_t len) {
@@ -41,16 +40,16 @@ int main(int argc, char *argv[]) {
 		switch (opt) {
 			break; case 'a': append = true;
 			break; case 'f': path = optarg;
-			break; default:  return EX_USAGE;
+			break; default:  return 1;
 		}
 	}
 
 	FILE *tags = fopen(path, (append ? "a" : "w"));
-	if (!tags) err(EX_CANTCREAT, "%s", path);
+	if (!tags) err(1, "%s", path);
 
 #ifdef __OpenBSD__
 	error = pledge("stdio rpath", NULL);
-	if (error) err(EX_OSERR, "pledge");
+	if (error) err(1, "pledge");
 #endif
 
 	regex_t makeFile, makeLine;
@@ -87,7 +86,7 @@ int main(int argc, char *argv[]) {
 		}
 
 		FILE *file = fopen(argv[i], "r");
-		if (!file) err(EX_NOINPUT, "%s", argv[i]);
+		if (!file) err(1, "%s", argv[i]);
 
 		while (0 < getline(&buf, &cap, file)) {
 			regmatch_t match[2];