Mercurial > hg > octave-nkf
diff libinterp/corefcn/load-save.cc @ 20657:c6224b4e7774
maint: Rename instances of LS_ASCII to LS_TEXT for clarity.
Octave's default save format is '-text' which is confusingly referred to in the
code base as LS_ASCII (looks like '-ascii' mode).
* ls-oct-text.cc, ls-oct-text.h: Renamed from ls-oct-ascii.[cc|h].
* ls-oct-ascii.cc, ls-oct-ascii.h: Removed files.
* libinterp/corefcn/module.mk: Add ls-oct-text.cc, ls-oct-text.h to build
system.
* load-save.h (load_save_format_type): Change first value of enum from
LS_ASCII to LS_TEXT.
* load-save.cc: Rename instances of LS_ASCII to LS_TEXT. Rename instances of
read_ascii_data to read_text_data.
* ov-base-diag.cc, ov-base-int.cc, ov-base-sparse.cc, ov-bool-mat.cc,
ov-bool.cc, ov-complex.cc, ov-cx-mat.cc ov-fcn-inline.cc, ov-float.cc,
ov-flt-complex.cc, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-int16.cc,
ov-int32.cc, ov-int64.cc, ov-int8.cc, ov-perm.cc, ov-re-mat.cc, ov-scalar.cc,
ov-str-mat.cc, ov-uint16.cc, ov-uint32.cc, ov-uint64.cc, ov-uint8.cc:
Use '#include "ls-oct-text.h"' rather than ls-oct-ascii.h.
ov-cell.cc, ov-class.cc, ov-fcn-handle.cc, ov-lazy-idx.cc, ov-struct.cc:
Use '#include "ls-oct-text.h"' rather than ls-oct-ascii.h.
Rename save_ascii_data to save_text_data, read_ascii_data to read_text_data.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 17 Aug 2015 09:20:03 -0700 |
parents | 610c74748518 |
children | 1690807b226c |
line wrap: on
line diff
--- a/libinterp/corefcn/load-save.cc +++ b/libinterp/corefcn/load-save.cc @@ -77,7 +77,7 @@ #include "ls-mat-ascii.h" #include "ls-mat4.h" #include "ls-mat5.h" -#include "ls-oct-ascii.h" +#include "ls-oct-text.h" #include "ls-oct-binary.h" // Remove gnulib definitions, if any. @@ -270,7 +270,7 @@ std::string type_val = extract_keyword (file, "type"); if (name_val.empty () != true && type_val.empty () != true) - retval = LS_ASCII; + retval = LS_TEXT; else { file.clear (); @@ -363,8 +363,8 @@ switch (format.type) { - case LS_ASCII: - name = read_ascii_data (stream, orig_fname, global, tc, count); + case LS_TEXT: + name = read_text_data (stream, orig_fname, global, tc, count); break; case LS_BINARY: @@ -709,7 +709,7 @@ } else if (argv[i] == "-text" || argv[i] == "-t") { - format = LS_ASCII; + format = LS_TEXT; } else break; @@ -928,8 +928,8 @@ { switch (fmt.type) { - case LS_ASCII: - save_ascii_data (os, tc, name, global, 0); + case LS_TEXT: + save_text_data (os, tc, name, global, 0); break; case LS_BINARY: @@ -1070,7 +1070,7 @@ } else if (argv[i] == "-text" || argv[i] == "-t") { - format = LS_ASCII; + format = LS_TEXT; } else if (argv[i] == "-binary" || argv[i] == "-b") { @@ -1229,7 +1229,7 @@ #ifdef HAVE_HDF5 case LS_HDF5: #endif /* HAVE_HDF5 */ - case LS_ASCII: + case LS_TEXT: { octave_localtime now; @@ -1615,7 +1615,7 @@ bool save_as_floats = false; - load_save_format format = LS_ASCII; + load_save_format format = LS_TEXT; bool append = false; @@ -1640,7 +1640,7 @@ return retval; } - if (save_as_floats && format == LS_ASCII) + if (save_as_floats && format == LS_TEXT) { error ("save: cannot specify both -ascii and -float-binary"); return retval;