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
Typedefs | Functions | Variables
help.cc File Reference
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <sys/types.h>
#include <unistd.h>
#include "cmd-edit.h"
#include "file-ops.h"
#include "file-stat.h"
#include "oct-env.h"
#include "oct-locbuf.h"
#include "str-vec.h"
#include <defaults.h>
#include "defun.h"
#include "dirfns.h"
#include "error.h"
#include "gripes.h"
#include "help.h"
#include "input.h"
#include "load-path.h"
#include "oct-obj.h"
#include "ov-usr-fcn.h"
#include "pager.h"
#include "parse.h"
#include "pathsearch.h"
#include "procstream.h"
#include "pt-pr-code.h"
#include "sighandlers.h"
#include "symtab.h"
#include "syswait.h"
#include "toplev.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include "version.h"
#include "quit.h"
#include <map>
Include dependency graph for help.cc:

Go to the source code of this file.

Typedefs

typedef map_type::const_iterator map_iter
 
typedef std::map< std::string,
std::string > 
map_type
 
typedef map_type::value_type pair_type
 

Functions

static void do_get_help_text (const std::string &name, std::string &text, std::string &format)
 
static void do_get_help_text_from_file (const std::string &fname, std::string &text, std::string &format)
 
static std::string do_which (const std::string &name, std::string &type)
 
std::string do_which (const std::string &name)
 
OCTAVE_EXPORT octave_value_list F__builtins__ (const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list F__keywords__ (const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list F__list_functions__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__operators__ (const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list F__which__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fbuilt_in_docstrings_file (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fdoc_cache_file (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fget_help_text (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fget_help_text_from_file (const octave_value_list &args, int)
 
bool file_is_in_dir (const std::string filename, const std::string dir)
 
OCTAVE_EXPORT octave_value_list Finfo_file (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Finfo_program (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fmakeinfo_program (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fsuppress_verbose_help_message (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Ftexi_macros_file (const octave_value_list &args, int nargout)
 
void install_built_in_docstrings (void)
 
static const map_type keywords_map (keywords, keywords+size(keywords))
 
static bool looks_like_html (const std::string &msg)
 
static bool looks_like_texinfo (const std::string &msg, size_t &p1)
 
string_vector make_name_list (void)
 
static string_vector names (const map_type &lst)
 
static const map_type operators_map (operators, operators+size(operators))
 
std::string raw_help (const std::string &nm, bool &symbol_found)
 
static bool raw_help_from_file (const std::string &nm, std::string &h, std::string &file, bool &symbol_found)
 
static bool raw_help_from_map (const std::string &nm, std::string &h, const map_type &map, bool &symbol_found)
 
static bool raw_help_from_symbol_table (const std::string &nm, std::string &h, std::string &w, bool &symbol_found)
 
template<typename T , size_t z>
size_t size (T const (&)[z])
 

Variables

static const string_vector keyword_names = names (keywords_map)
 
static const pair_type keywords []
 
static const pair_type operators []
 
std::string Vdoc_cache_file
 
std::string Vinfo_file
 
std::string Vinfo_program
 
static std::string Vmakeinfo_program = "makeinfo"
 
static bool Vsuppress_verbose_help_message = false
 
std::string Vtexi_macros_file
 

Typedef Documentation

typedef map_type::const_iterator map_iter

Definition at line 99 of file help.cc.

typedef std::map<std::string, std::string> map_type

Definition at line 97 of file help.cc.

typedef map_type::value_type pair_type

Definition at line 98 of file help.cc.

Function Documentation

static void do_get_help_text ( const std::string &  name,
std::string &  text,
std::string &  format 
)
static

Definition at line 1051 of file help.cc.

References looks_like_html(), looks_like_texinfo(), and raw_help().

Referenced by Fget_help_text().

static void do_get_help_text_from_file ( const std::string &  fname,
std::string &  text,
std::string &  format 
)
static

Definition at line 1117 of file help.cc.

References f, looks_like_html(), looks_like_texinfo(), and raw_help_from_file().

Referenced by Fget_help_text_from_file().

static std::string do_which ( const std::string &  name,
std::string &  type 
)
static
std::string do_which ( const std::string &  name)

Definition at line 1283 of file help.cc.

References do_which().

OCTAVE_EXPORT octave_value_list F__builtins__ ( const octave_value_list ,
int   
)

Definition at line 1217 of file help.cc.

References symbol_table::built_in_function_names(), and octave_value().

OCTAVE_EXPORT octave_value_list F__keywords__ ( const octave_value_list ,
int   
)

Definition at line 1205 of file help.cc.

References keywords_map(), names(), and octave_value().

OCTAVE_EXPORT octave_value_list F__list_functions__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__operators__ ( const octave_value_list ,
int   
)

Definition at line 1193 of file help.cc.

References names(), octave_value(), and operators_map().

OCTAVE_EXPORT octave_value_list F__which__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fbuilt_in_docstrings_file ( const octave_value_list args,
int  nargout 
)

Definition at line 972 of file help.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

Referenced by octave_process_command_line().

OCTAVE_EXPORT octave_value_list Fdoc_cache_file ( const octave_value_list args,
int  nargout 
)

Definition at line 1427 of file help.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

Referenced by octave_process_command_line().

OCTAVE_EXPORT octave_value_list Fget_help_text ( const octave_value_list args,
int   
)

Definition at line 1089 of file help.cc.

References do_get_help_text(), error(), error_state, and print_usage().

OCTAVE_EXPORT octave_value_list Fget_help_text_from_file ( const octave_value_list args,
int   
)

Definition at line 1159 of file help.cc.

References do_get_help_text_from_file(), error(), error_state, and print_usage().

bool file_is_in_dir ( const std::string  filename,
const std::string  dir 
)
inline

Definition at line 1344 of file help.cc.

References file_ops::is_dir_sep().

OCTAVE_EXPORT octave_value_list Finfo_file ( const octave_value_list args,
int  nargout 
)

Definition at line 1477 of file help.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

Referenced by octave_process_command_line().

OCTAVE_EXPORT octave_value_list Finfo_program ( const octave_value_list args,
int  nargout 
)

Definition at line 1503 of file help.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

Referenced by octave_process_command_line().

OCTAVE_EXPORT octave_value_list Fmakeinfo_program ( const octave_value_list args,
int  nargout 
)

Definition at line 1523 of file help.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

OCTAVE_EXPORT octave_value_list Fsuppress_verbose_help_message ( const octave_value_list args,
int  nargout 
)

Definition at line 1540 of file help.cc.

References SET_INTERNAL_VARIABLE.

OCTAVE_EXPORT octave_value_list Ftexi_macros_file ( const octave_value_list args,
int  nargout 
)

Definition at line 1453 of file help.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

Referenced by octave_process_command_line().

void install_built_in_docstrings ( void  )
static const map_type keywords_map ( keywords  ,
keywords sizekeywords 
)
static

Referenced by F__keywords__(), and raw_help().

static bool looks_like_html ( const std::string &  msg)
static

Definition at line 848 of file help.cc.

Referenced by do_get_help_text(), and do_get_help_text_from_file().

static bool looks_like_texinfo ( const std::string &  msg,
size_t p1 
)
static

Definition at line 859 of file help.cc.

Referenced by do_get_help_text(), and do_get_help_text_from_file().

string_vector make_name_list ( void  )
static string_vector names ( const map_type lst)
static
static const map_type operators_map ( operators  ,
operators sizeoperators 
)
static

Referenced by F__operators__(), and raw_help().

std::string raw_help ( const std::string &  nm,
bool symbol_found 
)
static bool raw_help_from_file ( const std::string &  nm,
std::string &  h,
std::string &  file,
bool symbol_found 
)
static

Definition at line 905 of file help.cc.

References get_help_from_file().

Referenced by do_get_help_text_from_file(), and raw_help().

static bool raw_help_from_map ( const std::string &  nm,
std::string &  h,
const map_type map,
bool symbol_found 
)
static

Definition at line 919 of file help.cc.

Referenced by raw_help().

static bool raw_help_from_symbol_table ( const std::string &  nm,
std::string &  h,
std::string &  w,
bool symbol_found 
)
static
template<typename T , size_t z>
size_t size ( T const   (&)[z])

Variable Documentation

const string_vector keyword_names = names (keywords_map)
static

Definition at line 793 of file help.cc.

const pair_type keywords[]
static
const pair_type operators[]
static

Definition at line 108 of file help.cc.

std::string Vdoc_cache_file

Definition at line 73 of file help.cc.

Referenced by set_default_doc_cache_file().

std::string Vinfo_file

Definition at line 82 of file help.cc.

Referenced by set_default_info_file(), and webinfo::webinfo().

std::string Vinfo_program

Definition at line 86 of file help.cc.

Referenced by set_default_info_prog().

std::string Vmakeinfo_program = "makeinfo"
static

Definition at line 89 of file help.cc.

bool Vsuppress_verbose_help_message = false
static

Definition at line 93 of file help.cc.

std::string Vtexi_macros_file

Definition at line 78 of file help.cc.

Referenced by set_default_texi_macros_file().