2 /* types.h - basic types
6 #define MAXPATHLEN 80 /* JOIN.C */
7 #define MAXARG 80 /* ERRTST.C */
8 #define CURDISK 0x19 /* ERRTST.C */
9 #define GETVERS 0x30 /* MAIN.C */
10 #define GETVARS 0x52 /* SYSVAR.C */
11 #define IOCTL9 0x4409 /* ERRTST.C */
12 #define SwitChr '/' /* JOIN.C & SUBST.C */
13 #define PathChr '\\' /* SUBST.C */
14 #define COLON ':' /* ERRTST.C */
15 #define BACKSLASH '\\' /* ERRTST.C */
16 #define ASCNULL '\0' /* ERRTST.C */
19 #define IBMSPACE(c) ((c)==','||(c)==';'||(c)=='='||(c)==0x08||(c)==0x0a)
20 #define IBMBREAK(c) ((c) == '/' || CMDSPACE((c)))
21 #define CMDBREAK(c) IBMBREAK((c))
22 #define CMDSPACE(c) (isspace((c)) || IBMSPACE((c)))
24 #define SHIFT(c,v) {c--; v++;}
26 /* The following structure is a UNIX file block that retains information
27 * about a file being accessed via the level 1 I/O functions.
32 char ufbflg ; /* flags */
33 char ufbtyp ; /* device type */
34 int ufbfh ; /* file handle */
37 #define NUFBS 20 /* number of UFBs defined */
39 /* UFB.ufbflg definitions */
41 #define UFB_OP 0x80 /* file is open */
42 #define UFB_RA 0x40 /* reading is allowed */
43 #define UFB_WA 0x20 /* writing is allowed */
44 #define UFB_NT 0x10 /* access file with no translation */
45 #define UFB_AP 8 /* append mode flag */
47 /* UFB.ufbtyp definitions */
58 #define SETFLAG(l,f) ((l) |= (f))
59 #define TESTFLAG(v,f) (((v)&(f))!=0)
60 #define RSETFLAG(l,f) ((l) &= ~(f))
62 #define LOW(w) ((w)&0xFF)
63 #define HIGH(w) LOW((w)>>8)
64 #define WORD(h,l) ((LOW((h))<<8)|LOW((l)))
66 /* buffer description for findfirst and findnext */
69 char reserved[21]; /* reserved for start up */
70 char attr; /* attribute found */
71 unsigned int time; /* time of last modify */
72 unsigned int date; /* date of last modify */
73 long length; /* file size */
74 char name[13]; /* asciz file name */
78 #define A_RO 1 /* read only */
79 #define A_H 2 /* hidden */
80 #define A_S 4 /* system */
81 #define A_V 8 /* volume id */
82 #define A_D 16 /* directory */
83 #define A_A 32 /* archive */
85 #define A_MOD (A_RO+A_H+A_S+A_A) /* changeable attributes */
87 #define HASATTR(a,v) TESTFLAG(a,v) /* true if a has attribute v */