1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2024-11-24 10:15:12 +00:00
notnotdnethack/include/unixconf.h
Ron Nazarov 378f50efd6
Always enable TEXTCOLOR and STATUS_COLORS and require terminfo
Always enabled: TERMLIB ASCIIGRAPH TERMINFO TEXTCOLOR STATUS_COLORS

Removed: NO_TERMS
2024-05-06 18:48:53 +01:00

177 lines
5.4 KiB
C

/* SCCS Id: @(#)unixconf.h 3.4 1999/07/02 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#ifdef UNIX
#ifndef UNIXCONF_H
#define UNIXCONF_H
/*#define FUZZER_TIMEOUT 60*/
/* define any of the following that are appropriate */
#define NETWORK /* if running on a networked system */
/* e.g. Suns sharing a playground through NFS */
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control */
/* (e.g., VSUSP) */
/* #define RANDOM */ /* if neither random/srandom nor lrand48/srand48
is available from your system */
/*
* The next two defines are intended mainly for the Andrew File System,
* which does not allow hard links. If NO_FILE_LINKS is defined, lock files
* will be created in LOCKDIR using open() instead of in the playground using
* link().
* Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
*/
/* #define NO_FILE_LINKS */ /* if no hard links */
/* #define LOCKDIR "/usr/games/lib/nethackdir" */ /* where to put locks */
/*
* If you want the static parts of your playground on a read-only file
* system, define VAR_PLAYGROUND to be where the variable parts are kept.
*/
/* #define VAR_PLAYGROUND "/playground" */
/*
* Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
* If defined, it can be overridden by the environment variable PAGER.
* Hack will use its internal pager if DEF_PAGER is not defined.
* (This might be preferable for security reasons.)
* #define DEF_PAGER ".../mydir/mypager"
*/
/*
* Define PORT_HELP to be the name of the port-specfic help file.
* This file is found in HACKDIR.
* Normally, you shouldn't need to change this.
* There is currently no port-specific help for Unix systems.
*/
/* #define PORT_HELP "Unixhelp" */
#ifdef TTY_GRAPHICS
/*
* To enable the `timed_delay' option for using a timer rather than extra
* screen output when pausing for display effect. Requires that `msleep'
* function be available (with time argument specified in milliseconds).
* Various output devices can produce wildly varying delays when the
* "extra output" method is used, but not all systems provide access to
* a fine-grained timer.
*/
#define TIMED_DELAY /* usleep() */
#endif
/*
* If you define MAIL, then the player will be notified of new mail
* when it arrives. If you also define DEF_MAILREADER then this will
* be the default mail reader, and can be overridden by the environment
* variable MAILREADER; otherwise an internal pager will be used.
* A stat system call is done on the mailbox every MAILCKFREQ moves.
*/
#define MAIL /* Deliver mail during the game */
/* The Andrew Message System does mail a little differently from normal
* UNIX. Mail is deposited in the user's own directory in ~/Mailbox
* (another directory). MAILBOX is the element that will be added on to
* the user's home directory path to generate the Mailbox path - just in
* case other Andrew sites do it differently from CMU.
*
* dan lovinger
* dl2n+@andrew.cmu.edu (dec 19 1989)
*/
/* #define AMS */ /* use Andrew message system for mail */
/* NO_MAILREADER is for kerberos authenticating filesystems where it is
* essentially impossible to securely exec child processes, like mail
* readers, when the game is running under a special token.
*
* dan
*/
/* #define NO_MAILREADER */ /* have mail daemon just tell player of mail */
#ifdef MAIL
#define DEF_MAILREADER "/bin/mail"
/* #define MAILCKFREQ 50 */
#endif /* MAIL */
#ifdef COMPRESS
/* Some implementations of compress need a 'quiet' option.
* If you've got one of these versions, put -q here.
* You can also include any other strange options your compress needs.
* If you have a normal compress, just leave it commented out.
*/
/* #define COMPRESS_OPTIONS "-q" */
#endif
#define FCMASK 0660 /* file creation mask */
/* fcntl(2) is a POSIX-portable call for manipulating file descriptors.
* Comment out the USE_FCNTL if for some reason you have a strange
* os/filesystem combination for which fcntl(2) does not work. */
# define USE_FCNTL
/*
* The remainder of the file should not need to be changed.
*/
# ifndef POSIX_JOB_CONTROL
# define POSIX_JOB_CONTROL
# endif
/*
* BSD/ULTRIX systems are normally the only ones that can suspend processes.
* Suspending NetHack processes cleanly should be easy to add to other systems
* that have SIGTSTP in the Berkeley sense. Currently the only such systems
* known to work are HPUX and AIX 3.1; other systems will probably require
* tweaks to unixtty.c and ioctl.c.
*
* POSIX defines a slightly different type of job control, which should be
* equivalent for NetHack's purposes. POSIX_JOB_CONTROL should work on
* various recent SYSV versions (with possibly tweaks to unixtty.c again).
*/
#if defined(BSD_JOB_CONTROL) || defined(POSIX_JOB_CONTROL)
/*#define SUSPEND*/ /* let ^Z suspend the game */
#endif
#include <time.h>
#define HLOCK "perm" /* an empty file used for locking purposes */
#define tgetch getchar
/*#define SHELL*/ /* do not delete the '!' command */
#include "system.h"
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#ifndef index /* some systems seem to do this for you */
# define index strchr
#endif
#ifndef rindex
# define rindex strrchr
#endif
/* Use the high quality random number routines. */
#define Rand() random()
#ifdef TIMED_DELAY
# define msleep(k) usleep((k)*1000)
#endif
#endif /* UNIXCONF_H */
#endif /* UNIX */