1 // I/O through <iostream>
7 #include "cln/modules.h"
9 // I/O through <iostream>
14 #define floor cln_floor
22 typedef std::istream& cl_istream;
23 typedef std::ostream& cl_ostream;
24 extern std::ostream* cl_debugout_stream;
25 #define cl_debugout (*cl_debugout_stream)
27 // Elementary operations on std::ostream&
29 inline void fprintchar (std::ostream& stream, char c)
34 inline void fprint (std::ostream& stream, const char * string)
40 extern void fprintdecimal (std::ostream& stream, unsigned int x);
41 extern void fprintdecimal (std::ostream& stream, int x);
43 extern void fprintdecimal (std::ostream& stream, unsigned long x);
44 extern void fprintdecimal (std::ostream& stream, long x);
46 extern void fprintdecimal (std::ostream& stream, unsigned long long x);
47 extern void fprintdecimal (std::ostream& stream, long long x);
49 extern void fprinthexadecimal (std::ostream& stream, unsigned int x);
50 extern void fprinthexadecimal (std::ostream& stream, int x);
52 extern void fprinthexadecimal (std::ostream& stream, unsigned long x);
53 extern void fprinthexadecimal (std::ostream& stream, long x);
55 extern void fprinthexadecimal (std::ostream& stream, unsigned long long x);
56 extern void fprinthexadecimal (std::ostream& stream, long long x);
59 struct cl_print_flags;
60 struct cl_print_number_flags;
61 struct cl_print_real_flags;
62 struct cl_print_rational_flags;
63 struct cl_print_float_flags;
65 class cl_prin_globals_init_helper
69 cl_prin_globals_init_helper();
70 ~cl_prin_globals_init_helper();
72 static cl_prin_globals_init_helper cl_prin_globals_init_helper_instance;
74 // Define the customary << and >> operators.
76 #define CL_DEFINE_PRINT_OPERATOR(_class_) \
77 inline std::ostream& operator<< (std::ostream& stream, const _class_& x) \