8 #define WINE_PATH_LENGTH 256
12 char unixpath
[WINE_PATH_LENGTH
];
13 char filename
[WINE_PATH_LENGTH
];
16 char search_attribute
;
19 short entnum
; /* Directory entry number */
20 struct dosdirent
*next
;
31 struct dosdirent
*directory
;
36 #define DOSVERSION 0x1606 /* Major version in low byte: DOS 6.22 */
37 #define WINDOSVER 0x0616 /* Windows reports the DOS version reversed */
38 #define WINVERSION 0x0a03 /* Windows version 3.10 */
40 #define MAX_DOS_DRIVES 26
42 extern WORD ExtendedError
;
43 extern BYTE ErrorClass
, Action
, ErrorLocus
;
44 extern struct DosDeviceStruct COM
[MAX_PORTS
];
45 extern struct DosDeviceStruct LPT
[MAX_PORTS
];
47 #define setword(a,b) do { *(BYTE*)(a) = (b) & 0xff; \
48 *((BYTE*)((a)+1)) = ((b)>>8) & 0xff;\
51 #define setdword(a,b) do { *(BYTE*)(a) = (b) & 0xff; \
52 *((BYTE*)(a)+1) = ((b)>>8) & 0xff; \
53 *((BYTE*)(a)+2) = ((b)>>16) & 0xff; \
54 *((BYTE*)(a)+3) = ((b)>>24) & 0xff; \
57 #define getword(a) ( (WORD)*(BYTE*)(a) + \
58 ((WORD)*((BYTE*)(a) + 1) << 8))
60 #define getdword(a) ( (DWORD)*(BYTE*)(a) + \
61 (DWORD)(*((BYTE*)(a) + 1) << 8) + \
62 (DWORD)(*((BYTE*)(a) + 2) << 16) + \
63 (DWORD)(*((BYTE*)(a) + 3) << 24))
65 /* dos file attributes */
67 #define FA_NORMAL 0x00 /* Normal file, no attributes */
68 #define FA_RDONLY 0x01 /* Read only attribute */
69 #define FA_HIDDEN 0x02 /* Hidden file */
70 #define FA_SYSTEM 0x04 /* System file */
71 #define FA_LABEL 0x08 /* Volume label */
72 #define FA_DIREC 0x10 /* Directory */
73 #define FA_ARCH 0x20 /* Archive */
75 /* extended error codes */
78 #define InvalidFunction 0x01
79 #define FileNotFound 0x02
80 #define PathNotFound 0x03
81 #define AccessDenied 0x05
82 #define InvalidHandle 0x06
83 #define MCBDestroyed 0x07
84 #define OutOfMemory 0x08
85 #define MCBInvalid 0x09
86 #define DataInvalid 0x0d
87 #define InvalidDrive 0x0f
88 #define CanNotRemoveCwd 0x10
89 #define NotSameDevice 0x11
90 #define NoMoreFiles 0x12
91 #define WriteProtected 0x13
92 #define UnknownUnit 0x14
93 #define DriveNotReady 0x15
94 #define UnknownCommand 0x16
96 #define BadRqLength 0x18
97 #define SeekError 0x19
98 #define UnknownMedia 0x1a
99 #define SectorNotFound 0x1b
100 #define OutOfPaper 0x1c
101 #define WriteFault 0x1d
102 #define ReadFault 0x1e
103 #define GeneralFailure 0x1f
104 #define ShareViolation 0x20
105 #define LockViolation 0x21
106 #define DiskFull 0x27
107 #define NoNetwork 0x49
108 #define FileExists 0x50
109 #define CanNotMakeDir 0x52
113 #define EC_Temporary 0x02
114 #define EC_AccessDenied 0x03
115 #define EC_AppError 0x04
116 #define EC_SystemFailure 0x06
117 #define EC_NotFound 0x08
118 #define EC_MediaError 0x0b
119 #define EC_Exists 0x0c
120 #define EC_Unknown 0x0d
122 /* Suggested actions */
124 #define SA_Retry 0x01
125 #define SA_Abort 0x04
126 #define SA_Ignore 0x06
127 #define SA_Ask4Retry 0x07
131 #define EL_Unknown 0x01
133 #define EL_Network 0x03
134 #define EL_Memory 0x05
136 #endif /* __MSDOS_H */