Functions

utils.h File Reference

#include <cstdarg>
#include <iosfwd>
#include <string>
#include <list>
#include "dMatrix.h"
#include "lo-utils.h"
#include "cutils.h"
Include dependency graph for utils.h:

Go to the source code of this file.

Functions

OCTINTERP_API int almost_match (const std::string &std, const std::string &s, int min_match_len=1, int case_sens=1)
OCTINTERP_API void check_dimensions (dim_vector &dim, const char *warnfor)
OCTINTERP_API std::string contents_file_in_path (const std::string &)
OCTINTERP_API octave_idx_type dims_to_numel (const dim_vector &dims, const octave_value_list &idx)
OCTINTERP_API octave_value_list do_simple_cellfun (octave_value_list(*fun)(const octave_value_list &, int), const char *fun_name, const octave_value_list &args, int nargout)
OCTINTERP_API octave_value do_simple_cellfun (octave_value_list(*fun)(const octave_value_list &, int), const char *fun_name, const octave_value_list &args)
OCTINTERP_API std::string do_string_escapes (const std::string &s)
OCTINTERP_API int empty_arg (const char *name, octave_idx_type nr, octave_idx_type nc)
OCTINTERP_API std::string fcn_file_in_path (const std::string &)
OCTINTERP_API std::string file_in_path (const std::string &, const std::string &)
OCTINTERP_API FloatMatrix float_identity_matrix (octave_idx_type nr, octave_idx_type nc)
OCTINTERP_API void get_dimensions (const octave_value &a, const char *warn_for, dim_vector &dim)
OCTINTERP_API void get_dimensions (const octave_value &a, const octave_value &b, const char *warn_for, octave_idx_type &nr, octave_idx_type &nc)
OCTINTERP_API void get_dimensions (const octave_value &a, const char *warn_for, octave_idx_type &nr, octave_idx_type &nc)
OCTINTERP_API Matrix identity_matrix (octave_idx_type nr, octave_idx_type nc)
OCTINTERP_API int keyword_almost_match (const char *const *std, int *min_len, const std::string &s, int min_toks_to_match, int max_toks)
OCTINTERP_API std::string mex_file_in_path (const std::string &)
OCTINTERP_API std::string oct_file_in_path (const std::string &)
OCTINTERP_API std::string octave_asprintf (const char *fmt,...)
OCTINTERP_API size_t octave_format (std::ostream &os, const char *fmt,...)
OCTINTERP_API void octave_sleep (double seconds)
OCTINTERP_API std::string octave_vasprintf (const char *fmt, va_list args)
OCTINTERP_API size_t octave_vformat (std::ostream &os, const char *fmt, va_list args)
OCTINTERP_API bool same_file (const std::string &f, const std::string &g)
OCTINTERP_API string_vector search_path_for_all_files (const std::string &, const string_vector &)
OCTINTERP_API std::string search_path_for_file (const std::string &, const string_vector &)
OCTINTERP_API const charundo_string_escape (char c)
OCTINTERP_API std::string undo_string_escapes (const std::string &s)
OCTINTERP_API bool valid_identifier (const char *s)
OCTINTERP_API bool valid_identifier (const std::string &s)

Function Documentation

OCTINTERP_API int almost_match ( const std::string &  std,
const std::string &  s,
int  min_match_len = 1,
int  case_sens = 1 
)

Definition at line 139 of file utils.cc.

References octave_strncasecmp().

Referenced by keyword_almost_match().

OCTINTERP_API void check_dimensions ( dim_vector dim,
const char warnfor 
)

Definition at line 1035 of file utils.cc.

References dim_vector::length(), and warning_with_id().

OCTINTERP_API std::string contents_file_in_path ( const std::string &   ) 
OCTINTERP_API octave_idx_type dims_to_numel ( const dim_vector dims,
const octave_value_list idx 
)
OCTINTERP_API octave_value_list do_simple_cellfun ( octave_value_list(*)(const octave_value_list &, int fun,
const char fun_name,
const octave_value_list args,
int  nargout 
)
OCTINTERP_API octave_value do_simple_cellfun ( octave_value_list(*)(const octave_value_list &, int fun,
const char fun_name,
const octave_value_list args 
)

Definition at line 1422 of file utils.cc.

References do_simple_cellfun(), and octave_value_list::length().

OCTINTERP_API std::string do_string_escapes ( const std::string &  s  ) 

Definition at line 572 of file utils.cc.

References warning().

Referenced by DEFUN(), DEFUN_DLD(), octave_stream::oscanf(), octave_stream::printf(), and octave_stream::scanf().

OCTINTERP_API int empty_arg ( const char name,
octave_idx_type  nr,
octave_idx_type  nc 
)

Definition at line 245 of file utils.cc.

Referenced by DEFUN_DLD().

OCTINTERP_API std::string fcn_file_in_path ( const std::string &   ) 
OCTINTERP_API std::string file_in_path ( const std::string &  ,
const std::string &   
)

Definition at line 444 of file utils.cc.

References load_path::find_file(), and octave_env::make_absolute().

Referenced by symbol_exist().

OCTINTERP_API FloatMatrix float_identity_matrix ( octave_idx_type  nr,
octave_idx_type  nc 
)

Definition at line 1184 of file utils.cc.

References min().

OCTINTERP_API void get_dimensions ( const octave_value a,
const char warn_for,
dim_vector dim 
)
OCTINTERP_API void get_dimensions ( const octave_value a,
const octave_value b,
const char warn_for,
octave_idx_type nr,
octave_idx_type nc 
)
OCTINTERP_API void get_dimensions ( const octave_value a,
const char warn_for,
octave_idx_type nr,
octave_idx_type nc 
)
OCTINTERP_API Matrix identity_matrix ( octave_idx_type  nr,
octave_idx_type  nc 
)

Definition at line 1168 of file utils.cc.

References min().

OCTINTERP_API int keyword_almost_match ( const char *const *  std,
int min_len,
const std::string &  s,
int  min_toks_to_match,
int  max_toks 
)

Definition at line 155 of file utils.cc.

References almost_match(), and strsave().

OCTINTERP_API std::string mex_file_in_path ( const std::string &   ) 
OCTINTERP_API std::string oct_file_in_path ( const std::string &   ) 
OCTINTERP_API std::string octave_asprintf ( const char fmt,
  ... 
)

Definition at line 1243 of file utils.cc.

References octave_vasprintf().

OCTINTERP_API size_t octave_format ( std::ostream &  os,
const char fmt,
  ... 
)

Definition at line 1200 of file utils.cc.

References octave_vformat().

Referenced by do_printf_conv().

OCTINTERP_API void octave_sleep ( double  seconds  ) 

Definition at line 1258 of file utils.cc.

References octave_sleep(), and octave_usleep().

OCTINTERP_API std::string octave_vasprintf ( const char fmt,
va_list  args 
)

Definition at line 1225 of file utils.cc.

Referenced by octave_asprintf(), and octave_vformat().

OCTINTERP_API size_t octave_vformat ( std::ostream &  os,
const char fmt,
va_list  args 
)

Definition at line 1215 of file utils.cc.

References octave_vasprintf().

Referenced by mexPrintf(), octave_format(), verror(), and vwarning().

OCTINTERP_API bool same_file ( const std::string &  f,
const std::string &  g 
)

Definition at line 133 of file utils.cc.

References same_file_internal().

Referenced by execute_startup_files(), and out_of_date_check().

OCTINTERP_API string_vector search_path_for_all_files ( const std::string &  ,
const string_vector  
)

Definition at line 263 of file utils.cc.

References dir_path::find_all_first_of(), Array< T >::length(), and octave_env::make_absolute().

Referenced by DEFUN().

OCTINTERP_API std::string search_path_for_file ( const std::string &  ,
const string_vector  
)

Definition at line 253 of file utils.cc.

References dir_path::find_first_of(), and octave_env::make_absolute().

Referenced by DEFUN().

OCTINTERP_API const char* undo_string_escape ( char  c  ) 

Definition at line 693 of file utils.cc.

Referenced by undo_string_escapes().

OCTINTERP_API std::string undo_string_escapes ( const std::string &  s  ) 
OCTINTERP_API bool valid_identifier ( const char s  ) 
OCTINTERP_API bool valid_identifier ( const std::string &  s  ) 

Definition at line 90 of file utils.cc.

References valid_identifier().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines