]> www.ginac.de Git - cln.git/blobdiff - src/base/output/cl_output_dec.cc
bump library version, since CLN doesn't export global object ctors any more.
[cln.git] / src / base / output / cl_output_dec.cc
index 3465bf124375ae1efbea7f3258f8e74a96e79dd3..99ea4570e65608b0444016925a65c190427b379e 100644 (file)
@@ -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