if (init == 0) {
CONSOLE_SCREEN_BUFFER_INFO info;
GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info);
- init = info.attr;
+ init = info.wAttributes;
}
/* default attribute */
return _ibase;
}
-char *itoa (unsigned long value)
+/* multi base integer to ascii function */
+
+char *mbitoa (unsigned long value)
{
static char str[8 * sizeof (long) + 1];
if (_obase == 10) {
printf (_format ? _format : DEFAULT_FORMAT, value);
} else {
- printf ("%s%s\n", (_prompt) ? _prompt : DEFAULT_PROMPT, itoa ((unsigned int)value));
+ printf ("%s%s\n", (_prompt) ? _prompt : DEFAULT_PROMPT, mbitoa ((unsigned int)value));
}
return value;
}
if (_obase == 10) {
printf (_minform ? _minform : DEFAULT_MINFORM, value);
} else {
- printf ("%s%s", (_prompt) ? _prompt : DEFAULT_PROMPT, itoa ((unsigned int)value));
+ printf ("%s%s", (_prompt) ? _prompt : DEFAULT_PROMPT, mbitoa ((unsigned int)value));
}
return value;
}