Mercurial > libdvdnav.hg
comparison vm/vm.c @ 394:0ac6f0d242bc src
OS/2 support by KO Myung-Hun, komh chollian net
author | diego |
---|---|
date | Thu, 09 Oct 2008 22:20:36 +0000 |
parents | 0a5a6f03b029 |
children | 9c5aef10d165 |
comparison
equal
deleted
inserted
replaced
393:bba82ef5d75a | 394:0ac6f0d242bc |
---|---|
50 | 50 |
51 #ifdef _MSC_VER | 51 #ifdef _MSC_VER |
52 #include <io.h> /* read() */ | 52 #include <io.h> /* read() */ |
53 #endif /* _MSC_VER */ | 53 #endif /* _MSC_VER */ |
54 | 54 |
55 #ifdef __OS2__ | |
56 #define INCL_DOS | |
57 #include <os2.h> | |
58 #endif | |
59 | |
55 /* | 60 /* |
56 #define STRICT | 61 #define STRICT |
57 */ | 62 */ |
58 | 63 |
59 /* Local prototypes */ | 64 /* Local prototypes */ |
126 (vm->state).cellN, | 131 (vm->state).cellN, |
127 (vm->state).blockN, | 132 (vm->state).blockN, |
128 (vm->state).VTS_TTN_REG, | 133 (vm->state).VTS_TTN_REG, |
129 (vm->state).TTN_REG, | 134 (vm->state).TTN_REG, |
130 (vm->state).TT_PGCN_REG); | 135 (vm->state).TT_PGCN_REG); |
136 } | |
137 #endif | |
138 | |
139 #ifdef __OS2__ | |
140 #define open os2_open | |
141 | |
142 static int os2_open(const char *name, int oflag) | |
143 { | |
144 HFILE hfile; | |
145 ULONG ulAction; | |
146 ULONG rc; | |
147 | |
148 rc = DosOpen( name, &hfile, &ulAction, 0, FILE_NORMAL, | |
149 OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW, | |
150 OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE | OPEN_FLAGS_DASD, | |
151 NULL ); | |
152 | |
153 if( rc ) | |
154 return -1; | |
155 | |
156 return ( int )hfile; | |
131 } | 157 } |
132 #endif | 158 #endif |
133 | 159 |
134 static void dvd_read_name(char *name, const char *device) { | 160 static void dvd_read_name(char *name, const char *device) { |
135 /* Because we are compiling with _FILE_OFFSET_BITS=64 | 161 /* Because we are compiling with _FILE_OFFSET_BITS=64 |