#ifdef tolower
#undef tolower
#endif
+#ifdef islower
+#undef islower
+#endif
#ifdef isdigit
#undef isdigit
#endif
//#define toupper(c) ((c)&=~0x20)
#define toupper(c) ((c)&=0xDF)
#define tolower(c) ((c)|=0x20)
+#define islower(c) ((unsigned char)c >= (unsigned char)'a' && (unsigned char)c <= (unsigned char)'z')
#define isdigit(c) ((unsigned char)c >= (unsigned char)'0' && (unsigned char)c <= (unsigned char)'9')
typedef union
pfn_outputchar output_char, void* p)
{
unsigned char charsOutputted = 0;
+ char fpBuffer[128];
#else
#define OUTPUT_FLOAT(F, W, D, L, Z, S, P) output_float(F, W, D, L, Z, S, P)
static void
signed char reqDecimals,
BOOL left, BOOL zero, BOOL sign, BOOL space)
{
+ xdata char fpBuffer[128];
#endif //SDCC_STACK_AUTO
BOOL negative = 0;
unsigned long integerPart;
float decimalPart;
- char fpBuffer[128];
char fpBI=0, fpBD;
unsigned char minWidth, i;
goto get_conversion_spec;
}
- lower_case = islower(c);
- if (lower_case)
+ if (islower(c))
{
c = toupper(c);
+ lower_case = 1;
}
+ else
+ lower_case = 0;
switch( c )
{
goto get_conversion_spec;
case 'C':
- OUTPUT_CHAR( va_arg(ap,int), p );
+ if( char_argument )
+ c = va_arg(ap,char);
+ else
+ c = va_arg(ap,int);
+ OUTPUT_CHAR( c, p );
break;
case 'S':
}
}
- while ( *PTR && (decimals-- > 0))
+ while ( (c = *PTR) && (decimals-- > 0))
{
- OUTPUT_CHAR( *PTR++, p );
+ OUTPUT_CHAR( c, p );
+ PTR++;
}
if ( left_justify && (length < width))