changeset 16471:d203a225cf11

allow clc to clear the Windows terminal screen * liboctave/util/oct-rl-edit.c (octave_rl_clear_screen): For Windows, use 'system ("cls")'.
author John W. Eaton <jwe@octave.org>
date Mon, 08 Apr 2013 17:05:43 -0400
parents 7369b210dbd0
children 293f5479a7e7
files liboctave/util/oct-rl-edit.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/util/oct-rl-edit.c
+++ b/liboctave/util/oct-rl-edit.c
@@ -93,6 +93,15 @@
 void
 octave_rl_clear_screen (void)
 {
+  /* This is a bit of a kluge, but I think it will work (I know, famous
+     last words).  */
+
+#if defined (__WIN32__) && ! defined (__CYGWIN__)
+
+  system ("cls");
+
+#else
+
   int ignore1 = 0;
   int ignore2 = 0;
 
@@ -102,6 +111,8 @@
   rl_clear_screen (ignore1, ignore2);
 
   rl_redisplay_function = saved_redisplay_function;
+
+#endif
 }
 
 void