about summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2024-05-22 19:39:44 -0400
committerJune McEnroe <june@causal.agency>2024-05-22 19:39:44 -0400
commitd3b3c96385a9f456ac7a0e8f7eaa615d1dfc78d4 (patch)
tree920ef7c7a642d01d8063f234ef4c63d865ad9808 /chat.h
parentPronouns (diff)
downloadcatgirl-d3b3c96385a9f456ac7a0e8f7eaa615d1dfc78d4.tar.gz
catgirl-d3b3c96385a9f456ac7a0e8f7eaa615d1dfc78d4.zip
Remove use of sysexits.h
Preserve exit status 69 (EX_UNAVAILABLE) for getting disconnected.
Use 127 for failing to exec, like the shell.
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/chat.h b/chat.h
index 2a41cf6..369747c 100644
--- a/chat.h
+++ b/chat.h
@@ -35,7 +35,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <strings.h>
-#include <sysexits.h>
 #include <time.h>
 #include <wchar.h>
 
@@ -131,7 +130,7 @@ static inline uint idFor(const char *name) {
 	if (idNext == IDCap) return Network;
 	idNames[idNext] = strdup(name);
 	idColors[idNext] = Default;
-	if (!idNames[idNext]) err(EX_OSERR, "strdup");
+	if (!idNames[idNext]) err(1, "strdup");
 	return idNext++;
 }
 
@@ -221,7 +220,7 @@ extern struct Self {
 static inline void set(char **field, const char *value) {
 	free(*field);
 	*field = strdup(value);
-	if (!*field) err(EX_OSERR, "strdup");
+	if (!*field) err(1, "strdup");
 }
 
 #define ENUM_TAG \
@@ -273,7 +272,7 @@ static inline void utilPush(struct Util *util, const char *arg) {
 	if (1 + util->argc < UtilCap) {
 		util->argv[util->argc++] = arg;
 	} else {
-		errx(EX_CONFIG, "too many utility arguments");
+		errx(1, "too many utility arguments");
 	}
 }