use errx() for help and version messages

dev
Matthias-Christian Ott 2008-07-21 09:25:25 +02:00
parent a95f4f2ed9
commit 746931a3d4
1 changed files with 4 additions and 8 deletions

12
std.c
View File

@ -265,14 +265,10 @@ int
main(int argc, char *argv[]) {
fd_set rfds;
if(argc == 2 && !strcmp("-v", argv[1])) {
fprintf(stderr, "std-"VERSION", © 2008 Matthias-Christian Ott\n");
exit(EXIT_SUCCESS);
}
else if(argc == 1) {
fprintf(stderr, "usage: st [-v]\n");
exit(EXIT_FAILURE);
}
if(argc == 2 && !strcmp("-v", argv[1]))
errx(EXIT_SUCCESS, "std-"VERSION", © 2008 Matthias-Christian Ott");
else if(argc == 1)
errx(EXIT_FAILURE, "usage: st [-v]");
getpty();
shell();
FD_ZERO(&rfds);