From: nhmall Date: Sat, 5 Mar 2016 20:38:44 +0000 (-0500) Subject: Another file for support of Ray Chason's patch X-Git-Tag: NetHack-3.6.1_RC01~887 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83c58f009ed0a6a335983e7d432044c41b3bb85c;p=nethack Another file for support of Ray Chason's patch --- diff --git a/Files b/Files index 26a2d0d0b..959393d8e 100644 --- a/Files +++ b/Files @@ -36,16 +36,16 @@ align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h color.h config.h config1.h context.h coord.h decl.h def_os2.h dgn_file.h display.h dlb.h dungeon.h engrave.h extern.h -flag.h func_tab.h global.h hack.h lev.h -lint.h mail.h mextra.h mfndpos.h micro.h -mkroom.h monattk.h mondata.h monflag.h monst.h -monsym.h ntconf.h obj.h objclass.h os2conf.h -patchlevel.h pcconf.h permonst.h prop.h qtext.h -quest.h rect.h region.h rm.h skills.h -sp_lev.h spell.h sys.h system.h tcap.h -timeout.h tosconf.h tradstdc.h trampoli.h trap.h -unixconf.h vision.h vmsconf.h wceconf.h winami.h -winprocs.h wintype.h you.h youprop.h +flag.h func_tab.h global.h hack.h integer.h +lev.h lint.h mail.h mextra.h mfndpos.h +micro.h mkroom.h monattk.h mondata.h monflag.h +monst.h monsym.h ntconf.h obj.h objclass.h +os2conf.h patchlevel.h pcconf.h permonst.h prop.h +qtext.h quest.h rect.h region.h rm.h +skills.h sp_lev.h spell.h sys.h system.h +tcap.h timeout.h tosconf.h tradstdc.h trampoli.h +trap.h unixconf.h vision.h vmsconf.h wceconf.h +winami.h winprocs.h wintype.h you.h youprop.h (file for tty versions) wintty.h (files for X versions) diff --git a/include/integer.h b/include/integer.h new file mode 100644 index 000000000..3f77aec8d --- /dev/null +++ b/include/integer.h @@ -0,0 +1,40 @@ +/* NetHack 3.6 integer.h $NHDT-Date: 1457210314 2016/03/05 20:38:34 $ $NHDT-Branch: chasonr $:$NHDT-Revision: 1.0 $ */ +/* NetHack may be freely redistributed. See license for details. */ + +/* integer.h -- provide sized integer types */ + +#ifndef INTEGER_H +#define INTEGER_H + +#if defined(__STDC__) && __STDC__ >= 199101L + +/* The compiler claims to conform to C99. Use stdint.h */ +#include +typedef uint8_t uint8; +typedef int16_t int16; +typedef uint16_t uint16; +typedef int32_t int32; +typedef uint32_t uint32; + +#else /* !C99 */ + +/* Provide uint8, int16, uint16, int32 and uint32 */ +typedef unsigned char uint8; +typedef short int16; +typedef unsigned short uint16; + +#if defined(__WATCOMC__) && !defined(__386__) +/* Open Watcom providing a 16 bit build for MS-DOS or OS/2 */ +/* int is 16 bits; use long for 32 bits */ +typedef long int32; +typedef unsigned long uint32; +#else +/* Otherwise, assume either a 32- or 64-bit compiler */ +/* long may be 64 bits; use int for 32 bits */ +typedef int int32; +typedef unsigned int uint32; +#endif + +#endif /* !C99 */ + +#endif /* INTEGER_H */