Mercurial > hg > octave-nkf
diff libinterp/corefcn/load-save.cc @ 19043: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 | 5c0b8f2da650 |
children | 2b82d2f29a7b 264ff6bf7475 616f2b22787b |
line wrap: on
line diff
--- a/libinterp/corefcn/load-save.cc +++ b/libinterp/corefcn/load-save.cc @@ -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 {