_obase = out;
}
-int is_input_decimal ()
-{
- return (_ibase == 10);
-}
-
char *show_base ()
{
static char str[16] = {0};
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];
double print (double value)
{
if (_obase == 10) {
- fprintf (stdout, _format ? _format : DEFAULT_FORMAT, value);
+ printf (_format ? _format : DEFAULT_FORMAT, value);
} else {
- fprintf (stdout, "%s%s\n", (_prompt) ? _prompt : DEFAULT_PROMPT, itoa ((unsigned int)value));
+ printf ("%s%s\n", (_prompt) ? _prompt : DEFAULT_PROMPT, mbitoa ((unsigned int)value));
}
- fflush (stdout);
return value;
}
double printl (double value)
{
if (_obase == 10) {
- fprintf (stdout, _minform ? _minform : DEFAULT_MINFORM, value);
+ printf (_minform ? _minform : DEFAULT_MINFORM, value);
} else {
- fprintf (stdout, "%s%s", (_prompt) ? _prompt : DEFAULT_PROMPT, itoa ((unsigned int)value));
+ printf ("%s", mbitoa ((unsigned int)value));
}
- fflush (stdout);
return value;
}