Release 940201
[wine.git] / include / int21.h
blobf44c9a433facb7528ff18770261c9650a8009ac4
1 #ifndef INT21_H
2 #define INT21_H
3 #include <dirent.h>
5 struct dosdirent {
6 int inuse;
7 DIR *ds;
8 char unixpath[256];
9 char filename[256];
10 char attribute;
11 long filesize;
12 long filetime;
13 long filedate;
16 struct diskinfo {
17 unsigned int infolevel;
18 unsigned long serialnumber;
19 char label[11];
20 char fstype[8];
23 #define DosVersion 0x0303;
25 #define SectorSize 0x200;
26 #define SectorsPerCluster 0x04;
28 #define EAX context->sc_eax
29 #define EBX context->sc_ebx
30 #define ECX context->sc_ecx
31 #define EDX context->sc_edx
33 #define AX (context->sc_eax & 0x0000ffffL)
34 #define BX (context->sc_ebx & 0x0000ffffL)
35 #define CX (context->sc_ecx & 0x0000ffffL)
36 #define DX (context->sc_edx & 0x0000ffffL)
38 #define ES context->sc_es
39 #define DS context->sc_ds
40 #define DI context->sc_edi
41 #define SI context->sc_esi
43 #define pointer(a,b) (((unsigned int) a << 16) | b)
44 #define segment(a) (a >> 16)
45 #define offset(a) (a & 0xffff)
47 #define SetCflag (context->sc_efl |= 0x00000001L)
48 #define ResetCflag (context->sc_efl &= 0xfffffffeL)
50 /* extended error codes */
52 #define NoError 0x00
53 #define InvalidFunction 0x01
54 #define FileNotFound 0x02
55 #define PathNotFound 0x03
56 #define AccessDenied 0x05
57 #define InvalidHandle 0x06
58 #define MCBDestroyed 0x07
59 #define OutOfMemory 0x08
60 #define MCBInvalid 0x09
61 #define DataInvalid 0x0d
62 #define InvalidDrive 0x0f
63 #define CanNotRemoveCwd 0x10
64 #define NotSameDevice 0x11
65 #define NoMoreFiles 0x12
66 #define WriteProtected 0x13
67 #define UnknownUnit 0x14
68 #define DriveNotReady 0x15
69 #define UnknownCommand 0x16
70 #define CRCError 0x17
71 #define BadRqLength 0x18
72 #define SeekError 0x19
73 #define UnknownMedia 0x1a
74 #define SectorNotFound 0x1b
75 #define OutOfPaper 0x1c
76 #define WriteFault 0x1d
77 #define ReadFault 0x1e
78 #define GeneralFailure 0x1f
79 #define ShareViolation 0x20
80 #define LockViolation 0x21
81 #define DiskFull 0x27
82 #define NoNetwork 0x49
83 #define FileExists 0x50
84 #define CanNotMakeDir 0x52
86 /* Error classes */
88 #define EC_Temporary 0x02
89 #define EC_AccessDenied 0x03
90 #define EC_AppError 0x04
91 #define EC_SystemFailure 0x06
92 #define EC_NotFound 0x08
93 #define EC_MediaError 0x0b
94 #define EC_Exists 0x0c
95 #define EC_Unknown 0x0d
97 /* Suggested actions */
99 #define SA_Retry 0x01
100 #define SA_Abort 0x04
101 #define SA_Ignore 0x06
102 #define SA_Ask4Retry 0x07
104 /* Error locus */
106 #define EL_Unknown 0x01
107 #define EL_Disk 0x02
108 #define EL_Network 0x03
109 #define EL_Memory 0x05
111 #endif /* INT21_H */