14 Commits
Author SHA1 Message Date
iAbdulrrahman 6b31deaccf feat(libc): implement digittoint, isnumber, and ishexnumber 2026-10-26 19:34:17 +03:00
JJenkxandClaude Opus 5.5 5d347949b0 fix(libc): accept signed char values in the ctype functions as titles' libc.prx does
The ctype functions threw std::invalid_argument for any value below EOF,
so a title passing a plain char with its high bit set, such as a UTF-8
byte, aborted. The libc.prx bundled with titles accepts -128 to -2: each
class function returns 0 for them, as for 128 to 255 in the C locale,
and toupper and tolower return them unchanged. Values outside -128 to
255 still throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 22:16:45 -04:00
Dean 36df54b472 Merge pull request #10387 from JJenkx/windows/libc-ctype-console-masks
fix(libc): return the console's class bits from the ctype functions
2026-10-26 14:28:15 +13:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
JJenkxandClaude Opus 5.5 0f2f387159 Merge main into PR #10387
LocaleSupport.cpp: keep this branch's console class masks for the ctype
classifiers and main's new isascii and toascii.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 05:31:19 -04:00
Dean 7c2400d29b Merge pull request #8919 from iAbdulrrahman/feat/libc-isascii-toascii
feat(libc): implement isascii and toascii
2026-10-24 18:21:46 +13:00
JJenkxandClaude Opus 5.5 d2e18d53b3 fix(libc): return the console's class bits from the ctype functions
isalpha, isdigit, isspace and the other ctype classifiers returned 1 for
a match. The libc.prx bundled with eleven titles returns the matching
bits of its classification table instead, for example 0x20 from isdigit,
0x04 from isspace(' ') and 0x40 from isspace('\t'), and its table marks
tab with 0x400, which isblank returns. The classifiers now return the
exported table's bits under the console's masks, and the table gains the
tab bit; which characters match is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 16:18:56 -04:00
JJenkxandClaude Opus 5.5 1f206b59c4 fix(libc): accept any setlocale category and only the C locale, as titles' libc.prx does
setlocale returned a null pointer for a category outside 0 to 6 and
accepted "POSIX" as a name for "C". The libc.prx that titles ship
ignores the category, so setlocale(-1, NULL) and setlocale(7, "C")
return "C", and returns a null pointer for "POSIX" as for any name other
than "C" or the empty string.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 20:36:58 -04:00
iAbdulrrahman 285275e678 feat(libc): implement isascii and toascii 2026-10-21 09:00:56 +03:00
MarcZX100 2ec20dbd37 fix(libc): validate guest setlocale categories 2026-10-13 15:12:57 +02:00
MarcZX100 5eb99f8b65 fix(libc): reject invalid setlocale categories
(cherry picked from commit 099fa80b53)
2026-10-13 15:12:56 +02:00
devilismyfriendandClaude Opus 5.5 a503d0b617 Merge remote-tracking branch 'origin/main' into feat/demons-souls-boot
Brings in main up to 9958d26 (homebrew runtime, POSIX wrappers in
libkernel, sce_module guest modules and --skip-sce-module, the --to-intel
general pipeline, libSceRandom, libSceRtc, libScePosixForWebKit,
libRenoirCore, test wiring).

Resolutions where both sides implemented the same thing:
- libkernel pthread: main's structure (lazy static initialisation,
  destroyed markers, MutexOperations/CondOperations, mutex protocol and
  condattr clock) with this branch's TimedWait deadlines and condition
  (precise timed lock/wait on Windows), wait tracing, the adaptive mutex
  type 4, POSIX default ERRORCHECK mutexes, EDEADLK/EPERM results instead
  of throws, and condition clocks honoured for absolute timeouts.
- libc locale: the guest Dinkumware ABI (_Locimp, facet vtables, short
  ctype/case tables, locale ids, stream storage) is kept because guest code
  inlines those layouts; main's C character functions are kept on top.
- libc stdio/strings/math: main's stream functions (guest FILE status
  sync), strerror/perror, remove, formatting, string and math exports win
  over this branch's duplicates.
- libc paths: main's working directory with this branch's path aliases
  resolved on the normalised guest path.
- libkernel file: this branch's sceKernel* results as SCE errors, main's
  POSIX wrappers and both fstat helpers.
- relinker: this branch's stub lowering keeps its trampolines through the
  main executable path; guest modules refuse lowerings that need stubs.
- AGC driver: main's rendering wait is executed by this branch's workers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo
2026-09-27 10:52:21 -07:00
boykopovar e526f1f528 feat(libc): replace guest locale implementation with std::locale 2026-09-27 11:43:42 +03:00
SamG-Coder 39b81364b7 feat(libc): add C-locale character APIs and guest basename 2026-09-25 06:58:41 +10:00