summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReiko Asakura2020-09-05 13:30:53 -0400
committerReiko Asakura2020-09-05 13:30:53 -0400
commit6e41311f559604fd2307916e68459f65ed239282 (patch)
tree6ce9acccfbd8faa928ba182607304de9942a5c42
parentAdd const qualifier and attribute (diff)
downloadvds-libraries-6e41311f559604fd2307916e68459f65ed239282.tar.gz
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
-rw-r--r--include/user/paf.h32
1 files changed, 32 insertions, 0 deletions
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 <wchar.h>
#include <psp2/types.h>
#include <psp2/ces/error.h>
@@ -44,6 +45,37 @@ 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
*/