mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 03:14:50 +00:00
copy in from cvs; cvs2svn fucked up big time
git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@9775 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
@@ -1,12 +1,36 @@
|
||||
# Makefile - makefile for hangman
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
|
||||
hangman_DIRS := $(GAMESDIR) $(MAN6DIR) $(shell dirname $(HANGMAN_WORDSFILE))
|
||||
hangman_WORDS := hangman/words
|
||||
hangman_DIRS := $(GAMESDIR) $(MAN6DIR)
|
||||
|
||||
hangman_all: hangman/hangman $(hangman_WORDS) hangman/hangman.6
|
||||
hangman_all: hangman/hangman hangman/hangman.6
|
||||
|
||||
hangman_install: hangman_all
|
||||
$(INSTALL_BINARY) hangman/hangman $(INSTALL_PREFIX)$(GAMESDIR)/hangman
|
||||
$(HIDE_GAME) hangman
|
||||
$(INSTALL_DATA) $(hangman_WORDS) $(INSTALL_PREFIX)$(HANGMAN_WORDSFILE)
|
||||
$(INSTALL_MANUAL) hangman/hangman.6
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: setup.c,v 1.5 1997/10/11 08:01:06 lukem Exp $ */
|
||||
/* $NetBSD: setup.c,v 1.9 2001/12/06 12:07:37 blymn Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: setup.c,v 1.5 1997/10/11 08:01:06 lukem Exp $");
|
||||
__RCSID("$NetBSD: setup.c,v 1.9 2001/12/06 12:07:37 blymn Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -57,7 +57,7 @@ setup()
|
||||
static struct stat sbuf;
|
||||
|
||||
noecho();
|
||||
crmode();
|
||||
cbreak();
|
||||
|
||||
mvaddstr(PROMPTY, PROMPTX, "Guess:");
|
||||
mvaddstr(GUESSY, GUESSX, "Guessed:");
|
||||
@@ -72,9 +72,9 @@ setup()
|
||||
}
|
||||
|
||||
srand(time(NULL) + getpid());
|
||||
if ((Dict = fopen(_PATH_DICT, "r")) == NULL) {
|
||||
if ((Dict = fopen(Dict_name, "r")) == NULL) {
|
||||
endwin();
|
||||
err(1, "fopen %s", _PATH_DICT);
|
||||
err(1, "fopen %s", Dict_name);
|
||||
}
|
||||
fstat(fileno(Dict), &sbuf);
|
||||
Dict_size = sbuf.st_size;
|
||||
|
||||
Reference in New Issue
Block a user