GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
pager.cc File Reference
#include <fstream>
#include <iostream>
#include <string>
#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 "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.

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 F__diaryfile__ (const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list F__diarystate__ (const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list Fdiary (const octave_value_list &args, int) mixed together just as they appear on the terminal.Valid options are
 
void flush_octave_stdout (void)
 
OCTAVE_EXPORT octave_value_list Fmore (const octave_value_list &args, int) ode
 
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 = 0
 
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 = true
 
static std::string VPAGER = default_pager ()
 
static std::string VPAGER_FLAGS
 
static bool write_to_diary_file = false
 

Function Documentation

static void clear_external_pager ( void  )
static

Definition at line 95 of file pager.cc.

References external_pager, procstreambase::pid(), and octave::child_list::remove().

Referenced by flush_octave_stdout().

static void close_diary_file ( void  )
static
static std::string default_pager ( void  )
static

Definition at line 63 of file pager.cc.

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

static std::string diary_file ( "diary"  )
static
static void do_sync ( const char *  msg,
int  len,
bool  bypass_pager 
)
static
OCTAVE_EXPORT octave_value_list F__diaryfile__ ( const octave_value_list ,
int   
)

Definition at line 580 of file pager.cc.

References diary_file(), and ovl().

Referenced by install_pager_fcns().

OCTAVE_EXPORT octave_value_list F__diarystate__ ( const octave_value_list ,
int   
)

Definition at line 589 of file pager.cc.

References ovl().

Referenced by install_pager_fcns().

OCTAVE_EXPORT octave_value_list Fdiary ( const octave_value_list args,
int   
)
void flush_octave_stdout ( void  )
OCTAVE_EXPORT octave_value_list Fmore ( const octave_value_list args,
int   
)

Definition at line 605 of file pager.cc.

References arg, error(), nargin, ovl(), print_usage(), string, and Vpage_screen_output.

Referenced by install_pager_fcns().

static bool more_than_a_screenful ( const char *  s,
int  len 
)
static
static void open_diary_file ( void  )
static
static std::string pager_command ( void  )
static

Definition at line 134 of file pager.cc.

References string, VPAGER, and VPAGER_FLAGS.

Referenced by do_sync().

static bool pager_event_handler ( pid_t  pid,
int  status 
)
static

Definition at line 107 of file pager.cc.

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

Referenced by do_sync().

Variable Documentation

std::ofstream external_diary_file
static

Definition at line 60 of file pager.cc.

Referenced by close_diary_file(), open_diary_file(), and octave_diary_buf::sync().

oprocstream* external_pager = 0
static

Definition at line 51 of file pager.cc.

Referenced by clear_external_pager().

bool flushing_output_to_pager = false
static

Definition at line 92 of file pager.cc.

bool really_flush_to_pager = false
static

Definition at line 90 of file pager.cc.

bool Vpage_output_immediately = false
static

Definition at line 84 of file pager.cc.

bool Vpage_screen_output = true
static

Definition at line 88 of file pager.cc.

Referenced by Fmore().

std::string VPAGER = default_pager ()
static

Definition at line 76 of file pager.cc.

Referenced by pager_command().

std::string VPAGER_FLAGS
static

Definition at line 79 of file pager.cc.

Referenced by pager_command().

bool write_to_diary_file = false
static

Definition at line 54 of file pager.cc.

Referenced by Fdiary().