comparison pwplib/pwplib-unix.c @ 28:e45ae779d439

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 24 May 2010 00:18:41 +0300
parents 2c72092554fa
children d83239a98d1e
comparison
equal deleted inserted replaced
27:0eba27fee6da 28:e45ae779d439
107 #ifdef DRIVE_AUDIO 107 #ifdef DRIVE_AUDIO
108 sdl_flags |= SDL_INIT_AUDIO; 108 sdl_flags |= SDL_INIT_AUDIO;
109 #endif 109 #endif
110 /* With SDL, we let it handle the signals */ 110 /* With SDL, we let it handle the signals */
111 if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_EVENTTHREAD | sdl_flags) != 0) { 111 if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_EVENTTHREAD | sdl_flags) != 0) {
112 pwpwrite("* SDL could not be initialized.\n"); 112 pwpwrite("* SDL could not be initialized (%s).\n", SDL_GetError());
113 sdl_init = 0; 113 sdl_init = 0;
114 } else 114 } else
115 sdl_init = 1; 115 sdl_init = 1;
116 #endif 116 #endif
117 117
272 272
273 /***************************************************************/ 273 /***************************************************************/
274 274
275 int pwplib_init(int argc, char **argv) 275 int pwplib_init(int argc, char **argv)
276 { 276 {
277 int i = 0, quit = 0;
278
279 pwplib.argc = argc; 277 pwplib.argc = argc;
280 pwplib.argv = argv; 278 pwplib.argv = argv;
281 279
282 pwplib_getopts(); 280 pwplib_getopts();
283 281
284 if (pwplib.setup[SETUP_WANTHELP]) 282 if (pwplib.setup[SETUP_WANTHELP])
285 { 283 {
286 printhelp(); 284 printhelp();
287 exit(0); 285 exit(0);
288 pwplib.setup[SETUP_SHUTUP]++;
289 } 286 }
290 287
291 if (!pwplib.setup[SETUP_SHUTUP]) 288 if (!pwplib.setup[SETUP_SHUTUP])
292 { 289 {
293 fputs(pwplogo, stderr); 290 fputs(pwplogo, stderr);