comparison libinterp/corefcn/ls-oct-text.h @ 28166:ef349f5c320b

Load structures with arbitrary string fieldnames (bug #50831, bug #46645). * ls-oct-text.h, ls-oct-text.cc (read_text_data): Consider additional optional bool argument to skip validation of input name. * ov-struct.cc (octave_struct::load_ascii, octave_scalar_struct::load_ascii): Call read_text_data with additional argument (skip_validation), set to true. * test/bug-50831/bug-50831.tst, test/bug-50831/module.mk: New test files.
author Olaf Till <i7tiol@t-online.de>
date Wed, 19 Apr 2017 15:06:31 +0200
parents bd51beb6205e
children 0a5b15007766
comparison
equal deleted inserted replaced
28165:478ad929e77a 28166:ef349f5c320b
51 extract_keyword (std::istream& is, const char *keyword, 51 extract_keyword (std::istream& is, const char *keyword,
52 const bool next_only = false); 52 const bool next_only = false);
53 53
54 extern OCTINTERP_API std::string 54 extern OCTINTERP_API std::string
55 read_text_data (std::istream& is, const std::string& filename, bool& global, 55 read_text_data (std::istream& is, const std::string& filename, bool& global,
56 octave_value& tc, octave_idx_type count); 56 octave_value& tc, octave_idx_type count,
57 const bool do_name_validation = true);
57 58
58 extern OCTINTERP_API bool 59 extern OCTINTERP_API bool
59 save_text_data (std::ostream& os, const octave_value& val_arg, 60 save_text_data (std::ostream& os, const octave_value& val_arg,
60 const std::string& name, bool mark_global, int precision); 61 const std::string& name, bool mark_global, int precision);
61 62