Mercurial > hg > octave-lyh
changeset 1409:e282214c41a5
[project @ 1995-09-15 06:41:08 by jwe]
author | jwe |
---|---|
date | Fri, 15 Sep 1995 06:41:08 +0000 |
parents | f1fbe4cdd75c |
children | 5f2cd468a1c3 |
files | src/pager.cc |
diffstat | 1 files changed, 32 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pager.cc +++ b/src/pager.cc @@ -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++ ***