1 ## Copyright (C) 1994-2012 John W. Eaton
3 ## This file is part of Octave.
5 ## Octave is free software; you can redistribute it and/or modify it
6 ## under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 3 of the License, or (at
8 ## your option) any later version.
10 ## Octave is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, see
17 ## <http://www.gnu.org/licenses/>.
20 ## @deftypefn {Function File} {} dump_prefs ()
21 ## @deftypefnx {Function File} {} dump_prefs (@var{fid})
22 ## Dump all of the current user preference variables in a format that can be
23 ## parsed by Octave later. @var{fid} is a file descriptor as returned by
24 ## @code{fopen}. If @var{file} is omitted, the listing is printed to stdout.
29 function dump_prefs (file)
35 ## FIXME -- it would be nice to be able to get the list of
36 ## built-in variables directly from Octave so that we wouldn't have to
37 ## remember to update it each time the list of preference variables
40 ## Note that these are no longer variables.
50 "completion_append_char";
51 "crash_dumps_octave_core";
52 "echo_executing_commands";
55 "gnuplot_command_end";
56 "gnuplot_command_plot";
57 "gnuplot_command_replot";
58 "gnuplot_command_splot";
59 "gnuplot_command_title";
60 "gnuplot_command_using";
61 "gnuplot_command_with";
64 "ignore_function_time_stamp";
68 "max_recursion_depth";
69 "output_max_field_width";
71 "page_output_immediately";
73 "print_answer_id_name";
74 "print_empty_dimensions";
77 "sighup_dumps_octave_core";
78 "sigterm_dumps_octave_core";
82 "struct_levels_to_print";
83 "suppress_verbose_help_message"];
85 for i = 1:rows(sym_list)
86 sym = deblank (sym_list(i,:));
90 val = sprintf ("%g", val);
92 fprintf (file, " %s = %s\n", sym, val);
94 fprintf (file, "# %s = <no value or error in displaying it>\n", sym);