# HG changeset patch # User jwe # Date 953803956 0 # Node ID 2e6a41bc8fed55c3eb5284990c1502a5a8a77d67 # Parent 95d7c4b2b2e8e9c5a790f64fa88bfcbe31a21a8e [project @ 2000-03-23 09:32:36 by jwe] diff --git a/src/oct-stream.cc b/src/oct-stream.cc --- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -25,6 +25,7 @@ #endif #include +#include #include #include @@ -43,6 +44,23 @@ #include "oct-obj.h" #include "utils.h" +static istream& +octave_scan (istream& is, const char *fmt, ...) +{ +#if defined (__GNUG__) + + va_list args; + va_start (args, fmt); + + is.vscan (fmt, args); + + va_end (args); + +#endif + + return is; +} + // Possible values for conv_err: // // 1 : not a real scalar @@ -1012,7 +1030,7 @@ double *data, int& idx, int& conversion_count, int nr, int max_size, bool discard) { - is.scan (fmt, valptr); + octave_scan (is, fmt, valptr); if (is) { @@ -1126,7 +1144,7 @@ { \ tmp = new char [width+1]; \ \ - is.scan (fmt, tmp); \ + octave_scan (is, fmt, tmp); \ \ tmp[width] = '\0'; \ } \ @@ -1167,7 +1185,7 @@ { \ tmp = new char[width+1]; \ \ - is.scan (fmt, tmp); \ + octave_scan (is, fmt, tmp); \ \ tmp[width] = '\0'; \ } \ @@ -1381,7 +1399,7 @@ { int dummy; - is.scan (fmt, &dummy); + octave_scan (is, fmt, &dummy); } break; @@ -1581,7 +1599,7 @@ { is.clear (); - is.scan (elt->text); + octave_scan (is, elt->text); if (! is) { @@ -1665,7 +1683,7 @@ { int dummy; - if (! is.scan (fmt, &dummy)) + if (! octave_scan (is, fmt, &dummy)) quit = true; } break; @@ -1674,7 +1692,7 @@ { int tmp; - if (is.scan (fmt, &tmp)) + if (octave_scan (is, fmt, &tmp)) { if (! discard) retval = static_cast (tmp); @@ -1688,7 +1706,7 @@ { double tmp; - if (is.scan (fmt, &tmp)) + if (octave_scan (is, fmt, &tmp)) { if (! discard) retval = tmp; @@ -1800,7 +1818,7 @@ { is.clear (); - is.scan (elt->text); + octave_scan (is, elt->text); if (! is) {