From a6ceb0feec98f8b83d56033c57668c2518c2aa1b Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Thu, 24 Dec 1998 14:41:28 +0000 Subject: [PATCH] Better _ultoa(). --- misc/crtdll.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/misc/crtdll.c b/misc/crtdll.c index 30cf346ee3f..9994674e57e 100644 --- a/misc/crtdll.c +++ b/misc/crtdll.c @@ -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; -} -- 2.11.4.GIT