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::istream&
31 inline int freadchar (std::istream& stream)
41 inline int funreadchar (std::istream& stream, int c)
44 stream.putback((char)c);
48 // Elementary operations on std::ostream&
50 inline void fprintchar (std::ostream& stream, char c)
55 inline void fprint (std::ostream& stream, const char * string)
61 extern void fprintdecimal (std::ostream& stream, unsigned long x);
62 extern void fprintdecimal (std::ostream& stream, long x);
64 inline void fprintdecimal (std::ostream& stream, unsigned int x)
66 fprintdecimal(stream,(unsigned long)x);
68 inline void fprintdecimal (std::ostream& stream, int x)
70 fprintdecimal(stream,(long)x);
73 extern void fprinthexadecimal (std::ostream& stream, unsigned long x);
74 extern void fprinthexadecimal (std::ostream& stream, long x);
76 inline void fprinthexadecimal (std::ostream& stream, unsigned int x)
78 fprinthexadecimal(stream,(unsigned long)x);
80 inline void fprinthexadecimal (std::ostream& stream, int x)
82 fprinthexadecimal(stream,(long)x);
87 class cl_print_number_flags;
88 class cl_print_real_flags;
89 class cl_print_rational_flags;
90 class cl_print_float_flags;
91 CL_REQUIRE(cl_prin_globals)
94 // Define the customary << and >> operators.
96 #define CL_DEFINE_PRINT_OPERATOR(_class_) \
97 inline std::ostream& operator<< (std::ostream& stream, const _class_& x) \
105 #endif /* _CL_IO_H */