Mercurial > hg > octave-nkf
diff src/file-io.cc @ 5144:25b090e1be9f
[project @ 2005-02-15 12:06:05 by jwe]
author | jwe |
---|---|
date | Tue, 15 Feb 2005 12:06:44 +0000 |
parents | 1e36493572a0 |
children | 23b37da9fd5b |
line wrap: on
line diff
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -219,6 +219,31 @@ return retval; } +DEFUN (fclear, args, , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} fclear (@var{fid})\n\ +Clear the stream state for the specified file.\n\ +@end deftypefn") +{ + octave_value retval; + + int nargin = args.length (); + + if (nargin == 1) + { + int fid = octave_stream_list::get_file_number (args (0)); + + octave_stream os = octave_stream_list::lookup (fid, "fclear"); + + if (! error_state) + os.clearerr (); + } + else + print_usage ("fclear"); + + return retval; +} + DEFUN (fflush, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} fflush (@var{fid})\n\