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