]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/config.h
1 /* $NetBSD: config.h,v 1.6 2001/01/16 02:50:28 cgd Exp $ */
4 * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
9 #ifndef CONFIG /* make sure the compiler doesnt see the typedefs twice */
12 #define UNIX /* delete if no fork(), exec() available */
13 #define CHDIR /* delete if no chdir() available */
16 * Some include files are in a different place under SYSV
18 * <sys/wait.h> <wait.h>
19 * <sys/time.h> <time.h>
20 * <sgtty.h> <termio.h>
21 * Some routines are called differently
24 * Also, the code for suspend and various ioctls is only given for BSD4.2
25 * (I do not have access to a SYSV system.)
27 #define BSD /* delete this line on System V */
29 /* #define STUPID */ /* avoid some complicated expressions if
30 your C compiler chokes on them */
31 /* #define PYRAMID_BUG */ /* avoid a bug on the Pyramid */
32 /* #define NOWAITINCLUDE */ /* neither <wait.h> nor <sys/wait.h> exists */
34 #define WIZARD "bruno" /* the person allowed to use the -D option */
35 #define RECORD "record"/* the file containing the list of topscorers */
36 #define NEWS "news" /* the file containing the latest hack news */
37 #define HELP "help" /* the file containing a description of the commands */
38 #define SHELP "hh" /* abbreviated form of the same */
39 #define RUMORFILE "rumors" /* a file with fortune cookies */
40 #define DATAFILE "data" /* a file giving the meaning of symbols used */
41 #define FMASK 0660 /* file creation mask */
42 #define HLOCK "perm" /* an empty file used for locking purposes */
43 #define LLOCK "safelock" /* link to previous */
47 * Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
48 * If defined, it can be overridden by the environment variable PAGER.
49 * Hack will use its internal pager if DEF_PAGER is not defined.
50 * (This might be preferable for security reasons.)
51 * #define DEF_PAGER ".../mydir/mypager"
55 * If you define MAIL, then the player will be notified of new mail
56 * when it arrives. If you also define DEF_MAILREADER then this will
57 * be the default mail reader, and can be overridden by the environment
58 * variable MAILREADER; otherwise an internal pager will be used.
59 * A stat system call is done on the mailbox every MAILCKFREQ moves.
62 #define DEF_MAILREADER _PATH_MAIL /* or e.g. /bin/mail */
63 #define MAILCKFREQ 100
66 #define SHELL /* do not delete the '!' command */
69 #define SUSPEND /* let ^Z suspend the game */
75 * If you define HACKDIR, then this will be the default playground;
76 * otherwise it will be the current directory.
79 #define HACKDIR _PATH_QUEST
81 #define HACKDIR _PATH_HACK
85 * Some system administrators are stupid enough to make Hack suid root
86 * or suid daemon, where daemon has other powers besides that of reading or
87 * writing Hack files. In such cases one should be careful with chdir's
88 * since the user might create files in a directory of his choice.
89 * Of course SECURE is meaningful only if HACKDIR is defined.
91 #define SECURE /* do setuid(getuid()) after chdir() */
94 * If it is desirable to limit the number of people that can play Hack
95 * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS.
96 * #define MAX_NR_OF_PLAYERS 100
100 /* size of terminal screen is (at least) (ROWNO+2) by COLNO */
105 * small signed integers (8 bits suffice)
106 * typedef char schar;
107 * will do when you have signed characters; otherwise use
108 * typedef short int schar;
110 * Use short chars anyway to avoid warnings.
113 typedef short int schar
;
119 * small unsigned integers (8 bits suffice - but 7 bits do not)
120 * - these are usually object types; be careful with inequalities! -
121 * typedef unsigned char uchar;
122 * will be satisfactory if you have an "unsigned char" type; otherwise use
123 * typedef unsigned short int uchar;
125 typedef unsigned char uchar
;
128 * small integers in the range 0 - 127, usually coordinates
129 * although they are nonnegative they must not be declared unsigned
130 * since otherwise comparisons with signed quantities are done incorrectly
133 typedef xchar boolean
; /* 0 or 1 */
138 * Declaration of bitfields in various structs; if your C compiler
139 * doesnt handle bitfields well, e.g., if it is unable to initialize
140 * structs containing bitfields, then you might use
141 * #define Bitfield(x,n) uchar x
142 * since the bitfields used never have more than 7 bits. (Most have 1 bit.)
144 #define Bitfield(x,n) unsigned x:n
146 #define SIZE(x) (int)(sizeof(x) / sizeof(x[0]))