Revert use of system exit codes.

While well‐intentioned, in practice this hurts portability and
really, nobody checks the return codes anyway.
This commit is contained in:
Anthony J. Bentley
2011-06-04 21:33:03 -06:00
parent d784b14615
commit b1a2c664a9
6 changed files with 16 additions and 22 deletions

View File

@@ -4,7 +4,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include "asmotor.h"
@@ -21,7 +20,7 @@ usage(void)
{
printf("RGBLib v" LIB_VERSION " (part of ASMotor " ASMOTOR_VERSION ")\n\n");
printf("usage: rgblib file [add | delete | extract | list] [module ...]\n");
exit(EX_USAGE);
exit(1);
}
/*
* The main routine
@@ -85,10 +84,10 @@ main(int argc, char *argv[])
("Extracted module '%s'\n",
argv[argn]);
} else
err(EX_NOINPUT,
err(1,
"Unable to write module '%s'", argv[argn]);
} else
errx(EX_NOINPUT, "Module not found");
errx(1, "Module not found");
argn += 1;
argc -= 1;