# HG changeset patch # User jwe # Date 811494590 0 # Node ID 045e70a15a8f5a57014bd9018759815b63782e2d # Parent 245206fbed6439e55b9338fa725798667e97f681 [project @ 1995-09-19 07:05:37 by jwe] diff -r 245206fbed64 -r 045e70a15a8f src/Map.h --- a/src/Map.h Tue Sep 19 07:02:21 1995 +0000 +++ b/src/Map.h Tue Sep 19 07:09:50 1995 +0000 @@ -37,9 +37,9 @@ #if ! defined (octave_Map_h) #define octave_Map_h 1 -#include +#include -#include "utils.h" +#include template class Map @@ -88,9 +88,11 @@ CHNode (void) : tl (0), hd (0) { } - CHNode (const char *h, const C& c, CHNode *t = 0) - : tl (t), cont (c) - { hd = strsave (h); } + CHNode (const char *h, const C& c, CHNode *t = 0) : tl (t), cont (c) + { + hd = h ? strcpy (new char [strlen (h) + 1], h) : 0; + } + ~CHNode (void) { delete [] hd; } diff -r 245206fbed64 -r 045e70a15a8f src/input.cc --- a/src/input.cc Tue Sep 19 07:02:21 1995 +0000 +++ b/src/input.cc Tue Sep 19 07:09:50 1995 +0000 @@ -704,6 +704,8 @@ return names; } +// XXX FIXME XXX -- make this generate file names when appropriate. + static char ** generate_possible_completions (const char *text, char *& prefix, char *& hint) @@ -712,13 +714,10 @@ prefix = 0; - if (text && *text && *text != '.') - { - if (strrchr (text, '.')) - names = generate_struct_completions (text, prefix, hint); - else - names = make_name_list (); - } + if (text && *text && *text != '.' && strrchr (text, '.')) + names = generate_struct_completions (text, prefix, hint); + else + names = make_name_list (); return names; } @@ -847,7 +846,8 @@ if (matches == 1 && looks_like_struct (buf)) rl_completion_append_character = '.'; else - rl_completion_append_character = ' '; + rl_completion_append_character + = user_pref.completion_append_char; return buf; } @@ -911,7 +911,6 @@ operate_and_get_next (int count, int c) { int where; - extern int history_stifled, history_length, max_input_history; // Accept the current line. @@ -921,7 +920,8 @@ where = where_history (); - if (history_stifled && (history_length >= max_input_history)) + if ((history_is_stifled () && (history_length >= max_input_history)) + || (where >= history_length - 1)) saved_history_line_to_use = where; else saved_history_line_to_use = where + 1; diff -r 245206fbed64 -r 045e70a15a8f src/pt-const.cc --- a/src/pt-const.cc Tue Sep 19 07:02:21 1995 +0000 +++ b/src/pt-const.cc Tue Sep 19 07:09:50 1995 +0000 @@ -41,6 +41,7 @@ #include "pager.h" #include "tree-const.h" #include "user-prefs.h" +#include "utils.h" // The following three variables could be made static members of the // tree_constant class. diff -r 245206fbed64 -r 045e70a15a8f src/sysdep.cc --- a/src/sysdep.cc Tue Sep 19 07:02:21 1995 +0000 +++ b/src/sysdep.cc Tue Sep 19 07:09:50 1995 +0000 @@ -45,6 +45,16 @@ #include #endif +#if defined (HAVE_TERMIOS_H) +#include +#elif defined (HAVE_TERMIO_H) +#include +#elif defined (HAVE_SGTTY_H) +#include +#else +LOSE! LOSE! +#endif + #include "defun.h" #include "error.h" #include "f77-uscore.h" @@ -63,16 +73,6 @@ extern char *term_clrpag; extern void _rl_output_character_function (); -#if defined (HAVE_TERMIOS_H) -#include -#elif defined (HAVE_TERMIO_H) -#include -#elif defined (HAVE_SGTTY_H) -#include -#else -LOSE! LOSE! -#endif - extern double F77_FCN (d1mach, D1MACH) (const int&); }