23 #if defined (HAVE_CONFIG_H) 29 #include <sys/types.h> 54 m.
assign (
"uid", static_cast<double> (pw.
uid ()));
55 m.
assign (
"gid", static_cast<double> (pw.
gid ()));
66 DEFUN (getpwent, args, ,
76 if (args.length () != 0)
87 DEFUN (getpwuid, args, ,
97 if (args.length () != 1)
100 double dval = args(0).double_value ();
103 error (
"getpwuid: UID must be an integer");
105 uid_t uid =
static_cast<uid_t
> (dval);
115 DEFUN (getpwnam, args, ,
125 if (args.length () != 1)
138 DEFUN (setpwent, args, ,
145 if (args.length () != 0)
153 return ovl (static_cast<double> (status), msg);
156 DEFUN (endpwent, args, ,
163 if (args.length () != 0)
171 return ovl (static_cast<double> (status), msg);
static password getpwnam(const std::string &nm)
std::string dir(void) const
OCTINTERP_API void print_usage(void)
std::string gecos(void) const
identity matrix If supplied two scalar respectively For allows like xample val
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
static password getpwuid(uid_t uid)
void error(const char *fmt,...)
static password getpwent(void)
static int setpwent(void)
static octave_value mk_pw_map(const octave::sys::password &pw)
static int endpwent(void)
std::string name(void) const
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
std::string passwd(void) const
void assign(const std::string &k, const octave_value &val)
std::string shell(void) const
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string