29 #include <sys/types.h>
54 m.
assign (
"gid", static_cast<double> (gr.
gid ()));
65 DEFUN (getgrent, args, ,
67 @deftypefn {Built-in Function} {@var{grp_struct} =} getgrent ()\n\
68 Return an entry from the group database, opening it if necessary.\n\
69 Once the end of data has been reached, @code{getgrent} returns 0.\n\
74 retval(1) = std::string ();
77 int nargin = args.
length ();
92 DEFUN (getgrgid, args, ,
94 @deftypefn {Built-in Function} {@var{grp_struct} =} getgrgid (@var{gid}).\n\
95 Return the first entry from the group database with the group ID\n\
96 @var{gid}. If the group ID does not exist in the database,\n\
97 @code{getgrgid} returns 0.\n\
102 retval(1) = std::string ();
105 int nargin = args.
length ();
109 double dval = args(0).double_value ();
113 if (
D_NINT (dval) == dval)
115 gid_t gid =
static_cast<gid_t
> (dval);
123 error (
"getgrgid: GID must be an integer");
132 DEFUN (getgrnam, args, ,
134 @deftypefn {Built-in Function} {@var{grp_struct} =} getgrnam (@var{name})\n\
135 Return the first entry from the group database with the group name\n\
136 @var{name}. If the group name does not exist in the database,\n\
137 @code{getgrnam} returns 0.\n\
142 retval(1) = std::string ();
145 int nargin = args.
length ();
149 std::string s = args(0).string_value ();
165 DEFUN (setgrent, args, ,
167 @deftypefn {Built-in Function} {} setgrent ()\n\
168 Return the internal pointer to the beginning of the group database.\n\
173 retval(1) = std::string ();
176 int nargin = args.
length ();
191 DEFUN (endgrent, args, ,
193 @deftypefn {Built-in Function} {} endgrent ()\n\
194 Close the group database.\n\
199 retval(1) = std::string ();
202 int nargin = args.
length ();