Mercurial > octave-nkf
changeset 18887:9a70705dc616 stable
Check for name and type keyword to return as an octave ascii data file (Bug #42586)
* libinterp/corefcn/load-save.cc
(get_file_format): attempt to get name and then type keyword to decide if is an Octave ascii file.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 22 Jun 2014 07:22:26 -0400 |
parents | 9d185537e5d1 |
children | 35838f49e2f6 |
files | libinterp/corefcn/load-save.cc |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/load-save.cc Thu Jun 19 20:08:37 2014 -0400 +++ b/libinterp/corefcn/load-save.cc Sun Jun 22 07:22:26 2014 -0400 @@ -265,9 +265,10 @@ file.clear (); file.seekg (0, std::ios::beg); - std::string tmp = extract_keyword (file, "name"); + std::string name_val = extract_keyword (file, "name"); + std::string type_val = extract_keyword (file, "type"); - if (! tmp.empty ()) + if (name_val.empty () != true && type_val.empty () != true) retval = LS_ASCII; else {