diff options
author | dholland <dholland@NetBSD.org> | 2010-03-29 02:21:04 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2010-03-29 02:21:04 +0000 |
commit | 8b489af4786f7bd72d62ed3e227a276f6216991f (patch) | |
tree | 3c7dd97e40723ba6b0fade4254949d421399e69b /gomoku | |
parent | f2b7fd780afc1e5af2361c412570c105cde1f297 (diff) | |
download | bsdgames-darwin-8b489af4786f7bd72d62ed3e227a276f6216991f.tar.gz bsdgames-darwin-8b489af4786f7bd72d62ed3e227a276f6216991f.tar.zst bsdgames-darwin-8b489af4786f7bd72d62ed3e227a276f6216991f.zip |
Don't exit(0) on failure. Use errx() instead of fprintf.
Diffstat (limited to 'gomoku')
-rw-r--r-- | gomoku/bdisp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gomoku/bdisp.c b/gomoku/bdisp.c index a5e25ebd..fe227618 100644 --- a/gomoku/bdisp.c +++ b/gomoku/bdisp.c @@ -1,4 +1,4 @@ -/* $NetBSD: bdisp.c,v 1.12 2009/07/13 19:05:40 roy Exp $ */ +/* $NetBSD: bdisp.c,v 1.13 2010/03/29 02:21:04 dholland Exp $ */ /* * Copyright (c) 1994 @@ -37,13 +37,14 @@ #if 0 static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: bdisp.c,v 1.12 2009/07/13 19:05:40 roy Exp $"); +__RCSID("$NetBSD: bdisp.c,v 1.13 2010/03/29 02:21:04 dholland Exp $"); #endif #endif /* not lint */ #include <curses.h> #include <string.h> #include <stdlib.h> +#include <err.h> #include "gomoku.h" #define SCRNH 24 /* assume 24 lines for the moment */ @@ -63,8 +64,7 @@ cursinit(void) { if (!initscr()) { - fprintf(stderr, "couldn't initialize screen\n"); - exit (0); + errx(EXIT_FAILURE, "Couldn't initialize screen"); } noecho(); cbreak(); |