From ea46d05aed0343c20d8fdfaa0e67d54d51e8e2a0 Mon Sep 17 00:00:00 2001 From: "John Wilbert M. Villamor" Date: Fri, 22 Nov 2019 09:11:12 +0800 Subject: Added long awaited CD-ROM library and loads of fixes, see changelog for details --- libpsn00b/libc/readme.txt | 6 ------ libpsn00b/libc/string.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'libpsn00b/libc') diff --git a/libpsn00b/libc/readme.txt b/libpsn00b/libc/readme.txt index 064a353..5bef0fd 100644 --- a/libpsn00b/libc/readme.txt +++ b/libpsn00b/libc/readme.txt @@ -32,12 +32,6 @@ Library header(s): Todo list: - - * Current vsprintf/sprintf implementation from PSXSDK needs to be replaced - as it performs quite slow likely due to the unnecessary int64 arithmetic - performed on any integer value which the compiler has to emulate on the - R3000. A more efficient implementation that only uses int32 is much - preferred. * Many of the string manipulation and memory fill functions in string.c are yet to be replaced with more efficient assembly implementations. diff --git a/libpsn00b/libc/string.c b/libpsn00b/libc/string.c index a14d950..0b7307d 100644 --- a/libpsn00b/libc/string.c +++ b/libpsn00b/libc/string.c @@ -43,7 +43,7 @@ char *strncpy(char *dst, const char *src, int len) len--; } - if(len)*dst = 0; + *dst = 0; return odst; } @@ -139,13 +139,13 @@ char *strstr(const char *big, const char *little) int strcmp(const char *s1, const char *s2) { - while(*s1 && *s2 && (*s1 == *s2)) + while((*s1) && (*s2) && (*s1 == *s2)) { s1++; s2++; } - return *s1-*s2; + return(*s1-*s2); } int strncmp(const char *s1, const char *s2, int len) -- cgit v1.2.3