CVS commit: src/games/warp
Module Name:src Committed By: mrg Date: Tue Apr 13 08:06:38 UTC 2021 Modified Files: src/games/warp: term.h Log Message: avoid duplicating symbols in libterminfo. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/games/warp/term.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/term.h diff -u src/games/warp/term.h:1.5 src/games/warp/term.h:1.6 --- src/games/warp/term.h:1.5 Wed Nov 11 17:11:19 2020 +++ src/games/warp/term.h Tue Apr 13 08:06:38 2021 @@ -252,8 +252,10 @@ EXT bool bizarre INIT(false); /* do we */ #ifdef HAVETERMLIB +#if 0 EXT char *BC INIT(NULL); /* backspace character */ EXT char *UP INIT(NULL); /* move cursor up one line */ +#endif EXT char *myUP; EXT char *ND INIT(NULL); /* non-destructive cursor right */ EXT char *myND; @@ -275,8 +277,10 @@ EXT char *UC INIT(NULL); /* underline a EXT int UG INIT(0); /* blanks left by US and UE */ EXT bool AM INIT(false); /* does terminal have automatic margins? */ EXT bool XN INIT(false); /* does it eat 1st newline after automatic wrap? */ +#if 0 EXT char PC INIT(0); /* pad character for use by tputs() */ EXT short ospeed INIT(0); /* terminal output speed, for use by tputs() */ +#endif EXT int LINES INIT(0), COLS INIT(0); /* size of screen */ EXT int just_a_sec INIT(960); /* 1 sec at current baud rate */ /* (number of nulls) */
CVS commit: src/games/warp
Module Name:src Committed By: rin Date: Sat Nov 21 09:24:02 UTC 2020 Modified Files: src/games/warp: util.h Log Message: roundsleep(): Too many zeros; tv_nsec should be compared with 500 msec, not 5000. Raised by clang for ILP32 archs. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/games/warp/util.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/util.h diff -u src/games/warp/util.h:1.6 src/games/warp/util.h:1.7 --- src/games/warp/util.h:1.6 Thu Nov 12 22:23:16 2020 +++ src/games/warp/util.h Sat Nov 21 09:24:02 2020 @@ -18,7 +18,7 @@ /* we get fractions of seconds from calling ftime on timebuf */ extern struct timespec timebuf; -#define roundsleep(x) (clock_gettime(CLOCK_REALTIME, ),sleep(timebuf.tv_nsec > 50 ?x+1:x)) +#define roundsleep(x) (clock_gettime(CLOCK_REALTIME, ),sleep(timebuf.tv_nsec > (500 * 1000 * 1000) ?x+1:x)) #define waiting 0
CVS commit: src/games/warp
Module Name:src Committed By: joerg Date: Thu Nov 12 22:23:16 UTC 2020 Modified Files: src/games/warp: intrp.c score.h sig.h util.c util.h Log Message: Avoid common symbols. Use __dead. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/games/warp/intrp.c cvs rdiff -u -r1.4 -r1.5 src/games/warp/score.h src/games/warp/sig.h cvs rdiff -u -r1.5 -r1.6 src/games/warp/util.c src/games/warp/util.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/intrp.c diff -u src/games/warp/intrp.c:1.6 src/games/warp/intrp.c:1.7 --- src/games/warp/intrp.c:1.6 Wed Nov 11 19:55:33 2020 +++ src/games/warp/intrp.c Thu Nov 12 22:23:16 2020 @@ -32,7 +32,7 @@ static char *getrealname(uid_t); static char *skipinterp(const char *, const char *); #endif -static void abort_interp(void); +__dead static void abort_interp(void); void intrp_init(char *tcbuf) Index: src/games/warp/score.h diff -u src/games/warp/score.h:1.4 src/games/warp/score.h:1.5 --- src/games/warp/score.h:1.4 Wed Nov 11 19:55:33 2020 +++ src/games/warp/score.h Thu Nov 12 22:23:16 2020 @@ -42,7 +42,7 @@ EXT char longlognam[128]; EXT char c INIT(' '); void score_init(void); -void wscore(void); +__dead void wscore(void); void display_status(void); void wavescore(void); void score(void); Index: src/games/warp/sig.h diff -u src/games/warp/sig.h:1.4 src/games/warp/sig.h:1.5 --- src/games/warp/sig.h:1.4 Tue Nov 10 22:42:19 2020 +++ src/games/warp/sig.h Thu Nov 12 22:23:16 2020 @@ -8,8 +8,8 @@ void sig_init(void); void mytstp(void); -void finalize(int status); -void sig_catcher(int signo); +__dead void finalize(int status); +__dead void sig_catcher(int signo); #ifdef SIGTSTP void cont_catcher(int x); void stop_catcher(int sig); Index: src/games/warp/util.c diff -u src/games/warp/util.c:1.5 src/games/warp/util.c:1.6 --- src/games/warp/util.c:1.5 Tue Nov 10 23:03:22 2020 +++ src/games/warp/util.c Thu Nov 12 22:23:16 2020 @@ -21,6 +21,8 @@ #include "INTERN.h" #include "util.h" +struct timespec timebuf; + void util_init(void) { Index: src/games/warp/util.h diff -u src/games/warp/util.h:1.5 src/games/warp/util.h:1.6 --- src/games/warp/util.h:1.5 Wed Nov 11 19:55:33 2020 +++ src/games/warp/util.h Thu Nov 12 22:23:16 2020 @@ -17,7 +17,7 @@ /* we get fractions of seconds from calling ftime on timebuf */ -EXT struct timespec timebuf; +extern struct timespec timebuf; #define roundsleep(x) (clock_gettime(CLOCK_REALTIME, ),sleep(timebuf.tv_nsec > 50 ?x+1:x)) #define waiting 0 @@ -37,7 +37,7 @@ EXT int len_last_line_got INIT(0); void util_init(void); void movc3(int, char *, char *); -void no_can_do(const char *); +__dead void no_can_do(const char *); int exdis(int); void *safemalloc(size_t size); char *safecpy(char *, const char *, size_t); @@ -46,6 +46,6 @@ char *instr(const char *, const char *); #ifdef SETUIDGID int eaccess(const char *, mode_t); #endif -void prexit(const char *); +__dead void prexit(const char *); char *savestr(const char *); char *getval(const char *, const char *);
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Wed Nov 11 20:04:02 UTC 2020 Modified Files: src/games/warp: Makefile Log Message: Comment out debugging build (it still randomly crashes though) pointed out by wiz To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/games/warp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/Makefile diff -u src/games/warp/Makefile:1.4 src/games/warp/Makefile:1.5 --- src/games/warp/Makefile:1.4 Wed Nov 11 14:54:53 2020 +++ src/games/warp/Makefile Wed Nov 11 15:04:02 2020 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.4 2020/11/11 19:54:53 christos Exp $ +# $NetBSD: Makefile,v 1.5 2020/11/11 20:04:02 christos Exp $ .include PROG= warp -DBG=-g +#DBG=-g SRCS= bang.c init.c intrp.c move.c object.c play.c score.c sig.c term.c \ them.c us.c util.c version.c warp.c weapon.c
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Wed Nov 11 19:55:33 UTC 2020 Modified Files: src/games/warp: config.h config.h.SH config.sh init.c intrp.c score.c score.h sig.c term.c util.h warp.c Log Message: use strchr, strrchr, random, more lint removal, savefile in /var/games/warp not /usr/share/games/warp... To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/games/warp/config.h src/games/warp/sig.c \ src/games/warp/util.h cvs rdiff -u -r1.2 -r1.3 src/games/warp/config.h.SH cvs rdiff -u -r1.1 -r1.2 src/games/warp/config.sh cvs rdiff -u -r1.3 -r1.4 src/games/warp/init.c src/games/warp/score.h cvs rdiff -u -r1.5 -r1.6 src/games/warp/intrp.c src/games/warp/score.c cvs rdiff -u -r1.6 -r1.7 src/games/warp/term.c src/games/warp/warp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/config.h diff -u src/games/warp/config.h:1.4 src/games/warp/config.h:1.5 --- src/games/warp/config.h:1.4 Wed Nov 11 12:11:19 2020 +++ src/games/warp/config.h Wed Nov 11 14:55:33 2020 @@ -85,12 +85,6 @@ */ #define PREFSHELL "/bin/csh" /**/ -/* RANDBITS: - * This symbol contains the number of bits of random number the rand() - * function produces. Usual values are 15, 16, and 31. - */ -#define RANDBITS 15 /**/ - /* ROOTID: * This symbol contains the uid of root, normally 0. */ Index: src/games/warp/sig.c diff -u src/games/warp/sig.c:1.4 src/games/warp/sig.c:1.5 --- src/games/warp/sig.c:1.4 Tue Nov 10 17:42:19 2020 +++ src/games/warp/sig.c Wed Nov 11 14:55:33 2020 @@ -25,9 +25,6 @@ void sig_init(void) { -#ifdef lint -; -#else sigignore(SIGINT); /* for inquiry of existence via kill call */ #ifdef SIGTTOU sigignore(SIGTTOU); @@ -38,8 +35,10 @@ sig_init(void) sigset(SIGQUIT, sig_catcher); sigset(SIGILL, sig_catcher); sigset(SIGFPE, sig_catcher); +#if 0 sigset(SIGBUS, sig_catcher); sigset(SIGSEGV, sig_catcher); +#endif sigset(SIGSYS, sig_catcher); sigset(SIGTERM, sig_catcher); } @@ -53,7 +52,6 @@ sig_init(void) sigset(SIGTSTP, stop_catcher); sigset(SIGSTOP, stop_catcher); #endif -#endif /* lint */ } #ifdef SIGTSTP Index: src/games/warp/util.h diff -u src/games/warp/util.h:1.4 src/games/warp/util.h:1.5 --- src/games/warp/util.h:1.4 Tue Nov 10 17:42:19 2020 +++ src/games/warp/util.h Wed Nov 11 14:55:33 2020 @@ -6,49 +6,19 @@ * */ -#if RANDBITS < 15 || defined(lint) -#define rand_mod(m) getpid() -#define RANDRAND 0.0 -#define HALFRAND 0 -#define myrand() getpid() -#else -#if RANDBITS == 15 /* 15 bits of rand()? */ -#define RANDRAND 268435456.0 /* that's 2**28 */ -#define HALFRAND 0x4000 /* that's 2**14 */ -int rand(void); -#define myrand() (rand()&32767) -#define rand_mod(m) ((int)((double)myrand() / 32768.0 * ((double)(m -/* pick number in 0..m-1 */ - -#else - -#if RANDBITS < 31 /* 16 bits of rand()? */ -#define RANDRAND 1073741824.0 /* that's 2**30 */ -#define HALFRAND 0x8000 /* that's 2**15 */ -unsigned rand(); -#define myrand() (rand()&65535) -#define rand_mod(m) ((int)((double)myrand() / 65536.0 * ((double)(m -/* pick number in 0..m-1 */ - -#else /* assume 31 bits */ #define RANDRAND 1152921504606846976.0 /* that's 2**60 */ #define HALFRAND 0x4000 /* that's 2**30 */ -long rand(); -#define myrand() rand() +#define myrand() (int)random() #define rand_mod(m) ((myrand() / 37) % (m)) /* pick number in 0..m-1 */ /* * The reason for the /37 above is that our random number generator yields * successive evens and odds, for some reason. This makes strange star maps. */ -#endif -#endif -#endif - /* we get fractions of seconds from calling ftime on timebuf */ -EXT struct timeb timebuf; -#define roundsleep(x) (ftime(),sleep(timebuf.millitm > 500?x+1:x)) +EXT struct timespec timebuf; +#define roundsleep(x) (clock_gettime(CLOCK_REALTIME, ),sleep(timebuf.tv_nsec > 50 ?x+1:x)) #define waiting 0 Index: src/games/warp/config.h.SH diff -u src/games/warp/config.h.SH:1.2 src/games/warp/config.h.SH:1.3 --- src/games/warp/config.h.SH:1.2 Tue Nov 10 17:42:19 2020 +++ src/games/warp/config.h.SH Wed Nov 11 14:55:33 2020 @@ -87,16 +87,16 @@ cat
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Wed Nov 11 19:54:54 UTC 2020 Modified Files: src/games/warp: Makefile Log Message: no need for -lcompat To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/games/warp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/Makefile diff -u src/games/warp/Makefile:1.3 src/games/warp/Makefile:1.4 --- src/games/warp/Makefile:1.3 Wed Nov 11 12:11:19 2020 +++ src/games/warp/Makefile Wed Nov 11 14:54:53 2020 @@ -1,14 +1,15 @@ -# $NetBSD: Makefile,v 1.3 2020/11/11 17:11:19 christos Exp $ +# $NetBSD: Makefile,v 1.4 2020/11/11 19:54:53 christos Exp $ .include PROG= warp +DBG=-g SRCS= bang.c init.c intrp.c move.c object.c play.c score.c sig.c term.c \ them.c us.c util.c version.c warp.c weapon.c -DPADD= ${LIBTERMLIB} ${LIBM} ${LIBCOMPAT} -LDADD= -ltermlib -lm -lcompat +DPADD= ${LIBTERMLIB} ${LIBM} +LDADD= -ltermlib -lm CPPFLAGS+=-DHAVETERMLIB @@ -18,9 +19,6 @@ HIDEGAME=hidegame SETGIDGAME=yes MAN= warp.6 -BINGRP= games -BINMODE=2555 - warp.6: ${_MKTARGET_CREATE} cat ${.CURDIR}/warp.man > ${.TARGET} @@ -69,14 +67,4 @@ FILES+=warp.doc warp.news README FILESDIR=/usr/share/games/warp .endif -CFLAGS+= -Wno-error=old-style-definition -Wno-error=strict-prototypes -CFLAGS+= -Wno-error=comment -Wno-error=maybe-uninitialized -CFLAGS+= -Wno-error=discarded-qualifiers -Wno-error=dangling-else -CFLAGS+= -Wno-error=char-subscripts -Wno-error=parentheses -CFLAGS+= -Wno-error=unused-value -Wno-error=format-extra-args -CFLAGS+= -Wno-error=format-overflow= -Wno-error=builtin-declaration-mismatch -CFLAGS+= -Wno-error=format= -Wno-error=sign-compare -Wno-error=return-type -CFLAGS+= -Wno-error=unused-label -Wno-error=unused-variable -CFLAGS+= -Wno-error=format-nonliteral -Wno-error=implicit-fallthrough= - .include
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Wed Nov 11 17:11:19 UTC 2020 Modified Files: src/games/warp: Makefile config.h intrp.c score.c term.c term.h warp.h Log Message: - use termios - enable setgid games - enable savedir To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/games/warp/Makefile cvs rdiff -u -r1.3 -r1.4 src/games/warp/config.h cvs rdiff -u -r1.4 -r1.5 src/games/warp/intrp.c src/games/warp/score.c \ src/games/warp/term.h src/games/warp/warp.h cvs rdiff -u -r1.5 -r1.6 src/games/warp/term.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/Makefile diff -u src/games/warp/Makefile:1.2 src/games/warp/Makefile:1.3 --- src/games/warp/Makefile:1.2 Tue Nov 10 03:49:08 2020 +++ src/games/warp/Makefile Wed Nov 11 12:11:19 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2020/11/10 08:49:08 kamil Exp $ +# $NetBSD: Makefile,v 1.3 2020/11/11 17:11:19 christos Exp $ .include @@ -18,6 +18,9 @@ HIDEGAME=hidegame SETGIDGAME=yes MAN= warp.6 +BINGRP= games +BINMODE=2555 + warp.6: ${_MKTARGET_CREATE} cat ${.CURDIR}/warp.man > ${.TARGET} Index: src/games/warp/config.h diff -u src/games/warp/config.h:1.3 src/games/warp/config.h:1.4 --- src/games/warp/config.h:1.3 Tue Nov 10 17:42:19 2020 +++ src/games/warp/config.h Wed Nov 11 12:11:19 2020 @@ -20,12 +20,12 @@ */ #define SIGNEDCHAR /**/ -/* TERMIO: +/* TERMIOS: * This symbol, if defined, indicates that the program should include * termio.h rather than sgtty.h. There are also differences in the * ioctl() calls that depend on the value of this symbol. */ -#undef TERMIO /**/ +#define TERMIOS /**/ /* USENDIR: * This symbol, if defined, indicates that the program should compile Index: src/games/warp/intrp.c diff -u src/games/warp/intrp.c:1.4 src/games/warp/intrp.c:1.5 --- src/games/warp/intrp.c:1.4 Tue Nov 10 17:42:19 2020 +++ src/games/warp/intrp.c Wed Nov 11 12:11:19 2020 @@ -568,7 +568,7 @@ getrealname(uid_t uid) if (fork()) wait(0); else { - setuid(getuid()); + setgid(getgid()); if ((tmpfp = fopen(filexp(FULLNAMEFILE),"w")) == NULL) exit(1); fprintf(tmpfp, "%s\n", buf); Index: src/games/warp/score.c diff -u src/games/warp/score.c:1.4 src/games/warp/score.c:1.5 --- src/games/warp/score.c:1.4 Tue Nov 10 17:42:19 2020 +++ src/games/warp/score.c Wed Nov 11 12:11:19 2020 @@ -35,20 +35,18 @@ score_init(void) int i; FILE *savfil; -#if 0 if (stat(SAVEDIR,)) { printf("Cannot access %s\r\n",SAVEDIR); finalize(1); } -if (filestat.st_uid != geteuid()) { - printf("Warp will not run right without being setuid.\r\n"); +if (filestat.st_gid != getegid()) { + printf("Warp will not run right without being setgid.\r\n"); finalize(1); } if ((filestat.st_mode & 0605) != 0605) { printf("%s is not protected correctly (must be u+rw o+rx).\r\n",SAVEDIR); finalize(1); } -#endif #ifdef SCOREFULL interp(longlognam, sizeof longlognam, "%N"); @@ -241,9 +239,7 @@ wscore(void) printf("WHO SCORE DF CDF E B WV FLAGS\r\n"); resetty(); snprintf(spbuf, sizeof(spbuf), "/bin/cat %ssave.*",SAVEDIR); -#ifndef lint execl("/bin/sh", "sh", "-c", spbuf, NULL); -#endif finalize(1); } @@ -421,10 +417,8 @@ wavescore(void) snprintf(spbuf, sizeof(spbuf), "Star save ratio: %1.8f (%d/%d)", starscore, numstars, inumstars); mvaddstr( 6,5, spbuf); -#ifndef lint bonuses += tmp = (long) (((double)curscore / possiblescore) * (starscore*starscore) * smarts * 20); -#endif snprintf(spbuf, sizeof(spbuf), "%6ld", tmp); mvaddstr( 6, 68, spbuf); row = 7; Index: src/games/warp/term.h diff -u src/games/warp/term.h:1.4 src/games/warp/term.h:1.5 --- src/games/warp/term.h:1.4 Tue Nov 10 17:42:19 2020 +++ src/games/warp/term.h Wed Nov 11 12:11:19 2020 @@ -181,9 +181,16 @@ EXT char INTRCH INIT('\03'); /* stuff wanted by terminal mode diddling routines */ -#ifdef TERMIO +#ifdef TERMIOS +EXT struct termios _tty, _oldtty; +#elif defined(TERMIO) +typedef int speed_t; EXT struct termio _tty, _oldtty; +#define tcsetattr(fd, how, ti) ioctl(fd, how, ti) +#define tcgetattr(fd, ti) ioctl(fd, TCGETA, ti) +#define cfgetospeed(ti) ((ti)->c_cflag & CBAUD) #else +typedef int speed_t; EXT struct sgttyb _tty; EXT int _res_flg INIT(0); #endif @@ -193,18 +200,18 @@ EXT bool bizarre INIT(false); /* do we /* terminal mode diddling routines */ -#ifdef TERMIO +#if defined(TERMIO) || defined(TERMIOS) -#define raw() ((bizarre=1),_tty.c_lflag &=~ISIG,_tty.c_cc[VMIN] = 1,ioctl(_tty_ch,TCSETAF,&_tty)) -#define noraw() ((bizarre=1),_tty.c_lflag |= ISIG,_tty.c_cc[VEOF] = CEOF,ioctl(_tty_ch,TCSETAF,&_tty)) -#define crmode() ((bizarre=1),_tty.c_lflag &=~ICANON,_tty.c_cc[VMIN] = 1,ioctl(_tty_ch,TCSETAF,&_tty)) -#define nocrmode() ((bizarre=1),_tty.c_lflag |= ICANON,_tty.c_cc[VEOF]
CVS commit: src/games/warp
Module Name:src Committed By: kamil Date: Wed Nov 11 11:54:42 UTC 2020 Modified Files: src/games/warp: warp.c Log Message: Fix the old leftover license note Larry Wall: "I outgrew commercial-free licensing about 30 years ago." To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/games/warp/warp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/warp.c diff -u src/games/warp/warp.c:1.5 src/games/warp/warp.c:1.6 --- src/games/warp/warp.c:1.5 Tue Nov 10 22:52:32 2020 +++ src/games/warp/warp.c Wed Nov 11 11:54:42 2020 @@ -5,17 +5,33 @@ char rcsid[] = "@(#)Header: warp.c,v 7.0 * helpers: Jonathan and Mark Biggar, and Dan Faigin * special thanks to my sweetie Gloria who suggested the Planet Crusher * - * Copyright (C) 1986, Larry Wall - * - * This program may be copied as long as this copyright notice is - * included, and as long as it is not being copied for purposes - * of profit. If you want to modify this program in any way other - * than normal configuration changes, common decency would suggest - * that you also modify the name of the program so that my good name - * (what there is of it) is not impugned. (Calling it something like - * "warpx" or "superwarp" would be fine.) Also, give it another - * WARPDIR so that the scoreboards don't get confused. - * + * Copyright (c) 2020 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Larry Wall. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION OR CONTRIBUTORS + * 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. + * * version 5.0 04/20/83 * 5.1 05/05/83 various tidbits * 5.2 05/12/83 VAX -> vax, ifdef'ed a SIGCONT
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Tue Nov 10 23:32:33 UTC 2020 Modified Files: src/games/warp: play.c Log Message: remove error(1) comments To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/games/warp/play.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/play.c diff -u src/games/warp/play.c:1.3 src/games/warp/play.c:1.4 --- src/games/warp/play.c:1.3 Tue Nov 10 17:42:19 2020 +++ src/games/warp/play.c Tue Nov 10 18:32:33 2020 @@ -138,8 +138,6 @@ play(void) possiblescore += 5000; } if (apolloflag & 2) { -/*###141 [cc] warning: array subscript has type 'char' [-Wchar-subscripts]%%%*/ -/*###141 [cc] warning: array subscript has type 'char' [-Wchar-subscripts]%%%*/ if (blast[realapollo->posy][realapollo->posx] <= 32000) bvely = bvelx = 0; realapollo->energy = 32000;
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Tue Nov 10 23:03:22 UTC 2020 Modified Files: src/games/warp: util.c Log Message: Antivaxer support. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/games/warp/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/util.c diff -u src/games/warp/util.c:1.4 src/games/warp/util.c:1.5 --- src/games/warp/util.c:1.4 Tue Nov 10 17:42:19 2020 +++ src/games/warp/util.c Tue Nov 10 18:03:22 2020 @@ -29,11 +29,6 @@ util_init(void) void movc3(int len, char *src, char *dest) -#ifdef vax -{ -asm("movc3 4(ap),*8(ap),*12(ap)"); -} -#else { if (dest <= src) { for (; len; len--) { @@ -48,7 +43,6 @@ movc3(int len, char *src, char *dest) } } } -#endif void no_can_do(const char *what)
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Tue Nov 10 22:56:49 UTC 2020 Removed Files: src/games/warp: config.H Log Message: can't have config.h and config.H in case-preserving but case-folding file-systems. To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 src/games/warp/config.H Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Tue Nov 10 22:52:46 UTC 2020 Modified Files: src/games/warp: term.c Log Message: don't segv if the terminal is too big. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/games/warp/term.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/term.c diff -u src/games/warp/term.c:1.4 src/games/warp/term.c:1.5 --- src/games/warp/term.c:1.4 Tue Nov 10 17:42:19 2020 +++ src/games/warp/term.c Tue Nov 10 17:52:45 2020 @@ -286,6 +286,8 @@ term_set(char *tcbuf) /* temp area for " no_can_do("dumb"); if (!scorespec && (LINES < 24 || COLS < 80)) no_can_do("puny"); +if (LINES > 25) + no_can_do("humongus"); crmode(); raw();
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Tue Nov 10 22:52:32 UTC 2020 Modified Files: src/games/warp: warp.c Log Message: pray-tell where are you trying to write? To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/games/warp/warp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/warp.c diff -u src/games/warp/warp.c:1.4 src/games/warp/warp.c:1.5 --- src/games/warp/warp.c:1.4 Tue Nov 10 17:42:19 2020 +++ src/games/warp/warp.c Tue Nov 10 17:52:32 2020 @@ -325,7 +325,7 @@ main(int argc, char *argv[]) if (!experimenting) { if ((savfil = fopen(savefilename,"w")) == NULL) { resetty(); - printf("Can't open savefile\r\n"); + printf("Can't open savefile `%s'\r\n", savefilename); finalize(1); } fprintf(savfil,
CVS commit: src/games/warp
Module Name:src Committed By: christos Date: Tue Nov 10 22:42:19 UTC 2020 Modified Files: src/games/warp: bang.c bang.h config.H config.h config.h.SH init.c init.h intrp.c intrp.h move.c move.h object.c object.h play.c play.h score.c score.h sig.c sig.h sm.c term.c term.h them.c them.h us.c us.h util.c util.h version.c version.h warp.c warp.h weapon.c weapon.h Log Message: Time warp forward 34 years so that it compiles (but not work) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/games/warp/bang.c src/games/warp/bang.h \ src/games/warp/config.h src/games/warp/init.c src/games/warp/init.h \ src/games/warp/intrp.h src/games/warp/move.c src/games/warp/move.h \ src/games/warp/object.c src/games/warp/object.h src/games/warp/play.c \ src/games/warp/play.h src/games/warp/score.h src/games/warp/them.c \ src/games/warp/them.h src/games/warp/us.c src/games/warp/us.h \ src/games/warp/version.h src/games/warp/weapon.c src/games/warp/weapon.h cvs rdiff -u -r1.1 -r1.2 src/games/warp/config.H src/games/warp/config.h.SH cvs rdiff -u -r1.3 -r1.4 src/games/warp/intrp.c src/games/warp/score.c \ src/games/warp/sig.c src/games/warp/sig.h src/games/warp/sm.c \ src/games/warp/term.c src/games/warp/term.h src/games/warp/util.c \ src/games/warp/util.h src/games/warp/version.c src/games/warp/warp.c \ src/games/warp/warp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/bang.c diff -u src/games/warp/bang.c:1.2 src/games/warp/bang.c:1.3 --- src/games/warp/bang.c:1.2 Mon Nov 9 19:02:11 2020 +++ src/games/warp/bang.c Tue Nov 10 17:42:19 2020 @@ -26,17 +26,15 @@ #include "bang.h" void -bang_init() +bang_init(void) { ; } void -make_plink(y,x) -Reg1 int x; -Reg2 int y; +make_plink(int x, int y) { -Reg3 OBJECT *obj; +OBJECT *obj; move(y+1,x*2,0); beg_qwrite(); @@ -57,11 +55,7 @@ Reg2 int y; } void -make_blast(y,x,mass,size) -Reg1 int x; -Reg2 int y; -int size; -long mass; +make_blast(int x, int y, int size, long mass) { bangy[nxtbang] = y; bangx[nxtbang] = x; @@ -77,7 +71,7 @@ long mass; return; } else if (mass >= 0) { - Reg3 OBJECT *obj; + OBJECT *obj; move(y+1,x*2,0); beg_qwrite(); @@ -107,15 +101,15 @@ long mass; } void -do_bangs() +do_bangs(void) { -Reg1 int x; -Reg2 int y; -Reg3 int i; -Reg4 int j; -Reg7 int k; -Reg5 int lastxy; -Reg6 OBJECT *obj; +int x; +int y; +int i; +int j; +int k; +int lastxy; +OBJECT *obj; /* read blast list and update blast array */ assert(nxtbang >= 0 && nxtbang <= XSIZE * YSIZE); @@ -131,7 +125,7 @@ do_bangs() yblasted[yy[j] = (y+YSIZE00) % YSIZE] |= 1; xblasted[xx[j] = (x+XSIZE00) % XSIZE] |= 1; } - blasted = TRUE; + blasted = true; for (y=lastxy;y>=0;--y) { for (x=lastxy;x>=0;--x) { if (lastxy > 2) { Index: src/games/warp/bang.h diff -u src/games/warp/bang.h:1.2 src/games/warp/bang.h:1.3 --- src/games/warp/bang.h:1.2 Mon Nov 9 19:02:11 2020 +++ src/games/warp/bang.h Tue Nov 10 17:42:19 2020 @@ -24,7 +24,7 @@ EXT int yy[MAXBDIST]; EXT int nxtbang; EXT bool banging; -void make_plink(); -void make_blast(); -void do_bangs(); -void bang_init(); +void bang_init(void); +void make_plink(int, int); +void make_blast(int, int, int, long); +void do_bangs(void); Index: src/games/warp/config.h diff -u src/games/warp/config.h:1.2 src/games/warp/config.h:1.3 --- src/games/warp/config.h:1.2 Tue Nov 10 03:49:08 2020 +++ src/games/warp/config.h Tue Nov 10 17:42:19 2020 @@ -3,7 +3,7 @@ * to find out if there is input pending on an IO channel. Generally * the routine is used only if FIONREAD and O_NDELAY aren't available. */ -#/*undef RDCHK /**/ +#undef RDCHK /**/ /* SCOREFULL: * This symbol, if defined, indicates that any scoreboard kept by the @@ -11,7 +11,7 @@ * to the user's login name. If the user can change his full name he * can enter multiple scores if this is defined. */ -#/*undef SCOREFULL /**/ +#undef SCOREFULL /**/ /* SIGNEDCHAR: * This symbol, if defined, indicates that characters are a signed type. @@ -25,7 +25,7 @@ * termio.h rather than sgtty.h. There are also differences in the * ioctl() calls that depend on the value of this symbol. */ -#/*undef TERMIO /**/ +#undef TERMIO /**/ /* USENDIR: * This symbol, if defined, indicates that the program should compile @@ -35,15 +35,15 @@ * This symbol, if defined, indicates that the program should include the * system's version of ndir.h, rather than the one with this package. */ -#/*undef USENDIR /**/ -#/*undef LIBNDIR /**/ +#undef USENDIR /**/ +#undef LIBNDIR /**/ #define LIBNDIR /* WHOAMI: * This symbol, if defined, indicates that the program may include * whoami.h. */ -#/*undef WHOAMI /**/ +#undef WHOAMI
CVS commit: src/games/warp
Module Name:src Committed By: kamil Date: Tue Nov 10 11:29:29 UTC 2020 Removed Files: src/games/warp: smap.0 smap.1 smap.2 smap.3 smap.4 smap.5 smap.6 smap.7 Log Message: Remove the smap.* files They are generated during the build. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/games/warp/smap.0 src/games/warp/smap.1 \ src/games/warp/smap.2 src/games/warp/smap.3 src/games/warp/smap.4 \ src/games/warp/smap.5 src/games/warp/smap.6 src/games/warp/smap.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/warp
Module Name:src Committed By: kamil Date: Tue Nov 10 00:02:11 UTC 2020 Modified Files: src/games/warp: EXTERN.h INTERN.h bang.c bang.h init.c init.h intrp.c intrp.h move.c move.h object.c object.h play.c play.h score.c score.h sig.c sig.h sm.c term.c term.h them.c them.h us.c us.h util.c util.h version.c version.h warp.c warp.h weapon.c weapon.h Log Message: Reset CVS keywords To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/games/warp/EXTERN.h src/games/warp/INTERN.h \ src/games/warp/bang.c src/games/warp/bang.h src/games/warp/init.c \ src/games/warp/init.h src/games/warp/intrp.c src/games/warp/intrp.h \ src/games/warp/move.c src/games/warp/move.h src/games/warp/object.c \ src/games/warp/object.h src/games/warp/play.c src/games/warp/play.h \ src/games/warp/score.c src/games/warp/score.h src/games/warp/sig.c \ src/games/warp/sig.h src/games/warp/sm.c src/games/warp/term.c \ src/games/warp/term.h src/games/warp/them.c src/games/warp/them.h \ src/games/warp/us.c src/games/warp/us.h src/games/warp/util.c \ src/games/warp/util.h src/games/warp/version.c src/games/warp/version.h \ src/games/warp/warp.c src/games/warp/warp.h src/games/warp/weapon.c \ src/games/warp/weapon.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/warp/EXTERN.h diff -u src/games/warp/EXTERN.h:1.1 src/games/warp/EXTERN.h:1.2 --- src/games/warp/EXTERN.h:1.1 Mon Nov 9 23:37:05 2020 +++ src/games/warp/EXTERN.h Tue Nov 10 00:02:11 2020 @@ -1,24 +1,6 @@ -/* $Header: /cvsroot/src/games/warp/EXTERN.h,v 1.1 2020/11/09 23:37:05 kamil Exp $ - * - * $Log: EXTERN.h,v $ - * Revision 1.1 2020/11/09 23:37:05 kamil - * Add Warp Kit, Version 7.0 by Larry Wall - * - * Warp is a real-time space war game that doesn't get boring very quickly. - * Read warp.doc and the manual page for more information. - * - * games/warp originally distributed with 4.3BSD-Reno, is back to the BSD - * world via NetBSD. Its remnants were still mentioned in games/Makefile. - * - * Larry Wall, the original author and the copyright holder, generously - * donated the game and copyright to The NetBSD Foundation, Inc. - * - * Import the game sources as-is from 4.3BSD-Reno, with the cession - * of the copyright and license to BSD-2-clause NetBSD-style. - * - * Signed-off-by: Larry Wall - * Signed-off-by: Kamil Rytarowski +/* Header: EXTERN.h,v 7.0.1.1 86/12/12 16:46:50 lwall Exp * + * Log: EXTERN.h,v * Revision 7.0.1.1 86/12/12 16:46:50 lwall * Guarded the undefs. * Index: src/games/warp/INTERN.h diff -u src/games/warp/INTERN.h:1.1 src/games/warp/INTERN.h:1.2 --- src/games/warp/INTERN.h:1.1 Mon Nov 9 23:37:05 2020 +++ src/games/warp/INTERN.h Tue Nov 10 00:02:11 2020 @@ -1,24 +1,6 @@ -/* $Header: /cvsroot/src/games/warp/INTERN.h,v 1.1 2020/11/09 23:37:05 kamil Exp $ - * - * $Log: INTERN.h,v $ - * Revision 1.1 2020/11/09 23:37:05 kamil - * Add Warp Kit, Version 7.0 by Larry Wall - * - * Warp is a real-time space war game that doesn't get boring very quickly. - * Read warp.doc and the manual page for more information. - * - * games/warp originally distributed with 4.3BSD-Reno, is back to the BSD - * world via NetBSD. Its remnants were still mentioned in games/Makefile. - * - * Larry Wall, the original author and the copyright holder, generously - * donated the game and copyright to The NetBSD Foundation, Inc. - * - * Import the game sources as-is from 4.3BSD-Reno, with the cession - * of the copyright and license to BSD-2-clause NetBSD-style. - * - * Signed-off-by: Larry Wall - * Signed-off-by: Kamil Rytarowski +/* Header: INTERN.h,v 7.0.1.1 86/12/12 16:51:45 lwall Exp * + * Log: INTERN.h,v * Revision 7.0.1.1 86/12/12 16:51:45 lwall * Guarded the undefs. * Index: src/games/warp/bang.c diff -u src/games/warp/bang.c:1.1 src/games/warp/bang.c:1.2 --- src/games/warp/bang.c:1.1 Mon Nov 9 23:37:05 2020 +++ src/games/warp/bang.c Tue Nov 10 00:02:11 2020 @@ -1,24 +1,6 @@ -/* $Header: /cvsroot/src/games/warp/bang.c,v 1.1 2020/11/09 23:37:05 kamil Exp $ */ +/* Header: bang.c,v 7.0.1.3 86/12/12 16:57:00 lwall Exp */ -/* $Log: bang.c,v $ -/* Revision 1.1 2020/11/09 23:37:05 kamil -/* Add Warp Kit, Version 7.0 by Larry Wall -/* -/* Warp is a real-time space war game that doesn't get boring very quickly. -/* Read warp.doc and the manual page for more information. -/* -/* games/warp originally distributed with 4.3BSD-Reno, is back to the BSD -/* world via NetBSD. Its remnants were still mentioned in games/Makefile. -/* -/* Larry Wall, the original author and the copyright holder, generously -/* donated the game and copyright to The NetBSD Foundation, Inc. -/* -/* Import the game sources as-is from 4.3BSD-Reno, with the cession -/* of the copyright and license to BSD-2-clause NetBSD-style. -/* -/* Signed-off-by: Larry Wall -/* Signed-off-by: Kamil