1 // I/O through <iostream>
7 #include "cln/modules.h"
9 // I/O through <iostream>
14 #define floor cln_floor
21 typedef std::istream& cl_istream;
22 typedef std::ostream& cl_ostream;
23 extern std::ostream* cl_debugout_stream;
24 #define cl_debugout (*cl_debugout_stream)
26 // Elementary operations on cl_istream
30 inline int freadchar (cl_istream stream)
40 inline int funreadchar (cl_istream stream, int c)
43 stream.putback((char)c);
47 // Elementary operations on cl_ostream
49 inline void fprintchar (cl_ostream stream, char c)
54 inline void fprint (cl_ostream stream, const char * string)
60 extern void fprintdecimal (cl_ostream stream, unsigned long x);
61 extern void fprintdecimal (cl_ostream stream, long x);
63 inline void fprintdecimal (cl_ostream stream, unsigned int x)
65 fprintdecimal(stream,(unsigned long)x);
67 inline void fprintdecimal (cl_ostream stream, int x)
69 fprintdecimal(stream,(long)x);
72 extern void fprinthexadecimal (cl_ostream stream, unsigned long x);
73 extern void fprinthexadecimal (cl_ostream stream, long x);
75 inline void fprinthexadecimal (cl_ostream stream, unsigned int x)
77 fprinthexadecimal(stream,(unsigned long)x);
79 inline void fprinthexadecimal (cl_ostream stream, int x)
81 fprinthexadecimal(stream,(long)x);
86 class cl_print_number_flags;
87 class cl_print_real_flags;
88 class cl_print_rational_flags;
89 class cl_print_float_flags;
90 CL_REQUIRE(cl_prin_globals)
93 // Define the customary << and >> operators.
95 #define CL_DEFINE_PRINT_OPERATOR(_class_) \
96 inline cl_ostream operator<< (cl_ostream stream, const _class_& x) \
104 #endif /* _CL_IO_H */