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:
joey
2003-12-19 19:12:08 +00:00
parent 351c8ca204
commit 51eabc017b
310 changed files with 7852 additions and 5005 deletions

View File

@@ -1,4 +1,30 @@
# Makefrag - makefile fragment for bcd
#
# 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.
bcd_DIRS := $(GAMESDIR) $(MAN6DIR)
@@ -8,6 +34,3 @@ bcd_install: bcd_all
$(INSTALL_BINARY) bcd/bcd $(INSTALL_PREFIX)$(GAMESDIR)/bcd
$(HIDE_GAME) bcd
$(INSTALL_MANUAL) bcd/bcd.6
bcd_check: bcd_all
date | bcd/bcd

View File

@@ -1,4 +1,4 @@
/* $NetBSD: bcd.c,v 1.7 1997/10/10 09:54:18 lukem Exp $ */
/* $NetBSD: bcd.c,v 1.11 2000/07/03 03:57:40 matt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)bcd.c 8.2 (Berkeley) 3/20/94";
#else
__RCSID("$NetBSD: bcd.c,v 1.7 1997/10/10 09:54:18 lukem Exp $");
__RCSID("$NetBSD: bcd.c,v 1.11 2000/07/03 03:57:40 matt Exp $");
#endif
#endif /* not lint */
@@ -83,6 +83,7 @@ __RCSID("$NetBSD: bcd.c,v 1.7 1997/10/10 09:54:18 lukem Exp $");
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
@@ -128,7 +129,7 @@ const u_short holes[256] = {
#define bit(w,i) ((w)&(1<<(i)))
int main __P((int, char *[]));
void printcard __P((char *));
void printcard __P((unsigned char *));
int
main(argc, argv)
@@ -147,10 +148,10 @@ main(argc, argv)
if (argc > 1) {
while (--argc)
printcard(*++argv);
printcard((unsigned char *)*++argv);
} else
while (fgets(cardline, sizeof(cardline), stdin))
printcard(cardline);
printcard((unsigned char *)cardline);
exit(0);
}
@@ -158,17 +159,17 @@ main(argc, argv)
void
printcard(str)
char *str;
unsigned char *str;
{
static const char rowchars[] = " 123456789";
int i, row;
unsigned char *p;
/* ruthlessly remove newlines and truncate at 48 characters. */
if ((p = strchr(str, '\n')))
if ((p = (unsigned char *)strchr((char *)str, '\n')))
*p = '\0';
if (strlen(str) > COLUMNS)
if (strlen((char *)str) > COLUMNS)
str[COLUMNS] = '\0';
/* make string upper case. */