Commit graph

194 commits

Author SHA1 Message Date
Ryan C. Gordon
ff366fba87
include: Move SDL_HAS_BUILTIN to SDL_begin_code.h, document it.
This macro fits better here, since most of the other macros in this file are
for testing similar compiler/target features, etc.
2024-12-19 19:12:56 -05:00
SDL Wiki Bot
5608bf5866 Sync SDL3 wiki -> header
[ci skip]
2024-12-18 06:22:41 +00:00
Ryan C. Gordon
e957840d34
include: Filling in some more documentation gaps. 2024-12-18 01:18:40 -05:00
Ryan C. Gordon
be5fba963a
wikiheaders: optionally generate a Quick Reference page.
Plus some fixes to SDL's headers this brought up.
2024-12-10 11:25:15 -05:00
SDL Wiki Bot
c0f1fe8e7f Sync SDL3 wiki -> header
[ci skip]
2024-11-28 04:36:33 +00:00
SDL Wiki Bot
572cc7af63 Sync SDL3 wiki -> header
[ci skip]
2024-11-16 04:44:23 +00:00
ChillerDragon
7d7ee43ddb stdinc: document SDL_strnlen and SDL_strlen
See https://github.com/libsdl-org/sdlwiki/issues/635
2024-11-15 23:43:51 -05:00
Zack Middleton
8a2cac7aaa Fix SDL_PRIs64 to use standard PRId64
PRIs64 doesn't exist in C standards.
2024-11-08 12:37:14 +03:00
SDL Wiki Bot
0508f100e2 Sync SDL3 wiki -> header
[ci skip]
2024-11-01 22:50:16 +00:00
Petar Popovic
db4e2ccbac Allow redefinition of only one macro SDL_SINT64_C SDL_UINT64_C 2024-10-24 07:37:44 -07:00
Susko3
d0cf2c19d1
Allow defining custom SDL_SINT64_C and SDL_UINT64_C macros (#11315) 2024-10-23 17:03:13 -07:00
SDL Wiki Bot
24b376ef18 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 16:30:58 +00:00
Ryan C. Gordon
1c1706a00b
fnsince: update \since policy for documentation.
Everything in SDL3 up to the ABI lock is reported as available since 3.1.3.
Everything else will be reported as since 3.2.0 (what will be the first
official release).

Also ran a Perl script over the headers to change everything to 3.1.3 that
wasn't an API function, since fnsince.pl can't manage those. If there's a
macro or datatype that has snuck in that needs to be 3.2.0 instead, we'll
have to manually fix it up, but it shouldn't be a big deal in any case.

Reference PR #11304.
2024-10-23 12:22:43 -04:00
SDL Wiki Bot
7b6416add0 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 05:41:03 +00:00
Petar Popovic
af1c165352 Set version of new identifiers after 3.1.3 release to 3.1.6 2024-10-22 22:40:07 -07:00
Ryan C. Gordon
2318961b6f
docs: Add \threadsafety to some low-hanging fruit across a few headers.
Reference Issue #7140.
2024-10-22 13:48:35 -04:00
Ryan C. Gordon
eed11ad6d6
docs: Fixed example code for SDL_qsort_r() and SDL_bsearch_r(). 2024-10-22 13:48:35 -04:00
Ozkan Sezer
3ebfdb04be SDL_stdinc.h: provide a prototype for strdup for __clang_analyzer__ case
Because strdup is not ANSI but POSIX, and its prototype might be hidden..

... and re-enable clang-tidy in CI for LoongArch64.

Fixes:  https://github.com/libsdl-org/SDL/issues/11219.
2024-10-16 21:50:40 +03:00
SDL Wiki Bot
365dba6de8 Sync SDL3 wiki -> header
[ci skip]
2024-10-12 15:08:54 +00:00
SDL Wiki Bot
2a9cb68b91 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 16:43:29 +00:00
SDL Wiki Bot
ac6b9e2d19 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 15:06:56 +00:00
Sam Lantinga
28a70a5b71 Use the correct version for the \since field 2024-10-10 08:06:18 -07:00
SDL Wiki Bot
02f3a96476 Sync SDL3 wiki -> header
[ci skip]
2024-10-09 16:49:57 +00:00
Sam Lantinga
f8eac30276 Added SDL_StepBackUTF8() 2024-10-09 09:49:10 -07:00
Ryan C. Gordon
02434cd293
emscripten: Fixes for data addresses above 2gb
This includes both wasm64 and wasm32 when addressing more than 2gb of memory.

Fixes: #9052

(Manually cherry-picked from 3deb07ea39.)
2024-10-08 17:41:18 -04:00
Naman Dixit
54e622c2e6 Use the printf vararg verification macros when compiling with clang 2024-10-06 22:19:52 -07:00
SDL Wiki Bot
798c9574d0 Sync SDL3 wiki -> header 2024-10-01 17:46:16 +00:00
Sam Lantinga
89e68aa801 Added missing return value documentation for bsearch() 2024-10-01 10:45:32 -07:00
Sam Lantinga
4fa92d233d Include stdbool.h when using Visual Studio 2017+
Also cleaned up some incorrect return values from bool functions.
2024-10-01 09:57:59 -07:00
SDL Wiki Bot
c16d7c87d6 Sync SDL3 wiki -> header 2024-09-30 18:18:49 +00:00
Sam Lantinga
ab832f1be0 Added documentation for qsort and bsearch functions 2024-09-30 11:18:17 -07:00
Sam Lantinga
a923771978 Added SDL_murmur3_32() 2024-09-28 17:19:01 -07:00
Sam Lantinga
039148fb0e Updated check for stdbool.h
If you're building in a C99 or newer environment, we'll automatically include stdbool.h.

If you're building in a C89 or C90 environment, we'll assume that stdbool.h isn't available and define bool as an unsigned char. If you have a working stdbool.h and want SDL to use it, you can either include stdbool.h before SDL headers, or define SDL_INCLUDE_STDBOOL_H in your project.

Closes https://github.com/libsdl-org/SDL/pull/10980
2024-09-28 16:55:09 -07:00
Sam Lantinga
3f446d8fb5 Minor cleanup 2024-09-27 14:10:46 -07:00
Sam Lantinga
b0e528cc88 Switched ifdef from negative to positive 2024-09-21 20:12:54 -07:00
Ozkan Sezer
254b36361e Add SDL_PRILL? format specifiers specifically for long long type. 2024-09-21 23:03:50 +03:00
Ozkan Sezer
7edf7fad66 fix bool define when SDL_DEFINE_STDBOOL is defined:
it should be unsigned.
2024-09-18 12:17:22 -07:00
Ozkan Sezer
ff90570a3c define SDL_DEFINE_STDBOOL for gcc < 3 2024-09-18 12:17:22 -07:00
Sam Lantinga
ea640894d3 Fixed SDL_DEFINE_STDBOOL logic if __bool_true_false_are_defined is defined 2024-09-18 10:50:52 -07:00
Sam Lantinga
32fd1878a0 Provide a definition of bool if needed for your environment 2024-09-18 10:37:11 -07:00
SDL Wiki Bot
026d3c2306 Sync SDL3 wiki -> header 2024-09-18 15:33:11 +00:00
Sam Lantinga
a90ad3b0e2 Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type.

If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
Sam Lantinga
97d40b9218 Removed SDL_CleanupEnvironment() 2024-09-15 10:00:21 -07:00
SDL Wiki Bot
a7f1deae8d Sync SDL3 wiki -> header 2024-09-15 16:38:38 +00:00
Sam Lantinga
28b94c4758 Re-added SDL_getenv() as a thread-safe getenv() implementation 2024-09-15 09:37:04 -07:00
Sam Lantinga
8569bde053 Fixed typo 2024-09-14 14:35:57 -07:00
SDL Wiki Bot
706aaaf280 Sync SDL3 wiki -> header 2024-09-14 20:23:16 +00:00
Ryan C. Gordon
3bc0347761
Revert "Sync SDL3 wiki -> header"
This reverts commit 35427ff9ec.
2024-09-14 16:22:16 -04:00
Ryan C. Gordon
c2e4b14a82
Revert "stdinc: Added missing \param to SDL_CreateEnvironment."
This reverts commit 919f8d3e2b.
2024-09-14 16:22:09 -04:00
Ryan C. Gordon
11c9975caa
Revert "Sync SDL3 wiki -> header"
This reverts commit ba65767afa.
2024-09-14 16:22:00 -04:00