29 #include <sys/types.h>
54 m.
assign (
"uid", static_cast<double> (pw.
uid ()));
55 m.
assign (
"gid", static_cast<double> (pw.
gid ()));
68 DEFUN (getpwent, args, ,
70 @deftypefn {Built-in Function} {@var{pw_struct} =} getpwent ()\n\
71 Return a structure containing an entry from the password database,\n\
72 opening it if necessary. Once the end of the data has been reached,\n\
73 @code{getpwent} returns 0.\n\
78 retval(1) = std::string ();
81 int nargin = args.
length ();
96 DEFUN (getpwuid, args, ,
98 @deftypefn {Built-in Function} {@var{pw_struct} =} getpwuid (@var{uid}).\n\
99 Return a structure containing the first entry from the password database\n\
100 with the user ID @var{uid}. If the user ID does not exist in the\n\
101 database, @code{getpwuid} returns 0.\n\
106 retval(1) = std::string ();
109 int nargin = args.
length ();
113 double dval = args(0).double_value ();
117 if (
D_NINT (dval) == dval)
119 uid_t uid =
static_cast<uid_t
> (dval);
127 error (
"getpwuid: UID must be an integer");
136 DEFUN (getpwnam, args, ,
138 @deftypefn {Built-in Function} {@var{pw_struct} =} getpwnam (@var{name})\n\
139 Return a structure containing the first entry from the password database\n\
140 with the user name @var{name}. If the user name does not exist in the\n\
141 database, @code{getpwname} returns 0.\n\
146 retval(1) = std::string ();
149 int nargin = args.
length ();
153 std::string s = args(0).string_value ();
169 DEFUN (setpwent, args, ,
171 @deftypefn {Built-in Function} {} setpwent ()\n\
172 Return the internal pointer to the beginning of the password database.\n\
177 retval(1) = std::string ();
180 int nargin = args.
length ();
195 DEFUN (endpwent, args, ,
197 @deftypefn {Built-in Function} {} endpwent ()\n\
198 Close the password database.\n\
203 retval(1) = std::string ();
206 int nargin = args.
length ();