# HG changeset patch # User jwe # Date 811147268 0 # Node ID e282214c41a555271bda56808bb57e69ab5d4999 # Parent f1fbe4cdd75ccd0de647ecc3518c748245796fb0 [project @ 1995-09-15 06:41:08 by jwe] diff -r f1fbe4cdd75c -r e282214c41a5 src/pager.cc --- a/src/pager.cc Fri Sep 15 06:39:28 1995 +0000 +++ b/src/pager.cc Fri Sep 15 06:41:08 1995 +0000 @@ -41,8 +41,10 @@ #include "oct-obj.h" #include "pager.h" #include "sighandlers.h" +#include "tree-const.h" #include "user-prefs.h" #include "utils.h" +#include "variables.h" // Where we stash output headed for the screen. static ostrstream *pager_buf = 0; @@ -201,7 +203,7 @@ { Octave_object retval; - DEFINE_ARGV("diary"); + DEFINE_ARGV ("diary"); if (! diary_file) diary_file = strsave ("diary"); @@ -242,6 +244,35 @@ return retval; } +DEFUN_TEXT ("more", Fmore, Smore, -1, 1, + "more on\n\ +more off\n\ +\n\ +Turn output pagination on or off.") +{ + Octave_object retval; + + DEFINE_ARGV ("more"); + + if (argc == 2) + { + char *arg = argv[1]; + + if (strcmp (arg, "on") == 0) + bind_builtin_variable ("page_screen_output", "true"); + else if (strcmp (arg, "off") == 0) + bind_builtin_variable ("page_screen_output", "false"); + else + error ("more: unrecognized argument `%s'", arg); + } + else + print_usage ("more"); + + DELETE_ARGV; + + return retval; +} + /* ;;; Local Variables: *** ;;; mode: C++ ***