From 67b537cef43a804cdad2f0d917e58b0e3fc81fe0 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 1 Nov 2024 23:49:53 -0400 Subject: [PATCH] .wikiheader-options: Treat SDL int types (Uint64, etc) as API prefixes. This makes any reference to them in the docs link to their wiki pages. Also fixup the integer type documentation, so the SDL2 wiki _has_ actual pages for them. :) --- .wikiheaders-options | 2 +- include/SDL_stdinc.h | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.wikiheaders-options b/.wikiheaders-options index 7c1ab1a643282..3dc79ec133b07 100644 --- a/.wikiheaders-options +++ b/.wikiheaders-options @@ -3,7 +3,7 @@ projectshortname = SDL incsubdir = include wikisubdir = SDL2 readmesubdir = docs -apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_) +apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_|[US]int\d+) mainincludefname = SDL.h versionfname = include/SDL_version.h versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h index 9fa348826a26d..e77a248de0d1e 100644 --- a/include/SDL_stdinc.h +++ b/include/SDL_stdinc.h @@ -193,58 +193,59 @@ typedef enum /** * A signed 8-bit integer type. */ +typedef int8_t Sint8; #define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */ #define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */ -typedef int8_t Sint8; /** * An unsigned 8-bit integer type. */ +typedef uint8_t Uint8; #define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */ #define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */ -typedef uint8_t Uint8; /** * A signed 16-bit integer type. */ +typedef int16_t Sint16; #define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */ #define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */ -typedef int16_t Sint16; /** * An unsigned 16-bit integer type. */ +typedef uint16_t Uint16; #define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */ #define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */ -typedef uint16_t Uint16; /** * A signed 32-bit integer type. */ +typedef int32_t Sint32; #define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */ #define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */ -typedef int32_t Sint32; /** * An unsigned 32-bit integer type. */ +typedef uint32_t Uint32; #define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */ #define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */ -typedef uint32_t Uint32; /** * A signed 64-bit integer type. */ +typedef int64_t Sint64; #define SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */ #define SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */ -typedef int64_t Sint64; /** * An unsigned 64-bit integer type. */ +typedef uint64_t Uint64; #define SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */ #define SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */ -typedef uint64_t Uint64; + /* @} *//* Basic data types */