Mercurial > octave-nkf
diff libinterp/corefcn/load-save.cc @ 18442:5c0b8f2da650 stable
Allow save() to write to the terminal with the filename '-' (bug #41505)
* load-save.cc (parse_save_options): Treat an argument of '-' as a filename
argument instead of an invalid option, restoring the ability to write to
the terminal with save().
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sun, 09 Feb 2014 18:21:14 -0500 |
parents | 870f3e12e163 |
children | 3afae1432cd6 9a70705dc616 |
line wrap: on
line diff
--- a/libinterp/corefcn/load-save.cc Fri Feb 07 20:10:02 2014 -0800 +++ b/libinterp/corefcn/load-save.cc Sun Feb 09 18:21:14 2014 -0500 @@ -1143,7 +1143,7 @@ { retval.append (argv[i]); } - else if (argv[i][0] == '-') + else if (argv[i][0] == '-' && argv[i] != "-") { error ("save: Unrecognized option '%s'", argv[i].c_str ()); }