From 6e41311f559604fd2307916e68459f65ed239282 Mon Sep 17 00:00:00 2001 From: Reiko Asakura Date: Sat, 5 Sep 2020 13:30:53 -0400 Subject: Add paf wchar functions prototypes Note that there is no attribute for format wprintf. See this GCC ticket from 2015: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862 --- include/user/paf.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/include/user/paf.h b/include/user/paf.h index a0ac597..b742a9b 100644 --- a/include/user/paf.h +++ b/include/user/paf.h @@ -1,6 +1,7 @@ #ifndef _PSP2_PAF_H_ #define _PSP2_PAF_H_ +#include #include #include @@ -43,6 +44,37 @@ int sce_paf_strncmp(const char *str1, const char *str2, SceSize num); char *sce_paf_strncpy(char *destination, const char *source, SceSize num); char *sce_paf_strrchr(const char *str, int character); +/** + * wchar functions + */ + +/* __attribute__((__format__(__wprintf__, 3, 4))) */ +int sce_paf_swprintf(wchar_t *buffer, size_t bufsz, const wchar_t *format, ...); + +wint_t sce_paf_towlower(wint_t wc); + +wchar_t *sce_paf_wcscat(wchar_t *dest, const wchar_t *src); +wchar_t *sce_paf_wcsncat(wchar_t *dest, const wchar_t *src, size_t count); +wchar_t *sce_paf_wcscpy(wchar_t *dest, const wchar_t *src); +wchar_t *sce_paf_wcsncpy(wchar_t *dest, const wchar_t *src, size_t count); + +int sce_paf_wcscasecmp(const wchar_t *s1, const wchar_t *s2); +wchar_t *sce_paf_wcschr(const wchar_t *str, wchar_t ch); +int sce_paf_wcscmp(const wchar_t *lhs, const wchar_t *rhs); +size_t sce_paf_wcscspn(const wchar_t *dest, const wchar_t *src); +size_t sce_paf_wcslen(const wchar_t *str); +int sce_paf_wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n); +int sce_paf_wcsncmp(const wchar_t *lhs, const wchar_t *rhs, size_t count); +size_t sce_paf_wcsnlen(const wchar_t *s, size_t maxlen); +wchar_t *sce_paf_wcspbrk(const wchar_t *dest, const wchar_t *str); +wchar_t *sce_paf_wcsrchr(const wchar_t *str, wchar_t ch); +size_t sce_paf_wcsspn(const wchar_t *dest, const wchar_t *src); + +wchar_t *sce_paf_wmemchr(const wchar_t *ptr, wchar_t ch, size_t count); +int sce_paf_wmemcmp(const wchar_t *lhs, const wchar_t *rhs, size_t count); +wchar_t *sce_paf_wmemcpy(wchar_t *dest, const wchar_t *src, size_t count); +wchar_t *sce_paf_wmemmove(wchar_t *dest, const wchar_t *src, size_t count); + /** * CES functions */ -- cgit v1.2.3