GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <cstdio>
#include <cstring>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include "cmd-hist.h"
#include "file-ops.h"
#include "file-stat.h"
#include "oct-env.h"
#include "oct-syscalls.h"
#include "oct-uname.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "lo-utils.h"
#include "oct-hist.h"
#include "oct-map.h"
#include "oct-obj.h"
#include "oct-stdstrm.h"
#include "oct-stream.h"
#include "sysdep.h"
#include "utils.h"
#include "variables.h"
#include "input.h"
Go to the source code of this file.
Macros | |
#define | WCONTINUE 0 |
#define | WNOHANG 0 |
#define | WUNTRACED 0 |
#define WCONTINUE 0 |
Definition at line 1947 of file syscalls.cc.
Referenced by FWCONTINUE().
#define WNOHANG 0 |
Definition at line 1914 of file syscalls.cc.
Referenced by FWNOHANG(), and octave_child_list::octave_child_list_rep::wait().
#define WUNTRACED 0 |
Definition at line 1930 of file syscalls.cc.
Referenced by FWUNTRACED().
|
static |
Definition at line 1647 of file syscalls.cc.
References octave_value_list::length(), and print_usage().
Referenced by FF_DUPFD(), FF_GETFD(), FF_GETFL(), FF_SETFD(), FF_SETFL(), FO_APPEND(), FO_ASYNC(), FO_CREAT(), FO_EXCL(), FO_NONBLOCK(), FO_RDONLY(), FO_RDWR(), FO_SYNC(), FO_TRUNC(), FO_WRONLY(), FWCONTINUE(), FWNOHANG(), and FWUNTRACED().
OCTAVE_EXPORT octave_value_list Fcanonicalize_file_name | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1619 of file syscalls.cc.
References octave_value_list::empty(), error(), error_state, octave_canonicalize_file_name(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fdup2 | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 120 of file syscalls.cc.
References octave_syscalls::dup2(), error(), error_state, octave_stream::file_number(), octave_value_list::length(), octave_stream_list::lookup(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fexec | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 181 of file syscalls.cc.
References command_history::clean_up_and_save(), error(), error_state, octave_syscalls::execvp(), command_history::ignoring_entries(), octave_value_list::length(), Array< T >::length(), octave_history_write_timestamp(), print_usage(), and string_vector::resize().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FF_DUPFD | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1671 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FF_GETFD | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1687 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FF_GETFL | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1703 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FF_SETFD | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1719 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FF_SETFL | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1735 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Ffcntl | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 503 of file syscalls.cc.
References arg(), error(), error_state, octave_stream::file_number(), octave_value_list::length(), octave_stream_list::lookup(), octave_fcntl(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Ffork | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 569 of file syscalls.cc.
References octave_syscalls::fork(), octave_value_list::length(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fgetegid | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 659 of file syscalls.cc.
References octave_syscalls::getegid(), octave_value::length(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fgeteuid | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 695 of file syscalls.cc.
References octave_syscalls::geteuid(), octave_value::length(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fgetgid | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 677 of file syscalls.cc.
References octave_syscalls::getgid(), octave_value::length(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fgethostname | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1234 of file syscalls.cc.
References octave_env::get_host_name(), and print_usage().
OCTAVE_EXPORT octave_value_list Fgetpgrp | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 597 of file syscalls.cc.
References octave_syscalls::getpgrp(), octave_value_list::length(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fgetpid | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 623 of file syscalls.cc.
References octave_syscalls::getpid(), octave_value::length(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fgetppid | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 641 of file syscalls.cc.
References octave_syscalls::getppid(), octave_value::length(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fgetuid | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 713 of file syscalls.cc.
References octave_syscalls::getuid(), octave_value::length(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fkill | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 747 of file syscalls.cc.
References error_state, octave_syscalls::kill(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Flstat | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 788 of file syscalls.cc.
References error_state, mk_stat_result(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fmkfifo | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 819 of file syscalls.cc.
References error(), error_state, octave_value_list::length(), octave_mkfifo(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_APPEND | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1752 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_ASYNC | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1768 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_CREAT | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1785 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_EXCL | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1801 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_NONBLOCK | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1818 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_RDONLY | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1835 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_RDWR | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1852 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_SYNC | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1869 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_TRUNC | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1886 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FO_WRONLY | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1903 of file syscalls.cc.
References const_value(), error(), and octave_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fpipe | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 874 of file syscalls.cc.
References octave_stdiostream::create(), octave_stream_list::insert(), octave_value_list::length(), octave_syscalls::pipe(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fpopen2 | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 290 of file syscalls.cc.
References octave_stdiostream::create(), error(), error_state, octave_stream_list::insert(), interactive, Array< T >::length(), octave_syscalls::popen2(), print_usage(), and string_vector::resize().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FS_ISBLK | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1133 of file syscalls.cc.
References octave_value::double_value(), error(), error_state, base_file_stat::is_blk(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FS_ISCHR | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1107 of file syscalls.cc.
References octave_value::double_value(), error(), error_state, base_file_stat::is_chr(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FS_ISDIR | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1081 of file syscalls.cc.
References octave_value::double_value(), error(), error_state, base_file_stat::is_dir(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FS_ISFIFO | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1159 of file syscalls.cc.
References octave_value::double_value(), error(), error_state, base_file_stat::is_fifo(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FS_ISLNK | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1185 of file syscalls.cc.
References octave_value::double_value(), error(), error_state, base_file_stat::is_lnk(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FS_ISREG | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1055 of file syscalls.cc.
References octave_value::double_value(), error(), error_state, base_file_stat::is_reg(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FS_ISSOCK | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1211 of file syscalls.cc.
References octave_value::double_value(), error(), error_state, base_file_stat::is_sock(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fstat | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1013 of file syscalls.cc.
References error_state, octave_stream_list::get_file_number(), mk_stat_result(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Funame | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1267 of file syscalls.cc.
References octave_scalar_map::assign(), octave_uname::error(), octave_uname::machine(), octave_uname::message(), octave_uname::nodename(), print_usage(), octave_uname::release(), octave_uname::sysname(), and octave_uname::version().
OCTAVE_EXPORT octave_value_list Funlink | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1301 of file syscalls.cc.
References error(), octave_value_list::length(), octave_unlink(), and print_usage().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list Fwaitpid | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1375 of file syscalls.cc.
References error(), error_state, octave_value_list::length(), print_usage(), and octave_syscalls::waitpid().
Referenced by install_syscalls_fcns(), and gnuplot_graphics_toolkit::send_quit().
OCTAVE_EXPORT octave_value_list FWCONTINUE | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1958 of file syscalls.cc.
References const_value(), and WCONTINUE.
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWCOREDUMP | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1524 of file syscalls.cc.
References octave_wait::coredump(), error(), error_state, and octave_value::int_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWEXITSTATUS | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1451 of file syscalls.cc.
References error(), error_state, octave_wait::exitstatus(), and octave_value::int_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWIFCONTINUED | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1596 of file syscalls.cc.
References error(), error_state, octave_wait::ifcontinued(), and octave_value::int_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWIFEXITED | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1427 of file syscalls.cc.
References error(), error_state, octave_wait::ifexited(), and octave_value::int_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWIFSIGNALED | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1474 of file syscalls.cc.
References error(), error_state, octave_wait::ifsignaled(), and octave_value::int_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWIFSTOPPED | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1549 of file syscalls.cc.
References error(), error_state, octave_wait::ifstopped(), and octave_value::int_value().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWNOHANG | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1924 of file syscalls.cc.
References const_value(), and WNOHANG.
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWSTOPSIG | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1573 of file syscalls.cc.
References error(), error_state, octave_value::int_value(), and octave_wait::stopsig().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWTERMSIG | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1498 of file syscalls.cc.
References error(), error_state, octave_value::int_value(), and octave_wait::termsig().
Referenced by install_syscalls_fcns().
OCTAVE_EXPORT octave_value_list FWUNTRACED | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1941 of file syscalls.cc.
References const_value(), and WUNTRACED.
Referenced by install_syscalls_fcns().
|
static |
Definition at line 63 of file syscalls.cc.
References octave_scalar_map::assign(), base_file_stat::atime(), base_file_stat::blksize(), base_file_stat::blocks(), base_file_stat::ctime(), base_file_stat::dev(), base_file_stat::gid(), base_file_stat::ino(), base_file_stat::mode(), base_file_stat::mode_as_string(), base_file_stat::mtime(), base_file_stat::nlink(), base_file_stat::rdev(), base_file_stat::size(), and base_file_stat::uid().
Referenced by mk_stat_result().
|
static |
Definition at line 92 of file syscalls.cc.
References base_file_stat::error(), mk_stat_map(), and octave_value().