|
|
|
|
@ -286,14 +286,9 @@ char *yon_char_from_double(double int_to_convert)
|
|
|
|
|
|
|
|
|
|
char *yon_char_from_long(long int_to_convert)
|
|
|
|
|
{
|
|
|
|
|
int i = 1;
|
|
|
|
|
double convert_check = (double)int_to_convert;
|
|
|
|
|
for (i = 1; convert_check >= 10; i++)
|
|
|
|
|
{
|
|
|
|
|
convert_check = convert_check / 10;
|
|
|
|
|
}
|
|
|
|
|
char *ch = malloc(i * sizeof(char) + 1);
|
|
|
|
|
memset(ch,0,i * sizeof(char) + 1);
|
|
|
|
|
size_t size = 20 * sizeof(char) + 1;
|
|
|
|
|
char *ch = malloc(size);
|
|
|
|
|
memset(ch,0,size);
|
|
|
|
|
sprintf(ch, "%ld", int_to_convert);
|
|
|
|
|
return ch;
|
|
|
|
|
}
|
|
|
|
|
|