changeset 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 5d14a08e7533
children 4bfd44c15145
files libinterp/corefcn/load-save.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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 ());
         }