Wikia

Wikihack

Source:NetHack 3.0.0/unixconf.h

2,032pages on
this wiki
Talk0

Below is the full text to unixconf.h from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/unixconf.h#line123]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

The NetHack General Public License applies to screenshots, source code and other content from NetHack.
1.    /*	SCCS Id: @(#)unixconf.h	3.0	88/07/21
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifdef UNIX
6.    #ifndef UNIXCONF_H
7.    #define UNIXCONF_H
8.    
9.    /*
10.    * Some include files are in a different place under SYSV
11.    * 	BSD		   SYSV
12.    * <sys/time.h>		<time.h>
13.    * <sgtty.h>		<termio.h>
14.    *
15.    * Some routines are called differently
16.    * index		strchr
17.    * rindex		strrchr
18.    *
19.    * Also, the code for suspend is only given for BSD
20.    */
21.   
22.   /* #define BSD		/* define for 4.n BSD  */
23.   			/* also for relatives like SunOS */
24.   #define ULTRIX		/* define for Ultrix v3.0 or higher (but not lower) */
25.   			/* Use BSD for < v3.0 */
26.   			/* "ULTRIX" not to be confused with "ultrix" */
27.   /* #define SYSV		/* define for System V */
28.   /* #define NETWORK	/* if running on a networked system */
29.   			/* e.g. Suns sharing a playground through NFS */
30.   
31.   /* #define GENIX	/* Yet Another Unix Clone */
32.   /* #define HISX		/* Bull Unix for XPS Machines */
33.   /* #define UNIXPC	/* use in addition to SYSV for AT&T 7300/3B1 */
34.   			/* also note that the stock cpp qualifies as a
35.   			   STUPID_CPP for config.h */
36.   
37.   /* #define PYRAMID_BUG 	/* avoid a bug on the Pyramid */
38.   /* #define APOLLO	/* same for the Apollo */
39.   /* #define RANDOM	/* if neither random/srandom nor lrand48/srand48
40.   			   is available from your system */
41.   
42.   /*
43.    * Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
44.    * If defined, it can be overridden by the environment variable PAGER.
45.    * Hack will use its internal pager if DEF_PAGER is not defined.
46.    * (This might be preferable for security reasons.)
47.    * #define DEF_PAGER	".../mydir/mypager"
48.    */
49.   
50.   /*
51.    * If you define MAIL, then the player will be notified of new mail
52.    * when it arrives. If you also define DEF_MAILREADER then this will
53.    * be the default mail reader, and can be overridden by the environment
54.    * variable MAILREADER; otherwise an internal pager will be used.
55.    * A stat system call is done on the mailbox every MAILCKFREQ moves.
56.    */
57.   
58.   #define	MAIL
59.   #define	DEF_MAILREADER	"/usr/ucb/Mail"		/* or e.g. /bin/mail */
60.   #define	MAILCKFREQ	50
61.   
62.   #ifdef COMPRESS
63.   /* Some implementations of compress need a 'quiet' option.
64.    * If you've got one of these versions, put -q here.
65.    * You can also include any other strange options your compress needs.
66.    * If you have a normal compress, just leave it commented out.
67.    */
68.   /* #define COMPRESS_OPTIONS	"-q"	/* */
69.   #endif
70.   
71.   #define	FCMASK	0660	/* file creation mask */
72.   
73.   
74.   /*
75.    * The remainder of the file should not need to be changed.
76.    */
77.   
78.   #if (defined(BSD) || defined(ULTRIX)) && !defined(MSDOS)
79.   #include	<sys/time.h>
80.   #else
81.   #include	<time.h>
82.   #endif
83.   
84.   #define	HLOCK	"perm"	/* an empty file used for locking purposes */
85.   #define LLOCK	"safelock"	/* link to previous */
86.   
87.   #ifndef REDO
88.   #define Getchar getchar
89.   #else
90.   #define tgetch getchar
91.   #endif
92.   
93.   #define SHELL		/* do not delete the '!' command */
94.   
95.   #include "system.h"
96.   
97.   #if defined(BSD) || defined(ULTRIX)
98.   #define	SUSPEND		/* let ^Z suspend the game */
99.   #define memcpy(d, s, n)		bcopy(s, d, n)
100.  #define memcmp(s1, s2, n)	bcmp(s2, s1, n)
101.  #else	/* therefore SYSV */
102.  #define index	strchr
103.  #define rindex	strrchr
104.  #endif
105.  
106.  /* Use the high quality random number routines. */
107.  #if defined(BSD) || defined(ULTRIX) || defined(RANDOM)
108.  #define Rand()	random()
109.  #define Srand(seed) srandom(seed)
110.  #else
111.  #define Rand()	lrand48()
112.  #define Srand(seed) srand48(seed)
113.  #endif
114.  
115.  #include "extern.h"
116.  
117.  #endif /* UNIXCONF_H /* */
118.  #endif /* UNIX /* */

Around Wikia's network

Random Wiki