GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
pager.cc File Reference
#include <fstream>
#include <iostream>
#include <string>
#include "child-list.h"
#include "cmd-edit.h"
#include "oct-env.h"
#include "oct-syscalls.h"
#include "singleton-cleanup.h"
#include "defaults.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "input.h"
#include "interpreter-private.h"
#include "octave.h"
#include "ovl.h"
#include "pager.h"
#include "procstream.h"
#include "sighandlers.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
Include dependency graph for pager.cc:

Go to the source code of this file.

Namespaces

 octave
 

Functions

static void clear_external_pager (void)
 
static void close_diary_file (void)
 
static std::string default_pager (void)
 
static std::string diary_file ("diary")
 
static void do_sync (const char *msg, int len, bool bypass_pager)
 
OCTAVE_EXPORT octave_value_list Fdiary (const octave_value_list &args, int nargout) ar
 
void octave::flush_stdout (void)
 
static bool more_than_a_screenful (const char *s, int len)
 
static void open_diary_file (void)
 
static std::string pager_command (void)
 
static bool pager_event_handler (pid_t pid, int status)
 

Variables

static std::ofstream external_diary_file
 
static oprocstreamexternal_pager = nullptr
 
static bool flushing_output_to_pager = false
 
static bool really_flush_to_pager = false
 
static bool Vpage_output_immediately = false
 
static bool Vpage_screen_output = false
 
static std::string VPAGER = default_pager ()
 
static std::string VPAGER_FLAGS
 
static bool write_to_diary_file = false
 

Function Documentation

◆ clear_external_pager()

static void clear_external_pager ( void  )
static

◆ close_diary_file()

static void close_diary_file ( void  )
static

◆ default_pager()

static std::string default_pager ( void  )
static

Definition at line 65 of file pager.cc.

References octave::config::default_pager(), octave::sys::env::getenv(), and string.

◆ diary_file()

static std::string diary_file ( "diary"  )
static

Referenced by Fdiary(), and open_diary_file().

◆ do_sync()

static void do_sync ( const char *  msg,
int  len,
bool  bypass_pager 
)
static

◆ Fdiary()

OCTAVE_EXPORT octave_value_list Fdiary ( const octave_value_list args,
int  nargout 
)

◆ more_than_a_screenful()

static bool more_than_a_screenful ( const char *  s,
int  len 
)
static

◆ open_diary_file()

static void open_diary_file ( void  )
static

◆ pager_command()

static std::string pager_command ( void  )
static

Definition at line 137 of file pager.cc.

References string, VPAGER, and VPAGER_FLAGS.

Referenced by do_sync().

◆ pager_event_handler()

static bool pager_event_handler ( pid_t  pid,
int  status 
)
static

Definition at line 110 of file pager.cc.

References retval, octave::sys::wifexited(), and octave::sys::wifsignaled().

Referenced by do_sync().

Variable Documentation

◆ external_diary_file

std::ofstream external_diary_file
static

Definition at line 62 of file pager.cc.

Referenced by close_diary_file(), open_diary_file(), and octave::diary_buf::sync().

◆ external_pager

oprocstream* external_pager = nullptr
static

Definition at line 53 of file pager.cc.

Referenced by clear_external_pager(), and do_sync().

◆ flushing_output_to_pager

bool flushing_output_to_pager = false
static

Definition at line 92 of file pager.cc.

Referenced by octave::flush_stdout().

◆ really_flush_to_pager

bool really_flush_to_pager = false
static

Definition at line 90 of file pager.cc.

Referenced by octave::flush_stdout(), and octave::pager_buf::sync().

◆ Vpage_output_immediately

bool Vpage_output_immediately = false
static

Definition at line 84 of file pager.cc.

Referenced by octave::pager_buf::sync().

◆ Vpage_screen_output

bool Vpage_screen_output = false
static

Definition at line 88 of file pager.cc.

Referenced by octave::pager_buf::sync().

◆ VPAGER

std::string VPAGER = default_pager ()
static

Definition at line 76 of file pager.cc.

Referenced by pager_command().

◆ VPAGER_FLAGS

std::string VPAGER_FLAGS
static

Definition at line 79 of file pager.cc.

Referenced by pager_command().

◆ write_to_diary_file

bool write_to_diary_file = false
static

Definition at line 56 of file pager.cc.

Referenced by Fdiary(), and octave::diary_buf::sync().