(I seem to recall someone saying that newlib mallocs the largest amount of memory it can and then just assigns from there?)
First thing that hit me was there is no sscanf, that was easy to fix (I wrote some extra code using strtol instead)
This got it compiled and running. It got as far as the first time strncat is called, then the output got a little weird.
Heres strncat from the sdk:
( /trunk/pspsdk/src/libc/string.c - Rev 1486 )
Code: Select all
#ifdef F_strncat
char *strncat(char *s, const char *append, size_t count)
{
char *pRet = s;
while(*s)
{
s++;
}
while((*append) && (count > 0))
{
*s++ = *append++;
}
*s = 0;
return pRet;
}
#endif
I'd fix it and test but the toolchain.sh installer doesn't seem to keep a copy of the svn locally and being almost 1am I think its better to leave it in someone elses capable hands while I sleep...