2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/msvcrt/stdlib/itoa.c
5 * PURPOSE: converts a integer to ascii
9 * 1998: Added ltoa Boudewijn Dekker
11 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
13 #include <msvcrt/errno.h>
14 #include <msvcrt/stdlib.h>
15 #include <msvcrt/internal/file.h>
21 char* _i64toa(__int64 value, char* string, int radix)
30 if (radix > 36 || radix <= 1)
36 sign = (radix == 10 && value < 0);
41 while (v || tp == tmp)
52 string = (char *)malloc((tp-tmp)+sign+1);
66 char* _ui64toa(unsigned __int64 value, char* string, int radix)
71 unsigned long v = value;
74 if (radix > 36 || radix <= 1)
80 while (v || tp == tmp)
91 string = (char *)malloc((tp-tmp)+1);