Wikihack
Advertisement

Below is the full text to macconf.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/macconf.h#line123]], for example.

The latest source code for vanilla NetHack is at Source code.


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