pxfstructcreate(3F)

PXFSTRUCTCREATE - Creates an instance of the desired structure and returns a nonzero handle in the argument jhandle

As shipped in IRIX 6.5.5. Last changed in IRIX 6.5.5.

NAME
     PXFSTRUCTCREATE - Creates an instance of the desired structure and
     returns a nonzero handle in the argument jhandle

SYNOPSIS
     INTEGER jhandle, ierror
     CHARACTER*n structname
     CALL PXFSTRUCTCREATE (structname, jhandle, ierror)

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

DESCRIPTION
     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
     F77 compiler.

     The PXFSTRUCTCREATE() routine creates an instance of the desired
     structure and returns a nonzero handle in the argument jhandle.  All
     further references to this instance of the structure are through this
     handle.  The initial values of components within the new instance of
     the structure are undefined.

     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 are arguments for PXFSTRUCTCREATE:

     structname
               An input character variable.  structname specifies which
               type of structure should be created.  Values for structname
               that are currently recognized are shown in the following
               table.  structname must be in lowercase letters; trailing
               blanks are ignored.

               Values for structname:

               ---------------------------------------------------
                             Structure     Header file containing
               structname    name          definition
               ---------------------------------------------------
               FLOCK         flock        <fcntl.h>
               UTIMBUF       utimbuf      <utime.h>
               UTSNAME       utsname      <sys/utsname.h>
               STAT          stat         <stat.h>
               TMS           tms          <sys/times.h>
               GROUP         group        <grp.h>
               PASSWD        passwd       <pwd.h>
               ---------------------------------------------------

     jhandle   An output integer variable.  The structure handle is
               returned in jhandle.

     ierror    An output integer variable.

EXIT STATUS
     Upon successful completion of PXFSTRUCTCREATE, the argument ierror is
     set to 0.  If any of the following conditions occur, PXFSTRUCTCREATE
     sets the argument to the corresponding value:

     ENONAME        Component name is not defined for this structure

     ENOHANDLE      Instance of the structure could not be created

EXAMPLES
                program test
                integer junam, ierr, ilen
                character*15 sname
          *  Create STRUCTURE to be used by uname()
                call pxfstructcreate('utsname',junam,ierr)
                if (ierr.ne.0) then
                   print *,'FAIL: error from pxfstructcreate = ',ierr
                endif
          *  Fill STRUCTURE through uname()
                call pxfuname(junam,ierr)
                if (ierr.ne.0) then
                   print *,'FAIL: error from pxfuname = ',ierr
                endif
                ilen = 0
          *  Retrieve component sysname from STRUCTURE
                call pxfstrget(junam,'sysname',sname,ilen,ierr)
                print *, 'sysname=',sname
          *  Free STRUCTURE
                call pxfstructfree(junam,ierr)
                if (ierr.ne.0) then
                   print *,'FAIL: error from pxfstructfree = ',ierr
                endif
                end

SEE ALSO
     Application Programmer's Library Reference Manual for the printed
     version of this man page.