replace eprint() functions with BSD error functions

This commit is contained in:
Matthias-Christian Ott
2008-07-04 18:05:08 +02:00
parent f757e6f839
commit d16fdbb6fa
5 changed files with 31 additions and 45 deletions

14
st.c
View File

@ -1,13 +1,17 @@
/* See LICENSE file for copyright and license details. */
#include "util.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[]) {
if(argc == 2 && !strcmp("-v", argv[1]))
eprint("st-"VERSION", © 2007-2008 st engineers, see LICENSE for details\n");
else if(argc != 1)
eprint("usage: st [-v]\n");
if(argc == 2 && !strcmp("-v", argv[1])) {
fprintf(stderr, "st-"VERSION", © 2007-2008 st engineers, see LICENSE for details\n");
exit(EXIT_SUCCESS);
}
else if(argc != 1) {
fprintf(stderr, "usage: st [-v]\n");
exit(EXIT_FAILURE);
}
return 0;
}