aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/libc
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-11-22 09:11:12 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-11-22 09:11:12 +0800
commitea46d05aed0343c20d8fdfaa0e67d54d51e8e2a0 (patch)
tree43e2a53f4e5f7f55b075cfc9d6dc7a652a7b0837 /libpsn00b/libc
parentd80d92e13330d527ddb94420b19f9e21bf0e74eb (diff)
downloadpsn00bsdk-ea46d05aed0343c20d8fdfaa0e67d54d51e8e2a0.tar.gz
Added long awaited CD-ROM library and loads of fixes, see changelog for details
Diffstat (limited to 'libpsn00b/libc')
-rw-r--r--libpsn00b/libc/readme.txt6
-rw-r--r--libpsn00b/libc/string.c6
2 files changed, 3 insertions, 9 deletions
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)