From f982c1c37ccc4adc38260a132aa64ee29d1a1a8c Mon Sep 17 00:00:00 2001 From: Matthias-Christian Ott Date: Fri, 4 Jul 2008 18:05:08 +0200 Subject: replace eprint() functions with BSD error functions --- st.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'st.c') diff --git a/st.c b/st.c index e82faaa..8a8804f 100644 --- a/st.c +++ b/st.c @@ -1,13 +1,17 @@ /* See LICENSE file for copyright and license details. */ -#include "util.h" #include +#include #include 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; } -- cgit v1.2.3-13-gbd6f