Better _ultoa().

This commit is contained in:
Andreas Mohr 1998-12-24 14:41:28 +00:00 committed by Alexandre Julliard
parent 8f1b5e6322
commit a6ceb0feec
1 changed files with 19 additions and 8 deletions

View File

@ -1911,6 +1911,25 @@ LPSTR __cdecl CRTDLL__ltoa(long x,LPSTR buf,INT32 radix)
return buf;
}
/*********************************************************************
* _ultoa (CRTDLL.311)
*/
LPSTR __cdecl CRTDLL__ultoa(long x,LPSTR buf,INT32 radix)
{
switch(radix) {
case 2: FIXME(crtdll, "binary format not implemented !\n");
break;
case 8: wsnprintf32A(buf,0x80,"%lo",x);
break;
case 10: wsnprintf32A(buf,0x80,"%ld",x);
break;
case 16: wsnprintf32A(buf,0x80,"%lx",x);
break;
default: FIXME(crtdll, "radix %d not implemented !\n", radix);
}
return buf;
}
typedef VOID (*sig_handler_type)(VOID);
/*********************************************************************
@ -2053,11 +2072,3 @@ LPSTR __cdecl CRTDLL__strtime (LPSTR date)
{ FIXME (crtdll,"%p stub\n", date);
return 0;
}
/*********************************************************************
* _ultoa (CRTDLL.311)
*/
LPSTR __cdecl CRTDLL__ultoa(UINT32 x, LPSTR buf, INT32 buflen) {
wsnprintf32A(buf,buflen,"%d",x);
return buf;
}