From f3b29e52ea5a7b013f8294065920365e5d17d18f Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Thu, 14 Dec 2000 16:52:58 +0000 Subject: [PATCH] * */*: cl_istream -> std::istream, cl_ostream -> std::ostream. --- ChangeLog | 8 +++ INSTALL | 5 +- NEWS | 4 +- configure.in | 1 - doc/cln.tex | 71 +++++++++---------- include/cln/GV_complex.h | 10 +-- include/cln/GV_integer.h | 10 +-- include/cln/GV_rational.h | 10 +-- include/cln/GV_real.h | 10 +-- include/cln/SV_complex.h | 10 +-- include/cln/SV_integer.h | 10 +-- include/cln/SV_rational.h | 10 +-- include/cln/SV_real.h | 10 +-- include/cln/SV_ringelt.h | 2 +- include/cln/complex_io.h | 10 +-- include/cln/condition.h | 2 +- include/cln/dfloat_io.h | 8 +-- include/cln/ffloat_io.h | 8 +-- include/cln/float_io.h | 16 ++--- include/cln/integer_io.h | 24 +++---- include/cln/io.h | 31 ++++---- include/cln/lfloat_io.h | 8 +-- include/cln/modinteger.h | 10 +-- include/cln/rational_io.h | 16 ++--- include/cln/real_io.h | 12 ++-- include/cln/ring.h | 8 +-- include/cln/sfloat_io.h | 8 +-- include/cln/string.h | 12 ++-- include/cln/timing.h | 6 +- include/cln/univpoly.h | 10 +-- include/cln/univpoly_complex.h | 2 +- include/cln/univpoly_integer.h | 2 +- include/cln/univpoly_modint.h | 2 +- include/cln/univpoly_rational.h | 2 +- include/cln/univpoly_real.h | 2 +- include/cln/version.h.in | 22 ++++++ src/base/cl_version.cc | 18 +++++ src/base/output/cl_output_dec.cc | 4 +- src/base/output/cl_output_hex.cc | 4 +- src/base/ring/cl_no_ring.cc | 2 +- src/base/string/input/cl_st_get1.cc | 2 +- src/base/string/input/cl_st_get2.cc | 2 +- src/base/string/input/cl_st_getline1.cc | 2 +- src/base/string/input/cl_st_getline2.cc | 2 +- src/base/string/input/cl_st_gettoken.cc | 2 +- src/base/string/output/cl_st_print.cc | 2 +- src/complex/input/cl_N_read_stream.cc | 2 +- src/complex/output/cl_N_aprint.cc | 2 +- src/complex/output/cl_N_bprint.cc | 2 +- src/complex/ring/cl_C_ring.cc | 2 +- src/float/input/cl_F_read_stream.cc | 2 +- src/float/output/cl_F_aprint.cc | 2 +- src/float/output/cl_F_bprint.cc | 2 +- src/float/output/cl_F_cprint.cc | 2 +- src/float/output/cl_F_dprint.cc | 2 +- src/float/output/cl_F_printb.cc | 2 +- src/integer/input/cl_I_read_stream.cc | 2 +- src/integer/output/cl_I_aprint.cc | 2 +- src/integer/output/cl_I_bprint.cc | 2 +- src/integer/output/cl_I_cprint.cc | 2 +- src/integer/output/cl_I_dprint.cc | 2 +- src/integer/output/cl_I_print.cc | 2 +- src/integer/ring/cl_0_ring.cc | 2 +- src/integer/ring/cl_I_ring.cc | 2 +- src/modinteger/cl_MI_cond_composite.cc | 2 +- src/modinteger/cl_MI_int.h | 2 +- src/modinteger/cl_MI_std.h | 2 +- src/polynomial/elem/cl_UP_MI.h | 2 +- src/polynomial/elem/cl_UP_gen.h | 2 +- src/polynomial/elem/cl_UP_no_ring.cc | 2 +- src/polynomial/elem/cl_UP_number.h | 2 +- src/rational/input/cl_RA_read_stream.cc | 2 +- src/rational/output/cl_RA_aprint.cc | 2 +- src/rational/output/cl_RA_bprint.cc | 2 +- src/rational/output/cl_RA_cprint.cc | 2 +- src/rational/output/cl_RA_dprint.cc | 2 +- src/rational/output/cl_RA_print.cc | 2 +- src/rational/ring/cl_RA_ring.cc | 2 +- src/real/format-output/cl_fmt_cardinal.cc | 4 +- src/real/format-output/cl_fmt_integer.cc | 2 +- src/real/format-output/cl_fmt_newroman.cc | 2 +- src/real/format-output/cl_fmt_oldroman.cc | 2 +- src/real/format-output/cl_fmt_ordinal.cc | 2 +- src/real/format-output/cl_fmt_paddedstring.cc | 2 +- src/real/format-output/cl_format.h | 14 ++-- src/real/input/cl_R_read_stream.cc | 2 +- src/real/output/cl_R_aprint.cc | 2 +- src/real/output/cl_R_bprint.cc | 2 +- src/real/output/cl_R_cprint.cc | 2 +- src/real/ring/cl_R_ring.cc | 2 +- src/timing/cl_t_c2.cc | 8 +-- src/timing/cl_t_report.cc | 2 +- src/vector/cl_GV_io.h | 2 +- src/vector/cl_GV_number_debug.cc | 2 +- src/vector/cl_SV_io.h | 2 +- src/vector/cl_SV_number_debug.cc | 2 +- src/vector/output/cl_GV_number_aprint.cc | 2 +- src/vector/output/cl_SV_aprint.cc | 2 +- src/vector/output/cl_SV_number_aprint.cc | 2 +- 99 files changed, 300 insertions(+), 258 deletions(-) create mode 100644 include/cln/version.h.in create mode 100644 src/base/cl_version.cc diff --git a/ChangeLog b/ChangeLog index e8ed15d..35435f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-12-14 Richard Kreckel + + * Version 1.1 released. + +2000-12-13 Richard Kreckel + + * */*: cl_istream -> std::istream, cl_ostream -> std::ostream. + 2000-12-05 Richard Kreckel * Makefile.in, src/Makefile.in, doc/Makefile.in: Use mkdir -p. diff --git a/INSTALL b/INSTALL index abd272c..eaeb0d3 100644 --- a/INSTALL +++ b/INSTALL @@ -14,7 +14,7 @@ Known to work with: - Linux/x86, gcc-2.8.0, egcs-1.1, gcc-2.95.x - Solaris 2.4 (sparc), egcs-1.1, gcc-2.95 - OSF/1 V4.0 (alpha), egcs-1.1, gcc-2.95 - - Irix 5.3, CC 4 + - Irix 6.5, gcc-2.95 The "make" step takes about 1 hour, on a P-II / 400 MHz / 64 MB. @@ -28,8 +28,5 @@ either "-O", "-O1" or "-O2 -fno-schedule-insns" to the CXXFLAGS. With full egcs-1.1.1 or older on Sparc, you must specify --disable-shared because g++ would miscompile parts of the library. -On MIPS (SGI Irix 6), pass option "--without-gmp" to configure. gmp does -not work when compiled in "n32" binary format on Irix. - More detailed installation instructions can be found in the documentation, in the doc/ directory. diff --git a/NEWS b/NEWS index 5dba580..2102127 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -2000-11-xx, version 1.1.0 +2000-12-14, version 1.1.0 ========================= Functional changes @@ -24,7 +24,7 @@ Implementation changes better match present-day CPUs. * Fix several errors for architectures with 64-bit wide words. - (Others than Alpha.) + (Others than Alpha, which worked already.) * Fix compilation errors with current GCC-3.0 snapshots. diff --git a/configure.in b/configure.in index aad8faa..836c30c 100644 --- a/configure.in +++ b/configure.in @@ -65,7 +65,6 @@ CL_CANONICAL_HOST_CPU dnl dnl check for build configuration dnl -LIBS=-lm dnl libcln depends on libm PACKAGE=cln dnl libtool wants PACKAGE diff --git a/doc/cln.tex b/doc/cln.tex index c87f745..bc6a7fe 100644 --- a/doc/cln.tex +++ b/doc/cln.tex @@ -12,6 +12,9 @@ @end iftex @c %**end of header +@direntry +* CLN: (cln). Class Library for Numbers (C++). +@end direntry @c My own index. @defindex my @@ -2415,18 +2418,15 @@ In Common Lisp notation: @code{#C(@var{realpart} @var{imagpart})}. @section Input functions -Including @code{} defines a type @code{cl_istream}, which is -the type of the first argument to all input functions. @code{cl_istream} -is the same as @code{std::istream&}. - -These are the simple input functions: +Including @code{} defines a number of simple input functions +that read from @code{std::istream&}: @table @code -@item int freadchar (cl_istream stream) +@item int freadchar (std::istream& stream) Reads a character from @code{stream}. Returns @code{cl_EOF} (not a @samp{char}!) if the end of stream was encountered or an error occurred. -@item int funreadchar (cl_istream stream, int c) +@item int funreadchar (std::istream& stream, int c) Puts back @code{c} onto @code{stream}. @code{c} must be the result of the last @code{freadchar} operation on @code{stream}. @end table @@ -2436,7 +2436,7 @@ Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I}, defines, in @code{}, the following input function: @table @code -@item cl_istream operator>> (cl_istream stream, @var{type}& result) +@item std::istream& operator>> (std::istream& stream, @var{type}& result) Reads a number from @code{stream} and stores it in the @code{result}. @end table @@ -2444,11 +2444,11 @@ The most flexible input functions, defined in @code{}, are the following: @table @code -@item cl_N read_complex (cl_istream stream, const cl_read_flags& flags) -@itemx cl_R read_real (cl_istream stream, const cl_read_flags& flags) -@itemx cl_F read_float (cl_istream stream, const cl_read_flags& flags) -@itemx cl_RA read_rational (cl_istream stream, const cl_read_flags& flags) -@itemx cl_I read_integer (cl_istream stream, const cl_read_flags& flags) +@item cl_N read_complex (std::istream& stream, const cl_read_flags& flags) +@itemx cl_R read_real (std::istream& stream, const cl_read_flags& flags) +@itemx cl_F read_float (std::istream& stream, const cl_read_flags& flags) +@itemx cl_RA read_rational (std::istream& stream, const cl_read_flags& flags) +@itemx cl_I read_integer (std::istream& stream, const cl_read_flags& flags) Reads a number from @code{stream}. The @code{flags} are parameters which affect the input syntax. Whitespace before the number is silently skipped. @@ -2514,32 +2514,29 @@ precision corresponding to their number of significant digits. @section Output functions -Including @code{} defines a type @code{cl_ostream}, which is -the type of the first argument to all output functions. @code{cl_ostream} -is the same as @code{std::ostream&}. - -These are the simple output functions: +Including @code{} defines a number of simple output functions +that write to @code{std::ostream&}: @table @code -@item void fprintchar (cl_ostream stream, char c) +@item void fprintchar (std::ostream& stream, char c) Prints the character @code{x} literally on the @code{stream}. -@item void fprint (cl_ostream stream, const char * string) +@item void fprint (std::ostream& stream, const char * string) Prints the @code{string} literally on the @code{stream}. -@item void fprintdecimal (cl_ostream stream, int x) -@itemx void fprintdecimal (cl_ostream stream, const cl_I& x) +@item void fprintdecimal (std::ostream& stream, int x) +@itemx void fprintdecimal (std::ostream& stream, const cl_I& x) Prints the integer @code{x} in decimal on the @code{stream}. -@item void fprintbinary (cl_ostream stream, const cl_I& x) +@item void fprintbinary (std::ostream& stream, const cl_I& x) Prints the integer @code{x} in binary (base 2, without prefix) on the @code{stream}. -@item void fprintoctal (cl_ostream stream, const cl_I& x) +@item void fprintoctal (std::ostream& stream, const cl_I& x) Prints the integer @code{x} in octal (base 8, without prefix) on the @code{stream}. -@item void fprinthexadecimal (cl_ostream stream, const cl_I& x) +@item void fprinthexadecimal (std::ostream& stream, const cl_I& x) Prints the integer @code{x} in hexadecimal (base 16, without prefix) on the @code{stream}. @end table @@ -2549,8 +2546,8 @@ Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I}, defines, in @code{}, the following output functions: @table @code -@item void fprint (cl_ostream stream, const @var{type}& x) -@itemx cl_ostream operator<< (cl_ostream stream, const @var{type}& x) +@item void fprint (std::ostream& stream, const @var{type}& x) +@itemx std::ostream& operator<< (std::ostream& stream, const @var{type}& x) Prints the number @code{x} on the @code{stream}. The output may depend on the global printer settings in the variable @code{default_print_flags}. The @code{ostream} flags and settings (flags, width and locale) are @@ -2560,15 +2557,15 @@ ignored. The most flexible output function, defined in @code{}, are the following: @example -void print_complex (cl_ostream stream, const cl_print_flags& flags, +void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); -void print_real (cl_ostream stream, const cl_print_flags& flags, +void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); -void print_float (cl_ostream stream, const cl_print_flags& flags, +void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); -void print_rational (cl_ostream stream, const cl_print_flags& flags, +void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); -void print_integer (cl_ostream stream, const cl_print_flags& flags, +void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); @end example Prints the number @code{x} on the @code{stream}. The @code{flags} are @@ -2627,7 +2624,7 @@ These compare two rings for equality. Given a ring @code{R}, the following members can be used. @table @code -@item void R->fprint (cl_ostream stream, const cl_ring_element& x) +@item void R->fprint (std::ostream& stream, const cl_ring_element& x) @cindex @code{fprint ()} @itemx cl_boolean R->equal (const cl_ring_element& x, const cl_ring_element& y) @cindex @code{equal ()} @@ -2849,9 +2846,9 @@ The following output functions are defined (see also the chapter on input/output). @table @code -@item void fprint (cl_ostream stream, const cl_MI& x) +@item void fprint (std::ostream& stream, const cl_MI& x) @cindex @code{fprint ()} -@itemx cl_ostream operator<< (cl_ostream stream, const cl_MI& x) +@itemx std::ostream& operator<< (std::ostream& stream, const cl_MI& x) @cindex @code{operator << ()} Prints the modular integer @code{x} on the @code{stream}. The output may depend on the global printer settings in the variable @code{default_print_flags}. @@ -3171,9 +3168,9 @@ The following output functions are defined (see also the chapter on input/output). @table @code -@item void fprint (cl_ostream stream, const cl_UP& x) +@item void fprint (std::ostream& stream, const cl_UP& x) @cindex @code{fprint ()} -@itemx cl_ostream operator<< (cl_ostream stream, const cl_UP& x) +@itemx std::ostream& operator<< (std::ostream& stream, const cl_UP& x) @cindex @code{operator << ()} Prints the univariate polynomial @code{x} on the @code{stream}. The output may depend on the global printer settings in the variable diff --git a/include/cln/GV_complex.h b/include/cln/GV_complex.h index 72a9797..60cd180 100644 --- a/include/cln/GV_complex.h +++ b/include/cln/GV_complex.h @@ -40,14 +40,14 @@ inline const cl_GV_N copy (const cl_GV_N& vector) } // Output. -inline void fprint (cl_ostream stream, const cl_GV_N& x) +inline void fprint (std::ostream& stream, const cl_GV_N& x) { extern cl_print_flags default_print_flags; - extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); - extern void print_complex (cl_ostream stream, const cl_print_flags& flags, const cl_N& z); + extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); + extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); print_vector(stream, default_print_flags, - (void (*) (cl_ostream, const cl_print_flags&, const cl_number&)) - (void (*) (cl_ostream, const cl_print_flags&, const cl_N&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_N&)) &print_complex, x); } diff --git a/include/cln/GV_integer.h b/include/cln/GV_integer.h index e2adf95..502ec78 100644 --- a/include/cln/GV_integer.h +++ b/include/cln/GV_integer.h @@ -62,14 +62,14 @@ CL_REQUIRE(cl_GV_I) extern const cl_GV_I copy (const cl_GV_I&); // Output. -inline void fprint (cl_ostream stream, const cl_GV_I& x) +inline void fprint (std::ostream& stream, const cl_GV_I& x) { extern cl_print_flags default_print_flags; - extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); - extern void print_integer (cl_ostream stream, const cl_print_flags& flags, const cl_I& z); + extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); + extern void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); print_vector(stream, default_print_flags, - (void (*) (cl_ostream, const cl_print_flags&, const cl_number&)) - (void (*) (cl_ostream, const cl_print_flags&, const cl_I&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_I&)) &print_integer, x); } diff --git a/include/cln/GV_rational.h b/include/cln/GV_rational.h index 2f7fd9c..d585206 100644 --- a/include/cln/GV_rational.h +++ b/include/cln/GV_rational.h @@ -40,14 +40,14 @@ inline const cl_GV_RA copy (const cl_GV_RA& vector) } // Output. -inline void fprint (cl_ostream stream, const cl_GV_RA& x) +inline void fprint (std::ostream& stream, const cl_GV_RA& x) { extern cl_print_flags default_print_flags; - extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); - extern void print_rational (cl_ostream stream, const cl_print_flags& flags, const cl_RA& z); + extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); + extern void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); print_vector(stream, default_print_flags, - (void (*) (cl_ostream, const cl_print_flags&, const cl_number&)) - (void (*) (cl_ostream, const cl_print_flags&, const cl_RA&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_RA&)) &print_rational, x); } diff --git a/include/cln/GV_real.h b/include/cln/GV_real.h index 711ff4d..510b739 100644 --- a/include/cln/GV_real.h +++ b/include/cln/GV_real.h @@ -40,14 +40,14 @@ inline const cl_GV_R copy (const cl_GV_R& vector) } // Output. -inline void fprint (cl_ostream stream, const cl_GV_R& x) +inline void fprint (std::ostream& stream, const cl_GV_R& x) { extern cl_print_flags default_print_flags; - extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); - extern void print_real (cl_ostream stream, const cl_print_flags& flags, const cl_R& z); + extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); + extern void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); print_vector(stream, default_print_flags, - (void (*) (cl_ostream, const cl_print_flags&, const cl_number&)) - (void (*) (cl_ostream, const cl_print_flags&, const cl_R&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_R&)) &print_real, x); } diff --git a/include/cln/SV_complex.h b/include/cln/SV_complex.h index ef0d03e..a7272ee 100644 --- a/include/cln/SV_complex.h +++ b/include/cln/SV_complex.h @@ -36,14 +36,14 @@ inline const cl_SV_N copy (const cl_SV_N& vector) } // Output. -inline void fprint (cl_ostream stream, const cl_SV_N& x) +inline void fprint (std::ostream& stream, const cl_SV_N& x) { extern cl_print_flags default_print_flags; - extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); - extern void print_complex (cl_ostream stream, const cl_print_flags& flags, const cl_N& z); + extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); + extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); print_vector(stream, default_print_flags, - (void (*) (cl_ostream, const cl_print_flags&, const cl_number&)) - (void (*) (cl_ostream, const cl_print_flags&, const cl_N&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_N&)) &print_complex, x); } diff --git a/include/cln/SV_integer.h b/include/cln/SV_integer.h index 3a1892b..4bf03d8 100644 --- a/include/cln/SV_integer.h +++ b/include/cln/SV_integer.h @@ -33,14 +33,14 @@ inline const cl_SV_I copy (const cl_SV_I& vector) } // Output. -inline void fprint (cl_ostream stream, const cl_SV_I& x) +inline void fprint (std::ostream& stream, const cl_SV_I& x) { extern cl_print_flags default_print_flags; - extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); - extern void print_integer (cl_ostream stream, const cl_print_flags& flags, const cl_I& z); + extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); + extern void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); print_vector(stream, default_print_flags, - (void (*) (cl_ostream, const cl_print_flags&, const cl_number&)) - (void (*) (cl_ostream, const cl_print_flags&, const cl_I&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_I&)) &print_integer, x); } diff --git a/include/cln/SV_rational.h b/include/cln/SV_rational.h index 860a414..8774dee 100644 --- a/include/cln/SV_rational.h +++ b/include/cln/SV_rational.h @@ -36,14 +36,14 @@ inline const cl_SV_RA copy (const cl_SV_RA& vector) } // Output. -inline void fprint (cl_ostream stream, const cl_SV_RA& x) +inline void fprint (std::ostream& stream, const cl_SV_RA& x) { extern cl_print_flags default_print_flags; - extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); - extern void print_rational (cl_ostream stream, const cl_print_flags& flags, const cl_RA& z); + extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); + extern void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); print_vector(stream, default_print_flags, - (void (*) (cl_ostream, const cl_print_flags&, const cl_number&)) - (void (*) (cl_ostream, const cl_print_flags&, const cl_RA&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_RA&)) &print_rational, x); } diff --git a/include/cln/SV_real.h b/include/cln/SV_real.h index a7d9236..7a01f5f 100644 --- a/include/cln/SV_real.h +++ b/include/cln/SV_real.h @@ -36,14 +36,14 @@ inline const cl_SV_R copy (const cl_SV_R& vector) } // Output. -inline void fprint (cl_ostream stream, const cl_SV_R& x) +inline void fprint (std::ostream& stream, const cl_SV_R& x) { extern cl_print_flags default_print_flags; - extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); - extern void print_real (cl_ostream stream, const cl_print_flags& flags, const cl_R& z); + extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); + extern void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); print_vector(stream, default_print_flags, - (void (*) (cl_ostream, const cl_print_flags&, const cl_number&)) - (void (*) (cl_ostream, const cl_print_flags&, const cl_R&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) + (void (*) (std::ostream&, const cl_print_flags&, const cl_R&)) &print_real, x); } diff --git a/include/cln/SV_ringelt.h b/include/cln/SV_ringelt.h index 36945c8..9d3a501 100644 --- a/include/cln/SV_ringelt.h +++ b/include/cln/SV_ringelt.h @@ -51,7 +51,7 @@ inline const cl_SV_ringelt copy (const cl_SV_ringelt& vector) { return The(cl_SV_ringelt) (copy((const cl_SV_any&) vector)); } // Output. -extern void fprint (cl_ostream stream, const cl_ring& R, const cl_SV_ringelt& x); +extern void fprint (std::ostream& stream, const cl_ring& R, const cl_SV_ringelt& x); // Debugging support. #ifdef CL_DEBUG diff --git a/include/cln/complex_io.h b/include/cln/complex_io.h index 14e840f..1d6a9b9 100644 --- a/include/cln/complex_io.h +++ b/include/cln/complex_io.h @@ -11,11 +11,11 @@ namespace cln { // Undocumented input functions extern const cl_N read_complex (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); -extern const cl_N read_complex (cl_istream stream, const cl_read_flags& flags); +extern const cl_N read_complex (std::istream& stream, const cl_read_flags& flags); // Documented input functions -inline cl_istream operator>> (cl_istream stream, cl_N& result) +inline std::istream& operator>> (std::istream& stream, cl_N& result) { extern cl_read_flags cl_N_read_flags; result = read_complex(stream,cl_N_read_flags); @@ -32,10 +32,10 @@ inline cl_istream operator>> (cl_istream stream, cl_N& result) // print_complex(stream,z); // > z: komplexe Zahl // > stream: Stream -extern void print_complex (cl_ostream stream, const cl_print_flags& flags, const cl_N& z); -extern void print_complex (cl_ostream stream, const cl_print_number_flags& flags, const cl_N& z); +extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); +extern void print_complex (std::ostream& stream, const cl_print_number_flags& flags, const cl_N& z); -inline void fprint (cl_ostream stream, const cl_N& x) +inline void fprint (std::ostream& stream, const cl_N& x) { extern cl_print_flags default_print_flags; print_complex(stream,default_print_flags,x); diff --git a/include/cln/condition.h b/include/cln/condition.h index dc961f3..80a6975 100644 --- a/include/cln/condition.h +++ b/include/cln/condition.h @@ -16,7 +16,7 @@ struct cl_condition { // Name. virtual const char * name () const = 0; // Print. - virtual void print (cl_ostream) const = 0; + virtual void print (std::ostream&) const = 0; // Virtual destructor. virtual ~cl_condition () = 0; private: diff --git a/include/cln/dfloat_io.h b/include/cln/dfloat_io.h index 78204a2..476df4e 100644 --- a/include/cln/dfloat_io.h +++ b/include/cln/dfloat_io.h @@ -8,19 +8,19 @@ namespace cln { -inline cl_istream operator>> (cl_istream stream, cl_DF& result) +inline std::istream& operator>> (std::istream& stream, cl_DF& result) { extern cl_read_flags cl_DF_read_flags; - extern const cl_F read_float (cl_istream, const cl_read_flags&); + extern const cl_F read_float (std::istream&, const cl_read_flags&); result = As(cl_DF)(read_float(stream,cl_DF_read_flags)); return stream; } // The following does strictly the same as the general `fprint' for floats. // It is here only so that people don't need to include . -inline void fprint (cl_ostream stream, const cl_DF& x) +inline void fprint (std::ostream& stream, const cl_DF& x) { - extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z); + extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } diff --git a/include/cln/ffloat_io.h b/include/cln/ffloat_io.h index 5731346..aa70ad7 100644 --- a/include/cln/ffloat_io.h +++ b/include/cln/ffloat_io.h @@ -8,19 +8,19 @@ namespace cln { -inline cl_istream operator>> (cl_istream stream, cl_FF& result) +inline std::istream& operator>> (std::istream& stream, cl_FF& result) { extern cl_read_flags cl_FF_read_flags; - extern const cl_F read_float (cl_istream, const cl_read_flags&); + extern const cl_F read_float (std::istream&, const cl_read_flags&); result = As(cl_FF)(read_float(stream,cl_FF_read_flags)); return stream; } // The following does strictly the same as the general `fprint' for floats. // It is here only so that people don't need to include . -inline void fprint (cl_ostream stream, const cl_FF& x) +inline void fprint (std::ostream& stream, const cl_FF& x) { - extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z); + extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } diff --git a/include/cln/float_io.h b/include/cln/float_io.h index f08ea49..66423ac 100644 --- a/include/cln/float_io.h +++ b/include/cln/float_io.h @@ -32,11 +32,11 @@ extern const cl_F read_float (unsigned int base, float_format_t prec, // It is here only so that you don't need the complex and rational number // readers in order to read a float number. ("Treeshaking") extern const cl_F read_float (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); -extern const cl_F read_float (cl_istream stream, const cl_read_flags& flags); +extern const cl_F read_float (std::istream& stream, const cl_read_flags& flags); // Documented input functions -inline cl_istream operator>> (cl_istream stream, cl_F& result) +inline std::istream& operator>> (std::istream& stream, cl_F& result) { extern cl_read_flags cl_F_read_flags; result = read_float(stream,cl_F_read_flags); @@ -53,22 +53,22 @@ inline cl_istream operator>> (cl_istream stream, cl_F& result) // print_float(stream,z); // > z: Float // > stream: Stream -extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z); -extern void print_float (cl_ostream stream, const cl_print_number_flags& flags, const cl_F& z); -extern void print_float (cl_ostream stream, const cl_print_real_flags& flags, const cl_F& z); -extern void print_float (cl_ostream stream, const cl_print_float_flags& flags, const cl_F& z); +extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); +extern void print_float (std::ostream& stream, const cl_print_number_flags& flags, const cl_F& z); +extern void print_float (std::ostream& stream, const cl_print_real_flags& flags, const cl_F& z); +extern void print_float (std::ostream& stream, const cl_print_float_flags& flags, const cl_F& z); // Gibt ein Float binär (sehr primitiv) aus. // print_float_binary(stream,z); // > z: Float // > stream: Stream -extern void print_float_binary (cl_ostream stream, const cl_F& z); +extern void print_float_binary (std::ostream& stream, const cl_F& z); // The following does strictly the same as the general `fprint' for numbers. // It is here only so that you don't need the complex printer // in order to print a float. ("Treeshaking") -inline void fprint (cl_ostream stream, const cl_F& x) +inline void fprint (std::ostream& stream, const cl_F& x) { extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); diff --git a/include/cln/integer_io.h b/include/cln/integer_io.h index 783c7cf..dc1a599 100644 --- a/include/cln/integer_io.h +++ b/include/cln/integer_io.h @@ -27,11 +27,11 @@ extern const cl_I read_integer (unsigned int base, // It is here only so that you don't need the rational, complex and float number // readers in order to read an integer. ("Treeshaking") extern const cl_I read_integer (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); -extern const cl_I read_integer (cl_istream stream, const cl_read_flags& flags); +extern const cl_I read_integer (std::istream& stream, const cl_read_flags& flags); // Documented input functions -inline cl_istream operator>> (cl_istream stream, cl_I& result) +inline std::istream& operator>> (std::istream& stream, cl_I& result) { extern cl_read_flags cl_I_read_flags; result = read_integer(stream,cl_I_read_flags); @@ -51,29 +51,29 @@ extern char * cl_decimal_string (const cl_I& x); // > z: Integer // > base: Basis (>=2, <=36) // > stream: Stream -extern void print_integer (cl_ostream stream, unsigned int base, const cl_I& z); +extern void print_integer (std::ostream& stream, unsigned int base, const cl_I& z); // Dasselbe als String. Mit malloc_hook() alloziert, mit free_hook() freizugeben. extern char * print_integer_to_string (unsigned int base, const cl_I& z); // Documented output functions -inline void fprintdecimal (cl_ostream stream, const cl_I& x) +inline void fprintdecimal (std::ostream& stream, const cl_I& x) { print_integer(stream,10,x); } -inline void fprintbinary (cl_ostream stream, const cl_I& x) +inline void fprintbinary (std::ostream& stream, const cl_I& x) { print_integer(stream,2,x); } -inline void fprintoctal (cl_ostream stream, const cl_I& x) +inline void fprintoctal (std::ostream& stream, const cl_I& x) { print_integer(stream,8,x); } -inline void fprinthexadecimal (cl_ostream stream, const cl_I& x) +inline void fprinthexadecimal (std::ostream& stream, const cl_I& x) { print_integer(stream,16,x); } @@ -83,16 +83,16 @@ inline void fprinthexadecimal (cl_ostream stream, const cl_I& x) // > z: Zahl // > stream: Stream // > flags: Ausgabe-Parameter -extern void print_integer (cl_ostream stream, const cl_print_flags& flags, const cl_I& z); -extern void print_integer (cl_ostream stream, const cl_print_number_flags& flags, const cl_I& z); -extern void print_integer (cl_ostream stream, const cl_print_real_flags& flags, const cl_I& z); -extern void print_integer (cl_ostream stream, const cl_print_rational_flags& flags, const cl_I& z); +extern void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); +extern void print_integer (std::ostream& stream, const cl_print_number_flags& flags, const cl_I& z); +extern void print_integer (std::ostream& stream, const cl_print_real_flags& flags, const cl_I& z); +extern void print_integer (std::ostream& stream, const cl_print_rational_flags& flags, const cl_I& z); // The following does strictly the same as the general `fprint' for numbers. // It is here only so that you don't need the rational number printer // in order to print an integer. ("Treeshaking") -inline void fprint (cl_ostream stream, const cl_I& x) +inline void fprint (std::ostream& stream, const cl_I& x) { extern cl_print_flags default_print_flags; print_integer(stream,default_print_flags,x); diff --git a/include/cln/io.h b/include/cln/io.h index 246e5fd..cc8ca1e 100644 --- a/include/cln/io.h +++ b/include/cln/io.h @@ -18,16 +18,17 @@ namespace cln { +// compatibility: typedef std::istream& cl_istream; typedef std::ostream& cl_ostream; extern std::ostream* cl_debugout_stream; #define cl_debugout (*cl_debugout_stream) -// Elementary operations on cl_istream +// Elementary operations on std::istream& #define cl_EOF (-1) -inline int freadchar (cl_istream stream) +inline int freadchar (std::istream& stream) { char c; if (stream.get(c)) @@ -37,46 +38,46 @@ inline int freadchar (cl_istream stream) return cl_EOF; } -inline int funreadchar (cl_istream stream, int c) +inline int funreadchar (std::istream& stream, int c) { if (c != cl_EOF) stream.putback((char)c); return c; } -// Elementary operations on cl_ostream +// Elementary operations on std::ostream& -inline void fprintchar (cl_ostream stream, char c) +inline void fprintchar (std::ostream& stream, char c) { stream.put(c); } -inline void fprint (cl_ostream stream, const char * string) +inline void fprint (std::ostream& stream, const char * string) { stream << string; } -extern void fprintdecimal (cl_ostream stream, unsigned long x); -extern void fprintdecimal (cl_ostream stream, long x); +extern void fprintdecimal (std::ostream& stream, unsigned long x); +extern void fprintdecimal (std::ostream& stream, long x); -inline void fprintdecimal (cl_ostream stream, unsigned int x) +inline void fprintdecimal (std::ostream& stream, unsigned int x) { fprintdecimal(stream,(unsigned long)x); } -inline void fprintdecimal (cl_ostream stream, int x) +inline void fprintdecimal (std::ostream& stream, int x) { fprintdecimal(stream,(long)x); } -extern void fprinthexadecimal (cl_ostream stream, unsigned long x); -extern void fprinthexadecimal (cl_ostream stream, long x); +extern void fprinthexadecimal (std::ostream& stream, unsigned long x); +extern void fprinthexadecimal (std::ostream& stream, long x); -inline void fprinthexadecimal (cl_ostream stream, unsigned int x) +inline void fprinthexadecimal (std::ostream& stream, unsigned int x) { fprinthexadecimal(stream,(unsigned long)x); } -inline void fprinthexadecimal (cl_ostream stream, int x) +inline void fprinthexadecimal (std::ostream& stream, int x) { fprinthexadecimal(stream,(long)x); } @@ -93,7 +94,7 @@ CL_REQUIRE(cl_prin_globals) // Define the customary << and >> operators. #define CL_DEFINE_PRINT_OPERATOR(_class_) \ -inline cl_ostream operator<< (cl_ostream stream, const _class_& x) \ +inline std::ostream& operator<< (std::ostream& stream, const _class_& x) \ { \ fprint(stream,x); \ return stream; \ diff --git a/include/cln/lfloat_io.h b/include/cln/lfloat_io.h index 04e8b55..eb00313 100644 --- a/include/cln/lfloat_io.h +++ b/include/cln/lfloat_io.h @@ -8,19 +8,19 @@ namespace cln { -inline cl_istream operator>> (cl_istream stream, cl_LF& result) +inline std::istream& operator>> (std::istream& stream, cl_LF& result) { extern cl_read_flags cl_LF_read_flags; - extern const cl_F read_float (cl_istream, const cl_read_flags&); + extern const cl_F read_float (std::istream&, const cl_read_flags&); result = As(cl_LF)(read_float(stream,cl_LF_read_flags)); return stream; } // The following does strictly the same as the general `fprint' for floats. // It is here only so that people don't need to include . -inline void fprint (cl_ostream stream, const cl_LF& x) +inline void fprint (std::ostream& stream, const cl_LF& x) { - extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z); + extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } diff --git a/include/cln/modinteger.h b/include/cln/modinteger.h index 4624be7..c1823ab 100644 --- a/include/cln/modinteger.h +++ b/include/cln/modinteger.h @@ -81,7 +81,7 @@ struct cl_composite_condition : public cl_condition { { print(std::cerr); } // Implement general condition methods. const char * name () const; - void print (cl_ostream) const; + void print (std::ostream&) const; ~cl_composite_condition () {} }; @@ -151,7 +151,7 @@ public: struct _cl_modint_setops /* cf. _cl_ring_setops */ { // print - void (* fprint) (cl_heap_modint_ring* R, cl_ostream stream, const _cl_MI& x); + void (* fprint) (cl_heap_modint_ring* R, std::ostream& stream, const _cl_MI& x); // equality cl_boolean (* equal) (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y); // random number @@ -214,7 +214,7 @@ public: cl_I modulus; // m, normalized to be >= 0 public: // Low-level operations. - void _fprint (cl_ostream stream, const _cl_MI& x) + void _fprint (std::ostream& stream, const _cl_MI& x) { setops->fprint(this,stream,x); } cl_boolean _equal (const _cl_MI& x, const _cl_MI& y) { return setops->equal(this,x,y); } @@ -251,7 +251,7 @@ public: const cl_I _retract (const _cl_MI& x) { return mulops->retract(this,x); } // High-level operations. - void fprint (cl_ostream stream, const cl_MI& x) + void fprint (std::ostream& stream, const cl_MI& x) { if (!(x.ring() == this)) cl_abort(); _fprint(stream,x); @@ -370,7 +370,7 @@ extern cl_class cl_class_modint_ring; // Operations on modular integers. // Output. -inline void fprint (cl_ostream stream, const cl_MI& x) +inline void fprint (std::ostream& stream, const cl_MI& x) { x.ring()->fprint(stream,x); } CL_DEFINE_PRINT_OPERATOR(cl_MI) diff --git a/include/cln/rational_io.h b/include/cln/rational_io.h index f96ebc2..b34a038 100644 --- a/include/cln/rational_io.h +++ b/include/cln/rational_io.h @@ -27,11 +27,11 @@ extern const cl_RA read_rational (unsigned int base, // It is here only so that you don't need the complex and float number // readers in order to read an rational number. ("Treeshaking") extern const cl_RA read_rational (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); -extern const cl_RA read_rational (cl_istream stream, const cl_read_flags& flags); +extern const cl_RA read_rational (std::istream& stream, const cl_read_flags& flags); // Documented input functions -inline cl_istream operator>> (cl_istream stream, cl_RA& result) +inline std::istream& operator>> (std::istream& stream, cl_RA& result) { extern cl_read_flags cl_RA_read_flags; result = read_rational(stream,cl_RA_read_flags); @@ -46,7 +46,7 @@ inline cl_istream operator>> (cl_istream stream, cl_RA& result) // > z: rationale Zahl // > base: Basis (>=2, <=36) // > stream: Stream -extern void print_rational (cl_ostream stream, unsigned int base, const cl_RA& z); +extern void print_rational (std::ostream& stream, unsigned int base, const cl_RA& z); // Documented output functions @@ -56,16 +56,16 @@ extern void print_rational (cl_ostream stream, unsigned int base, const cl_RA& z // > z: Zahl // > stream: Stream // > flags: Ausgabe-Parameter -extern void print_rational (cl_ostream stream, const cl_print_flags& flags, const cl_RA& z); -extern void print_rational (cl_ostream stream, const cl_print_number_flags& flags, const cl_RA& z); -extern void print_rational (cl_ostream stream, const cl_print_real_flags& flags, const cl_RA& z); -extern void print_rational (cl_ostream stream, const cl_print_rational_flags& flags, const cl_RA& z); +extern void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); +extern void print_rational (std::ostream& stream, const cl_print_number_flags& flags, const cl_RA& z); +extern void print_rational (std::ostream& stream, const cl_print_real_flags& flags, const cl_RA& z); +extern void print_rational (std::ostream& stream, const cl_print_rational_flags& flags, const cl_RA& z); // The following does strictly the same as the general `fprint' for numbers. // It is here only so that you don't need the complex and long-float number // printers in order to print an integer. ("Treeshaking") -inline void fprint (cl_ostream stream, const cl_RA& x) +inline void fprint (std::ostream& stream, const cl_RA& x) { extern cl_print_flags default_print_flags; print_rational(stream,default_print_flags,x); diff --git a/include/cln/real_io.h b/include/cln/real_io.h index 4af765c..ce1e544 100644 --- a/include/cln/real_io.h +++ b/include/cln/real_io.h @@ -14,11 +14,11 @@ namespace cln { // It is here only so that you don't need the complex number reader // in order to read an rational number. ("Treeshaking") extern const cl_R read_real (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); -extern const cl_R read_real (cl_istream stream, const cl_read_flags& flags); +extern const cl_R read_real (std::istream& stream, const cl_read_flags& flags); // Documented input functions -inline cl_istream operator>> (cl_istream stream, cl_R& result) +inline std::istream& operator>> (std::istream& stream, cl_R& result) { extern cl_read_flags cl_R_read_flags; result = read_real(stream,cl_R_read_flags); @@ -36,15 +36,15 @@ inline cl_istream operator>> (cl_istream stream, cl_R& result) // > z: Zahl // > stream: Stream // > flags: Ausgabe-Parameter -extern void print_real (cl_ostream stream, const cl_print_flags& flags, const cl_R& z); -extern void print_real (cl_ostream stream, const cl_print_number_flags& flags, const cl_R& z); -extern void print_real (cl_ostream stream, const cl_print_real_flags& flags, const cl_R& z); +extern void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); +extern void print_real (std::ostream& stream, const cl_print_number_flags& flags, const cl_R& z); +extern void print_real (std::ostream& stream, const cl_print_real_flags& flags, const cl_R& z); // The following does strictly the same as the general `fprint' for numbers. // It is here only so that you don't need the complex number printer // in order to print an integer. ("Treeshaking") -inline void fprint (cl_ostream stream, const cl_R& x) +inline void fprint (std::ostream& stream, const cl_R& x) { extern cl_print_flags default_print_flags; print_real(stream,default_print_flags,x); diff --git a/include/cln/ring.h b/include/cln/ring.h index b815f69..69c621c 100644 --- a/include/cln/ring.h +++ b/include/cln/ring.h @@ -155,7 +155,7 @@ public: // Debugging output. struct _cl_ring_setops { // print - void (* fprint) (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x); + void (* fprint) (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x); // equality cl_boolean (* equal) (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y); // ... @@ -208,7 +208,7 @@ public: // ... public: // Low-level operations. - void _fprint (cl_ostream stream, const _cl_ring_element& x) + void _fprint (std::ostream& stream, const _cl_ring_element& x) { setops->fprint(this,stream,x); } cl_boolean _equal (const _cl_ring_element& x, const _cl_ring_element& y) { return setops->equal(this,x,y); } @@ -233,7 +233,7 @@ public: const _cl_ring_element _expt_pos (const _cl_ring_element& x, const cl_I& y) { return mulops->expt_pos(this,x,y); } // High-level operations. - void fprint (cl_ostream stream, const cl_ring_element& x) + void fprint (std::ostream& stream, const cl_ring_element& x) { if (!(x.ring() == this)) cl_abort(); _fprint(stream,x); @@ -314,7 +314,7 @@ public: \ // Operations on ring elements. // Output. -inline void fprint (cl_ostream stream, const cl_ring_element& x) +inline void fprint (std::ostream& stream, const cl_ring_element& x) { x.ring()->fprint(stream,x); } CL_DEFINE_PRINT_OPERATOR(cl_ring_element) diff --git a/include/cln/sfloat_io.h b/include/cln/sfloat_io.h index be9ae14..ddb46a4 100644 --- a/include/cln/sfloat_io.h +++ b/include/cln/sfloat_io.h @@ -8,19 +8,19 @@ namespace cln { -inline cl_istream operator>> (cl_istream stream, cl_SF& result) +inline std::istream& operator>> (std::istream& stream, cl_SF& result) { extern cl_read_flags cl_SF_read_flags; - extern const cl_F read_float (cl_istream, const cl_read_flags&); + extern const cl_F read_float (std::istream&, const cl_read_flags&); result = As(cl_SF)(read_float(stream,cl_SF_read_flags)); return stream; } // The following does strictly the same as the general `fprint' for floats. // It is here only so that people don't need to include . -inline void fprint (cl_ostream stream, const cl_SF& x) +inline void fprint (std::ostream& stream, const cl_SF& x) { - extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z); + extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } diff --git a/include/cln/string.h b/include/cln/string.h index b9f2de2..f413f52 100644 --- a/include/cln/string.h +++ b/include/cln/string.h @@ -131,7 +131,7 @@ CL_REQUIRE(cl_st_null) extern unsigned long hashcode (const cl_string& str); // Output. -extern void fprint (cl_ostream stream, const cl_string& str); +extern void fprint (std::ostream& stream, const cl_string& str); CL_DEFINE_PRINT_OPERATOR(cl_string) // Input. @@ -139,23 +139,23 @@ CL_DEFINE_PRINT_OPERATOR(cl_string) // Reads a line. Up to delim. The delimiter character is not placed in the // resulting string. The delimiter character is kept in the input stream. // If EOF is encountered, the stream's eofbit is set. -extern const cl_string cl_fget (cl_istream stream, char delim = '\n'); +extern const cl_string cl_fget (std::istream& stream, char delim = '\n'); // Reads a line. Up to delim. The delimiter character is not placed in the // resulting string. The delimiter character is extracted from the input stream. // If EOF is encountered, the stream's eofbit is set. -extern const cl_string cl_fgetline (cl_istream stream, char delim = '\n'); +extern const cl_string cl_fgetline (std::istream& stream, char delim = '\n'); // Like above, but only up to n-1 characters. If n-1 characters were read // before the delimiter character was seen, the stream's failbit is set. -extern const cl_string cl_fget (cl_istream stream, int n, char delim = '\n'); -extern const cl_string cl_fgetline (cl_istream stream, int n, char delim = '\n'); +extern const cl_string cl_fget (std::istream& stream, int n, char delim = '\n'); +extern const cl_string cl_fgetline (std::istream& stream, int n, char delim = '\n'); // Skips whitespace and then reads a non-whitespace string. // If stream.width() is greater than 0, at most stream.width()-1 non-whitespace // characters are read. When done, stream.width(0) is called. // If EOF is encountered, the stream's eofbit is set. -extern cl_istream operator>> (cl_istream stream, cl_string& str); +extern std::istream& operator>> (std::istream& stream, cl_string& str); // Runtime typing support. extern cl_class cl_class_string; diff --git a/include/cln/timing.h b/include/cln/timing.h index 76883ba..a4be4f7 100644 --- a/include/cln/timing.h +++ b/include/cln/timing.h @@ -47,13 +47,13 @@ extern const cl_time_consumption cl_current_time_consumption (); // Report a time consumption. // (Should better be a virtual member function of `cl_time_consumption'). -extern void cl_timing_report (cl_ostream, const cl_time_consumption&); +extern void cl_timing_report (std::ostream&, const cl_time_consumption&); struct cl_timing { // Constructor, starts the time interval. cl_timing (cl_time_consumption& accumulator); - cl_timing (cl_ostream destination = std::cerr); - cl_timing (const char *, cl_ostream destination = std::cerr); + cl_timing (std::ostream& destination = std::cerr); + cl_timing (const char *, std::ostream& destination = std::cerr); // Destructor, closes the time interval and does a report. ~cl_timing (); //private: diff --git a/include/cln/univpoly.h b/include/cln/univpoly.h index b940d21..d1a173b 100644 --- a/include/cln/univpoly.h +++ b/include/cln/univpoly.h @@ -111,7 +111,7 @@ public: // Ability to place an object at a given address. struct _cl_univpoly_setops /* cf. _cl_ring_setops */ { // print - void (* fprint) (cl_heap_univpoly_ring* R, cl_ostream stream, const _cl_UP& x); + void (* fprint) (cl_heap_univpoly_ring* R, std::ostream& stream, const _cl_UP& x); // equality // (Be careful: This is not well-defined for polynomials with // floating-point coefficients.) @@ -184,7 +184,7 @@ public: const cl_ring& basering () const { return _basering; } public: // Low-level operations. - void _fprint (cl_ostream stream, const _cl_UP& x) + void _fprint (std::ostream& stream, const _cl_UP& x) { setops->fprint(this,stream,x); } cl_boolean _equal (const _cl_UP& x, const _cl_UP& y) { return setops->equal(this,x,y); } @@ -225,7 +225,7 @@ public: const cl_ring_element _eval (const _cl_UP& x, const cl_ring_element& y) { return polyops->eval(this,x,y); } // High-level operations. - void fprint (cl_ostream stream, const cl_UP& x) + void fprint (std::ostream& stream, const cl_UP& x) { if (!(x.ring() == this)) cl_abort(); _fprint(stream,x); @@ -357,7 +357,7 @@ extern cl_class cl_class_univpoly_ring; // Operations on polynomials. // Output. -inline void fprint (cl_ostream stream, const cl_UP& x) +inline void fprint (std::ostream& stream, const cl_UP& x) { x.ring()->fprint(stream,x); } CL_DEFINE_PRINT_OPERATOR(cl_UP) @@ -531,7 +531,7 @@ template class cl_heap_univpoly_specialized_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. - void fprint (cl_ostream stream, const cl_UP_specialized& x) + void fprint (std::ostream& stream, const cl_UP_specialized& x) { cl_heap_univpoly_ring::fprint(stream,x); } diff --git a/include/cln/univpoly_complex.h b/include/cln/univpoly_complex.h index 6c16b34..8deab19 100644 --- a/include/cln/univpoly_complex.h +++ b/include/cln/univpoly_complex.h @@ -60,7 +60,7 @@ public: // Ability to place an object at a given address. class cl_heap_univpoly_complex_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. - void fprint (cl_ostream stream, const cl_UP_N& x) + void fprint (std::ostream& stream, const cl_UP_N& x) { cl_heap_univpoly_ring::fprint(stream,x); } diff --git a/include/cln/univpoly_integer.h b/include/cln/univpoly_integer.h index 9d998f8..16b704e 100644 --- a/include/cln/univpoly_integer.h +++ b/include/cln/univpoly_integer.h @@ -59,7 +59,7 @@ public: // Ability to place an object at a given address. class cl_heap_univpoly_integer_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. - void fprint (cl_ostream stream, const cl_UP_I& x) + void fprint (std::ostream& stream, const cl_UP_I& x) { cl_heap_univpoly_ring::fprint(stream,x); } diff --git a/include/cln/univpoly_modint.h b/include/cln/univpoly_modint.h index 28f800a..b603e8e 100644 --- a/include/cln/univpoly_modint.h +++ b/include/cln/univpoly_modint.h @@ -51,7 +51,7 @@ class cl_heap_univpoly_modint_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() const cl_modint_ring& basering () const { return The(cl_modint_ring)(_basering); } // High-level operations. - void fprint (cl_ostream stream, const cl_UP_MI& x) + void fprint (std::ostream& stream, const cl_UP_MI& x) { cl_heap_univpoly_ring::fprint(stream,x); } diff --git a/include/cln/univpoly_rational.h b/include/cln/univpoly_rational.h index f9ff026..fe76e23 100644 --- a/include/cln/univpoly_rational.h +++ b/include/cln/univpoly_rational.h @@ -60,7 +60,7 @@ public: // Ability to place an object at a given address. class cl_heap_univpoly_rational_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. - void fprint (cl_ostream stream, const cl_UP_RA& x) + void fprint (std::ostream& stream, const cl_UP_RA& x) { cl_heap_univpoly_ring::fprint(stream,x); } diff --git a/include/cln/univpoly_real.h b/include/cln/univpoly_real.h index 064e73d..742b373 100644 --- a/include/cln/univpoly_real.h +++ b/include/cln/univpoly_real.h @@ -60,7 +60,7 @@ public: // Ability to place an object at a given address. class cl_heap_univpoly_real_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. - void fprint (cl_ostream stream, const cl_UP_R& x) + void fprint (std::ostream& stream, const cl_UP_R& x) { cl_heap_univpoly_ring::fprint(stream,x); } diff --git a/include/cln/version.h.in b/include/cln/version.h.in new file mode 100644 index 0000000..62be940 --- /dev/null +++ b/include/cln/version.h.in @@ -0,0 +1,22 @@ +// Version information (cf. cln.m4) + +#ifndef _CL_VERSION_H +#define _CL_VERSION_H + +/* These definitions are adjusted by `configure' automatically. */ + + +#define CL_VERSION_MAJOR 1 +#define CL_VERSION_MINOR 1 +#define CL_VERSION_PATCHLEVEL 0 +#define CL_VERSION 1.1.0 + +namespace cln { + +extern const int version_major; +extern const int version_minor; +extern const int version_patchlevel; + +} // namespace cln + +#endif /* _CL_VERSION_H */ diff --git a/src/base/cl_version.cc b/src/base/cl_version.cc new file mode 100644 index 0000000..97116fc --- /dev/null +++ b/src/base/cl_version.cc @@ -0,0 +1,18 @@ +// Version string buried into the library + +// General includes. +#include "cl_sysdep.h" + +// Specification. +#include "cln/version.h" + + +// Implementation. + +namespace cln { + +const int version_major = CL_VERSION_MAJOR; +const int version_minor = CL_VERSION_MINOR; +const int version_patchlevel = CL_VERSION_PATCHLEVEL; + +} // namespace cln diff --git a/src/base/output/cl_output_dec.cc b/src/base/output/cl_output_dec.cc index 27facca..99ea457 100644 --- a/src/base/output/cl_output_dec.cc +++ b/src/base/output/cl_output_dec.cc @@ -14,7 +14,7 @@ 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]; @@ -30,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); diff --git a/src/base/output/cl_output_hex.cc b/src/base/output/cl_output_hex.cc index 552612e..57b1ed1 100644 --- a/src/base/output/cl_output_hex.cc +++ b/src/base/output/cl_output_hex.cc @@ -11,7 +11,7 @@ namespace cln { -void fprinthexadecimal (cl_ostream stream, unsigned long x) +void fprinthexadecimal (std::ostream& stream, unsigned long x) { #define bufsize 16 var char buf[bufsize+1]; @@ -27,7 +27,7 @@ void fprinthexadecimal (cl_ostream stream, unsigned long x) #undef bufsize } -void fprinthexadecimal (cl_ostream stream, long x) +void fprinthexadecimal (std::ostream& stream, long x) { if (x >= 0) fprintdecimal(stream,(unsigned long)x); diff --git a/src/base/ring/cl_no_ring.cc b/src/base/ring/cl_no_ring.cc index b804a11..86869bd 100644 --- a/src/base/ring/cl_no_ring.cc +++ b/src/base/ring/cl_no_ring.cc @@ -59,7 +59,7 @@ static const _cl_ring_element dummy_op2 (cl_heap_ring* R, const _cl_ring_element uninitialized_error(x); uninitialized_error(y); RETDUMMY; } -static void dummy_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x) +static void dummy_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; unused stream; diff --git a/src/base/string/input/cl_st_get1.cc b/src/base/string/input/cl_st_get1.cc index 4f2f560..8524e7d 100644 --- a/src/base/string/input/cl_st_get1.cc +++ b/src/base/string/input/cl_st_get1.cc @@ -14,7 +14,7 @@ namespace cln { -const cl_string cl_fget (cl_istream stream, char delim) +const cl_string cl_fget (std::istream& stream, char delim) { var cl_spushstring buffer; // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.get()==EOF). diff --git a/src/base/string/input/cl_st_get2.cc b/src/base/string/input/cl_st_get2.cc index f20daaa..8ef1e26 100644 --- a/src/base/string/input/cl_st_get2.cc +++ b/src/base/string/input/cl_st_get2.cc @@ -14,7 +14,7 @@ namespace cln { -const cl_string cl_fget (cl_istream stream, int n, char delim) +const cl_string cl_fget (std::istream& stream, int n, char delim) { var cl_spushstring buffer; // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.get()==EOF). diff --git a/src/base/string/input/cl_st_getline1.cc b/src/base/string/input/cl_st_getline1.cc index 5421ae0..8ceb2da 100644 --- a/src/base/string/input/cl_st_getline1.cc +++ b/src/base/string/input/cl_st_getline1.cc @@ -14,7 +14,7 @@ namespace cln { -const cl_string cl_fgetline (cl_istream stream, char delim) +const cl_string cl_fgetline (std::istream& stream, char delim) { var cl_spushstring buffer; // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.get()==EOF). diff --git a/src/base/string/input/cl_st_getline2.cc b/src/base/string/input/cl_st_getline2.cc index fa015cb..cfdc695 100644 --- a/src/base/string/input/cl_st_getline2.cc +++ b/src/base/string/input/cl_st_getline2.cc @@ -14,7 +14,7 @@ namespace cln { -const cl_string cl_fgetline (cl_istream stream, int n, char delim) +const cl_string cl_fgetline (std::istream& stream, int n, char delim) { var cl_spushstring buffer; // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.get()==EOF). diff --git a/src/base/string/input/cl_st_gettoken.cc b/src/base/string/input/cl_st_gettoken.cc index 0f27fa7..1201f91 100644 --- a/src/base/string/input/cl_st_gettoken.cc +++ b/src/base/string/input/cl_st_gettoken.cc @@ -15,7 +15,7 @@ namespace cln { -cl_istream operator>> (cl_istream stream, cl_string& str) +std::istream& operator>> (std::istream& stream, cl_string& str) { var cl_spushstring buffer; var int n = stream.width(); diff --git a/src/base/string/output/cl_st_print.cc b/src/base/string/output/cl_st_print.cc index be39578..5d3fa99 100644 --- a/src/base/string/output/cl_st_print.cc +++ b/src/base/string/output/cl_st_print.cc @@ -13,7 +13,7 @@ namespace cln { -void fprint (cl_ostream stream, const cl_string& str) +void fprint (std::ostream& stream, const cl_string& str) { stream.write(str.asciz(),str.length()); } diff --git a/src/complex/input/cl_N_read_stream.cc b/src/complex/input/cl_N_read_stream.cc index f22f3ed..48df82e 100644 --- a/src/complex/input/cl_N_read_stream.cc +++ b/src/complex/input/cl_N_read_stream.cc @@ -38,7 +38,7 @@ static cl_boolean number_char_p (char c) } } -const cl_N read_complex (cl_istream stream, const cl_read_flags& flags) +const cl_N read_complex (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; diff --git a/src/complex/output/cl_N_aprint.cc b/src/complex/output/cl_N_aprint.cc index 969ba13..bae3b35 100644 --- a/src/complex/output/cl_N_aprint.cc +++ b/src/complex/output/cl_N_aprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_complex (cl_ostream stream, const cl_print_flags& flags, const cl_N& z) +void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z) { print_complex(stream,(const cl_print_number_flags&)flags,z); } diff --git a/src/complex/output/cl_N_bprint.cc b/src/complex/output/cl_N_bprint.cc index 3a42f85..d9c1371 100644 --- a/src/complex/output/cl_N_bprint.cc +++ b/src/complex/output/cl_N_bprint.cc @@ -16,7 +16,7 @@ namespace cln { -void print_complex (cl_ostream stream, const cl_print_number_flags& flags, const cl_N& z) +void print_complex (std::ostream& stream, const cl_print_number_flags& flags, const cl_N& z) { if (realp(z)) { DeclareType(cl_R,z); diff --git a/src/complex/ring/cl_C_ring.cc b/src/complex/ring/cl_C_ring.cc index 6e6cb74..aa01740 100644 --- a/src/complex/ring/cl_C_ring.cc +++ b/src/complex/ring/cl_C_ring.cc @@ -17,7 +17,7 @@ CL_PROVIDE(cl_C_ring) namespace cln { -static void N_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x) +static void N_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; fprint(stream,The(cl_N)(x)); diff --git a/src/float/input/cl_F_read_stream.cc b/src/float/input/cl_F_read_stream.cc index dfa30aa..a3e7461 100644 --- a/src/float/input/cl_F_read_stream.cc +++ b/src/float/input/cl_F_read_stream.cc @@ -40,7 +40,7 @@ static cl_boolean number_char_p (char c) } } -const cl_F read_float (cl_istream stream, const cl_read_flags& flags) +const cl_F read_float (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; diff --git a/src/float/output/cl_F_aprint.cc b/src/float/output/cl_F_aprint.cc index 2a3ff1e..2749c92 100644 --- a/src/float/output/cl_F_aprint.cc +++ b/src/float/output/cl_F_aprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z) +void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z) { print_float(stream,(const cl_print_number_flags&)flags,z); } diff --git a/src/float/output/cl_F_bprint.cc b/src/float/output/cl_F_bprint.cc index aacc49c..bfd7899 100644 --- a/src/float/output/cl_F_bprint.cc +++ b/src/float/output/cl_F_bprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_float (cl_ostream stream, const cl_print_number_flags& flags, const cl_F& z) +void print_float (std::ostream& stream, const cl_print_number_flags& flags, const cl_F& z) { print_float(stream,(const cl_print_real_flags&)flags,z); } diff --git a/src/float/output/cl_F_cprint.cc b/src/float/output/cl_F_cprint.cc index 24985a2..5145131 100644 --- a/src/float/output/cl_F_cprint.cc +++ b/src/float/output/cl_F_cprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_float (cl_ostream stream, const cl_print_real_flags& flags, const cl_F& z) +void print_float (std::ostream& stream, const cl_print_real_flags& flags, const cl_F& z) { print_float(stream,(const cl_print_float_flags&)flags,z); } diff --git a/src/float/output/cl_F_dprint.cc b/src/float/output/cl_F_dprint.cc index 4b156c0..b50ef4b 100644 --- a/src/float/output/cl_F_dprint.cc +++ b/src/float/output/cl_F_dprint.cc @@ -361,7 +361,7 @@ static const cl_decimal_decoded_float decode_float_decimal (const cl_F& x) } // Ausgabefunktion: -void print_float (cl_ostream stream, const cl_print_float_flags& flags, const cl_F& z) +void print_float (std::ostream& stream, const cl_print_float_flags& flags, const cl_F& z) { var cl_decimal_decoded_float z_decoded = decode_float_decimal(z); var char * & mantstring = z_decoded.a; diff --git a/src/float/output/cl_F_printb.cc b/src/float/output/cl_F_printb.cc index 7c20abb..9eafb0b 100644 --- a/src/float/output/cl_F_printb.cc +++ b/src/float/output/cl_F_printb.cc @@ -16,7 +16,7 @@ namespace cln { -void print_float_binary (cl_ostream stream, const cl_F& z) +void print_float_binary (std::ostream& stream, const cl_F& z) { // Vorzeichen, Punkt, Mantisse (binär), (Zweiersystem-)Exponent (dezimal) cl_idecoded_float m_e_s = integer_decode_float(z); diff --git a/src/integer/input/cl_I_read_stream.cc b/src/integer/input/cl_I_read_stream.cc index dcb9176..71fddb6 100644 --- a/src/integer/input/cl_I_read_stream.cc +++ b/src/integer/input/cl_I_read_stream.cc @@ -40,7 +40,7 @@ static cl_boolean number_char_p (char c) } } -const cl_I read_integer (cl_istream stream, const cl_read_flags& flags) +const cl_I read_integer (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; diff --git a/src/integer/output/cl_I_aprint.cc b/src/integer/output/cl_I_aprint.cc index 49c4577..c65b445 100644 --- a/src/integer/output/cl_I_aprint.cc +++ b/src/integer/output/cl_I_aprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_integer (cl_ostream stream, const cl_print_flags& flags, const cl_I& z) +void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z) { print_integer(stream,(const cl_print_number_flags&)flags,z); } diff --git a/src/integer/output/cl_I_bprint.cc b/src/integer/output/cl_I_bprint.cc index a792a2e..d718333 100644 --- a/src/integer/output/cl_I_bprint.cc +++ b/src/integer/output/cl_I_bprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_integer (cl_ostream stream, const cl_print_number_flags& flags, const cl_I& z) +void print_integer (std::ostream& stream, const cl_print_number_flags& flags, const cl_I& z) { print_integer(stream,(const cl_print_real_flags&)flags,z); } diff --git a/src/integer/output/cl_I_cprint.cc b/src/integer/output/cl_I_cprint.cc index e53b066..4479125 100644 --- a/src/integer/output/cl_I_cprint.cc +++ b/src/integer/output/cl_I_cprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_integer (cl_ostream stream, const cl_print_real_flags& flags, const cl_I& z) +void print_integer (std::ostream& stream, const cl_print_real_flags& flags, const cl_I& z) { print_integer(stream,(const cl_print_rational_flags&)flags,z); } diff --git a/src/integer/output/cl_I_dprint.cc b/src/integer/output/cl_I_dprint.cc index 99cf397..e79f62e 100644 --- a/src/integer/output/cl_I_dprint.cc +++ b/src/integer/output/cl_I_dprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_integer (cl_ostream stream, const cl_print_rational_flags& flags, const cl_I& z) +void print_integer (std::ostream& stream, const cl_print_rational_flags& flags, const cl_I& z) { var unsigned int base = flags.rational_base; if (flags.rational_readably) diff --git a/src/integer/output/cl_I_print.cc b/src/integer/output/cl_I_print.cc index 938e526..65688b4 100644 --- a/src/integer/output/cl_I_print.cc +++ b/src/integer/output/cl_I_print.cc @@ -15,7 +15,7 @@ namespace cln { -void print_integer (cl_ostream stream, unsigned int base, const cl_I& z) +void print_integer (std::ostream& stream, unsigned int base, const cl_I& z) { var cl_I abs_z; if (minusp(z)) { diff --git a/src/integer/ring/cl_0_ring.cc b/src/integer/ring/cl_0_ring.cc index 5e173ae..d082877 100644 --- a/src/integer/ring/cl_0_ring.cc +++ b/src/integer/ring/cl_0_ring.cc @@ -33,7 +33,7 @@ static const _cl_ring_element null_op2 (cl_heap_ring* R, const _cl_ring_element& return _cl_ring_element(R, (cl_I)0); } -static void null_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x) +static void null_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; unused x; diff --git a/src/integer/ring/cl_I_ring.cc b/src/integer/ring/cl_I_ring.cc index f7ae40b..5629e1f 100644 --- a/src/integer/ring/cl_I_ring.cc +++ b/src/integer/ring/cl_I_ring.cc @@ -17,7 +17,7 @@ CL_PROVIDE(cl_I_ring) namespace cln { -static void I_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x) +static void I_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; fprint(stream,The(cl_I)(x)); diff --git a/src/modinteger/cl_MI_cond_composite.cc b/src/modinteger/cl_MI_cond_composite.cc index 4cd014a..8780365 100644 --- a/src/modinteger/cl_MI_cond_composite.cc +++ b/src/modinteger/cl_MI_cond_composite.cc @@ -17,7 +17,7 @@ namespace cln { const char * cl_composite_condition::name () const { return "cl_composite_condition"; } -void cl_composite_condition::print (cl_ostream strm) const +void cl_composite_condition::print (std::ostream& strm) const { fprint(strm, "Exception occurred: p = "); fprint(strm, p); diff --git a/src/modinteger/cl_MI_int.h b/src/modinteger/cl_MI_int.h index 9690dc8..fe70d49 100644 --- a/src/modinteger/cl_MI_int.h +++ b/src/modinteger/cl_MI_int.h @@ -2,7 +2,7 @@ namespace cln { -static void int_fprint (cl_heap_modint_ring* R, cl_ostream stream, const _cl_MI &x) +static void int_fprint (cl_heap_modint_ring* R, std::ostream& stream, const _cl_MI &x) { fprint(stream,R->_retract(x)); } diff --git a/src/modinteger/cl_MI_std.h b/src/modinteger/cl_MI_std.h index 7f02104..e52494b 100644 --- a/src/modinteger/cl_MI_std.h +++ b/src/modinteger/cl_MI_std.h @@ -2,7 +2,7 @@ namespace cln { -static void std_fprint (cl_heap_modint_ring* R, cl_ostream stream, const _cl_MI &x) +static void std_fprint (cl_heap_modint_ring* R, std::ostream& stream, const _cl_MI &x) { fprint(stream,R->_retract(x)); fprint(stream," mod "); diff --git a/src/polynomial/elem/cl_UP_MI.h b/src/polynomial/elem/cl_UP_MI.h index 36f294c..19b6236 100644 --- a/src/polynomial/elem/cl_UP_MI.h +++ b/src/polynomial/elem/cl_UP_MI.h @@ -32,7 +32,7 @@ static inline void modint_normalize (cl_heap_modint_ring* R, cl_GV_MI& result, u } } -static void modint_fprint (cl_heap_univpoly_ring* UPR, cl_ostream stream, const _cl_UP& x) +static void modint_fprint (cl_heap_univpoly_ring* UPR, std::ostream& stream, const _cl_UP& x) {{ DeclarePoly(cl_GV_MI,x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); diff --git a/src/polynomial/elem/cl_UP_gen.h b/src/polynomial/elem/cl_UP_gen.h index fc8dc86..6d80faa 100644 --- a/src/polynomial/elem/cl_UP_gen.h +++ b/src/polynomial/elem/cl_UP_gen.h @@ -28,7 +28,7 @@ static inline void gen_normalize (cl_heap_ring* R, cl_SV_ringelt& result, uintL } } -static void gen_fprint (cl_heap_univpoly_ring* UPR, cl_ostream stream, const _cl_UP& x) +static void gen_fprint (cl_heap_univpoly_ring* UPR, std::ostream& stream, const _cl_UP& x) {{ DeclarePoly(cl_SV_ringelt,x); var cl_heap_ring* R = TheRing(UPR->basering()); diff --git a/src/polynomial/elem/cl_UP_no_ring.cc b/src/polynomial/elem/cl_UP_no_ring.cc index cc93634..2e1f543 100644 --- a/src/polynomial/elem/cl_UP_no_ring.cc +++ b/src/polynomial/elem/cl_UP_no_ring.cc @@ -59,7 +59,7 @@ static const _cl_UP dummy_op2 (cl_heap_univpoly_ring* R, const _cl_UP& x, const uninitialized_error(x); uninitialized_error(y); RETDUMMY; } -static void dummy_fprint (cl_heap_univpoly_ring* R, cl_ostream stream, const _cl_UP& x) +static void dummy_fprint (cl_heap_univpoly_ring* R, std::ostream& stream, const _cl_UP& x) { unused R; unused stream; diff --git a/src/polynomial/elem/cl_UP_number.h b/src/polynomial/elem/cl_UP_number.h index 274849e..ea78cb8 100644 --- a/src/polynomial/elem/cl_UP_number.h +++ b/src/polynomial/elem/cl_UP_number.h @@ -29,7 +29,7 @@ static inline void num_normalize (cl_number_ring_ops& ops, cl_SV_numb } } -static void num_fprint (cl_heap_univpoly_ring* UPR, cl_ostream stream, const _cl_UP& x) +static void num_fprint (cl_heap_univpoly_ring* UPR, std::ostream& stream, const _cl_UP& x) {{ DeclarePoly(cl_SV_number,x); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; diff --git a/src/rational/input/cl_RA_read_stream.cc b/src/rational/input/cl_RA_read_stream.cc index 58bbd9e..85dcfd8 100644 --- a/src/rational/input/cl_RA_read_stream.cc +++ b/src/rational/input/cl_RA_read_stream.cc @@ -41,7 +41,7 @@ static cl_boolean number_char_p (char c) } } -const cl_RA read_rational (cl_istream stream, const cl_read_flags& flags) +const cl_RA read_rational (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; diff --git a/src/rational/output/cl_RA_aprint.cc b/src/rational/output/cl_RA_aprint.cc index 522f071..56dd896 100644 --- a/src/rational/output/cl_RA_aprint.cc +++ b/src/rational/output/cl_RA_aprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_rational (cl_ostream stream, const cl_print_flags& flags, const cl_RA& z) +void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z) { print_rational(stream,(const cl_print_number_flags&)flags,z); } diff --git a/src/rational/output/cl_RA_bprint.cc b/src/rational/output/cl_RA_bprint.cc index ae6e07c..4c7c66c 100644 --- a/src/rational/output/cl_RA_bprint.cc +++ b/src/rational/output/cl_RA_bprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_rational (cl_ostream stream, const cl_print_number_flags& flags, const cl_RA& z) +void print_rational (std::ostream& stream, const cl_print_number_flags& flags, const cl_RA& z) { print_rational(stream,(const cl_print_real_flags&)flags,z); } diff --git a/src/rational/output/cl_RA_cprint.cc b/src/rational/output/cl_RA_cprint.cc index 69e71e4..bc86188 100644 --- a/src/rational/output/cl_RA_cprint.cc +++ b/src/rational/output/cl_RA_cprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_rational (cl_ostream stream, const cl_print_real_flags& flags, const cl_RA& z) +void print_rational (std::ostream& stream, const cl_print_real_flags& flags, const cl_RA& z) { print_rational(stream,(const cl_print_rational_flags&)flags,z); } diff --git a/src/rational/output/cl_RA_dprint.cc b/src/rational/output/cl_RA_dprint.cc index 035f50a..5e8bcce 100644 --- a/src/rational/output/cl_RA_dprint.cc +++ b/src/rational/output/cl_RA_dprint.cc @@ -16,7 +16,7 @@ namespace cln { -void print_rational (cl_ostream stream, const cl_print_rational_flags& flags, const cl_RA& z) +void print_rational (std::ostream& stream, const cl_print_rational_flags& flags, const cl_RA& z) { var unsigned int base = flags.rational_base; if (flags.rational_readably) diff --git a/src/rational/output/cl_RA_print.cc b/src/rational/output/cl_RA_print.cc index 2cf4c3c..a4f359e 100644 --- a/src/rational/output/cl_RA_print.cc +++ b/src/rational/output/cl_RA_print.cc @@ -15,7 +15,7 @@ namespace cln { -void print_rational (cl_ostream stream, unsigned int base, const cl_RA& z) +void print_rational (std::ostream& stream, unsigned int base, const cl_RA& z) { if (integerp(z)) { DeclareType(cl_I,z); diff --git a/src/rational/ring/cl_RA_ring.cc b/src/rational/ring/cl_RA_ring.cc index e8e8da0..f1a4125 100644 --- a/src/rational/ring/cl_RA_ring.cc +++ b/src/rational/ring/cl_RA_ring.cc @@ -17,7 +17,7 @@ CL_PROVIDE(cl_RA_ring) namespace cln { -static void RA_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x) +static void RA_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; fprint(stream,The(cl_RA)(x)); diff --git a/src/real/format-output/cl_fmt_cardinal.cc b/src/real/format-output/cl_fmt_cardinal.cc index f2c3dff..220be8b 100644 --- a/src/real/format-output/cl_fmt_cardinal.cc +++ b/src/real/format-output/cl_fmt_cardinal.cc @@ -40,7 +40,7 @@ static const char * const cl_format_ones [20] = { // gibt eine ganze Zahl >0, <1000 im Klartext auf englisch auf den stream aus. // (arg=0 -> gibt nichts aus.) -static void format_small_cardinal (cl_ostream stream, uintL arg) +static void format_small_cardinal (std::ostream& stream, uintL arg) { var uintL hundreds = floor(arg,100); var uintL tens_and_ones = arg % 100; @@ -65,7 +65,7 @@ static void format_small_cardinal (cl_ostream stream, uintL arg) } } -void format_cardinal (cl_ostream stream, const cl_I& argument) +void format_cardinal (std::ostream& stream, const cl_I& argument) { if (zerop(argument)) fprint(stream,"zero"); diff --git a/src/real/format-output/cl_fmt_integer.cc b/src/real/format-output/cl_fmt_integer.cc index 1645505..5dc24cb 100644 --- a/src/real/format-output/cl_fmt_integer.cc +++ b/src/real/format-output/cl_fmt_integer.cc @@ -15,7 +15,7 @@ namespace cln { -void format_integer (cl_ostream stream, const cl_I& arg, +void format_integer (std::ostream& stream, const cl_I& arg, unsigned int base, sintL mincol, char padchar, char commachar, uintL commainterval, cl_boolean commaflag, cl_boolean positive_sign_flag) diff --git a/src/real/format-output/cl_fmt_newroman.cc b/src/real/format-output/cl_fmt_newroman.cc index e0c953d..0732820 100644 --- a/src/real/format-output/cl_fmt_newroman.cc +++ b/src/real/format-output/cl_fmt_newroman.cc @@ -15,7 +15,7 @@ namespace cln { -void format_new_roman (cl_ostream stream, const cl_I& arg) +void format_new_roman (std::ostream& stream, const cl_I& arg) { if (!(0 < arg && arg < 4000)) { fprint(std::cerr, "format_new_roman: argument should be in the range 1 - 3999, not "); diff --git a/src/real/format-output/cl_fmt_oldroman.cc b/src/real/format-output/cl_fmt_oldroman.cc index cc9f9ca..b69029b 100644 --- a/src/real/format-output/cl_fmt_oldroman.cc +++ b/src/real/format-output/cl_fmt_oldroman.cc @@ -15,7 +15,7 @@ namespace cln { -void format_old_roman (cl_ostream stream, const cl_I& arg) +void format_old_roman (std::ostream& stream, const cl_I& arg) { if (!(0 < arg && arg < 5000)) { fprint(std::cerr, "format_old_roman: argument should be in the range 1 - 4999, not "); diff --git a/src/real/format-output/cl_fmt_ordinal.cc b/src/real/format-output/cl_fmt_ordinal.cc index 006cec2..9e4c299 100644 --- a/src/real/format-output/cl_fmt_ordinal.cc +++ b/src/real/format-output/cl_fmt_ordinal.cc @@ -49,7 +49,7 @@ static const char * const cl_format_ordinal_tens [10] = { "ninetieth", }; -void format_ordinal (cl_ostream stream, const cl_I& argument) +void format_ordinal (std::ostream& stream, const cl_I& argument) { if (zerop(argument)) fprint(stream,"zeroth"); diff --git a/src/real/format-output/cl_fmt_paddedstring.cc b/src/real/format-output/cl_fmt_paddedstring.cc index b13b15d..43e41d8 100644 --- a/src/real/format-output/cl_fmt_paddedstring.cc +++ b/src/real/format-output/cl_fmt_paddedstring.cc @@ -13,7 +13,7 @@ namespace cln { -void format_padded_string (cl_ostream stream, sintL mincol, sintL colinc, sintL minpad, char padchar, cl_boolean padleftflag, const char * str) +void format_padded_string (std::ostream& stream, sintL mincol, sintL colinc, sintL minpad, char padchar, cl_boolean padleftflag, const char * str) { var sintL need = ::strlen(str) + minpad; // so viele Zeichen mindestens var uintL auxpad = (need < mincol diff --git a/src/real/format-output/cl_format.h b/src/real/format-output/cl_format.h index b6f9219..4c29f0b 100644 --- a/src/real/format-output/cl_format.h +++ b/src/real/format-output/cl_format.h @@ -10,22 +10,22 @@ namespace cln { // gibt arg als römische Zahl auf stream aus, z.B. 4 als IIII. -extern void format_old_roman (cl_ostream stream, const cl_I& arg); +extern void format_old_roman (std::ostream& stream, const cl_I& arg); // gibt arg als römische Zahl auf stream aus, z.B. 4 als IV. -extern void format_new_roman (cl_ostream stream, const cl_I& arg); +extern void format_new_roman (std::ostream& stream, const cl_I& arg); extern const char * const cl_format_tens [10]; // gibt die ganze Zahl arg im Klartext auf englisch auf den Stream aus. -extern void format_cardinal (cl_ostream stream, const cl_I& arg); +extern void format_cardinal (std::ostream& stream, const cl_I& arg); // gibt eine ganze Zahl arg als Abzählnummer im Klartext auf englisch // auf den stream aus. -extern void format_ordinal (cl_ostream stream, const cl_I& arg); +extern void format_ordinal (std::ostream& stream, const cl_I& arg); // gibt count (>=0) Zeichen ch auf stream aus. -inline void format_padding (cl_ostream stream, sintL count, char ch) +inline void format_padding (std::ostream& stream, sintL count, char ch) { for (; count >= 0; count--) fprintchar(stream,ch); @@ -37,14 +37,14 @@ inline void format_padding (cl_ostream stream, sintL count, char ch) // werden mindestens minpad Zeichen eingefügt, eventuelle weitere dann in // Blöcken à colinc Zeichen. Falls padleftflag, werden sie links eingefügt, // sonst rechts vom String. -extern void format_padded_string (cl_ostream stream, sintL mincol, sintL colinc, sintL minpad, char padchar, cl_boolean padleftflag, const char * str); +extern void format_padded_string (std::ostream& stream, sintL mincol, sintL colinc, sintL minpad, char padchar, cl_boolean padleftflag, const char * str); // gibt den Integer arg auf den Stream aus: // in Zahlenbasis base, mit Vorzeichen (+ nur falls >0 und positive-sign-flag), // bei commaflag alle drei Stellen unterbrochen durch ein Zeichen commachar. // Das Ganze links aufgefüllt mit padchar's, so daß die Gesamtbreite mindestens // mincol ist. -extern void format_integer (cl_ostream stream, const cl_I& arg, unsigned int base, sintL mincol, char padchar, char commachar, uintL commainterval, cl_boolean commaflag, cl_boolean positive_sign_flag); +extern void format_integer (std::ostream& stream, const cl_I& arg, unsigned int base, sintL mincol, char padchar, char commachar, uintL commainterval, cl_boolean commaflag, cl_boolean positive_sign_flag); // format_scale_exponent(arg) liefert zur Floating-Point-Zahl arg // drei Werte: mantissa und n, mit diff --git a/src/real/input/cl_R_read_stream.cc b/src/real/input/cl_R_read_stream.cc index 7be4ecb..b694745 100644 --- a/src/real/input/cl_R_read_stream.cc +++ b/src/real/input/cl_R_read_stream.cc @@ -40,7 +40,7 @@ static cl_boolean number_char_p (char c) } } -const cl_R read_real (cl_istream stream, const cl_read_flags& flags) +const cl_R read_real (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; diff --git a/src/real/output/cl_R_aprint.cc b/src/real/output/cl_R_aprint.cc index 2f09a32..23f2ef9 100644 --- a/src/real/output/cl_R_aprint.cc +++ b/src/real/output/cl_R_aprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_real (cl_ostream stream, const cl_print_flags& flags, const cl_R& z) +void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z) { print_real(stream,(const cl_print_number_flags&)flags,z); } diff --git a/src/real/output/cl_R_bprint.cc b/src/real/output/cl_R_bprint.cc index 6ac1176..a676d41 100644 --- a/src/real/output/cl_R_bprint.cc +++ b/src/real/output/cl_R_bprint.cc @@ -13,7 +13,7 @@ namespace cln { -void print_real (cl_ostream stream, const cl_print_number_flags& flags, const cl_R& z) +void print_real (std::ostream& stream, const cl_print_number_flags& flags, const cl_R& z) { print_real(stream,(const cl_print_real_flags&)flags,z); } diff --git a/src/real/output/cl_R_cprint.cc b/src/real/output/cl_R_cprint.cc index 37e7196..34ee0c1 100644 --- a/src/real/output/cl_R_cprint.cc +++ b/src/real/output/cl_R_cprint.cc @@ -16,7 +16,7 @@ namespace cln { -void print_real (cl_ostream stream, const cl_print_real_flags& flags, const cl_R& z) +void print_real (std::ostream& stream, const cl_print_real_flags& flags, const cl_R& z) { if (rationalp(z)) { DeclareType(cl_RA,z); diff --git a/src/real/ring/cl_R_ring.cc b/src/real/ring/cl_R_ring.cc index 28cf3e3..12bad45 100644 --- a/src/real/ring/cl_R_ring.cc +++ b/src/real/ring/cl_R_ring.cc @@ -18,7 +18,7 @@ CL_PROVIDE(cl_R_ring) namespace cln { -static void R_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x) +static void R_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; fprint(stream,The(cl_R)(x)); diff --git a/src/timing/cl_t_c2.cc b/src/timing/cl_t_c2.cc index 3b46861..e487d72 100644 --- a/src/timing/cl_t_c2.cc +++ b/src/timing/cl_t_c2.cc @@ -1,4 +1,4 @@ -// constructor cl_timing(cl_ostream). +// constructor cl_timing(std::ostream&). // General includes. #include "cl_sysdep.h" @@ -19,14 +19,14 @@ static void report_stream (const cl_timing& t) usage.realtime = usage_end.realtime - usage_start.realtime; usage.usertime = usage_end.usertime - usage_start.usertime; - var cl_ostream destination = *(std::ostream*) t.report_destination; + var std::ostream& destination = *(std::ostream*) t.report_destination; if (t.comment) fprint(destination,t.comment); cl_timing_report(destination,usage); fprint(destination,"\n"); } -cl_timing::cl_timing (cl_ostream destination) +cl_timing::cl_timing (std::ostream& destination) { report_fn = report_stream; report_destination = &destination; @@ -34,7 +34,7 @@ cl_timing::cl_timing (cl_ostream destination) tmp = cl_current_time_consumption(); } -cl_timing::cl_timing (const char * msg, cl_ostream destination) +cl_timing::cl_timing (const char * msg, std::ostream& destination) { report_fn = report_stream; report_destination = &destination; diff --git a/src/timing/cl_t_report.cc b/src/timing/cl_t_report.cc index 95b4fb9..1ffed47 100644 --- a/src/timing/cl_t_report.cc +++ b/src/timing/cl_t_report.cc @@ -15,7 +15,7 @@ namespace cln { #define CL_HZ 1000 #define CL_HZ_NSECS (1000000000/CL_HZ) -void cl_timing_report (cl_ostream stream, const cl_time_consumption& t) +void cl_timing_report (std::ostream& stream, const cl_time_consumption& t) { var uintL real_sec = t.realtime.tv_sec; var uintL real_msec = (t.realtime.tv_nsec + (CL_HZ_NSECS-1)/2) / CL_HZ_NSECS; diff --git a/src/vector/cl_GV_io.h b/src/vector/cl_GV_io.h index ed935a1..824523d 100644 --- a/src/vector/cl_GV_io.h +++ b/src/vector/cl_GV_io.h @@ -15,7 +15,7 @@ namespace cln { // > flags: Flags // > fun: Ausgabefunktion für die einzelnen Elemente // > vector: Vektor -extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); +extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); } // namespace cln diff --git a/src/vector/cl_GV_number_debug.cc b/src/vector/cl_GV_number_debug.cc index 37745b2..ad20f39 100644 --- a/src/vector/cl_GV_number_debug.cc +++ b/src/vector/cl_GV_number_debug.cc @@ -15,7 +15,7 @@ namespace cln { -static void print_for_debug (cl_ostream stream, const cl_print_flags& flags, const cl_number& z) +static void print_for_debug (std::ostream& stream, const cl_print_flags& flags, const cl_number& z) { unused stream; // must be cl_debugout unused flags; // must be default_print_flags diff --git a/src/vector/cl_SV_io.h b/src/vector/cl_SV_io.h index eb0da90..51de4df 100644 --- a/src/vector/cl_SV_io.h +++ b/src/vector/cl_SV_io.h @@ -15,7 +15,7 @@ namespace cln { // > flags: Flags // > fun: Ausgabefunktion für die einzelnen Elemente // > vector: Vektor -extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); +extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); } // namespace cln diff --git a/src/vector/cl_SV_number_debug.cc b/src/vector/cl_SV_number_debug.cc index 3990903..1652891 100644 --- a/src/vector/cl_SV_number_debug.cc +++ b/src/vector/cl_SV_number_debug.cc @@ -15,7 +15,7 @@ namespace cln { -static void print_for_debug (cl_ostream stream, const cl_print_flags& flags, const cl_number& z) +static void print_for_debug (std::ostream& stream, const cl_print_flags& flags, const cl_number& z) { unused stream; // must be cl_debugout unused flags; // must be default_print_flags diff --git a/src/vector/output/cl_GV_number_aprint.cc b/src/vector/output/cl_GV_number_aprint.cc index aaebb8a..aa77ffc 100644 --- a/src/vector/output/cl_GV_number_aprint.cc +++ b/src/vector/output/cl_GV_number_aprint.cc @@ -17,7 +17,7 @@ namespace cln { -void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* printfun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector) +void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector) { var uintL len = vector.length(); if (flags.vector_syntax == vsyntax_commonlisp) { diff --git a/src/vector/output/cl_SV_aprint.cc b/src/vector/output/cl_SV_aprint.cc index 42cc1fd..f414e5a 100644 --- a/src/vector/output/cl_SV_aprint.cc +++ b/src/vector/output/cl_SV_aprint.cc @@ -13,7 +13,7 @@ namespace cln { -void fprint (cl_ostream stream, const cl_ring& R, const cl_SV_ringelt& vector) +void fprint (std::ostream& stream, const cl_ring& R, const cl_SV_ringelt& vector) { var const cl_print_flags& flags = default_print_flags; var uintL len = vector.length(); diff --git a/src/vector/output/cl_SV_number_aprint.cc b/src/vector/output/cl_SV_number_aprint.cc index fefd174..8da73d2 100644 --- a/src/vector/output/cl_SV_number_aprint.cc +++ b/src/vector/output/cl_SV_number_aprint.cc @@ -17,7 +17,7 @@ namespace cln { -void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* printfun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector) +void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector) { var uintL len = vector.length(); if (flags.vector_syntax == vsyntax_commonlisp) { -- 2.45.2