changeset 19338:ad93e9be78ee gui-release

command_editor: provide access to rl_prefer_env_winsize * cmd-edit.h, cmd-edit.cc (command_editor::prefer_env_winsize, command_editor::do_prefer_env_winsize, gnu_readline::do_prefer_env_winsize): New functions. * oct-rl-edit.h, oct-rl-edit.c (octave_rl_prefer_env_winsize): New function.
author John W. Eaton <jwe@octave.org>
date Wed, 17 Sep 2014 16:36:41 -0400
parents c6615ca0a11d
children 735bc47d18af
files liboctave/util/cmd-edit.cc liboctave/util/cmd-edit.h liboctave/util/oct-rl-edit.c liboctave/util/oct-rl-edit.h
diffstat 4 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/util/cmd-edit.cc	Thu Oct 30 13:38:02 2014 -0400
+++ b/liboctave/util/cmd-edit.cc	Wed Sep 17 16:36:41 2014 -0400
@@ -179,6 +179,8 @@
 
   bool do_filename_quoting_desired (bool);
 
+  bool do_prefer_env_winsize (bool);
+
   void do_interrupt (bool);
 
   static int operate_and_get_next (int, int);
@@ -651,6 +653,12 @@
   return ::octave_rl_filename_quoting_desired (arg);
 }
 
+bool
+gnu_readline::do_prefer_env_winsize (bool arg)
+{
+  return ::octave_rl_prefer_env_winsize (arg);
+}
+
 void
 gnu_readline::do_interrupt (bool arg)
 {
--- a/liboctave/util/cmd-edit.h	Thu Oct 30 13:38:02 2014 -0400
+++ b/liboctave/util/cmd-edit.h	Wed Sep 17 16:36:41 2014 -0400
@@ -161,6 +161,8 @@
 
   static bool filename_quoting_desired (bool);
 
+  static bool prefer_env_winsize (bool);
+
   static bool interrupt (bool = true);
 
   static int current_command_number (void);
@@ -329,6 +331,8 @@
 
   virtual bool do_filename_quoting_desired (bool) { return false; }
 
+  virtual bool do_prefer_env_winsize (bool) { return false; }
+
   virtual void do_interrupt (bool) { }
 
   int do_insert_initial_input (void);
--- a/liboctave/util/oct-rl-edit.c	Thu Oct 30 13:38:02 2014 -0400
+++ b/liboctave/util/oct-rl-edit.c	Wed Sep 17 16:36:41 2014 -0400
@@ -242,6 +242,14 @@
   return retval;
 }
 
+int
+octave_rl_prefer_env_winsize (int arg)
+{
+  int retval = rl_prefer_env_winsize;
+  rl_prefer_env_winsize = arg;
+  return retval;
+}
+
 void
 octave_rl_done (int arg)
 {
--- a/liboctave/util/oct-rl-edit.h	Thu Oct 30 13:38:02 2014 -0400
+++ b/liboctave/util/oct-rl-edit.h	Wed Sep 17 16:36:41 2014 -0400
@@ -98,6 +98,8 @@
 
 extern int octave_rl_filename_quoting_desired (int);
 
+extern int octave_rl_prefer_env_winsize (int);
+
 extern void octave_rl_done (int);
 
 extern char *octave_rl_filename_completion_function (const char *, int);