home *** CD-ROM | disk | FTP | other *** search
- /*
- (c) 1990 S.Hawtin.
- Permission is granted to copy this file provided
- 1) It is not used for commercial gain
- 2) This notice is included in all copies
- 3) Altered copies are marked as such
-
- No liability is accepted for the contents of the file.
-
- open.c within Public Domain UNIX.lib
-
- */
-
- #include <types.h>
- #include <libraries/dos.h>
- #include "unix.h"
-
- extern APTR Open();
-
- APTR
- open(name,mode)
- char *name;
- int mode;
- {/* Open the file */
- long Amode;
- APTR ret;
-
- if(mode & O_CREAT)
- Amode = MODE_NEWFILE;
- else
- Amode = MODE_OLDFILE;
- ret = Open(name,Amode);
- if(ret!=0)
- return(ret);
- else
- return(-1);
- }
-