dos_compilers/Microsoft C v203/IOS1.H
2024-06-30 13:40:22 -07:00

53 lines
1.1 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
*
* The following structure is a UNIX file block that retains information about
* a file being accessed via the level 1 I/O functions.
*/
struct UFB
{
char ufbflg; /* flags */
char ufbtyp; /* device type */
#if MSDOS
#if MSDOS2
int ufbfh; /* file handle */
#else
struct FCB ufbfcb; /* file control block */
#endif
#else
struct FAB
{
struct FCB fcb; /* file control block */
char wf; /* buffer write flag */
long fpos; /* file position */
long eof; /* end of file */
long peof; /* previous end of file */
int bn; /* block number */
char b[128]; /* block buffer */
}
ufbfcb;
#endif
};
#define NUFBS 20 /* number of UFBs defined */
/*
*
* UFB.ufbflg definitions
*
*/
#define UFB_OP 0x80 /* file is open */
#define UFB_RA 0x40 /* reading is allowed */
#define UFB_WA 0x20 /* writing is allowed */
#define UFB_NT 0x10 /* access file with no translation */
#define UFB_AP 8 /* append mode flag */
/*
*
* UFB.ufbtyp definitions
*
*/
#define D_DISK 0
#define D_CON 1
#define D_PRN 2
#define D_AUX 3
#define D_NULL 4