diff libinterp/interpfcn/load-save.h @ 16555:04fb96f4bea1

allow double-click in file browser to load data files * files-dock-widget.cc (files_dock_widget::display_directory): If file looks like Octave data file, load it instead of opening with editor. * ls-mat-ascii.h, ls-mat-ascii.cc (get_lines_and_columns): New option to supress error messages. New option to check for numeric values. (looks_like_mat_ascii_file): New function. * load-save.h load-save.cc (is_octave_data_file): New function. (get_file_format): Don't return LS_MAT_ASCII unless the file really looks like it is a numeric data file.
author John W. Eaton <jwe@octave.org>
date Tue, 23 Apr 2013 12:57:16 -0400
parents 1249a615c91b
children a86a14e6e65e
line wrap: on
line diff
--- a/libinterp/interpfcn/load-save.h	Tue Apr 23 08:14:54 2013 -0400
+++ b/libinterp/interpfcn/load-save.h	Tue Apr 23 12:57:16 2013 -0400
@@ -26,6 +26,9 @@
 #include <iosfwd>
 #include <string>
 
+#include "mach-info.h"
+#include "symtab.h"
+
 class octave_value;
 
 // FIXME: maybe MAT5 and MAT7 should be options to MAT_BINARY.
@@ -80,6 +83,8 @@
          bool list_only, bool swap, bool verbose,
          const string_vector& argv, int argv_idx, int argc, int nargout);
 
+extern bool is_octave_data_file (const std::string& file);
+
 extern void
 do_save (std::ostream& os, const symbol_table::symbol_record& sr,
          load_save_format fmt, bool save_as_floats);