-/* $Header: /cvsroot/src/games/warp/warp.h,v 1.1 2020/11/09 23:37:05 kamil Exp $ */
+/* Header: warp.h,v 7.0.1.2 86/12/12 17:08:42 lwall Exp */
-/* $Log: warp.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 <larry@wall.org>
-/* Signed-off-by: Kamil Rytarowski <kamil@netbsd.org>
-/*
+/* Log: warp.h,v
* Revision 7.0.1.2 86/12/12 17:08:42 lwall
* Baseline for net release.
*
*
*/
-extern int errno;
+#ifndef WARP_H
+#define WARP_H
#include "config.h" /* generated by Configure script */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/param.h>
+#include <sys/ioctl.h>
+
+#include <term.h>
+#include <math.h>
#include <stdio.h>
#include <signal.h>
+#include <fcntl.h>
#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <errno.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
/* WARPLIB must be readable and writeable by warp, but not by anyone who you
* don't trust. In other words, to set up warp so everyone can play and
* access.)
*/
-#define SAVEDIR "./"
+#define SAVEDIR "/var/games/warp"
#define NEWSFILE "warp.news"
#define HELPFILE "warp.doc"
#define LOCKFILE ".warp.lock"
#ifdef TERMIO
# include <termio.h>
+#elif defined TERMIOS
+# include <termios.h>
#else
# include <sgtty.h>
#endif
/* some handy defs */
-#define bool char
-#define TRUE (1)
-#define FALSE (0)
-#define Null(t) ((t)0)
-#define Nullch Null(char *)
-#define Nullfp Null(FILE *)
-
#define Ctl(ch) (ch & 037)
#define strNE(s1,s2) (strcmp(s1,s2))
# define ROOTID 0 /* uid of superuser */
#endif
-# define sigset Signal
-# define sigignore(sig) Signal(sig,SIG_IGN)
+# define sigset signal
+# define sigignore(sig) signal(sig,SIG_IGN)
#ifndef LOGDIRFIELD
# define LOGDIRFIELD 6 /* Which field (origin 1) is the */
/* typedefs */
-typedef unsigned int MEM_SIZE; /* for passing to malloc */
-
/* *** end of the machine dependent stuff *** */
/* GLOBAL THINGS */
/* various things of type char */
-char *index();
-char *rindex();
-char *getenv();
-char *strcat();
-char *strcpy();
-
EXT char buf[LBUFLEN+1]; /* general purpose line buffer */
-EXT char *cwd INIT(Nullch); /* current working directory */
+EXT char *cwd INIT(NULL); /* current working directory */
/* switches */
#ifdef VERBOSE
# ifdef TERSE
- EXT bool verbose INIT(TRUE); /* +t */
+ EXT bool verbose INIT(true); /* +t */
# endif
#endif
/* miscellania */
-EXT FILE *tmpfp INIT(Nullfp); /* scratch fp */
+EXT FILE *tmpfp INIT(NULL); /* scratch fp */
#define NOMARKING 0
#define STANDOUT 1
EXT char cantopen[] INIT("Can't open %s\r\n");
#ifdef VERBOSE
- EXT char nocd[] INIT("Can't chdir to directory %s\r\n");
+#define NOCD "Can't chdir to directory %s\r\n"
#else
- EXT char nocd[] INIT("Can't find %s\r\n");
+#define NOCD "Can't find %s\r\n"
#endif
-extern int errno;
-
-EXT bool justonemoretime INIT(TRUE);
-EXT bool keepgoing INIT(TRUE);
-
-EXT bool friendspec INIT(FALSE);
-EXT bool piratespec INIT(FALSE);
-EXT bool amoebaspec INIT(FALSE);
-EXT bool starspec INIT(FALSE);
-EXT bool klingspec INIT(FALSE);
-EXT bool apolspec INIT(FALSE);
-EXT bool crushspec INIT(FALSE);
-EXT bool romspec INIT(FALSE);
-EXT bool prespec INIT(FALSE);
-EXT bool tholspec INIT(FALSE);
-EXT bool gornspec INIT(FALSE);
-EXT bool beginner INIT(FALSE);
-EXT bool massacre INIT(FALSE);
-EXT bool lowspeed INIT(FALSE);
-EXT bool debugging INIT(FALSE);
-EXT bool didkill INIT(FALSE);
-EXT bool experimenting INIT(FALSE);
-EXT bool scorespec INIT(FALSE);
-EXT bool metakey INIT(FALSE);
+EXT bool justonemoretime INIT(true);
+EXT bool keepgoing INIT(true);
+
+EXT bool friendspec INIT(false);
+EXT bool piratespec INIT(false);
+EXT bool amoebaspec INIT(false);
+EXT bool starspec INIT(false);
+EXT bool klingspec INIT(false);
+EXT bool apolspec INIT(false);
+EXT bool crushspec INIT(false);
+EXT bool romspec INIT(false);
+EXT bool prespec INIT(false);
+EXT bool tholspec INIT(false);
+EXT bool gornspec INIT(false);
+EXT bool beginner INIT(false);
+EXT bool massacre INIT(false);
+EXT bool lowspeed INIT(false);
+EXT bool debugging INIT(false);
+EXT bool didkill INIT(false);
+EXT bool experimenting INIT(false);
+EXT bool scorespec INIT(false);
+EXT bool metakey INIT(false);
EXT bool bombed_out;
-EXT bool panic INIT(FALSE);
+EXT int panic INIT(0);
EXT bool madgorns;
EXT int madfriends;
EXT int xamblast;
EXT int ambsize;
-EXT char spbuf[512];
-
-char *index(), *ttyname(), *malloc(), *ctime(), *strcpy();
-char *getenv(), cmstore(), *tgoto();
-long atol();
-
-#define Fclose (void)fclose
-#define Fflush (void)fflush
-#define Fgets (void)fgets
-#define Sprintf (void)sprintf
-#define Signal (void)signal
-#define Safecpy (void)safecpy
-#define Cpytill (void)cpytill
-#define Tract (void)tract
-#define Make_object (void)make_object
-#define Read_tty (void)read_tty
+EXT char spbuf[1024];
+
+#endif