1 // I/O through <stdio.h> or <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 cl_istream stdin;
24 extern cl_ostream stdout;
25 extern cl_ostream stderr;
26 extern std::ostream* cl_debugout_stream;
27 #define cl_debugout (*cl_debugout_stream)
29 // Elementary operations on cl_istream
33 inline int freadchar (cl_istream stream)
43 inline int funreadchar (cl_istream stream, int c)
46 stream.putback((char)c);
50 // Elementary operations on cl_ostream
52 inline void fprintchar (cl_ostream stream, char c)
57 inline void fprint (cl_ostream stream, const char * string)
63 extern void fprintdecimal (cl_ostream stream, unsigned long x);
64 extern void fprintdecimal (cl_ostream stream, long x);
66 inline void fprintdecimal (cl_ostream stream, unsigned int x)
68 fprintdecimal(stream,(unsigned long)x);
70 inline void fprintdecimal (cl_ostream stream, int x)
72 fprintdecimal(stream,(long)x);
75 extern void fprinthexadecimal (cl_ostream stream, unsigned long x);
76 extern void fprinthexadecimal (cl_ostream stream, long x);
78 inline void fprinthexadecimal (cl_ostream stream, unsigned int x)
80 fprinthexadecimal(stream,(unsigned long)x);
82 inline void fprinthexadecimal (cl_ostream stream, int x)
84 fprinthexadecimal(stream,(long)x);
89 class cl_print_number_flags;
90 class cl_print_real_flags;
91 class cl_print_rational_flags;
92 class cl_print_float_flags;
93 CL_REQUIRE(cl_prin_globals)
96 // Define the customary << and >> operators.
98 #define CL_DEFINE_PRINT_OPERATOR(_class_) \
99 inline cl_ostream operator<< (cl_ostream stream, const _class_& x) \
107 #endif /* _CL_IO_H */