diff options
author | Matthias-Christian Ott <ott@enolink.de> | 2008-07-04 18:05:08 +0200 |
---|---|---|
committer | Matthias-Christian Ott <ott@enolink.de> | 2008-07-04 18:05:08 +0200 |
commit | f982c1c37ccc4adc38260a132aa64ee29d1a1a8c (patch) | |
tree | 5d2ca4b666b91eed75ce2b16c3cd7ab785e66838 /st.c | |
parent | d83cbc27b99427d00846832a73810f285d8f0d05 (diff) | |
download | st-f982c1c37ccc4adc38260a132aa64ee29d1a1a8c.tar.gz st-f982c1c37ccc4adc38260a132aa64ee29d1a1a8c.tar.bz2 st-f982c1c37ccc4adc38260a132aa64ee29d1a1a8c.zip |
replace eprint() functions with BSD error functions
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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; } |