comparison src/video/x11/SDL_x11modes.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 c71e05b4dc2e
comparison
equal deleted inserted replaced
1337:c687f06c7473 1338:604d73db6802
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 /* Utilities for getting and setting the X display mode */ 23 /* Utilities for getting and setting the X display mode */
24 24
25 #include <stdlib.h> 25 #include <stdio.h>
26 #include <string.h> 26
27 27 #include "SDL_stdlib.h"
28 #include "SDL_string.h"
28 #include "SDL_timer.h" 29 #include "SDL_timer.h"
29 #include "SDL_error.h" 30 #include "SDL_error.h"
30 #include "SDL_events.h" 31 #include "SDL_events.h"
31 #include "SDL_events_c.h" 32 #include "SDL_events_c.h"
32 #include "SDL_x11video.h" 33 #include "SDL_x11video.h"
357 1000 * modes[i]->dotclock / (modes[i]->htotal * 358 1000 * modes[i]->dotclock / (modes[i]->htotal *
358 modes[i]->vtotal) ); 359 modes[i]->vtotal) );
359 } 360 }
360 #endif 361 #endif
361 362
362 qsort(modes, nmodes, sizeof *modes, cmpmodes); 363 SDL_qsort(modes, nmodes, sizeof *modes, cmpmodes);
363 SDL_modelist = (SDL_Rect **)SDL_malloc((nmodes+2)*sizeof(SDL_Rect *)); 364 SDL_modelist = (SDL_Rect **)SDL_malloc((nmodes+2)*sizeof(SDL_Rect *));
364 if ( SDL_modelist ) { 365 if ( SDL_modelist ) {
365 n = 0; 366 n = 0;
366 for ( i=0; i<nmodes; ++i ) { 367 for ( i=0; i<nmodes; ++i ) {
367 int w, h; 368 int w, h;