$NetBSD: patch-aj,v 1.4 2006/08/12 14:51:39 darcy Exp $ --- main.c.orig Tue Jan 12 19:59:36 1993 +++ main.c @@ -23,13 +23,36 @@ Widget top_form; +extern AppData app_data; + +static void +chk_debug(argc, argv) + int argc; + char **argv; +{ + int i; + + /* ugly hack */ + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "-debug") == 0) { + app_data.debug = True; + break; + } + } +} + +void +usage() { + (void) fprintf(stderr, "usage: xcdplayer [-debug]\n"); + + exit(1); +} + void main(argc, argv) int argc; char **argv; { - static void chk_debug(); - chk_debug(argc, argv); /* gets resources, & creates main form */ @@ -55,26 +78,3 @@ main(argc, argv) exit(0); } - -static void -chk_debug(argc, argv) - int argc; - char **argv; -{ - int i; - - /* ugly hack */ - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-debug") == 0) { - debug = True; - break; - } - } -} - -void -usage() { - (void) fprintf(stderr, "usage: xcdplayer [-debug]\n"); - - exit(1); -}