Mercurial > hg > octave-lyh
changeset 1429:245206fbed64
[project @ 1995-09-19 06:58:46 by jwe]
author | jwe |
---|---|
date | Tue, 19 Sep 1995 07:02:21 +0000 |
parents | fb6f8b634333 |
children | 045e70a15a8f |
files | src/DLList-fi.cc src/SLList-expr.cc src/SLList-misc.cc src/SLList-plot.cc src/SLList-tc.cc src/user-prefs.cc src/user-prefs.h src/variables.cc |
diffstat | 8 files changed, 62 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/DLList-fi.cc +++ b/src/DLList-fi.cc @@ -23,9 +23,13 @@ // Instantiate Lists of various values. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <DLList.h> -#include "file-io.h" +#include "file-info.h" template class DLNode <file_info>; template class DLList <file_info>;
--- a/src/SLList-expr.cc +++ b/src/SLList-expr.cc @@ -23,6 +23,10 @@ // Instantiate Lists of various values. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <SLList.h> #include "tree-expr.h"
--- a/src/SLList-misc.cc +++ b/src/SLList-misc.cc @@ -23,6 +23,10 @@ // Instantiate Lists of various values. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <SLList.h> #include "tree-misc.h"
--- a/src/SLList-plot.cc +++ b/src/SLList-plot.cc @@ -23,6 +23,10 @@ // Instantiate Lists of various values. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <SLList.h> #include "tree-plot.h"
--- a/src/SLList-tc.cc +++ b/src/SLList-tc.cc @@ -23,6 +23,10 @@ // Instantiate Lists of various values. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <SLList.h> #include "tree-const.h"
--- a/src/user-prefs.cc +++ b/src/user-prefs.cc @@ -75,6 +75,8 @@ user_pref.warn_function_name_clash = 0; user_pref.whitespace_in_literal_matrix = 0; + user_pref.completion_append_char = '\0'; + user_pref.default_save_format = 0; user_pref.editor = 0; user_pref.gnuplot_binary = 0; @@ -601,19 +603,24 @@ } int -sv_editor (void) +sv_completion_append_char (void) { int status = 0; - char *s = builtin_string_variable ("EDITOR"); + char *s = builtin_string_variable ("completion_append_char"); if (s) { - delete [] user_pref.editor; - user_pref.editor = s; + if (s[0] == '\0' || (s[0] && s[1] == '\0')) + user_pref.completion_append_char = s[0]; + else + { + warning ("completion_append_char must be a single character"); + status = -1; + } } else { - gripe_invalid_value_specified ("EDITOR"); + gripe_invalid_value_specified ("completion_append_char"); status = -1; } @@ -641,6 +648,26 @@ } int +sv_editor (void) +{ + int status = 0; + + char *s = builtin_string_variable ("EDITOR"); + if (s) + { + delete [] user_pref.editor; + user_pref.editor = s; + } + else + { + gripe_invalid_value_specified ("EDITOR"); + status = -1; + } + + return status; +} + +int sv_gnuplot_binary (void) { int status = 0;
--- a/src/user-prefs.h +++ b/src/user-prefs.h @@ -57,6 +57,8 @@ int warn_function_name_clash; int whitespace_in_literal_matrix; + char completion_append_char; + char *default_save_format; char *editor; char *gnuplot_binary; @@ -106,6 +108,8 @@ extern int set_output_precision (void); extern int set_save_precision (void); +extern int sv_completion_append_char (void); + extern int sv_default_save_format (void); extern int sv_editor (void); extern int sv_gnuplot_binary (void);
--- a/src/variables.cc +++ b/src/variables.cc @@ -1613,6 +1613,11 @@ beep_on_error, "if true, beep before printing error messages"); + DEFVAR ("completion_append_char", SBV_completion_append_char, " ", + 0, sv_completion_append_char, + "the string to append after successful command-line completion\n\ +attempts"); + DEFVAR ("default_return_value", SBV_default_return_value, Matrix (), 0, 0, "the default for value for unitialized variables returned from\n\