mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-22 15:25:58 +01:00
use errx() for help and version messages
This commit is contained in:
parent
a95f4f2ed9
commit
746931a3d4
1 changed files with 4 additions and 8 deletions
12
std.c
12
std.c
|
@ -265,14 +265,10 @@ int
|
||||||
main(int argc, char *argv[]) {
|
main(int argc, char *argv[]) {
|
||||||
fd_set rfds;
|
fd_set rfds;
|
||||||
|
|
||||||
if(argc == 2 && !strcmp("-v", argv[1])) {
|
if(argc == 2 && !strcmp("-v", argv[1]))
|
||||||
fprintf(stderr, "std-"VERSION", © 2008 Matthias-Christian Ott\n");
|
errx(EXIT_SUCCESS, "std-"VERSION", © 2008 Matthias-Christian Ott");
|
||||||
exit(EXIT_SUCCESS);
|
else if(argc == 1)
|
||||||
}
|
errx(EXIT_FAILURE, "usage: st [-v]");
|
||||||
else if(argc == 1) {
|
|
||||||
fprintf(stderr, "usage: st [-v]\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
getpty();
|
getpty();
|
||||||
shell();
|
shell();
|
||||||
FD_ZERO(&rfds);
|
FD_ZERO(&rfds);
|
||||||
|
|
Loading…
Reference in a new issue