feat(libc): implement vfscanf, vscanf, scanf, the wide stream printf family and vswscanf #8292
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8292"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-20T09:14:02Z.
What
Adds eight
libSceLibcInternalexports that no library provided. Each name hashes to the NID the firmware module exports (checked against a decryptedlibSceLibcInternal.sprx):vfscanflckWSkHDBrYfscanfpath (hostvfscanfon Linux,ScanFileWindowson Windows) on ava_listvscanf,scanfj7Jk3yd3yC8,7XEv6NnznWwvfscanfon__stdinpvfwprintf,fwprintfM2bGWSqt764,ZRAcn3dPVmAFormatWide, written to the guest stream asfputwswritesvwprintfQuF2rZGE-v8vfwprintfon__stdoutpvswscanf,vswscanf_sKGotca3AjYw,39HHkIWrWNoswscanf/swscanf_sscanner on ava_listIn the firmware,
vfscanfandvfwprintfare the stream entry points of Dinkumware's_Scanfand_WPrintf, andvscanfisvfscanfon stdin. The new code is appended at the ends ofFormatting.cpp,FormattingWide.cppandScanningWide.cpp, so it stays off the lines #7386, #7525, #7807, #5303 and #8226 change. If #7386 lands first,vfscanfshould take its Linux wide-conversion path the same wayfscanfdoes.Tested
Linux (CachyOS, GCC, Release): the new
guest_stdio_variadictest covers:vfscanfacross successive calls on one stream, up to EOFvscanf/scanfreading from a guest stdinfwprintf/vfwprintfwide-character counts and the UTF-8 bytes in the streamvswscanfand the sized%lscases ofvswscanf_sguest_wide_formatting,guest_wide_conversionandguest_standard_streams*still pass.import_audit.read_exportson the builtlibc.prxlists all eight NIDs.pr_overlapshows no line conflicts; the test registration sits at an anchor that only the repo-wide #6044 also covers.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T09:14:53Z.
Progress report (
77c18ce→4b527ad)📈 System libraries: 65.2% (+0.03%, +7 implemented, +1 declared functions)
✅ 7 implemented
fwprintf_nid_postfixscanf_nid_postfixvfwprintf_nid_postfixvscanf_nid_postfixvswscanf_nid_postfixvswscanf_s_nid_postfixvwprintf_nid_postfix🆕 1 declared as stubs
vfscanf_nid_postfixImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T09:18:14Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/src/ScanningWide.cppcore/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/CMakeLists.txt