Mercurial > hg > octave-nkf
changeset 3633:2e6a41bc8fed
[project @ 2000-03-23 09:32:36 by jwe]
author | jwe |
---|---|
date | Thu, 23 Mar 2000 09:32:36 +0000 |
parents | 95d7c4b2b2e8 |
children | 68b993aa2020 |
files | src/oct-stream.cc |
diffstat | 1 files changed, 27 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -25,6 +25,7 @@ #endif #include <cassert> +#include <cstdarg> #include <cstring> #include <iomanip> @@ -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<double> (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) {