Source:NetHack 3.2.0/macconf.h
Jump to navigation
Jump to search
Below is the full text to macconf.h from the source code of NetHack 3.2.0. To link to a particular line, write [[NetHack 3.2.0/macconf.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.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. /* SCCS Id: @(#)macconf.h 3.2 94/12/15 */ 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifdef MAC 6. # ifndef MACCONF_H 7. # define MACCONF_H 8. 9. /* 10. * Compiler selection is based on the following symbols: 11. * 12. * applec MPW compiler 13. * THINK_C Think C compiler 14. * __MWERKS__ Metrowerks compiler 15. * 16. * We use these early in config.h to define some needed symbols, 17. * including MAC. 18. # 19. # The Metrowerks compiler defines __STDC__ (which sets NHSTC) and uses 20. # WIDENED_PROTOTYPES (defined if UNWIDENED_PROTOTYPES is undefined and 21. # NHSTDC is defined). 22. */ 23. # ifdef applec 24. # define MAC_MPW32 /* Headers, and for avoiding a bug */ 25. # endif 26. 27. # ifndef __powerc 28. # define MAC68K /* 68K mac (non-powerpc) */ 29. # endif 30. 31. # define RANDOM 32. # define NO_SIGNAL /* You wouldn't believe our signals ... */ 33. # define FILENAME 256 34. # define NO_TERMS /* For tty port (see wintty.h) */ 35. 36. # define TEXTCOLOR /* For Mac TTY interface */ 37. # define CHANGE_COLOR 38. 39. #include "system.h" 40. 41. typedef long off_t ; 42. 43. /* 44. * Try and keep the number of files here to an ABSOLUTE minimum ! 45. * include the relevant files in the relevant .c files instead ! 46. */ 47. #include <segload.h> 48. #include <stdlib.h> 49. #include <windows.h> 50. #include <memory.h> 51. #include <quickdraw.h> 52. #include <events.h> 53. #include <controls.h> 54. #include <dialogs.h> 55. #include <fonts.h> 56. 57. /* 58. * Turn off the Macsbug calls for the production version. 59. */ 60. #if 0 61. # undef Debugger 62. # undef DebugStr 63. # define Debugger() 64. # define DebugStr(aStr) 65. #endif 66. 67. /* 68. * We could use the PSN under sys 7 here ... 69. */ 70. #ifndef __CONDITIONALMACROS__ /* universal headers */ 71. # define getpid() 1 72. # define getuid() 1 73. #endif 74. # define index strchr 75. # define rindex strrchr 76. 77. # define Rand random 78. # define error progerror 79. extern void progerror(const char *,...); /* why not just error ??? */ 80. 81. 82. # if !defined(O_WRONLY) 83. # ifdef __MWERKS__ 84. #include <unix.h> 85. # ifndef O_EXCL 86. /* MW 4.5 doesn't have this, so just use a bogus value */ 87. # define O_EXCL 0x80000000 88. # endif 89. # else 90. #include <fcntl.h> 91. # endif 92. # endif 93. 94. /* 95. * Don't redefine these Unix IO functions when making LevComp or DgnComp for 96. * MPW. With MPW, we make them into MPW tools, which use unix IO. SPEC_LEV 97. * and DGN_COMP are defined when compiling for LevComp and DgnComp respectively. 98. */ 99. #if !(defined(applec) && (defined(SPEC_LEV) || defined(DGN_COMP))) 100. # define creat maccreat 101. # define open macopen 102. # define close macclose 103. # define read macread 104. # define write macwrite 105. # define lseek macseek 106. #endif 107. 108. # define TEXT_TYPE 'TEXT' 109. # define LEVL_TYPE 'LEVL' 110. # define BONE_TYPE 'BONE' 111. # define SAVE_TYPE 'SAVE' 112. # define PREF_TYPE 'PREF' 113. # define DATA_TYPE 'DATA' 114. # define MAC_CREATOR 'nh31' /* Registered with DTS ! */ 115. 116. typedef struct macdirs { 117. Str32 dataName ; 118. short dataRefNum ; 119. long dataDirID ; 120. 121. Str32 saveName ; 122. short saveRefNum ; 123. long saveDirID ; 124. 125. Str32 levelName ; 126. short levelRefNum ; 127. long levelDirID ; 128. } MacDirs ; 129. 130. typedef struct macflags { 131. Bitfield ( processes , 1 ) ; 132. Bitfield ( color , 1 ) ; 133. Bitfield ( folders , 1 ) ; 134. Bitfield ( tempMem , 1 ) ; 135. Bitfield ( help , 1 ) ; 136. Bitfield ( fsSpec , 1 ) ; 137. Bitfield ( trueType , 1 ) ; 138. Bitfield ( aux , 1 ) ; 139. Bitfield ( alias , 1 ) ; 140. Bitfield ( standardFile , 1 ) ; 141. Bitfield ( hasDebugger , 1 ) ; 142. } MacFlags ; 143. 144. extern MacDirs theDirs ; /* used in files.c */ 145. extern MacFlags macFlags ; 146. 147. /* 148. * Define PORT_HELP to be the name of the port-specfic help file. 149. * This file is included into the resource fork of the application. 150. */ 151. #define PORT_HELP "MacHelp" 152. 153. #define MAC_GRAPHICS_ENV 154. 155. # endif /* ! MACCONF_H */ 156. #endif /* MAC */