2.9BSD/usr/man/cat3/open.3f


OPEN(3F)            UNIX Programmer's Manual             OPEN(3F)

NAME
     open - open a file

SYNTAX
     integer fileid, open
     character*(L) filnam, mode
     fileid = open(filnam, mode)

DESCRIPTION
     _O_p_e_n opens the file named by _f_i_l_e_n_a_m and returns an integer
     (_f_i_l_e_i_d) to be used to identify it in subsequent operations.

     _M_o_d_e is a character string having one of the following
     values:

     "r"  open for reading

     "w"  create for writing

     "a"  append: open for writing at end of file, or create for
          writing

SEE ALSO
     close(3F), create(3F)

DIAGNOSTICS
     _o_p_e_n returns the value -1 if _f_i_l_e_n_a_m_e cannot be accessed or
     too many files are already open.

BUGS
     The declared length of _f_i_l_n_a_m must be greater (by at least
     one character) than its contents.

AUTHOR
     Bruce Julian, U.S. Geological Survey, Menlo Park, California

Printed 5/17/83                                                 1