Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/gomoku Don't exit(0) on failure. Use errx() instead of...
details: https://anonhg.NetBSD.org/src/rev/1f7322d5f369
branches: trunk
changeset: 753439:1f7322d5f369
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Mar 29 02:21:04 2010 +0000
description:
Don't exit(0) on failure. Use errx() instead of fprintf.
diffstat:
games/gomoku/bdisp.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 817085199858 -r 1f7322d5f369 games/gomoku/bdisp.c
--- a/games/gomoku/bdisp.c Mon Mar 29 02:11:14 2010 +0000
+++ b/games/gomoku/bdisp.c Mon Mar 29 02:21:04 2010 +0000
@@ -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 @@
{
if (!initscr()) {
- fprintf(stderr, "couldn't initialize screen\n");
- exit (0);
+ errx(EXIT_FAILURE, "Couldn't initialize screen");
}
noecho();
cbreak();
Home |
Main Index |
Thread Index |
Old Index