X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Flib%2Fvprintf.c;h=28b81d6c7ff7c9908da59356cbdd74d57714be55;hb=99fcafaaddfe9eb3de89d61bf643cecacbb8a9d4;hp=a0b2d4c14e7b34ce1d6a6fcce67f90b89f1039bd;hpb=ea34442f1a2452c591734d551d76e46718665404;p=fw%2Fsdcc diff --git a/device/lib/vprintf.c b/device/lib/vprintf.c index a0b2d4c1..28b81d6c 100644 --- a/device/lib/vprintf.c +++ b/device/lib/vprintf.c @@ -22,6 +22,12 @@ You are forbidden to forbid anyone else to use, share and improve what you give them. Help stamp out software-hoarding! -------------------------------------------------------------------------*/ + +/* this module uses some global variables instead function parameters, so: */ +#ifdef SDCC_STACK_AUTO +#warning "this module cannot yet be use as a reentrant one" +#endif + #ifdef __ds390 #define USE_FLOATS 1 #endif @@ -72,7 +78,7 @@ static bit lsd; /* this one NEEDS to be in data */ static data value_t value; -static unsigned short radix; +static unsigned char radix; // jwk: TODO: this makes the whole dammed thing nonreentrent static int charsOutputted; @@ -252,14 +258,14 @@ static void output_float (float f, unsigned char reqWidth, int vsprintf (const char *buf, const char *format, va_list ap) { - bit left_justify; - bit zero_padding; - bit prefix_sign; - bit prefix_space; - bit signed_argument; - bit char_argument; - bit long_argument; - bit float_argument; + static bit left_justify; + static bit zero_padding; + static bit prefix_sign; + static bit prefix_space; + static bit signed_argument; + static bit char_argument; + static bit long_argument; + static bit float_argument; unsigned char width; signed char decimals;