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
lo-utils.cc File Reference
#include <cctype>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cfloat>
#include <limits>
#include <string>
#include "quit.h"
#include "lo-error.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "lo-utils.h"
#include "putenv-wrapper.h"
Include dependency graph for lo-utils.cc:

Go to the source code of this file.

Functions

std::string octave_fgetl (FILE *f)
 
std::string octave_fgetl (FILE *f, bool &eof)
 
std::string octave_fgets (FILE *f)
 
std::string octave_fgets (FILE *f, bool &eof)
 
void octave_putenv (const std::string &name, const std::string &value)
 
template<typename T >
std::complex< T > octave_read_cx_fp_value (std::istream &is)
 
template<typename T >
double octave_read_fp_value (std::istream &is)
 
template<>
OCTAVE_API double octave_read_value (std::istream &is)
 
template<>
OCTAVE_API Complex octave_read_value (std::istream &is)
 
template<>
OCTAVE_API float octave_read_value (std::istream &is)
 
template<>
OCTAVE_API FloatComplex octave_read_value (std::istream &is)
 
void octave_write_complex (std::ostream &os, const Complex &c)
 
void octave_write_double (std::ostream &os, double d)
 
void octave_write_float (std::ostream &os, float d)
 
void octave_write_float_complex (std::ostream &os, const FloatComplex &c)
 
template<typename T >
read_inf_nan_na (std::istream &is, char c0)
 
char * strsave (const char *s)
 
bool xis_int_or_inf_or_nan (double x)
 
bool xis_int_or_inf_or_nan (float x)
 
bool xis_one_or_zero (double x)
 
bool xis_one_or_zero (float x)
 
bool xis_zero (double x)
 
bool xis_zero (float x)
 
bool xtoo_large_for_float (double x)
 
bool xtoo_large_for_float (const Complex &x)
 

Function Documentation

std::string octave_fgetl ( FILE *  f)

Definition at line 188 of file lo-utils.cc.

Referenced by octave::default_command_editor::do_readline().

std::string octave_fgetl ( FILE *  f,
bool eof 
)

Definition at line 195 of file lo-utils.cc.

References octave_fgets(), retval, and string.

std::string octave_fgets ( FILE *  f)

Definition at line 114 of file lo-utils.cc.

Referenced by octave_file_reader::get_input(), and octave_fgetl().

std::string octave_fgets ( FILE *  f,
bool eof 
)

Definition at line 121 of file lo-utils.cc.

References free(), malloc(), retval, string, strlen(), and tmp.

void octave_putenv ( const std::string name,
const std::string value 
)

Definition at line 95 of file lo-utils.cc.

References current_liboctave_error_handler, malloc(), and octave_putenv_wrapper().

Referenced by octave::sys::env::putenv().

template<typename T >
std::complex<T> octave_read_cx_fp_value ( std::istream &  is)

Definition at line 326 of file lo-utils.cc.

References is.

template<typename T >
double octave_read_fp_value ( std::istream &  is)

Definition at line 264 of file lo-utils.cc.

References is, and val.

template<>
OCTAVE_API double octave_read_value ( std::istream &  is)

Definition at line 367 of file lo-utils.cc.

template<>
OCTAVE_API Complex octave_read_value ( std::istream &  is)

Definition at line 372 of file lo-utils.cc.

References is.

template<>
OCTAVE_API float octave_read_value ( std::istream &  is)

Definition at line 377 of file lo-utils.cc.

References is.

template<>
OCTAVE_API FloatComplex octave_read_value ( std::istream &  is)

Definition at line 382 of file lo-utils.cc.

References is.

void octave_write_complex ( std::ostream &  os,
const Complex c 
)

Definition at line 401 of file lo-utils.cc.

References imag(), octave_write_double(), and real().

Referenced by operator<<(), and octave_complex::save_ascii().

void octave_write_double ( std::ostream &  os,
double  d 
)
void octave_write_float ( std::ostream &  os,
float  d 
)
void octave_write_float_complex ( std::ostream &  os,
const FloatComplex c 
)

Definition at line 424 of file lo-utils.cc.

References imag(), octave_write_float(), and real().

Referenced by octave_float_complex::save_ascii().

template<typename T >
T read_inf_nan_na ( std::istream &  is,
char  c0 
)

Definition at line 211 of file lo-utils.cc.

References NA(), and val.

char* strsave ( const char *  s)

Definition at line 78 of file lo-utils.cc.

References strlen(), and tmp.

bool xis_int_or_inf_or_nan ( double  x)
bool xis_int_or_inf_or_nan ( float  x)

Definition at line 66 of file lo-utils.cc.

References octave::math::isnan(), x, and octave::math::x_nint().

bool xis_one_or_zero ( double  x)
bool xis_one_or_zero ( float  x)

Definition at line 69 of file lo-utils.cc.

bool xis_zero ( double  x)
bool xis_zero ( float  x)

Definition at line 72 of file lo-utils.cc.

bool xtoo_large_for_float ( double  x)
bool xtoo_large_for_float ( const Complex x)

Definition at line 60 of file lo-utils.cc.

References xtoo_large_for_float().