Mercurial > hg > octave-nkf
view libinterp/interp-core/ls-mat-ascii.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 | 2fc554ffbc28 |
children |
line wrap: on
line source
/* Copyright (C) 2003-2012 John W. Eaton This file is part of Octave. Octave is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Octave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Octave; see the file COPYING. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (octave_ls_mat_ascii_h) #define octave_ls_mat_ascii_h 1 extern std::string read_mat_ascii_data (std::istream& is, const std::string& filename, octave_value& tc); extern bool save_mat_ascii_data (std::ostream& os, const octave_value& val_arg, int precision, bool tabs = false); extern bool looks_like_mat_ascii_file (const std::string& filename); #endif