Mercurial > sdl-ios-xcode
comparison src/video/fbcon/SDL_fbvideo.c @ 1338:604d73db6802
Removed uses of stdlib.h and string.h
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 09:29:18 +0000 |
parents | 3692456e7b0f |
children | d02b552e5304 |
comparison
equal
deleted
inserted
replaced
1337:c687f06c7473 | 1338:604d73db6802 |
---|---|
21 */ | 21 */ |
22 | 22 |
23 /* Framebuffer console based SDL video driver implementation. | 23 /* Framebuffer console based SDL video driver implementation. |
24 */ | 24 */ |
25 | 25 |
26 #include <stdlib.h> | |
27 #include <stdio.h> | 26 #include <stdio.h> |
28 #include <string.h> | |
29 #include <fcntl.h> | 27 #include <fcntl.h> |
30 #include <unistd.h> | 28 #include <unistd.h> |
31 #include <sys/ioctl.h> | 29 #include <sys/ioctl.h> |
32 #include <sys/mman.h> | 30 #include <sys/mman.h> |
33 #include <asm/page.h> /* For definition of PAGE_SIZE */ | 31 #include <asm/page.h> /* For definition of PAGE_SIZE */ |
32 #include <sys/io.h> /* For ioperm() */ | |
34 | 33 |
35 #include "SDL.h" | 34 #include "SDL.h" |
35 #include "SDL_stdlib.h" | |
36 #include "SDL_string.h" | |
36 #include "SDL_error.h" | 37 #include "SDL_error.h" |
37 #include "SDL_video.h" | 38 #include "SDL_video.h" |
38 #include "SDL_mouse.h" | 39 #include "SDL_mouse.h" |
39 #include "SDL_sysvideo.h" | 40 #include "SDL_sysvideo.h" |
40 #include "SDL_pixels_c.h" | 41 #include "SDL_pixels_c.h" |
51 #if defined(i386) && defined(FB_TYPE_VGA_PLANES) | 52 #if defined(i386) && defined(FB_TYPE_VGA_PLANES) |
52 #define VGA16_FBCON_SUPPORT | 53 #define VGA16_FBCON_SUPPORT |
53 #ifndef FB_AUX_VGA_PLANES_VGA4 | 54 #ifndef FB_AUX_VGA_PLANES_VGA4 |
54 #define FB_AUX_VGA_PLANES_VGA4 0 | 55 #define FB_AUX_VGA_PLANES_VGA4 0 |
55 #endif | 56 #endif |
57 /* | |
56 static inline void outb (unsigned char value, unsigned short port) | 58 static inline void outb (unsigned char value, unsigned short port) |
57 { | 59 { |
58 __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port)); | 60 __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port)); |
59 } | 61 } |
62 */ | |
60 #endif /* FB_TYPE_VGA_PLANES */ | 63 #endif /* FB_TYPE_VGA_PLANES */ |
61 | 64 |
62 /* A list of video resolutions that we query for (sorted largest to smallest) */ | 65 /* A list of video resolutions that we query for (sorted largest to smallest) */ |
63 static const SDL_Rect checkres[] = { | 66 static const SDL_Rect checkres[] = { |
64 { 0, 0, 1600, 1200 }, /* 16 bpp: 0x11E, or 286 */ | 67 { 0, 0, 1600, 1200 }, /* 16 bpp: 0x11E, or 286 */ |
436 static int FB_SortModes(_THIS) | 439 static int FB_SortModes(_THIS) |
437 { | 440 { |
438 int i; | 441 int i; |
439 for ( i=0; i<NUM_MODELISTS; ++i ) { | 442 for ( i=0; i<NUM_MODELISTS; ++i ) { |
440 if ( SDL_nummodes[i] > 0 ) { | 443 if ( SDL_nummodes[i] > 0 ) { |
441 qsort(SDL_modelist[i], SDL_nummodes[i], sizeof *SDL_modelist[i], cmpmodes); | 444 SDL_qsort(SDL_modelist[i], SDL_nummodes[i], sizeof *SDL_modelist[i], cmpmodes); |
442 } | 445 } |
443 } | 446 } |
444 } | 447 } |
445 | 448 |
446 static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat) | 449 static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat) |