23 #if defined (HAVE_CONFIG_H) 69 if (pager_binary.empty ())
121 std::cerr <<
"warning: connection to external pager lost (pid = " 122 << pid <<
')' << std::endl;
123 std::cerr <<
"warning: flushing pending output (please wait)" 148 do_sync (
const char *msg,
int len,
bool bypass_pager)
154 std::cout.write (msg, len);
201 std::cout.write (msg, len);
221 int chars_this_line = 0;
223 for (
int i = 0;
i < len;
i++)
227 count += chars_this_line / cols + 1;
234 if (count > available_rows)
246 if (! application::interactive ()
247 || application::forced_interactive ()
252 char *buf = eback ();
254 int len = pptr () - buf;
256 bool bypass_pager = (! application::interactive ()
257 || application::forced_interactive ()
266 do_sync (buf, len, bypass_pager);
270 seekoff (0, std::ios::beg);
282 size_t len = pptr () - buf;
300 char *buf = eback ();
302 int len = pptr () - buf;
308 seekoff (0, std::ios::beg);
397 error (
"unable to create pager_stream object!");
458 error (
"unable to create diary_stream object!");
556 int nargin = args.length ();
587 else if (
arg ==
"off")
616 int nargin = args.length ();
627 else if (
arg ==
"off")
630 error (R
"(more: argument must be "on" or "off")"); 638 DEFUN (terminal_size, , ,
child_list & __get_child_list__(const std::string &who)
static std::ostream & stream(void)
OCTINTERP_API void print_usage(void)
std::string xstring_value(const char *fmt,...) const
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void error(const char *fmt,...)
#define SET_INTERNAL_VARIABLE(NM)
static diary_stream * instance
static std::string getenv(const std::string &name)
bool wifsignaled(int status)
static int terminal_rows(void)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
static bool instance_ok(void)
std::string default_pager(void)
static void cleanup_instance(void)
#define SET_NONEMPTY_INTERNAL_STRING_VARIABLE(NM)
bool wifexited(int status)
void insert(pid_t pid, child::child_event_handler f)
octave::unwind_protect frame
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
static int terminal_cols(void)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string