Mercurial > hg > octave-nkf
diff src/oct-stream.cc @ 3233:98d0ee053ba4
[project @ 1999-01-27 20:23:40 by jwe]
author | jwe |
---|---|
date | Wed, 27 Jan 1999 20:23:46 +0000 |
parents | c17387059fd3 |
children | 8092e8197ce4 |
line wrap: on
line diff
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -289,7 +289,6 @@ break; case 'h': case 'l': case 'L': - // We accept these but we don't actually use them. if (modifier != '\0') nconv = -1; else @@ -927,6 +926,14 @@ do_scanf_conv (istream&, const char*, int*, Matrix&, double*, int&, int, int, bool); +template void +do_scanf_conv (istream&, const char*, long int*, Matrix&, double*, int&, + int, int, bool); + +template void +do_scanf_conv (istream&, const char*, short int*, Matrix&, double*, int&, + int, int, bool); + #if 0 template void do_scanf_conv (istream&, const char*, float*, Matrix&, double*, int&, @@ -1033,10 +1040,32 @@ case 'd': case 'i': case 'o': case 'u': case 'x': { - int tmp; - - do_scanf_conv (is, fmt, &tmp, mval, data, count, - nr, max_size, discard); + switch (elt->modifier) + { + case 'h': + { + short int tmp; + do_scanf_conv (is, fmt, &tmp, mval, data, count, + nr, max_size, discard); + } + break; + + case 'l': + { + long int tmp; + do_scanf_conv (is, fmt, &tmp, mval, data, count, + nr, max_size, discard); + } + break; + + default: + { + int tmp; + do_scanf_conv (is, fmt, &tmp, mval, data, count, + nr, max_size, discard); + } + break; + } } break;