changeset 5197:741618f692d7

[project @ 2005-03-09 21:37:29 by jwe]
author jwe
date Wed, 09 Mar 2005 21:37:30 +0000
parents cd5cc2a80589
children 083039a30a3f
files src/ChangeLog src/load-save.cc
diffstat 2 files changed, 36 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Mar 09 15:25:36 2005 +0000
+++ b/src/ChangeLog	Wed Mar 09 21:37:30 2005 +0000
@@ -1,5 +1,8 @@
 2005-03-09  John W. Eaton  <jwe@octave.org>
 
+	* load-save.cc (Fload, Fsave): Accept -text as an alias for -ascii.
+	Issue warning for future change in meaning of -ascii.
+
 	* Makefile.in (bin-dist): Delete target.
 	(BINDISTFILES, BINDISTLIBS): Delete variables.
 
--- a/src/load-save.cc	Wed Mar 09 15:25:36 2005 +0000
+++ b/src/load-save.cc	Wed Mar 09 21:37:30 2005 +0000
@@ -578,6 +578,11 @@
 @item -ascii\n\
 Force Octave to assume the file is in Octave's text format.\n\
 \n\
+@strong{WARNING: the meaning of this option will change in a future\n\
+version of Octave to be compatible with @sc{Matlab}.  To keep the\n\
+meaning of your code the same across this change, use the @code{-text}\n\
+option instead.}\n\
+\n\
 @item -binary\n\
 Force Octave to assume the file is in Octave's binary format.\n\
 \n\
@@ -604,6 +609,8 @@
 Octave can now support multi-dimensional HDF data and automatically\n\
 modifies variable names if they are invalid Octave identifiers.\n\
 \n\
+@item -text
+Force Octave to assume the file is in Octave's text format.\n\
 @end table\n\
 @end deffn")
 {
@@ -644,6 +651,11 @@
 	}
       else if (argv[i] == "-ascii" || argv[i] == "-a")
 	{
+	  warning ("the meaning of this option will change in a future");
+	  warning ("version of Octave to be compatible with @sc{Matlab}.");
+	  warning ("To keep the meaning of your code the same across");
+	  warning ("this change, use the -text option instead.");
+
 	  format = LS_ASCII;
 	}
       else if (argv[i] == "-binary" || argv[i] == "-b")
@@ -671,6 +683,10 @@
 	{
 	  warning ("load: -import ignored");
 	}
+      else if (argv[i] == "-text" || argv[i] == "-t")
+	{
+	  format = LS_ASCII;
+	}
       else
 	break;
     }
@@ -1202,6 +1218,11 @@
 @item -ascii\n\
 Save the data in Octave's text data format.\n\
 \n\
+@strong{WARNING: the meaning of this option will change in a future\n\
+version of Octave to be compatible with @sc{Matlab}.  To keep the\n\
+meaning of your code the same across this change, use the @code{-text}\n\
+option instead.}\n\
+\n\
 @item -binary\n\
 Save the data in Octave's binary data format.\n\
 \n\
@@ -1249,6 +1270,9 @@
 character is @code{!} or @code{^}, match all characters except those\n\
 specified by @var{list}.  For example, the pattern @samp{[a-zA-Z]} will\n\
 match all lower and upper case alphabetic characters. \n\
+\n\
+@item -text
+Save the data in Octave's text data format.\n\
 @end table\n\
 \n\
 Except when using the @sc{Matlab} binary data file format, saving global\n\
@@ -1296,6 +1320,15 @@
 	}
       else if (argv[i] == "-ascii" || argv[i] == "-a")
 	{
+	  warning ("the meaning of this option will change in a future");
+	  warning ("version of Octave to be compatible with @sc{Matlab}.");
+	  warning ("To keep the meaning of your code the same across");
+	  warning ("this change, use the -text option instead.");
+
+	  format = LS_ASCII;
+	}
+      else if (argv[i] == "-text" || argv[i] == "-t")
+	{
 	  format = LS_ASCII;
 	}
       else if (argv[i] == "-binary" || argv[i] == "-b")