Mercurial > sdl-ios-xcode
comparison src/cdrom/aix/SDL_syscdrom.c @ 2669:e27bdcc80744 gsoc2008_nds
First commit. Added header configs for DS as well as a Makefile. Initial work on framebuffer video driver, currently not functioning as desired.
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Tue, 10 Jun 2008 06:45:39 +0000 |
parents | c121d94672cb |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2668:bb3241de289e | 2669:e27bdcc80744 |
---|---|
179 #ifdef DEBUG_CDROM | 179 #ifdef DEBUG_CDROM |
180 fprintf(stderr, "Error reading vmount structures\n"); | 180 fprintf(stderr, "Error reading vmount structures\n"); |
181 #endif | 181 #endif |
182 return; | 182 return; |
183 } | 183 } |
184 } | 184 } while (ret == 0); |
185 while (ret == 0); | |
186 | 185 |
187 #ifdef DEBUG_CDROM | 186 #ifdef DEBUG_CDROM |
188 fprintf(stderr, "Read %d vmount structures\n", ret); | 187 fprintf(stderr, "Read %d vmount structures\n", ret); |
189 #endif | 188 #endif |
190 ptr = (struct vmount *) buffer; | 189 ptr = (struct vmount *) buffer; |
209 default: | 208 default: |
210 break; | 209 break; |
211 } | 210 } |
212 ptr = (struct vmount *) ((char *) ptr + ptr->vmt_length); | 211 ptr = (struct vmount *) ((char *) ptr + ptr->vmt_length); |
213 ret--; | 212 ret--; |
214 } | 213 } while (ret > 0); |
215 while (ret > 0); | |
216 | 214 |
217 free(buffer); | 215 free(buffer); |
218 } | 216 } |
219 | 217 |
220 static int | 218 static int |
245 AddDrive(entry.fs_spec, &stbuf); | 243 AddDrive(entry.fs_spec, &stbuf); |
246 } | 244 } |
247 } | 245 } |
248 } | 246 } |
249 } | 247 } |
250 } | 248 } while (ret == 0); |
251 while (ret == 0); | |
252 ret = endfsent_r(&fsFile); | 249 ret = endfsent_r(&fsFile); |
253 if (ret != 0) | 250 if (ret != 0) |
254 return -1; | 251 return -1; |
255 return 0; | 252 return 0; |
256 #else | 253 #else |
273 AddDrive(entry->fs_spec, &stbuf); | 270 AddDrive(entry->fs_spec, &stbuf); |
274 } | 271 } |
275 } | 272 } |
276 } | 273 } |
277 } | 274 } |
278 } | 275 } while (entry != NULL); |
279 while (entry != NULL); | |
280 endfsent(); | 276 endfsent(); |
281 #endif | 277 #endif |
282 } | 278 } |
283 | 279 |
284 int | 280 int |
324 if (delim) { | 320 if (delim) { |
325 SDLcdrom = delim; | 321 SDLcdrom = delim; |
326 } else { | 322 } else { |
327 SDLcdrom = NULL; | 323 SDLcdrom = NULL; |
328 } | 324 } |
329 } | 325 } while (SDLcdrom); |
330 while (SDLcdrom); | |
331 SDL_stack_free(cdpath); | 326 SDL_stack_free(cdpath); |
332 } | 327 } |
333 | 328 |
334 /* If we found our drives, there's nothing left to do */ | 329 /* If we found our drives, there's nothing left to do */ |
335 if (SDL_numcds > 0) { | 330 if (SDL_numcds > 0) { |