# HG changeset patch # User John W. Eaton # Date 1365455143 14400 # Node ID d203a225cf11f319761f2fc7ee2fc521212d6f31 # Parent 7369b210dbd0090ee09a05b400a9c317cbeef677 allow clc to clear the Windows terminal screen * liboctave/util/oct-rl-edit.c (octave_rl_clear_screen): For Windows, use 'system ("cls")'. diff --git a/liboctave/util/oct-rl-edit.c b/liboctave/util/oct-rl-edit.c --- 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