diff options
author | June McEnroe <june@causal.agency> | 2024-05-22 12:16:41 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2024-05-22 12:16:41 -0400 |
commit | 625662a5c1cbb71cf37653df1f31cd60c48b18ae (patch) | |
tree | 7a04a48f7007b30f086b353c0c03002c861383b9 /bin/order.y | |
parent | Add photo descriptions from 05-03 and 05-06 (diff) | |
download | src-625662a5c1cbb71cf37653df1f31cd60c48b18ae.tar.gz src-625662a5c1cbb71cf37653df1f31cd60c48b18ae.zip |
Remove use of sysexits.h
Diffstat (limited to 'bin/order.y')
-rw-r--r-- | bin/order.y | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/order.y b/bin/order.y index b3cbf2df..05be9838 100644 --- a/bin/order.y +++ b/bin/order.y @@ -22,7 +22,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sysexits.h> #define YYSTYPE char * @@ -32,7 +31,7 @@ static char *fmt(const char *format, ...) { va_start(ap, format); vasprintf(&str, format, ap); va_end(ap); - if (!str) err(EX_OSERR, "vasprintf"); + if (!str) err(1, "vasprintf"); return str; } @@ -179,17 +178,17 @@ static int yylex(void) { } static void yyerror(const char *str) { - errx(EX_DATAERR, "%s", str); + errx(1, "%s", str); } int main(int argc, char *argv[]) { for (int i = 1; i < argc; ++i) { in = fmemopen(argv[i], strlen(argv[i]), "r"); - if (!in) err(EX_OSERR, "fmemopen"); + if (!in) err(1, "fmemopen"); yyparse(); fclose(in); } - if (argc > 1) return EX_OK; + if (argc > 1) return 0; in = stdin; yyparse(); } |