PowerPC Linux support from ericvh.
Mainly adding va_copy/va_end. Also fix bug in sprint wrapping around top of memory.
This commit is contained in:
parent
c8c0df440f
commit
984e353160
16 changed files with 54 additions and 17 deletions
|
|
@ -20,6 +20,7 @@ int
|
|||
vsnprint(char *buf, int len, char *fmt, va_list args)
|
||||
{
|
||||
Fmt f;
|
||||
int x = 0;
|
||||
|
||||
if(len <= 0)
|
||||
return -1;
|
||||
|
|
@ -30,8 +31,9 @@ vsnprint(char *buf, int len, char *fmt, va_list args)
|
|||
f.flush = 0;
|
||||
f.farg = nil;
|
||||
f.nfmt = 0;
|
||||
f.args = args;
|
||||
va_copy(f.args,args);
|
||||
dofmt(&f, fmt);
|
||||
va_end(f.args);
|
||||
*(char*)f.to = '\0';
|
||||
return (char*)f.to - buf;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue