aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/libc
diff options
context:
space:
mode:
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)