Source:NetHack 3.0.0/tradstdc.h

Below is the full text to tradstdc.h from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/tradstdc.h#line123 ]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

1.   /*	SCCS Id: @(#)tradstdc.h	3.0	89/07/12 2.   /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3.    /* NetHack may be freely redistributed. See license for details. */ 4.     5.    #ifndef TRADSTDC_H 6.   #define	TRADSTDC_H 7.    8.    #ifdef DUMB 9.   #undef void 10.  #define void	int 11.  #endif 12.   13.   /*  14.    * ANSI X3J11 detection. 15.   * Makes substitutes for compatibility with the old C standard. 16.   */  17.    18.   #if (defined(__STDC__) || defined(MSDOS)) && !defined(AMIGA) 19.   20.   /* Used for robust ANSI parameter forward declarations: 21.   * int sprintf P((char *, const char *, ...)); 22.   */  23.    24.   /* However, if you do use a prototype in declaring a function but define 25.   * the function in an old-style manner, the compiler might (justifiably) barf. 26.   * Since we have to define functions in the old-style manner to accommodate 27.   * traditional compilers, we don't want to use prototypes if the ANSI-standard 28.   * compiler barfs on these. 29.   */  30.   #ifdef __GNUC__ /* add other compilers as the need arises */ 31.  # define P(s) 32.  #else 33.  # define P(s)		s 34.  #endif 35.   36.   # ifdef __TURBOC__	/* Cover for stupid Turbo C */ 37.  #  define genericptr_t	void * 38.  # else 39.  typedef void *		genericptr_t; 40.  #  ifndef __STDC__ 41.  #   define const 42.  #   define signed 43.  #   define volatile 44.  #  endif 45.  # endif 46.   47.   #else /* __STDC__ */	/* a "traditional" C  compiler */ 48.   49.   # define P(s) 50.   51.   # ifndef genericptr_t 52.  #  ifdef AMIGA 53.  typedef void *		genericptr_t; 54.  #  else 55.  typedef char *		genericptr_t; 56.  #  endif 57.  # endif 58.   59.   # define const 60.  # define signed 61.  # define volatile 62.   63.   #endif /* __STDC__ */ 64.   65.   #endif /* TRADSTDC_H /**/