PXFGETGRNAM(3F) Last changed: 1-6-98
PXFGETGRNAM - Gets group information using the group name
SUBROUTINE PXFGETGRNAM (name, ilen, jgroup, ierror)
CHARACTER*n name
INTEGER ilen, jgroup, ierror
UNICOS, UNICOS/mk, and IRIX systems
IEEE standard interface for FORTRAN 77
On IRIX systems, this routine is in libfortran.so which is linked by
default when compiling programs with the MIPSpro 7 Fortran 90 compiler
or when compiling programs with the -craylibs option to the MIPSpro
7.2 F77 compiler.
The PXFGETGRNAM routine uses the getgrnam(3C) function to obtain group
information using a group name.
The following are components of the group structure used by
PXFGETGRNAM and created by calling PXFSTRUCTCREATE:
* gr_name: Group name
* gr_gid: Group ID
* gr_nmem: Number of group members contained in gr_mem
* gr_mem: Array of group members' login names
The gr_name component can be accessed by calling PXFSTRGET(3F).
gr_gid and gr_nmem can be accessed by calling PXFINTGET(3F).
PXFESTRGET can be used to access the elements of gr_mem.
When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
kind unless documented otherwise. On UNICOS and UNICOS/mk, default
kind is KIND=8 for integer, real, complex, and logical arguments; on
IRIX, the default kind is KIND=4.
The following is a list of valid arguments for this routine:
name An input character character variable or array element
containing the group name for which group information is
requested.
ilen An input integer variable containing the length of name. If
ilen is zero, trailing blanks are stripped.
jgroup An output handle of type group created with
PXFSTRUCTCREATE(3F).
ierror An output integer variable that contains zero if group
information was retrieved or nonzero if PXFGETGRNAM was not
successful.
The PXFGETGRNAM routine may also return any of the following error
values:
ENOENT If name contains a non-existant group ID.
ENOMEM If memory needed by PXFGETGRNAM could not be allocated.
EINVAL If ilen < 0 or ilen > LEN(name).
EBADHANDLE [Toc] [Back]
If jgroup is an invalid handle or has an incorrect handle
type (UNICOS and UNICOS/mk systems only).
In this example, PXFGETGRNAM is called for information about the group
users.
program pxftest
integer jgroup
integer ierror, igid
CALL PXFGETGRNAM('users',0,jgroup,ierror)
CALL PXFINTGET(jgroup,'gr_gid',igid,ierror)
print *,'group ID for group users is ',igid
end
PXFINTGET(3F), PXFSTRGET(3F)
Application Programmer's Library Reference Manual, publication SR2165,
for the printed version of this man page.
PXFGETGRNAM(3F) Last changed: 1-6-98
PXFGETGRNAM - Gets group information using the group name
SUBROUTINE PXFGETGRNAM (name, ilen, jgroup, ierror)
CHARACTER*n name
INTEGER ilen, jgroup, ierror
UNICOS, UNICOS/mk, and IRIX systems
IEEE standard interface for FORTRAN 77
On IRIX systems, this routine is in libfortran.so which is linked by
default when compiling programs with the MIPSpro 7 Fortran 90 compiler
or when compiling programs with the -craylibs option to the MIPSpro
7.2 F77 compiler.
The PXFGETGRNAM routine uses the getgrnam(3C) function to obtain group
information using a group name.
The following are components of the group structure used by
PXFGETGRNAM and created by calling PXFSTRUCTCREATE:
* gr_name: Group name
* gr_gid: Group ID
* gr_nmem: Number of group members contained in gr_mem
* gr_mem: Array of group members' login names
The gr_name component can be accessed by calling PXFSTRGET(3F).
gr_gid and gr_nmem can be accessed by calling PXFINTGET(3F).
PXFESTRGET can be used to access the elements of gr_mem.
When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
kind unless documented otherwise. On UNICOS and UNICOS/mk, default
kind is KIND=8 for integer, real, complex, and logical arguments; on
IRIX, the default kind is KIND=4.
The following is a list of valid arguments for this routine:
name An input character character variable or array element
containing the group name for which group information is
requested.
ilen An input integer variable containing the length of name. If
ilen is zero, trailing blanks are stripped.
jgroup An output handle of type group created with
PXFSTRUCTCREATE(3F).
ierror An output integer variable that contains zero if group
information was retrieved or nonzero if PXFGETGRNAM was not
successful.
The PXFGETGRNAM routine may also return any of the following error
values:
ENOENT If name contains a non-existant group ID.
ENOMEM If memory needed by PXFGETGRNAM could not be allocated.
EINVAL If ilen < 0 or ilen > LEN(name).
EBADHANDLE [Toc] [Back]
If jgroup is an invalid handle or has an incorrect handle
type (UNICOS and UNICOS/mk systems only).
In this example, PXFGETGRNAM is called for information about the group
users.
program pxftest
integer jgroup
integer ierror, igid
CALL PXFGETGRNAM('users',0,jgroup,ierror)
CALL PXFINTGET(jgroup,'gr_gid',igid,ierror)
print *,'group ID for group users is ',igid
end
PXFINTGET(3F), PXFSTRGET(3F)
Application Programmer's Library Reference Manual, publication SR2165,
for the printed version of this man page.
[ Back ]
|