pxfopen(3F)

PXFOPEN - Provides a Fortran interface to the open(2) system call

As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.19.

NAME
     PXFOPEN - Provides a Fortran interface to the open(2) system call

SYNOPSIS
     INTEGER ilen, iopenflag, imode, ifildes, ierror
     CHARACTER*n path
     CALL PXFOPEN(path, ilen, iopenflag, imode, ifildes, ierror)

STANDARDS
     IEEE standard interface for FORTRAN 77

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 routine PXFOPEN provides a subset of the functionality of the
     open(2) system call.

     The path argument identifies the file to be opened.  If PXFOPEN
     successfully opens the file, the file descriptor is returned in the
     argument ifildes, and ierror is set to zero.  If the file cannot be
     opened, ierror is set to the error value.

     All arguments must be of default kind unless documented otherwise.  On
     IRIX, the default kind is KIND=4.

     The following is a list of arguments for this routine:

     path      An input character variable or array element containing the
               name of the file to be opened.

     ilen      An input integer variable containing the length of path in
               characters.  If ilen is zero, the trailing blanks are
               removed.

     iopenflag An input integer variable containing the status flags.  See
               the open(2) man page for more detail.  The value for this
               variable may be obtained through the use of PXFCONST(3F) or
               IPXFCONST.  The following values are currently supported for
               iopenflag:

               * O_RDONLY

               * O_WRONLY

               * O_RDWR

               * O_NDELAY

               * O_NONBLOCK

               * O_NOCTTY

               * O_APPEND

               * O_CREAT

               * O_TRUNC

               * O_EXCL

               * O_SYNC

               The integer values may be combined through the use of a
               bitwise inclusive OR function.

     imode     An input integer variable, denoting the file access
               permission.  The value for this variable may be retrieved
               through the use of PXFCONST or IPXFCONST.  The following
               values are currently supported for imode:

               USER      READ permissions bit:  S_IRUSR
                         WRITE permissions bit:  S_IWUSR
                         SEARCH/EXECUTE permissions bit:  S_IXUSR
                         Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXU

               GROUP     READ permissions bit:  S_IRGRP
                         WRITE permissions bit:  S_IWGRP
                         SEARCH/EXECUTE permissions bit:  S_IXGRP
                         Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXG

               OTHER     READ permissions bit:  S_IROTH
                         WRITE permissions bit:  S_IWOTH
                         SEARCH/EXECUTE permissions bit:  S_IXOTH
                         Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXO

               SETID     Set user ID on execution:  S_ISUID
                         Set group ID on execution:  S_ISGID

                         The integer values may be combined through the use
                         of a bitwise inclusive OR function.

     ifildes   An output integer variable.  If the open system call was
               successful, ifildes will be set to the file descriptor.

     ierror    An output integer variable containing the status:

               0         If PXFOPEN was successful (the open(2) succeeded)

               errno     If the open(2) system call failed

               EINVAL    If ilen is less than 0 or ilen is greater than
                         LEN(path)

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

     PXFOPEN does not provide a way to specify the cbits or cblks
     parameters to open(2).

SEE ALSO
     open(2)