15 char search_attribute
;
18 short entnum
; /* Directory entry number */
29 struct dosdirent
*directory
;
33 #define DOSVERSION 0x0005; /* Major version in low byte: DOS 5.00 */
34 #define MAX_DOS_DRIVES 26
36 extern WORD ExtendedError
;
37 extern struct DosDeviceStruct COM
[MAX_PORTS
];
38 extern struct DosDeviceStruct LPT
[MAX_PORTS
];
40 #define setword(a,b) *(BYTE*)(a) = (b) & 0xff; \
41 *((BYTE*)((a)+1)) = ((b)>>8) & 0xff;
43 #define setdword(a,b) *(BYTE*)(a) = (b) & 0xff; \
44 *((BYTE*)(a)+1) = ((b)>>8) & 0xff; \
45 *((BYTE*)(a)+2) = ((b)>>16) & 0xff; \
46 *((BYTE*)(a)+3) = ((b)>>24) & 0xff;
48 #define getword(a) (WORD) *(BYTE*)(a) + \
49 (*((BYTE*)(a) + 1) << 8)
51 #define getdword(a) (DWORD) (*(BYTE*)(a) + \
52 (*((BYTE*)(a) + 1) << 8) + \
53 (*((BYTE*)(a) + 2) << 16) + \
54 (*((BYTE*)(a) + 3) << 24))
56 /* dos file attributes */
58 #define FA_NORMAL 0x00 /* Normal file, no attributes */
59 #define FA_RDONLY 0x01 /* Read only attribute */
60 #define FA_HIDDEN 0x02 /* Hidden file */
61 #define FA_SYSTEM 0x04 /* System file */
62 #define FA_LABEL 0x08 /* Volume label */
63 #define FA_DIREC 0x10 /* Directory */
64 #define FA_ARCH 0x20 /* Archive */
66 /* extended error codes */
69 #define InvalidFunction 0x01
70 #define FileNotFound 0x02
71 #define PathNotFound 0x03
72 #define AccessDenied 0x05
73 #define InvalidHandle 0x06
74 #define MCBDestroyed 0x07
75 #define OutOfMemory 0x08
76 #define MCBInvalid 0x09
77 #define DataInvalid 0x0d
78 #define InvalidDrive 0x0f
79 #define CanNotRemoveCwd 0x10
80 #define NotSameDevice 0x11
81 #define NoMoreFiles 0x12
82 #define WriteProtected 0x13
83 #define UnknownUnit 0x14
84 #define DriveNotReady 0x15
85 #define UnknownCommand 0x16
87 #define BadRqLength 0x18
88 #define SeekError 0x19
89 #define UnknownMedia 0x1a
90 #define SectorNotFound 0x1b
91 #define OutOfPaper 0x1c
92 #define WriteFault 0x1d
93 #define ReadFault 0x1e
94 #define GeneralFailure 0x1f
95 #define ShareViolation 0x20
96 #define LockViolation 0x21
98 #define NoNetwork 0x49
99 #define FileExists 0x50
100 #define CanNotMakeDir 0x52
104 #define EC_Temporary 0x02
105 #define EC_AccessDenied 0x03
106 #define EC_AppError 0x04
107 #define EC_SystemFailure 0x06
108 #define EC_NotFound 0x08
109 #define EC_MediaError 0x0b
110 #define EC_Exists 0x0c
111 #define EC_Unknown 0x0d
113 /* Suggested actions */
115 #define SA_Retry 0x01
116 #define SA_Abort 0x04
117 #define SA_Ignore 0x06
118 #define SA_Ask4Retry 0x07
122 #define EL_Unknown 0x01
124 #define EL_Network 0x03
125 #define EL_Memory 0x05
127 #endif /* __MSDOS_H */