Release 941210
[wine/multimedia.git] / include / msdos.h
blob31bf3fb1159f2819b368c5a12fc0d28cb03cfce6
1 #ifndef __MSDOS_H
2 #define __MSDOS_H
4 #include <dirent.h>
5 #include <windows.h>
6 #include "comm.h"
8 struct dosdirent {
9 int inuse;
10 DIR *ds;
11 char unixpath[256];
12 char filename[256];
13 char filemask[12];
14 char attribute;
15 char search_attribute;
16 long filesize;
17 long filetime;
20 struct fcb {
21 BYTE drive;
22 char name[8];
23 char extension[3];
24 BYTE dummy1[4];
25 int filesize;
26 WORD date_write;
27 WORD time_write;
28 struct dosdirent *directory;
29 BYTE dummy2[9];
32 #define DOSVERSION 0x0330;
33 #define MAX_DOS_DRIVES 26
35 extern WORD ExtendedError;
36 extern struct DosDeviceStruct COM[MAX_PORTS];
37 extern struct DosDeviceStruct LPT[MAX_PORTS];
39 #define segment(a) ((DWORD)(a) >> 16)
40 #define offset(a) ((DWORD)(a) & 0xffff)
42 #define setword(a,b) *(BYTE*)(a) = (b) & 0xff; \
43 *((BYTE*)((a)+1)) = ((b)>>8) & 0xff;
45 #define setdword(a,b) *(BYTE*)(a) = (b) & 0xff; \
46 *((BYTE*)(a)+1) = ((b)>>8) & 0xff; \
47 *((BYTE*)(a)+2) = ((b)>>16) & 0xff; \
48 *((BYTE*)(a)+3) = ((b)>>24) & 0xff;
50 #define getword(a) (WORD) *(BYTE*)(a) + \
51 (*((BYTE*)(a) + 1) << 8)
53 #define getdword(a) (DWORD) (*(BYTE*)(a) + \
54 (*((BYTE*)(a) + 1) << 8) + \
55 (*((BYTE*)(a) + 2) << 16) + \
56 (*((BYTE*)(a) + 3) << 24))
58 /* dos file attributes */
60 #define FA_NORMAL 0x00 /* Normal file, no attributes */
61 #define FA_RDONLY 0x01 /* Read only attribute */
62 #define FA_HIDDEN 0x02 /* Hidden file */
63 #define FA_SYSTEM 0x04 /* System file */
64 #define FA_LABEL 0x08 /* Volume label */
65 #define FA_DIREC 0x10 /* Directory */
66 #define FA_ARCH 0x20 /* Archive */
68 /* extended error codes */
70 #define NoError 0x00
71 #define InvalidFunction 0x01
72 #define FileNotFound 0x02
73 #define PathNotFound 0x03
74 #define AccessDenied 0x05
75 #define InvalidHandle 0x06
76 #define MCBDestroyed 0x07
77 #define OutOfMemory 0x08
78 #define MCBInvalid 0x09
79 #define DataInvalid 0x0d
80 #define InvalidDrive 0x0f
81 #define CanNotRemoveCwd 0x10
82 #define NotSameDevice 0x11
83 #define NoMoreFiles 0x12
84 #define WriteProtected 0x13
85 #define UnknownUnit 0x14
86 #define DriveNotReady 0x15
87 #define UnknownCommand 0x16
88 #define CRCError 0x17
89 #define BadRqLength 0x18
90 #define SeekError 0x19
91 #define UnknownMedia 0x1a
92 #define SectorNotFound 0x1b
93 #define OutOfPaper 0x1c
94 #define WriteFault 0x1d
95 #define ReadFault 0x1e
96 #define GeneralFailure 0x1f
97 #define ShareViolation 0x20
98 #define LockViolation 0x21
99 #define DiskFull 0x27
100 #define NoNetwork 0x49
101 #define FileExists 0x50
102 #define CanNotMakeDir 0x52
104 /* Error classes */
106 #define EC_Temporary 0x02
107 #define EC_AccessDenied 0x03
108 #define EC_AppError 0x04
109 #define EC_SystemFailure 0x06
110 #define EC_NotFound 0x08
111 #define EC_MediaError 0x0b
112 #define EC_Exists 0x0c
113 #define EC_Unknown 0x0d
115 /* Suggested actions */
117 #define SA_Retry 0x01
118 #define SA_Abort 0x04
119 #define SA_Ignore 0x06
120 #define SA_Ask4Retry 0x07
122 /* Error locus */
124 #define EL_Unknown 0x01
125 #define EL_Disk 0x02
126 #define EL_Network 0x03
127 #define EL_Memory 0x05
129 #endif /* __MSDOS_H */