Fix typo in OUTLINETEXTMETRIC definition.
[wine.git] / include / msdos.h
blob1eb9fd8fff653ebe748264c4f6a66e2ea083e585
1 #ifndef __WINE_MSDOS_H
2 #define __WINE_MSDOS_H
4 #include "winnt.h"
6 struct fcb {
7 BYTE drive;
8 char name[8];
9 char extension[3];
10 BYTE dummy1[4];
11 int filesize;
12 WORD date_write;
13 WORD time_write;
14 struct dosdirent *directory;
15 BYTE dummy2[9];
18 /* DTA layout for FindFirst/FindNext */
19 typedef struct
21 BYTE drive; /* 00 drive letter */
22 char mask[11]; /* 01 search template */
23 BYTE search_attr; /* 0c search attributes */
24 WORD count WINE_PACKED; /* 0d entry count within directory */
25 WORD cluster WINE_PACKED; /* 0f cluster of parent directory */
26 char *unixPath WINE_PACKED; /* 11 unix path (was: reserved) */
27 BYTE fileattr; /* 15 file attributes */
28 WORD filetime; /* 16 file time */
29 WORD filedate; /* 18 file date */
30 DWORD filesize WINE_PACKED; /* 1a file size */
31 char filename[13]; /* 1e file name + extension */
32 } FINDFILE_DTA;
34 /* FCB layout for FindFirstFCB/FindNextFCB */
35 typedef struct
37 BYTE drive; /* 00 drive letter */
38 char filename[11]; /* 01 filename 8+3 format */
39 int count; /* 0c entry count (was: reserved) */
40 char *unixPath; /* 10 unix path (was: reserved) */
41 } FINDFILE_FCB;
43 /* DOS directory entry for FindFirstFCB/FindNextFCB */
44 typedef struct
46 char filename[11]; /* 00 filename 8+3 format */
47 BYTE fileattr; /* 0b file attributes */
48 BYTE reserved[10]; /* 0c reserved */
49 WORD filetime; /* 16 file time */
50 WORD filedate; /* 18 file date */
51 WORD cluster; /* 1a file first cluster */
52 DWORD filesize; /* 1c file size */
53 } DOS_DIRENTRY_LAYOUT;
55 typedef struct
57 DWORD next_dev;
58 WORD attr;
59 WORD strategy;
60 WORD interrupt;
61 char name[8];
62 } DOS_DEVICE_HEADER;
64 typedef struct _DOS_LISTOFLISTS
66 WORD CX_Int21_5e01; /* contents of CX from INT 21/AX=5E01h */
67 WORD LRU_count_FCB_cache;
68 WORD LRU_count_FCB_open;
69 DWORD OEM_func_handler WINE_PACKED; /* OEM function of INT 21/AH=F8h */
70 WORD INT21_offset;/* offset in DOS CS of code to return from INT 21 call */
71 WORD sharing_retry_count;
72 WORD sharing_retry_delay;
73 DWORD ptr_disk_buf; /* ptr to current disk buf */
74 WORD offs_unread_CON; /* pointer in DOS data segment of unread CON input */
75 WORD seg_first_MCB;
76 DWORD ptr_first_DPB;
77 DWORD ptr_first_SysFileTable;
78 DWORD ptr_clock_dev_hdr;
79 DWORD ptr_CON_dev_hdr;
80 WORD max_byte_per_sec; /* maximum bytes per sector of any block device */
81 DWORD ptr_disk_buf_info WINE_PACKED;
82 DWORD ptr_array_CDS WINE_PACKED; /* current directory structure */
83 DWORD ptr_sys_FCB WINE_PACKED;
84 WORD nr_protect_FCB;
85 BYTE nr_block_dev;
86 BYTE nr_avail_drive_letters;
87 DOS_DEVICE_HEADER NUL_dev WINE_PACKED;
88 BYTE nr_drives_JOINed;
89 WORD ptr_spec_prg_names WINE_PACKED;
90 DWORD ptr_SETVER_prg_list WINE_PACKED;
91 WORD DOS_HIGH_A20_func_offs WINE_PACKED;
92 WORD PSP_last_exec WINE_PACKED; /* if DOS in HMA: PSP of program executed last; if DOS low: 0000h */
93 WORD BUFFERS_val WINE_PACKED;
94 WORD BUFFERS_nr_lookahead WINE_PACKED;
95 BYTE boot_drive WINE_PACKED;
96 BYTE flag_DWORD_moves WINE_PACKED; /* 01h for 386+, 00h otherwise */
97 WORD size_extended_mem WINE_PACKED; /* size of extended mem in KB */
98 } DOS_LISTOFLISTS;
100 #define MAX_DOS_DRIVES 26
102 #define setword(a,b) do { *(BYTE*)(a) = (b) & 0xff; \
103 *((BYTE*)((a)+1)) = ((b)>>8) & 0xff;\
104 } while(0)
107 /* dos file attributes */
109 #define FA_NORMAL 0x00 /* Normal file, no attributes */
110 #define FA_RDONLY 0x01 /* Read only attribute */
111 #define FA_HIDDEN 0x02 /* Hidden file */
112 #define FA_SYSTEM 0x04 /* System file */
113 #define FA_LABEL 0x08 /* Volume label */
114 #define FA_DIRECTORY 0x10 /* Directory */
115 #define FA_ARCHIVE 0x20 /* Archive */
116 #define FA_UNUSED 0x40 /* Unused */
118 /* Error codes */
120 #define ER_NoError 0x00
121 #define ER_InvalidFunction 0x01
122 #define ER_FileNotFound 0x02
123 #define ER_PathNotFound 0x03
124 #define ER_TooManyOpenFiles 0x04
125 #define ER_AccessDenied 0x05
126 #define ER_InvalidHandle 0x06
127 #define ER_MCBDestroyed 0x07
128 #define ER_OutOfMemory 0x08
129 #define ER_MCBInvalid 0x09
130 #define ER_EnvironInvalid 0x0a
131 #define ER_FormatInvalid 0x0b
132 #define ER_AccessCodeInvalid 0x0c
133 #define ER_DataInvalid 0x0d
134 #define ER_InvalidDrive 0x0f
135 #define ER_CanNotRemoveCwd 0x10
136 #define ER_NotSameDevice 0x11
137 #define ER_NoMoreFiles 0x12
138 #define ER_WriteProtected 0x13
139 #define ER_UnknownUnit 0x14
140 #define ER_DriveNotReady 0x15
141 #define ER_UnknownCommand 0x16
142 #define ER_CRCError 0x17
143 #define ER_BadRqLength 0x18
144 #define ER_SeekError 0x19
145 #define ER_UnknownMedia 0x1a
146 #define ER_SectorNotFound 0x1b
147 #define ER_OutOfPaper 0x1c
148 #define ER_WriteFault 0x1d
149 #define ER_ReadFault 0x1e
150 #define ER_GeneralFailure 0x1f
151 #define ER_ShareViolation 0x20
152 #define ER_LockViolation 0x21
153 #define ER_DiskFull 0x27
154 #define ER_NoNetwork 0x49
155 #define ER_FileExists 0x50
156 #define ER_CanNotMakeDir 0x52
158 /* Error classes */
160 #define EC_OutOfResource 0x01
161 #define EC_Temporary 0x02
162 #define EC_AccessDenied 0x03
163 #define EC_InternalError 0x04
164 #define EC_HardwareFailure 0x05
165 #define EC_SystemFailure 0x06
166 #define EC_ProgramError 0x07
167 #define EC_NotFound 0x08
168 #define EC_MediaError 0x0b
169 #define EC_Exists 0x0c
170 #define EC_Unknown 0x0d
172 /* Suggested actions */
174 #define SA_Retry 0x01
175 #define SA_DelayedRetry 0x02
176 #define SA_Abort 0x04
177 #define SA_Ignore 0x06
178 #define SA_Ask4Retry 0x07
180 /* Error locus */
182 #define EL_Unknown 0x01
183 #define EL_Disk 0x02
184 #define EL_Network 0x03
185 #define EL_Serial 0x04
186 #define EL_Memory 0x05
188 void WINAPI DOS3Call( CONTEXT86 *context );
190 #define DOSCONF_MEM_HIGH 0x0001
191 #define DOSCONF_MEM_UMB 0x0002
192 #define DOSCONF_NUMLOCK 0x0004
193 #define DOSCONF_KEYB_CONV 0x0008
195 typedef struct {
196 char lastdrive;
197 int brk_flag;
198 int files;
199 int stacks_nr;
200 int stacks_sz;
201 int buf;
202 int buf2;
203 int fcbs;
204 int flags;
205 char *shell;
206 char *country;
207 } DOSCONF;
209 extern DOSCONF DOSCONF_config;
211 #endif /* __WINE_MSDOS_H */