GNU Octave
4.0.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 1970 of file syscalls.cc.
Referenced by FWCONTINUE().
#define WNOHANG 0 |
Definition at line 1938 of file syscalls.cc.
Referenced by FWNOHANG(), and octave_child_list::octave_child_list_rep::wait().
#define WUNTRACED 0 |
Definition at line 1954 of file syscalls.cc.
Referenced by FWUNTRACED().
|
static |
Definition at line 1674 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 1647 of file syscalls.cc.
References octave_value_list::empty(), error(), 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 121 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 184 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 1698 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 1714 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 1730 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 1746 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 1762 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 510 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 576 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 669 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 707 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 688 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 1251 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 604 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 631 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 650 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 726 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 760 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 801 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 836 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 1779 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 1795 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 1812 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 1828 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 1845 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 1861 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 1878 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 1894 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 1911 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 1927 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 891 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 295 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 1150 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 1124 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 1098 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 1176 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 1202 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 1072 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 1228 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 1030 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 1286 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 1321 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 1397 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 1980 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 1549 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 1474 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 1623 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 1449 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 1497 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 1575 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 1948 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 1600 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 1522 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 1964 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().