]> granicus.if.org Git - nethack/commitdiff
typedef follow-up
authornhmall <nhmall@nethack.org>
Fri, 1 Jul 2022 12:23:31 +0000 (08:23 -0400)
committernhmall <nhmall@nethack.org>
Fri, 1 Jul 2022 12:23:31 +0000 (08:23 -0400)
include/global.h
include/integer.h

index fd5a3291cf87a4397ebde951006f4955efa0401d..a3abfadfe0e58ad533c75fb5c9c5776ad45d022d 100644 (file)
 typedef int8_t xint8;
 /*
  * type coordxy: integers (typedef'd as signed,
- * in the range 32768 to 32767), mostly coordinates.
+ * in the range -32768 to 32767), mostly coordinates.
  * Note that in 2022, screen coordinates easily
  * surpass an upper limit of 127.
  */
 typedef int16_t coordxy;
 /*
  * type xint16: integers (typedef'd as signed,
- * in the range 32768 to 32767), non-coordinates.
+ * in the range -32768 to 32767), non-coordinates.
  */
 typedef int16_t xint16;
 
index 5aca4ca22a0bed539cfc5919a34b82d3ef523c9d..4555cac8e2d3e880d708d43e7fa45a3b8a6fa2ac 100644 (file)
@@ -64,6 +64,7 @@
 /*
  * STDINT_WORKAROUND section begins here
  */
+typedef signed char int8_t;
 typedef unsigned char uint8_t;
 typedef short int16_t;
 typedef unsigned short uint16_t;
@@ -91,6 +92,7 @@ typedef unsigned long long int uint64_t;
 #endif /* !C99 */
 
 /* Provide uint8, int16, uint16, int32, uint32, int64 and uint64 */
+typedef int8_t int8;
 typedef uint8_t uint8;
 typedef int16_t int16;
 typedef uint16_t uint16;