Functions

sysdep.cc File Reference

#include <cfloat>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <sys/types.h>
#include <unistd.h>
#include "cmd-edit.h"
#include "file-ops.h"
#include "lo-mappers.h"
#include "lo-math.h"
#include "mach-info.h"
#include "oct-env.h"
#include "quit.h"
#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "input.h"
#include "oct-obj.h"
#include "ov.h"
#include "pager.h"
#include "parse.h"
#include "sighandlers.h"
#include "sysdep.h"
#include "toplev.h"
#include "utils.h"
#include "file-stat.h"
Include dependency graph for sysdep.cc:

Go to the source code of this file.

Functions

 DEFALIAS (home, clc)
 DEFALIAS (setenv, putenv)
 DEFUN (native_float_format,,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} native_float_format ()\n\ Return the native floating point format as a string\n\ @end deftypefn")
 DEFUN (clc,,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} clc ()\n\ @deftypefnx {Built-in Function} {} home ()\n\ Clear the terminal screen and move the cursor to the upper left corner.\n\ @end deftypefn")
 DEFUN (sleep, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sleep (@var{seconds})\n\ Suspend the execution of the program for the given number of seconds.\n\ @end deftypefn")
 DEFUN (usleep, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} usleep (@var{microseconds})\n\ Suspend the execution of the program for the given number of\n\ microseconds. On systems where it is not possible to sleep for periods\n\ of time less than one second, @code{usleep} will pause the execution for\n\ @code{round (@var{microseconds} / 1e6)} seconds.\n\ @end deftypefn")
 DEFUN (pause, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} pause (@var{seconds})\n\ Suspend the execution of the program. If invoked without any arguments,\n\ Octave waits until you type a character. With a numeric argument, it\n\ pauses for the given number of seconds. For example, the following\n\ statement prints a message and then waits 5 seconds before clearing the\n\ screen.\n\ \n\ @example\n\ @group\n\ fprintf (stderr, \"wait please...\\n\");\n\ pause (5);\n\ clc;\n\ @end group\n\ @end example\n\ @end deftypefn")
 DEFUN (isieee,,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isieee ()\n\ Return true if your computer @emph{claims} to conform to the IEEE standard\n\ for floating point calculations. No actual tests are performed.\n\ @end deftypefn")
 DEFUN (getenv, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} getenv (@var{var})\n\ Return the value of the environment variable @var{var}. For example,\n\ \n\ @example\n\ getenv (\"PATH\")\n\ @end example\n\ \n\ @noindent\n\ returns a string containing the value of your path.\n\ @end deftypefn")
 DEFUN (tilde_expand, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} tilde_expand (@var{string})\n\ Perform tilde expansion on @var{string}. If @var{string} begins with a\n\ tilde character, (@samp{~}), all of the characters preceding the first\n\ slash (or all characters, if there is no slash) are treated as a\n\ possible user name, and the tilde and the following characters up to the\n\ slash are replaced by the home directory of the named user. If the\n\ tilde is followed immediately by a slash, the tilde is replaced by the\n\ home directory of the user running Octave. For example:\n\ \n\ @example\n\ @group\n\ tilde_expand (\"~joeuser/bin\")\n\ @result{} \"/home/joeuser/bin\"\n\ tilde_expand (\"~/bin\")\n\ @result{} \"/home/jwe/bin\"\n\ @end group\n\ @end example\n\ @end deftypefn")
 DEFUN (putenv, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} putenv (@var{var}, @var{value})\n\ @deftypefnx {Built-in Function} {} setenv (@var{var}, @var{value})\n\ Set the value of the environment variable @var{var} to @var{value}.\n\ @end deftypefn")
 DEFUN (kbhit, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} kbhit ()\n\ Read a single keystroke from the keyboard. If called with one\n\ argument, don't wait for a keypress. For example,\n\ \n\ @example\n\ x = kbhit ();\n\ @end example\n\ \n\ @noindent\n\ will set @var{x} to the next character typed at the keyboard as soon as\n\ it is typed.\n\ \n\ @example\n\ x = kbhit (1);\n\ @end example\n\ \n\ @noindent\n\ identical to the above example, but don't wait for a keypress,\n\ returning the empty string if no key is available.\n\ @end deftypefn")
std::string get_P_tmpdir (void)
int octave_kbhit (bool wait)
int octave_pclose (FILE *f)
FILE * octave_popen (const char *command, const char *mode)
void raw_mode (bool on, bool wait)
bool same_file_internal (const std::string &file1, const std::string &file2)
void sysdep_cleanup (void)
void sysdep_init (void)

Function Documentation

DEFALIAS ( home  ,
clc   
)
DEFALIAS ( setenv  ,
putenv   
)
DEFUN ( native_float_format   ) 
DEFUN ( clc   ) 

Definition at line 530 of file sysdep.cc.

References command_editor::clear_screen().

DEFUN ( sleep  ,
args   
)

Definition at line 730 of file sysdep.cc.

References error_state, feval(), octave_sleep(), print_usage(), warning(), and xisnan().

DEFUN ( usleep  ,
args   
)

Definition at line 766 of file sysdep.cc.

References error_state, feval(), NINT(), octave_usleep(), print_usage(), warning(), and xisnan().

DEFUN ( pause  ,
args   
)
DEFUN ( isieee   ) 
DEFUN ( getenv  ,
args   
)

Definition at line 544 of file sysdep.cc.

References error_state, octave_env::getenv(), and print_usage().

DEFUN ( tilde_expand  ,
args   
)
DEFUN ( putenv  ,
args   
)

Definition at line 574 of file sysdep.cc.

References error(), error_state, print_usage(), and octave_env::putenv().

DEFUN ( kbhit  ,
args   
)

Definition at line 619 of file sysdep.cc.

References feval(), forced_interactive, interactive, and octave_kbhit().

std::string get_P_tmpdir ( void   ) 

Definition at line 492 of file sysdep.cc.

References octave_env::getenv().

Referenced by DEFUNX().

int octave_kbhit ( bool  wait  ) 

Definition at line 461 of file sysdep.cc.

References octave_ignore_interrupts(), octave_set_interrupt_handler(), and raw_mode().

Referenced by DEFUN().

int octave_pclose ( FILE *  f  ) 

Definition at line 449 of file sysdep.cc.

Referenced by octave_procbuf::close().

FILE* octave_popen ( const char command,
const char mode 
)

Definition at line 429 of file sysdep.cc.

Referenced by octave_procbuf::open().

void raw_mode ( bool  on,
bool  wait 
)

Definition at line 286 of file sysdep.cc.

References error(), interactive, and warning().

Referenced by do_octave_atexit(), and octave_kbhit().

bool same_file_internal ( const std::string &  file1,
const std::string &  file2 
)

Definition at line 204 of file sysdep.cc.

References base_file_stat::dev(), and base_file_stat::ino().

Referenced by same_file().

void sysdep_cleanup ( void   ) 

Definition at line 268 of file sysdep.cc.

References MINGW_SIGNAL_CLEANUP.

Referenced by do_octave_atexit().

void sysdep_init ( void   ) 

Definition at line 256 of file sysdep.cc.

Referenced by octave_main().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines