X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Fbase%2Foutput%2Fcl_output_dec.cc;h=99ea4570e65608b0444016925a65c190427b379e;hb=8b3d91dec77438c0fe679b10869ab29e6cdeba58;hp=3465bf124375ae1efbea7f3258f8e74a96e79dd3;hpb=dd9e0f894eec7e2a8cf85078330ddc0a6639090b;p=cln.git diff --git a/src/base/output/cl_output_dec.cc b/src/base/output/cl_output_dec.cc index 3465bf1..99ea457 100644 --- a/src/base/output/cl_output_dec.cc +++ b/src/base/output/cl_output_dec.cc @@ -4,31 +4,17 @@ #include "cl_sysdep.h" // Specification. -#include "cl_io.h" +#include "cln/io.h" // Implementation. -#if defined(CL_IO_STDIO) - -void fprintdecimal (cl_ostream stream, unsigned long x) -{ - fprintf(stream,"%lu",x); -} - -void fprintdecimal (cl_ostream stream, long x) -{ - fprintf(stream,"%ld",x); -} - -#endif - -#if defined(CL_IO_IOSTREAM) +namespace cln { // We don't use `stream << x' or `stream << dec << x', because an ostream // carries so many attributes, and we don't want to modifies these attributes. -void fprintdecimal (cl_ostream stream, unsigned long x) +void fprintdecimal (std::ostream& stream, unsigned long x) { #define bufsize 20 var char buf[bufsize+1]; @@ -44,7 +30,7 @@ void fprintdecimal (cl_ostream stream, unsigned long x) #undef bufsize } -void fprintdecimal (cl_ostream stream, long x) +void fprintdecimal (std::ostream& stream, long x) { if (x >= 0) fprintdecimal(stream,(unsigned long)x); @@ -54,4 +40,4 @@ void fprintdecimal (cl_ostream stream, long x) } } -#endif +} // namespace cln