4 Commits
Author SHA1 Message Date
hypermistandClaude Opus 5.5 8e46144d48 fix(libc): follow the console for integer bases and 0x prefixes
- strtol, strtoul, strtoll, strtoull and strtouq return 0 for a base
  outside 0 and 2 to 36, leave the end at the start and set EINVAL;
  strtoimax, strtoumax, _Stoull, _Stoul and the wide forms do the same
  without errno.
- A 0x prefix with no hexadecimal digit after it (base 0 or 16) is no
  conversion: the end stays at the start of the string.
- wcstol, wcstoll and wcstoimax take one sign, convert the rest with
  wcstoull and clamp to the signed range with ERANGE, so "- 1" is -1
  and "+\t-1" overflows.
- atoi, atol and atoll truncate strtoull's result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 16:05:00 +13:00
aspct3434andClaude Opus 5.5 2a45c85ac1 feat(libc): scan %p in swscanf and swscanf_s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 16:16:16 +04:00
screammandClaude Fable 5.1 8aa0d42824 feat(libc): implement swscanf
swscanf (HNnWdT43ues) runs the swscanf_s scanner without the buffer
size arguments after %s, %c and %[, as FreeBSD's swscanf.c passes its
arguments to vswscanf. Both entry points share one engine with a flag
for the sizes; swscanf_s behaves as before.

Title: PS5CEMU-HAR PPSA99360 imports swscanf from libSceLibcInternal.prx
(import audit with --trap-sdk-syscall-stubs, registry index 292, right
after pthread_setaffinity_np at 276). Predicted stop line once
pthread_setaffinity_np resolves, without this change:
FAIL: unresolved ELF import HNnWdT43ues (swscanf) from libSceLibcInternal.prx

NID from tools/nid_names.py, confirmed in shadPS4 aerolib.inl:51950
(e0a466753a1a). Prototype in ps5-payload-dev include/freebsd/wchar.h:133,
export in sce_stubs/libSceLibcInternal.c:8582 (f5d40f02770e).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 11:17:04 +13:00
DavidandClaude Fable 5.1 51fca3cec3 feat(libc): implement _WStoul, _Iswctype and swscanf_s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 23:44:00 +02:00