Commit graph

175 commits

Author SHA1 Message Date
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
SDL Wiki Bot
ba65767afa Sync SDL3 wiki -> header 2024-09-14 20:18:20 +00:00
Ryan C. Gordon
919f8d3e2b
stdinc: Added missing \param to SDL_CreateEnvironment. 2024-09-14 16:17:29 -04:00
SDL Wiki Bot
35427ff9ec Sync SDL3 wiki -> header 2024-09-14 20:11:24 +00:00
Sam Lantinga
aa7357a14d SDL_CreateEnvironment() fills the environment with a non-zero parameter 2024-09-14 10:29:02 -07:00
Sam Lantinga
90e01040c5 Added thread-safe environment functions
Also marked the existing functions as unsafe, as they can cause crashes if used in multi-threaded applications.

As a bonus, since the new functions are hashtable based, hint environment lookups are much faster.
2024-09-13 22:14:54 -07:00
SDL Wiki Bot
d483886ec5 Sync SDL3 wiki -> header 2024-09-13 19:32:14 +00:00
Carl Åstholm
7d94bf528d stdlib: Document SDL_strtox functions 2024-09-13 12:30:58 -07:00
Carl Åstholm
fb82772fb3 stdlib: Rewrite SDL_strtoull impl 2024-09-13 12:30:58 -07:00
Carl Åstholm
4efbe1ca28 stdlib: Assert that signed integers use two's complement arithmetic 2024-09-13 12:30:58 -07:00
Carl Åstholm
fd53b3e112 stdlib: Rewrite SDL_wcstol impl
SDL_wcstol should now fully adhere to the libc spec.
2024-09-13 12:30:58 -07:00
Sam Lantinga
4eb4370500 SDL_strtoll(), SDL_strtoull(), SDL_lltoa(), and SDL_ulltoa() use long long values 2024-09-09 15:46:26 -07:00
SDL Wiki Bot
7d1bbae6b2 Sync SDL3 wiki -> header 2024-09-09 20:51:57 +00:00
Carl Åstholm
af37056c0d stdinc: Fix typos and reword comments about aliasing 2024-09-09 13:51:16 -07:00
Carl Åstholm
8eb194b6f8 stdinc: Document number parsing APIs 2024-09-09 13:51:16 -07:00
Carl Åstholm
eda459ac49 stdinc: Fix up some printf definitions 2024-09-09 13:51:16 -07:00
Carl Åstholm
d6caf2abe7 Remove SDL_RESTRICT in favor of doc comments 2024-09-09 13:51:16 -07:00
Carl Åstholm
731939fca1 stdinc: Document memcpy APIs 2024-09-09 13:51:16 -07:00
Carl Åstholm
8cea4bd3c9 stdinc: Document memory allocation APIs 2024-09-09 13:51:16 -07:00
SDL Wiki Bot
6e885d9619 Sync SDL3 wiki -> header 2024-09-09 06:56:45 +00:00