static unsigned short radix;
+// jwk: TODO: this makes the whole dammed thing nonreentrent
+static int charsOutputted;
+
/****************************************************************************/
static void output_char( char c ) reentrant
{
putchar( c );
}
+ charsOutputted++;
}
/*--------------------------------------------------------------------------*/
XSPEC unsigned char length;
XSPEC char c;
+ // reset output chars
+ charsOutputted=0;
+
output_ptr = buf;
if ( !buf )
{
// Copy \0 to the end of buf
// Modified by JB 17/12/99
- if (output_to_string) output_char(0);
+ if (output_to_string) {
+ output_char(0);
+ return charsOutputted-1;
+ } else {
+ return charsOutputted;
+ }
}
/*--------------------------------------------------------------------------*/