pxfstructcreate(3F)

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

Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.

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)

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

     All arguments must be of default kind unless documented otherwise.  On
     IRIX systems, 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:

               ---------------------------------------------------

               structname

                             Structure
                             name

                                           Header file containing
                                           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.

NOTES
     The PXF_DEFINITIONS module can be used by Fortran 90 users to enable
     caller-callee interface checking.

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