GNU Octave  3.8.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
oct-hist.cc File Reference
#include <cstdlib>
#include <cstring>
#include <string>
#include <fstream>
#include <sys/types.h>
#include <unistd.h>
#include "cmd-hist.h"
#include "file-ops.h"
#include "lo-mappers.h"
#include "octave-link.h"
#include "oct-env.h"
#include "oct-time.h"
#include "str-vec.h"
#include <defaults.h>
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "input.h"
#include "oct-hist.h"
#include "oct-obj.h"
#include "pager.h"
#include "parse.h"
#include "sighandlers.h"
#include "sysdep.h"
#include "toplev.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
Include dependency graph for oct-hist.cc:

Go to the source code of this file.

Functions

static std::string default_history_file (void)
static int default_history_size (void)
static std::string default_history_timestamp_format (void)
static void do_edit_history (const octave_value_list &args)
static string_vector do_history (const octave_value_list &args, int nargout)
static void do_run_history (const octave_value_list &args)
static void edit_history_add_hist (const std::string &line)
static charedit_history_readline (std::fstream &stream)
OCTAVE_EXPORT octave_value_list Fedit_history (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fhistory (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fhistory_control (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fhistory_file (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fhistory_save (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fhistory_size (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fhistory_timestamp_format_string (const octave_value_list &args, int nargout)%a%b%d%H
OCTAVE_EXPORT octave_value_list Frun_history (const octave_value_list &args, int)
static bool get_int_arg (const octave_value &arg, int &val)
void initialize_history (bool read_history_file)
static std::string mk_tmp_hist_file (const octave_value_list &args, bool insert_curr, const char *warn_for)
void octave_history_write_timestamp (void)
static void unlink_cleanup (const char *file)

Variables

bool input_from_tmp_history_file = false
static std::string Vhistory_timestamp_format_string = default_history_timestamp_format ()

Function Documentation

static std::string default_history_file ( void  )
static
static int default_history_size ( void  )
static

Definition at line 93 of file oct-hist.cc.

References octave_env::getenv(), and size().

Referenced by initialize_history().

static std::string default_history_timestamp_format ( void  )
static
static void do_edit_history ( const octave_value_list args)
static
static string_vector do_history ( const octave_value_list args,
int  nargout 
)
static
static void do_run_history ( const octave_value_list args)
static
static void edit_history_add_hist ( const std::string &  line)
static

Definition at line 319 of file oct-hist.cc.

References command_history::add(), and octave_link::append_history().

Referenced by do_edit_history().

static char* edit_history_readline ( std::fstream &  stream)
static

Definition at line 269 of file oct-hist.cc.

Referenced by do_edit_history().

OCTAVE_EXPORT octave_value_list Fedit_history ( const octave_value_list args,
int   
)

Definition at line 619 of file oct-hist.cc.

References do_edit_history().

OCTAVE_EXPORT octave_value_list Fhistory ( const octave_value_list args,
int  nargout 
)

Definition at line 665 of file oct-hist.cc.

References do_history().

Referenced by main_window::clear_history_callback().

OCTAVE_EXPORT octave_value_list Fhistory_control ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list Fhistory_file ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list Fhistory_save ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list Fhistory_size ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list Fhistory_timestamp_format_string ( const octave_value_list args,
int  nargout 
)

Definition at line 841 of file oct-hist.cc.

References SET_INTERNAL_VARIABLE.

Referenced by maximum_braindamage().

OCTAVE_EXPORT octave_value_list Frun_history ( const octave_value_list args,
int   
)

Definition at line 726 of file oct-hist.cc.

References do_run_history().

static bool get_int_arg ( const octave_value arg,
int val 
)
static
void initialize_history ( bool  read_history_file)
static std::string mk_tmp_hist_file ( const octave_value_list args,
bool  insert_curr,
const char warn_for 
)
static
void octave_history_write_timestamp ( void  )
static void unlink_cleanup ( const char file)
static

Definition at line 465 of file oct-hist.cc.

Referenced by do_edit_history(), and do_run_history().

Variable Documentation

bool input_from_tmp_history_file = false

Definition at line 73 of file oct-hist.cc.

Referenced by do_edit_history(), and do_run_history().

std::string Vhistory_timestamp_format_string = default_history_timestamp_format ()
static

Definition at line 124 of file oct-hist.cc.

Referenced by octave_history_write_timestamp().