Source:NetHack 3.4.3/include/macconf.h

From NetHackWiki
Jump to: navigation, search

Below is the full text to include/macconf.h from NetHack 3.4.3. To link to a particular line, write [[macconf.h#line123]], for example.

  1. /*	SCCS Id: @(#)macconf.h	3.4	1999/10/25	*/
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3. /* NetHack may be freely redistributed.  See license for details. */

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. #ifdef MAC
  2. # ifndef MACCONF_H
  3. #  define MACCONF_H
  4.  
  5. /*
  6. * Compiler selection is based on the following symbols:
  7. *
  8. *  __SC__			sc, a MPW 68k compiler
  9. *  __MRC__			mrc, a MPW PowerPC compiler
  10. *	THINK_C			Think C compiler
  11. *	__MWERKS__		Metrowerks' Codewarrior compiler
  12. *
  13. * We use these early in config.h to define some needed symbols,
  14. * including MAC.
  15. #
  16. # The Metrowerks compiler defines __STDC__ (which sets NHSTC) and uses
  17. # WIDENED_PROTOTYPES (defined if UNWIDENED_PROTOTYPES is undefined and
  18. # NHSTDC is defined).
  19. */
  20.  
  21. #ifndef __powerc
  22. # define MAC68K		/* 68K mac (non-powerpc) */
  23. #endif
  24. #ifndef TARGET_API_MAC_CARBON
  25. # define TARGET_API_MAC_CARBON 0
  26. #endif
  27.  
  28.  
  29. #ifndef __MACH__
  30. #define RANDOM
  31. #endif
  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. /* Use these two includes instead of system.h. */
  40. #include <string.h>
  41. #include <stdlib.h>
  42.  
  43. /* Uncomment this line if your headers don't already define off_t */
  44. /*typedef long off_t;*/
  45. #include <time.h>	/* for time_t */
  46.  
  47. /*
  48. * Try and keep the number of files here to an ABSOLUTE minimum !
  49. * include the relevant files in the relevant .c files instead !
  50. */
  51. #if TARGET_API_MAC_CARBON
  52. /* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
  53. # define __FP__
  54. # include <Carbon/Carbon.h>
  55. #else
  56. # include <MacTypes.h>
  57. #endif
  58.  
  59. /*
  60. * We could use the PSN under sys 7 here ...
  61. * ...but it wouldn't matter...
  62. */
  63. #define getpid() 1
  64. #define getuid() 1
  65. #define index strchr
  66. #define rindex strrchr
  67.  
  68. #define Rand random
  69. extern void error(const char *,...);
  70.  
  71. #if !defined(O_WRONLY)
  72. # ifdef __MWERKS__
  73. #  include <unix.h>
  74. # endif
  75. # include <fcntl.h>
  76. #endif
  77.  
  78. /*
  79. * Don't redefine these Unix IO functions when making LevComp or DgnComp for
  80. * MPW.  With MPW, we make them into MPW tools, which use unix IO.  SPEC_LEV
  81. * and DGN_COMP are defined when compiling for LevComp and DgnComp respectively.
  82. */
  83. #if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) && (defined(SPEC_LEV) || defined(DGN_COMP)))
  84. # define creat maccreat
  85. # define open macopen
  86. # define close macclose
  87. # define read macread
  88. # define write macwrite
  89. # define lseek macseek
  90. #ifdef __MWERKS__
  91. # define unlink _unlink
  92. #endif
  93. #endif
  94.  
  95. #define YY_NEVER_INTERACTIVE 1
  96.  
  97. # define TEXT_TYPE 'TEXT'
  98. # define LEVL_TYPE 'LEVL'
  99. # define BONE_TYPE 'BONE'
  100. # define SAVE_TYPE 'SAVE'
  101. # define PREF_TYPE 'PREF'
  102. # define DATA_TYPE 'DATA'
  103. # define MAC_CREATOR 'nh31' /* Registered with DTS ! */
  104. # define TEXT_CREATOR 'ttxt' /* Something the user can actually edit */
  105.  
  106. /*
  107. * Define PORT_HELP to be the name of the port-specfic help file.
  108. * This file is included into the resource fork of the application.
  109. */
  110. #define PORT_HELP "MacHelp"
  111.  
  112. #define MAC_GRAPHICS_ENV
  113.  
  114. # endif /* ! MACCONF_H */
  115. #endif /* MAC */