1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947
|
/* include/config.h. Generated automatically by configure. */
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
#ifndef __NH_CONFIG_H__
#define __NH_CONFIG_H__
/* Define if the closedir function returns void instead of int. */
/* #undef CLOSEDIR_VOID */
/* Define to empty if the keyword does not work. */
/* #undef const */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
/* Define if you don't have vprintf but do have _doprnt. */
/* #undef HAVE_DOPRNT */
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef mode_t */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef pid_t */
/* Define if you need to in order for stat and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define if your <sys/time.h> declares struct tm. */
/* #undef TM_IN_SYS_TIME */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef uid_t */
/* Define if the closedir function returns void instead of int. */
/* #undef VOID_CLOSEDIR */
/* Define if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
/* Define if lex declares yytext as a char * by default, not a char[]. */
#define YYTEXT_POINTER 1
/* Define if you have the atexit function. */
#define HAVE_ATEXIT 1
/* Define if you have the bcmp function. */
#define HAVE_BCMP 1
/* Define if you have the bcopy function. */
#define HAVE_BCOPY 1
/* Define if you have the chdir function. */
#define HAVE_CHDIR 1
/* Define if you have the chmod function. */
#define HAVE_CHMOD 1
/* Define if you have the fstat function. */
#define HAVE_FSTAT 1
/* Define if you have the getcwd function. */
#define HAVE_GETCWD 1
/* Define if you have the getgid function. */
#define HAVE_GETGID 1
/* Define if you have the getpid function. */
#define HAVE_GETPID 1
/* Define if you have the getpwnam function. */
#define HAVE_GETPWNAM 1
/* Define if you have the getpwuid function. */
#define HAVE_GETPWUID 1
/* Define if you have the getuid function. */
#define HAVE_GETUID 1
/* Define if you have the index function. */
#define HAVE_INDEX 1
/* Define if you have the isatty function. */
#define HAVE_ISATTY 1
/* Define if you have the kill function. */
#define HAVE_KILL 1
/* Define if you have the memcmp function. */
#define HAVE_MEMCMP 1
/* Define if you have the memcpy function. */
#define HAVE_MEMCPY 1
/* Define if you have the napms function. */
/* #undef HAVE_NAPMS */
/* Define if you have the putenv function. */
#define HAVE_PUTENV 1
/* Define if you have the rindex function. */
#define HAVE_RINDEX 1
/* Define if you have the setgid function. */
#define HAVE_SETGID 1
/* Define if you have the setuid function. */
#define HAVE_SETUID 1
/* Define if you have the stat function. */
#define HAVE_STAT 1
/* Define if you have the strcasecmp function. */
#define HAVE_STRCASECMP 1
/* Define if you have the strcmpi function. */
/* #undef HAVE_STRCMPI */
/* Define if you have the strdup function. */
#define HAVE_STRDUP 1
/* Define if you have the strerror function. */
#define HAVE_STRERROR 1
/* Define if you have the strncasecmp function. */
#define HAVE_STRNCASECMP 1
/* Define if you have the strncmpi function. */
/* #undef HAVE_STRNCMPI */
/* Define if you have the tgetent function. */
/* #undef HAVE_TGETENT */
/* Define if you have the umask function. */
#define HAVE_UMASK 1
/* Define if you have the usleep function. */
#define HAVE_USLEEP 1
/* Define if you have the <X11/SM/SMlib.h> header file. */
#define HAVE_X11_SM_SMLIB_H 1
/* Define if you have the <X11/xpm.h> header file. */
#define HAVE_X11_XPM_H 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define if you have the <termio.h> header file. */
#define HAVE_TERMIO_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <varargs.h> header file. */
#define HAVE_VARARGS_H 1
/* Define if you have the <xpm.h> header file. */
/* #undef HAVE_XPM_H */
/* Define if you have the efence library (-lefence). */
/* #undef HAVE_LIBEFENCE */
/* Name of package */
#define PACKAGE "gnomehack"
/* Version number of package */
#define VERSION "1.0.5"
/* Define if compiler has function prototypes */
#define PROTOTYPES 1
/* some things autoheader complained about */
#define HAVE_LIBSM 1
/* Define if NetHack conflicts w/ system <curses.h> header file. */
#define HAVE_CURSES_H_CONFLICT 1
/* Define if you have a stupid compiler */
/* #undef STUPID */
/* Define to the appropriate generic pointer */
#define genericptr void *
/* Define if your compiler chokes on genericptr_t */
/* #undef genericptr_t */
/* Define if your compiler chokes on time_t */
/* #undef time_t */
/* Define if your compiler chokes on volatile */
/* #undef volatile */
/* define if you are running on unix */
#define UNIX 1
/* define if your C compiler chokes on some complicated expressions */
/* #undef STUPID */
/* prototype support */
#define PROTOTYPES 1
#define UNWIDENED_PROTOTYPES 1
/* #undef WIDENED_PROTOTYPES */
/* define if compiler chokes on some kinds of prototype */
/* #undef ULTRIX_PROTO */
/* define if defined() does not work properly */
/* #undef KR1ED */
/* define to a high-quality random-number generator like random or lrand48 */
#define RAND_FUNC random
/* define if you don't have a high-quality random-number generator */
/* #undef RANDOM */
/* define if you have usleep */
#define HAVE_USLEEP 1
/* define if you have napms */
/* #undef HAVE_NAPMS */
/* some versions of gcc seriously muck up nested loops. if you get strange
crashes while searching in a version compiled with gcc, try putting
#define GCC_BUG in *conf.h (or adding -DGCC_BUG to CFLAGS in the
makefile). */
/* NOTE: *not* defined in configure.in, because only the TOS port
appears to need this. Only included for completeness */
/* #undef GCC_BUG */
/* define if code to workaround GCC warnings is desired */
#define GCC_WARN 1
/* Define autoconf var if we want to #include any X11 pixmaps */
#define XPM_LIST 1
/* Define to compile tiles into NetHack binary */
#define INTERNAL_TILES 1
/* Define to DISable signal handling */
/* #undef NO_SIGNAL */
/* System checks for randomize functions */
/* #undef HAVE_SRAND48 */
#define HAVE_SRANDOM 1
/*
* header files to include before anything else
*/
#ifdef HAVE_STRING_H
#include <string.h>
#endif
/*
* Windowing systems...
*/
/* good old tty based graphics */
#define TTY_GRAPHICS 1
/* X11 interface */
/* #undef X11_GRAPHICS */
/* Gtk+/GNOME interface */
#define GNOME_GRAPHICS 1
/* #undef HAVE_ORBIT */
/* Enable use of tiles instead of characters to represent game objs */
#define USE_TILES 1
/*
* Define the default window system. This should be one that is compiled
* into your system (see defines above). Known window systems are:
*
* tty, X11, gnome
*/
#define DEFAULT_WINDOW_SYS "GNOME"
/* uses terminfo rather than termcap */
#define TERMINFO
/* define if a terminal handles highlighting or tabs poorly */
/* #undef MINIMAL_TERM */
/*
* There are two ways that X11 tiles may be defined. (1) using a custom
* format loaded by NetHack code, or (2) using the XPM format loaded by
* the free XPM library. The second option allows you to then use other
* programs to generate tiles files. For example, the PBMPlus tools
* would allow:
* xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
*/
/* Define if you wish to use xpm's */
#define USE_XPM 1
/* #undef USE_BIGTILES */
/* #undef RADAR */
/* Define to use a graphical tombstone (rip.xpm) */
#define GRAPHIC_TOMBSTONE 1
/*
* Section 2: Some global parameters and filenames.
* Commenting out WIZARD, LOGFILE, or NEWS removes that feature
* from the game; otherwise set the appropriate wizard name.
* LOGFILE and NEWS refer to files in the playground.
*/
/* Define to enable debugging output */
/* #undef DEBUG */
/*
* Define as the person allowed to use the -D option (wizard mode, debugging and
* cheating, ha ha)
*/
#define WIZARD "root"
/*
* Enable LZA/WWA's awesome Wizard patch '96
*/
/* #undef FEATURE_WIZ_PATCH */
/*
* if your preprocessor can't handle commands in the form #if defined(BLAH),
* instead of define WIZARD as the username, do a #define WIZARD and set this
* to the username.
*
* Otherwise, do not define this.
*/
/* #undef WIZARD_NAME */
/*
* If COMPRESS is defined, it should contain the full path name of your
* 'compress' program. Defining INTERNAL_COMP causes NetHack to do
* simpler byte-stream compression internally. Both COMPRESS and
* INTERNAL_COMP create smaller bones/level/save files, but require
* additional code and time. Currently, only UNIX fully implements
* COMPRESS; other ports should be able to uncompress save files a
* la unixmain.c if so inclined.
* If you define COMPRESS, you must also define COMPRESS_EXTENSION
* as the extension your compressor appends to filenames after
* compression.
*/
/* define to a compression program that works like compress or gzip */
#define COMPRESS "/usr/bin/bzip2"
/* define to the normal extension for that program */
#define COMPRESS_EXTENSION ".bz2"
/*
*define to use nethack's internal compression, I guess. It's not actually used
* in the code as far as I can tell
*/
/* #undef INTERNAL_COMP */
/*
* Data librarian. Defining DLB places most of the support files into
* a tar-like file, thus making a neater installation. See *conf.h
* for detailed configuration.
*/
#define DLB 1
/*
* Defining INSURANCE slows down level changes, but allows games that
* died due to program or system crashes to be resumed from the point
* of the last level change, after running a utility program.
*/
#define INSURANCE 1 allow crashed game recovery */
#ifndef HAVE_CHDIR
# error chdir() required
#else
# define CHDIR
#endif
#ifdef CHDIR
/*
* If you define HACKDIR, then this will be the default playground;
* otherwise it will be the current directory.
*/
/* NOTE: HACKDIR now defined in Makefile.am */
/*
* * If you define SAVEGAMEDIR, then this will be the save game directory
* */
/* NOTE: SAVEGAMEDIR is now defined in Makefile.am */
#define LOGFILE "/var/lib/games/gnomehack/logfile" /* "logfile" */ /* larger file for debugging purposes */
#define NEWS "/var/lib/games/gnomehack/news" /* "news" */ /* the file containing the latest hack news */
#define HLOCK "/var/lib/games/gnomehack/perm" /* "perm" */ /* an empty file used for locking purposes */
#define RECORD "/var/lib/games/gnomehack/record" /* "record" */
/*
* Some system administrators are stupid enough to make Hack suid root
* or suid daemon, where daemon has other powers besides that of reading or
* writing Hack files. In such cases one should be careful with chdir's
* since the user might create files in a directory of his choice.
* Of course SECURE is meaningful only if HACKDIR is defined.
*/
/* define to do setuid(getuid()) after chdir() */
/* #undef SECURE */
/*
* If it is desirable to limit the number of people that can play Hack
* simultaneously, define HACKDIR, SECURE, and set MAX_NR_OF_PLAYERS to the
* maximum number of players.
*/
/* #undef MAX_NR_OF_PLAYERS */
#endif /* CHDIR */
/*
* Section 3: Definitions that may vary with system type.
* For example, both schar and uchar should be short ints on
* the AT&T 3B2/3B5/etc. family.
*/
#define SCHAR signed char
#define UCHAR unsigned char
/*
* type schar: small signed integers (8 bits suffice) (eg. TOS) */
typedef SCHAR schar;
/*
* type uchar: small unsigned integers (8 bits suffice - but 7 bits do not)
*
* typedef unsigned char uchar;
*
* will be satisfactory if you have an "unsigned char" type;
* otherwise use
*
* typedef unsigned short int uchar;
*/
typedef UCHAR uchar;
/*
* Various structures have the option of using bitfields to save space.
* If your C compiler handles bitfields well (e.g., it can initialize structs
* containing bitfields), you can define BITFIELDS. Otherwise, the game will
* allocate a separate character for each bitfield. (The bitfields used never
* have more than 7 bits, and most are only 1 bit.)
*/
/* #undef BITFIELDS */
/* handle various names for case-insensitive string comparison */
#if defined(HAVE_STRNCMPI) || defined(HAVE_STRNCASECMP)
# define STRNCMPI
# if defined(HAVE_STRNCASECMP) && !defined(HAVE_STRNCMPI)
# define strncmpi(s1, s2, n) strncasecmp(s1, s2, n)
# endif
#endif
#if defined(HAVE_STRCASECMP) && !defined(HAVE_STRCMPI)
# define strcmpi(s1, s2) strcasecmp(s1, s2)
#endif
/*
* There are various choices for the NetHack vision system. There is a
* choice of two algorithms with the same behavior. Defining VISION_TABLES
* creates huge (60K) tables at compile time, drastically increasing data
* size, but runs slightly faster than the alternate algorithm. (MSDOS in
* particular cannot tolerate the increase in data size; other systems can
* flip a coin weighted to local conditions.)
*
* If VISION_TABLES is not defined, things will be faster if you can use
* MACRO_CPATH. Some cpps, however, cannot deal with the size of the
* functions that have been macroized.
*/
/* define only one of these three */
/* define to use vision tables generated at compile time */
/* #undef VISION_TABLES */
/* use clear_path macros instead of functions */
/* #undef MACRO_CPATH */
/* use clear_path functions instead of macros */
#define NO_MACRO_CPATH 1
/*
* Section 4: THE FUN STUFF!!!
*
* Conditional compilation of special options are controlled here.
* If you define the following flags, you will add not only to the
* complexity of the game but also to the size of the load module.
*/
/*
* dungeon features
*/
/* Weapon skills - Stephen White */
#define WEAPON_SKILLS 1
/* Kitchen sinks - Janet Walz */
#define SINKS 1
/*
* dungeon levels
*/
/* Fancy mazes - Jean-Christophe Collet */
#define WALLIFIED_MAZE 1
/* Special Rogue-like levels */
#define REINCARNATION 1
/*
* monsters & objects
*/
/* Keystone Kops by Scott R. Turner */
#define KOPS 1
/* Succubi/incubi seduction, by KAA, suggested by IM */
#define SEDUCE 1
/* Tourist players with cameras and Hawaiian shirts */
#define TOURIST 1
/* difficulty */
/* Engraving the E-word repels monsters */
#define ELBERETH 1
/* I/O */
/* support for redoing last command - DGK */
#define REDO 1
/* allow smaller screens -- ERS */
#define CLIPPING 1
#ifdef REDO
# define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */
#endif
/* Show experience on bottom line */
#define EXP_ON_BOTL 1
/* added by Gary Erickson (erickson@ucivax) */
#define SCORE_ON_BOTL 1
/* if running on a networked system */
#define NETWORK 1
/* Use System V r3.2 terminfo color support */
#define TEXTCOLOR
/* avoid a problem using OpenWindows 3.0 for X11
on SunOS 4.1.x, x>= 2. Do not define for other
X11 implementations. */
/* #define OPENWINBUG */
/* avoid a bug on the Pyramid */
/* #define PYRAMID_BUG */
/* for real 4.3BSD cc's without schain botch fix */
/* #define BSD_43_BUG */
/* problems with large arrays in structs */
/* #define MICROPORT_BUG */
/* Changes needed in termcap.c to get it to
run with Microport Sys V/AT version 2.4.
By Jay Maynard */
/* #define MICROPORT_286_BUG */
/* avoid a problem with little_to_big() optimization */
/* #define AIXPS_2BUG */
/* see sys/unix/snd86.shr for more information on these */
/* Play real music through speaker on systems with
music driver installed */
/* #define UNIX386MUSIC */
/* Play real music through speaker on systems with
built-in VPIX support */
/* #define VPIX_MUSIC */
#define Sprintf (void) sprintf
#define Strcat (void) strcat
#define Strcpy (void) strcpy
#define Vsprintf (void) vsprintf
#define Vprintf (void) vprintf
#define Vfprintf (void) vfprintf
#ifdef __GNUC__
# if __GNUC__ >= 2
#define PRINTF_F(f,v) __attribute__ ((format (printf, f, v)))
# endif
#endif
#ifndef PRINTF_F
#define PRINTF_F(f,v)
#endif
#ifndef genericptr_t
typedef void * genericptr_t;
#endif
#ifdef HAVE_USLEEP
# define msleep(k) usleep((k)*1000)
# define TIMED_DELAY
#else
# ifdef HAVE_NAPMS
# define msleep(k) napms(k)
# define TIMED_DELAY
# endif
#endif
#define NEARDATA
#ifdef TM_IN_SYS_TIME
#include <sys/time.h>
#else
#include <time.h>
#endif
#ifdef RAND_FUNC
#define Rand() RAND_FUNC ()
#endif
#ifdef MSLEEP_MACRO
#define msleep(k) MSLEEP_MACRO
#define TIMED_DELAY
#endif
#ifdef STDC_HEADERS
# define USE_STDARG
#include <stdarg.h>
# define VA_DECL(typ1,var1) (typ1 var1, ...) { va_list the_args;
# define VA_DECL2(typ1,var1,typ2,var2) \
(typ1 var1, typ2 var2, ...) { va_list the_args;
# define VA_INIT(var1,typ1)
# define VA_NEXT(var1,typ1) var1 = va_arg(the_args, typ1)
# define VA_ARGS the_args
# define VA_START(x) va_start(the_args, x)
# define VA_END() va_end(the_args)
#else
# ifdef HAVE_VARARGS_H
# define USE_VARARGS
#include <varargs.h>
# define VA_DECL(typ1,var1) (va_alist) va_dcl {\
va_list the_args; typ1 var1;
# define VA_DECL2(typ1,var1,typ2,var2) (va_alist) va_dcl {\
va_list the_args; typ1 var1; typ2 var2;
# define VA_ARGS the_args
# define VA_START(x) va_start(the_args)
# define VA_INIT(var1,typ1) var1 = va_arg(the_args, typ1)
# define VA_NEXT(var1,typ1) var1 = va_arg(the_args,typ1)
# define VA_END() va_end(the_args)
# else
# define USE_OLDARGS
# define VA_ARGS arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9
# define VA_DECL(typ1,var1) (var1,VA_ARGS) typ1 var1; \
char *arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9; {
# define VA_DECL2(typ1,var1,typ2,var2) (var1,var2,VA_ARGS) \
typ1 var1; typ2 var2;\
char *arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9; {
# define VA_START(x)
# define VA_INIT(var1,typ1)
# define VA_END()
# endif
#endif
#ifdef PROTOTYPES
# define NDECL(f) f(void)
# define FDECL(f,p) f p
# define VDECL(f,p) f p
#else
# define NDECL(f) f()
# define FDECL(f,p) f()
# define VDECL(f,p) f()
#endif
#ifdef KR1ED /* For compilers which cannot handle defined() */
#define defined(x) (-x-1 != -1)
/* Because:
* #define FOO => FOO={} => defined( ) => (-1 != - - 1) => 1
* #define FOO 1 or on command-line -DFOO
* => defined(1) => (-1 != - 1 - 1) => 1
* if FOO isn't defined, FOO=0. But some compilers default to 0 instead of 1
* for -DFOO, oh well.
* => defined(0) => (-1 != - 0 - 1) => 0
*
* But:
* defined("") => (-1 != - "" - 1)
* [which is an unavoidable catastrophe.]
*/
#endif
/*
* 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)
*/
/* if no hard links */
/* #define NO_FILE_LINKS */
#define LOCKDIR "/var/lib/games/nethack" /* where to put locks */
/*
* 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"
*/
/*
* 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.
*/
/* Deliver mail during the game */
#define MAIL 1
/* 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)
*/
/* use Andrew message system for mail */
/* #undef AMS */
/* NO_MAILREADER is for kerberos authentcating filesystems where it is
* essentially impossible to securely exec child processes, like mail
* readers, when the game is running under a special token.
*
* dan
*/
/* have mail daemon just tell player of mail */
/* #define NO_MAILREADER */
#ifdef MAIL
# if defined(BSD) || defined(ULTRIX)
# ifdef AMS
#define AMS_MAILBOX "/Mailbox"
# else
#define DEF_MAILREADER "/usr/ucb/Mail"
# endif
#else
# if defined(SYSV) || defined(DGUX) || defined(HPUX)
# ifdef M_XENIX
#define DEF_MAILREADER "/usr/bin/mail"
# else
# ifdef __sgi
#define DEF_MAILREADER "/usr/sbin/Mail"
# else
#define DEF_MAILREADER "/usr/bin/mailx"
# endif
# endif
# else
#define DEF_MAILREADER "/bin/mail"
# endif
#endif
#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 */
/*
* The remainder of the file should not need to be changed.
*/
/*
* 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).
*/
#ifndef POSIX_JOB_CONTROL
# if defined(BSD) || defined(ULTRIX) || defined(HPUX) || defined(AIX_31)
# define BSD_JOB_CONTROL
# else
# if defined(SVR4)
# define POSIX_JOB_CONTROL
# endif
# endif
#endif
#if defined(BSD_JOB_CONTROL) || defined(POSIX_JOB_CONTROL) || defined(AUX)
#define SUSPEND /* let ^Z suspend the game */
#endif
#ifndef REDO
#define Getchar nhgetch
#endif
#define tgetch getchar
#define SHELL /* do not delete the '!' command */
#ifdef STDC_HEADERS
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#if !defined(HAVE_MEMCPY) && defined(HAVE_BCOPY)
#define memcpy(d, s, n) bcopy(s, d, n)
#endif
#if !defined(HAVE_MEMCMP) && defined(HAVE_BCMP)
#define memcmp(s1, s2, n) bcmp(s2, s1, n)
#endif
#ifndef HAVE_INDEX
#define index strchr
#endif
#ifndef HAVE_RINDEX
#define rindex strrchr
#endif
#define E extern
#define SIG_RET_TYPE RETSIGTYPE (*)()
/* Define the filename size for savegame files */
#ifdef UNIX
#define SAVESIZE (PL_NSIZ + 63) /* save/99999player.e */
#else
# ifdef VMS
#define SAVESIZE (PL_NSIZ + 22) /* [.save]<uid>player.e;1 */
# else
#define SAVESIZE FILENAME /* from macconf.h or pcconf.h */
# endif
#endif
#include <sys/types.h>
#include "global.h" /* Define everything else according to choices above */
#endif /* __NH_CONFIG_H__ */
|