Source:NetHack 3.6.0/include/macconf.h

From NetHackWiki
(Redirected from Source:Macconf.h)
Jump to: navigation, search

Below is the full text to macconf.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/macconf.h#line123]], for example.

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.  /* NetHack 3.6	macconf.h	$NHDT-Date: 1432512782 2015/05/25 00:13:02 $  $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
  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.  #ifndef TARGET_API_MAC_CARBON
  29.  #define TARGET_API_MAC_CARBON 0
  30.  #endif
  31.  
  32.  #ifndef __MACH__
  33.  #define RANDOM
  34.  #endif
  35.  #define NO_SIGNAL /* You wouldn't believe our signals ... */
  36.  #define FILENAME 256
  37.  #define NO_TERMS /* For tty port (see wintty.h) */
  38.  
  39.  #define TEXTCOLOR /* For Mac TTY interface */
  40.  #define CHANGE_COLOR
  41.  
  42.  /* Use these two includes instead of system.h. */
  43.  #include <string.h>
  44.  #include <stdlib.h>
  45.  
  46.  /* Uncomment this line if your headers don't already define off_t */
  47.  /*typedef long off_t;*/
  48.  #include <time.h> /* for time_t */
  49.  
  50.  /*
  51.   * Try and keep the number of files here to an ABSOLUTE minimum !
  52.   * include the relevant files in the relevant .c files instead !
  53.   */
  54.  #if TARGET_API_MAC_CARBON
  55.  #ifdef GNUC
  56.  /* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
  57.  #define __FP__
  58.  #include <Carbon/Carbon.h>
  59.  #else
  60.  /* Avoid including <fenv.h> -- it uses GENERATINGPOWERPC */
  61.  #define __FENV__
  62.  #include <machine/types.h>
  63.  #include <Carbon.h>
  64.  #endif
  65.  #else
  66.  #include <MacTypes.h>
  67.  #endif
  68.  
  69.  /*
  70.   * We could use the PSN under sys 7 here ...
  71.   * ...but it wouldn't matter...
  72.   */
  73.  #define getpid() 1
  74.  #define getuid() 1
  75.  #define index strchr
  76.  #define rindex strrchr
  77.  
  78.  #define Rand random
  79.  extern void error(const char *, ...);
  80.  
  81.  #if !defined(O_WRONLY)
  82.  #if defined(__MWERKS__) && !TARGET_API_MAC_CARBON
  83.  #include <unix.h>
  84.  #endif
  85.  #include <fcntl.h>
  86.  #endif
  87.  
  88.  /*
  89.   * Don't redefine these Unix IO functions when making LevComp or DgnComp for
  90.   * MPW.  With MPW, we make them into MPW tools, which use unix IO.  SPEC_LEV
  91.   * and DGN_COMP are defined when compiling for LevComp and DgnComp
  92.   * respectively.
  93.   */
  94.  #if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) \
  95.        && (defined(SPEC_LEV) || defined(DGN_COMP)))
  96.  #define creat maccreat
  97.  #define open macopen
  98.  #define close macclose
  99.  #define read macread
  100.  #define write macwrite
  101.  #define lseek macseek
  102.  #ifdef __MWERKS__
  103.  #define unlink _unlink
  104.  #endif
  105.  #endif
  106.  
  107.  #define YY_NEVER_INTERACTIVE 1
  108.  
  109.  #define TEXT_TYPE 'TEXT'
  110.  #define LEVL_TYPE 'LEVL'
  111.  #define BONE_TYPE 'BONE'
  112.  #define SAVE_TYPE 'SAVE'
  113.  #define PREF_TYPE 'PREF'
  114.  #define DATA_TYPE 'DATA'
  115.  #define MAC_CREATOR 'nh31'  /* Registered with DTS ! */
  116.  #define TEXT_CREATOR 'ttxt' /* Something the user can actually edit */
  117.  
  118.  /*
  119.   * Define PORT_HELP to be the name of the port-specfic help file.
  120.   * This file is included into the resource fork of the application.
  121.   */
  122.  #define PORT_HELP "MacHelp"
  123.  
  124.  #define MAC_GRAPHICS_ENV
  125.  
  126.  #endif /* ! MACCONF_H */
  127.  #endif /* MAC */