GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
toplev.cc File Reference
#include <cerrno>
#include <cstdlib>
#include <new>
#include <sstream>
#include <string>
#include "async-system-wrapper.h"
#include "child-list.h"
#include "lo-error.h"
#include "oct-fftw.h"
#include "oct-locbuf.h"
#include "oct-syscalls.h"
#include "signal-wrappers.h"
#include "str-vec.h"
#include "wait-for-input.h"
#include "build-env.h"
#include "liboctinterp-build-info.h"
#include "call-stack.h"
#include "defaults.h"
#include "defun.h"
#include "error.h"
#include "file-io.h"
#include "help.h"
#include "interpreter-private.h"
#include "octave.h"
#include "oct-map.h"
#include "ovl.h"
#include "ov.h"
#include "pager.h"
#include "procstream.h"
#include "sysdep.h"
#include "unwind-prot.h"
#include "utils.h"
#include "version.h"
Include dependency graph for toplev.cc:

Go to the source code of this file.

Macros

#define SHELL_PATH   "/bin/sh"
 

Enumerations

enum  system_exec_type { et_sync, et_async }
 

Functions

 disp (text)
 
OCTAVE_EXPORT octave_value_list Fsystem (const octave_value_list &args, int nargout) ar
 
OCTAVE_EXPORT octave_value_list Fwarranty (const octave_value_list &, int)
 
static void * get_signal_mask (void)
 
 printf ("%s\, nthargout(2, "system", "cmd"))
 
static void restore_signal_mask (void *mask)
 
static octave_value_list run_command_and_return_output (const std::string &cmd_str)
 

Variables

nd example oindent will set the variable ar {output} to the string amp{foo}
 
nd group nd example The ode {system} function can return two values. The first is the exit status of the command and the second is any output from the command that was written to the standard output stream. For example
 
more on
 
 text = system ("cmd")
 
nd group nd example The xample [status, output] = system ("echo foo & exit 2")
 

Macro Definition Documentation

◆ SHELL_PATH

#define SHELL_PATH   "/bin/sh"

Definition at line 70 of file toplev.cc.

Enumeration Type Documentation

◆ system_exec_type

Enumerator
et_sync 
et_async 

Definition at line 175 of file toplev.cc.

Function Documentation

◆ disp()

disp ( text  )

◆ Fsystem()

OCTAVE_EXPORT octave_value_list Fsystem ( const octave_value_list args,
int  nargout 
)

Definition at line 236 of file toplev.cc.

Referenced by F__open_with_system_app__().

◆ Fwarranty()

OCTAVE_EXPORT octave_value_list Fwarranty ( const octave_value_list ,
int   
)

Definition at line 77 of file toplev.cc.

References octave_name_version_and_copyright(), octave_stdout, and ovl().

◆ get_signal_mask()

static void* get_signal_mask ( void  )
static

Definition at line 156 of file toplev.cc.

References octave_alloc_signal_mask(), and octave_get_signal_mask().

◆ printf()

printf ( "%s\  ,
nthargout(2, "system", "cmd")   
)

◆ restore_signal_mask()

static void restore_signal_mask ( void *  mask)
static

Definition at line 168 of file toplev.cc.

References octave_free_signal_mask(), and octave_set_signal_mask().

◆ run_command_and_return_output()

Variable Documentation

◆ ar

nd example oindent will set the variable and the variable ar {output} to the string amp{foo}

Definition at line 236 of file toplev.cc.

◆ ode

nd group nd example The ode {system} function can return two values. The first is the exit status of the command and the second is any output from the command that was written to the standard output stream. For example

Definition at line 236 of file toplev.cc.

◆ on

◆ text

text = system ("cmd")

Definition at line 236 of file toplev.cc.

◆ xample

nd group nd example The xample[status, output] = system ("echo foo & exit 2")

Definition at line 236 of file toplev.cc.