abstract
| - Below is the full text to ntconf.h from the source code of NetHack 3.4.0. To link to a particular line, write [[NetHack 3.4.0/ntconf.h#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)ntconf.h 3.4 2002/03/10 */ 2. /* Copyright (c) NetHack PC Development Team 1993, 1994. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifndef NTCONF_H 6. #define NTCONF_H 7. 8. /* #define SHELL /* nt use of pcsys routines caused a hang */ 9. 10. #define RANDOM /* have Berkeley random(3) */ 11. #define TEXTCOLOR /* Color text */ 12. 13. #define EXEPATH /* Allow .exe location to be used as HACKDIR */ 14. #define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */ 15. #ifdef WIN32CON 16. #define LAN_FEATURES /* Include code for lan-aware features. Untested in 3.4.0*/ 17. #endif 18. 19. #define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */ 20. /* without first receiving confirmation. */ 21. #define NOCWD_ASSUMPTIONS /* Allow paths to be specified for HACKDIR, 22. LEVELDIR, SAVEDIR, BONESDIR, DATADIR, 23. SCOREDIR, LOCKDIR, and CONFIGDIR */ 24. 25. /* 26. * ----------------------------------------------------------------- 27. * The remaining code shouldn't need modification. 28. * ----------------------------------------------------------------- 29. */ 30. /* #define SHORT_FILENAMES /* All NT filesystems support long names now */ 31. 32. #define MICRO /* always define this! */ 33. #define NO_TERMS 34. #define ASCIIGRAPH 35. 36. #ifdef OPTIONS_USED 37. #undef OPTIONS_USED 38. #endif 39. #ifdef MSWIN_GRAPHICS 40. #define OPTIONS_USED "guioptions" 41. #else 42. #define OPTIONS_USED "ttyoptions" 43. #endif 44. #define OPTIONS_FILE OPTIONS_USED 45. 46. #define PORT_HELP "porthelp" 47. 48. /* The following is needed for prototypes of certain functions */ 49. #if defined(_MSC_VER) 51. #endif 52. 53. #include /* Provides prototypes of strncmpi(), etc. */ 54. #ifdef STRNCMPI 55. #define strncmpi(a,b,c) strnicmp(a,b,c) 56. #endif 57. 58. #include 59. #include 60. #ifdef __BORLANDC__ 61. #undef randomize 62. #undef random 63. #endif 64. 65. #define PATHLEN BUFSZ /* maximum pathlength */ 66. #define FILENAME BUFSZ /* maximum filename length (conservative) */ 67. 68. #if defined(_MAX_PATH) && defined(_MAX_FNAME) 69. # if (_MAX_PATH < BUFSZ) && (_MAX_FNAME < BUFSZ) 70. #undef PATHLEN 71. #undef FILENAME 72. #define PATHLEN _MAX_PATH 73. #define FILENAME _MAX_FNAME 74. # endif 75. #endif 76. 77. 78. #define NO_SIGNAL 79. #define index strchr 80. #define rindex strrchr 81. #include 82. #define USE_STDARG 83. #ifdef RANDOM 84. /* Use the high quality random number routines. */ 85. #define Rand() random() 86. #else 87. #define Rand() rand() 88. #endif 89. 90. #define FCMASK 0660 /* file creation mask */ 91. #define regularize nt_regularize 92. #define HLOCK "NHPERM" 93. 94. #ifndef M 95. #define M(c) ((char) (0x80 | (c))) 96. /* #define M(c) ((c) - 128) */ 97. #endif 98. 99. #ifndef C 100. #define C(c) (0x1f & (c)) 101. #endif 102. 103. #if defined(DLB) 104. #define FILENAME_CMP stricmp /* case insensitive */ 105. #endif 106. 107. #ifdef MICRO 108. # ifndef MICRO_H 109. #include "micro.h" /* contains necessary externs for [os_name].c */ 110. # endif 111. #endif 112. 113. #include 114. #ifndef __BORLANDC__ 115. #include 116. #include 117. #else 118. int _RTLENTRY _EXPFUNC _chdrive(int __drive); 119. int _RTLENTRYF _EXPFUNC32 chdir( const char _FAR *__path ); 120. char _FAR * _RTLENTRY _EXPFUNC getcwd( char _FAR *__buf, int __buflen ); 121. int _RTLENTRY _EXPFUNC write (int __handle, const void _FAR *__buf, unsigned __len); 122. int _RTLENTRY _EXPFUNC creat (const char _FAR *__path, int __amode); 123. int _RTLENTRY _EXPFUNC close (int __handle); 124. int _RTLENTRY _EXPFUNC open (const char _FAR *__path, int __access,... /*unsigned mode*/); 125. long _RTLENTRY _EXPFUNC lseek (int __handle, long __offset, int __fromwhere); 126. int _RTLENTRY _EXPFUNC read (int __handle, void _FAR *__buf, unsigned __len); 127. #endif 128. #include 129. #undef kbhit /* Use our special NT kbhit */ 130. #define kbhit (*nt_kbhit) 131. 132. #ifdef LAN_FEATURES 133. #define MAX_LAN_USERNAME 20 134. #define LAN_RO_PLAYGROUND /* not implemented in 3.3.0 */ 135. #define LAN_SHARED_BONES /* not implemented in 3.3.0 */ 136. #include "nhlan.h" 137. #endif 138. 139. #ifndef alloca 140. #define ALLOCA_HACK /* used in util/panic.c */ 141. #endif 142. 143. #ifndef REDO 144. #undef Getchar 145. #define Getchar nhgetch 146. #endif 147. 148. #ifdef _MSC_VER 149. #if 0 150. #pragma warning(disable:4018) /* signed/unsigned mismatch */ 151. #pragma warning(disable:4305) /* init, conv from 'const int' to 'char' */ 152. #endif 153. #pragma warning(disable:4761) /* integral size mismatch in arg; conv supp*/ 154. #ifdef YYPREFIX 155. #pragma warning(disable:4102) /* unreferenced label */ 156. #endif 157. #endif 158. 159. extern int FDECL(set_win32_option, (const char *, const char *)); 160. 161. #endif /* NTCONF_H */
|