4 #include "base/cl_sysdep.h"
14 // We don't use `stream << x' or `stream << dec << x', because an ostream
15 // carries so many attributes, and we don't want to modifies these attributes.
17 void fprintdecimal (std::ostream& stream, unsigned long x)
20 var char buf[bufsize+1];
21 var char* bufptr = &buf[bufsize];
24 unsigned long q = x / 10;
25 unsigned long r = x % 10;
29 fprint(stream,bufptr);
33 void fprintdecimal (std::ostream& stream, long x)
36 fprintdecimal(stream,(unsigned long)x);
38 fprintchar(stream,'-');
39 fprintdecimal(stream,(unsigned long)(-1-x)+1);