pxfopen(3F)

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

As shipped in IRIX 6.5. First release of IRIX 6.5.

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)

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

STANDARDS
     IEEE standard interface for FORTRAN 77

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

     When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk, or IRIX, 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 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_RAW*

               * O_LDRAW*

               * O_NDELAY

               * O_NONBLOCK

               * O_NOCTTY

               * O_BIG*

               * O_APPEND

               * O_CREAT

               * O_TRUNC

               * O_EXCL

               * O_PLACE*

               * O_RESTART*

               * O_SSD*

               * O_SYNC

               * O_WELLFORMED*

               * = UNICOS and UNICOS/mk systems only.

               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
     PXFOPEN does not provide a way to specify the cbits or cblks
     parameters to open(2).

SEE ALSO
     open(2)

     Application Programmer's Library Reference Manual, publication SR-
     2165, for the printed version of this man page.