GNU Octave  4.0.0
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 "singleton-cleanup.h"
#include "defaults.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "input.h"
#include "oct-obj.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)
 
void flush_octave_stdout (void)
 
OCTAVE_EXPORT octave_value_list Fmore (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fpage_output_immediately (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fpage_screen_output (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list FPAGER (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list FPAGER_FLAGS (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fterminal_size (const octave_value_list &, int)
 
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 93 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 61 of file pager.cc.

References octave_env::getenv(), and OCTAVE_DEFAULT_PAGER.

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 596 of file pager.cc.

References diary_file(), and ovl().

Referenced by root_figure::properties::get_diaryfile().

OCTAVE_EXPORT octave_value_list F__diarystate__ ( const octave_value_list ,
int   
)

Definition at line 605 of file pager.cc.

References ovl(), and write_to_diary_file.

Referenced by root_figure::properties::get_diary().

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   
)
OCTAVE_EXPORT octave_value_list Fpage_output_immediately ( const octave_value_list args,
int  nargout 
)

Definition at line 682 of file pager.cc.

References SET_INTERNAL_VARIABLE.

OCTAVE_EXPORT octave_value_list Fpage_screen_output ( const octave_value_list args,
int  nargout 
)

Definition at line 704 of file pager.cc.

References SET_INTERNAL_VARIABLE.

Referenced by maximum_braindamage().

OCTAVE_EXPORT octave_value_list FPAGER ( const octave_value_list args,
int  nargout 
)

Definition at line 725 of file pager.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

OCTAVE_EXPORT octave_value_list FPAGER_FLAGS ( const octave_value_list args,
int  nargout 
)

Definition at line 742 of file pager.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

OCTAVE_EXPORT octave_value_list Fterminal_size ( const octave_value_list ,
int   
)
static bool more_than_a_screenful ( const char s,
int  len 
)
static

Definition at line 201 of file pager.cc.

References command_editor::terminal_cols(), and command_editor::terminal_rows().

Referenced by octave_pager_buf::sync().

static void open_diary_file ( void  )
static
static std::string pager_command ( void  )
static

Definition at line 132 of file pager.cc.

References VPAGER, and VPAGER_FLAGS.

Referenced by do_sync().

static bool pager_event_handler ( pid_t  pid,
int  status 
)
static

Definition at line 105 of file pager.cc.

References octave_wait::ifexited(), and octave_wait::ifsignaled().

Referenced by do_sync().

Variable Documentation

std::ofstream external_diary_file
static

Definition at line 58 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 49 of file pager.cc.

Referenced by clear_external_pager().

bool flushing_output_to_pager = false
static

Definition at line 90 of file pager.cc.

Referenced by flush_octave_stdout().

bool really_flush_to_pager = false
static

Definition at line 88 of file pager.cc.

Referenced by flush_octave_stdout(), and octave_pager_buf::sync().

bool Vpage_output_immediately = false
static

Definition at line 82 of file pager.cc.

Referenced by octave_pager_buf::sync().

bool Vpage_screen_output = true
static

Definition at line 86 of file pager.cc.

Referenced by Fmore(), and octave_pager_buf::sync().

std::string VPAGER = default_pager ()
static

Definition at line 74 of file pager.cc.

Referenced by pager_command().

std::string VPAGER_FLAGS
static

Definition at line 77 of file pager.cc.

Referenced by pager_command().

bool write_to_diary_file = false
static

Definition at line 52 of file pager.cc.

Referenced by F__diarystate__(), Fdiary(), and octave_diary_buf::sync().