home *** CD-ROM | disk | FTP | other *** search
- /*
- * @(#) file.h 2.2 88/05/18
- *
- * Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987.
- * Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987.
- * This Module contains Proprietary Information of
- * The Santa Cruz Operation, Microsoft Corporation
- * and AT&T, and should be treated as Confidential.
- */
-
- /*
- * THIS FILE CONTAINS CODE WHICH IS DESIGNED TO BE
- * PORTABLE BETWEEN DIFFERENT MACHINE ARCHITECTURES
- * AND CONFIGURATIONS. IT SHOULD NOT REQUIRE ANY
- * MODIFICATIONS WHEN ADAPTING XENIX TO NEW HARDWARE.
- */
-
- /*
- * One file structure is allocated for each open/creat/pipe call.
- * Main use is to hold the read/write pointer associated with
- * each open file.
- */
- struct file
- {
- char f_flag;
- char f_res; /* reserved field to word align */
- ushort f_count; /* reference count */
- inodep_t f_inode; /* pointer to inode structure */
- union {
- off_t f_off; /* read/write character pointer */
- filep_t f_slnk; /* next waiter for semaphore */
- } f_un;
- };
-
- #define f_offset f_un.f_off
-
- #if defined(M_I8086) || defined(M_I286)
- extern struct file far file[]; /* The file table itself */
- #else
- extern struct file file[]; /* The file table itself */
- #endif
-
- /* flags */
- #define FOPEN (-1)
- #define FREAD 00001
- #define FWRITE 00002
- #define FNDELAY 00004
- #define FAPPEND 00010
- #ifdef M_I386
- #define FSYNC 00020
- #define OFSYNC 0100 /* for 286 compatibility */
- #else
- #define FSYNC 0100
- #endif
- #define FMASK 00377
-
- /* open only modes */
- #define FCREAT 00400
- #define FTRUNC 01000
- #define FEXCL 02000
-