| @@ -1,26 +1,39 @@ | | | @@ -1,26 +1,39 @@ |
1 | $NetBSD: patch-bb,v 1.2 2005/12/11 20:35:41 joerg Exp $ | | 1 | $NetBSD: patch-bb,v 1.3 2011/09/04 22:25:36 dholland Exp $ |
| | | 2 | |
| | | 3 | - initialize errfp (but why twice?) |
| | | 4 | - fix void main |
| | | 5 | - pass the XtAppContext to widget.c, which now needs it |
2 | | | 6 | |
3 | --- main.c.orig 1996-11-07 16:01:43.000000000 +0000 | | 7 | --- main.c.orig 1996-11-07 16:01:43.000000000 +0000 |
4 | +++ main.c | | 8 | +++ main.c |
5 | @@ -33,7 +33,7 @@ static char *_main_c_ident_ = "@(#)main. | | 9 | @@ -33,7 +33,7 @@ static char *_main_c_ident_ = "@(#)main. |
6 | bool_t exit_flag; /* Flag indicating end of application */ | | 10 | bool_t exit_flag; /* Flag indicating end of application */ |
7 | appdata_t app_data; /* Options data */ | | 11 | appdata_t app_data; /* Options data */ |
8 | widgets_t widgets; /* Holder of all widgets */ | | 12 | widgets_t widgets; /* Holder of all widgets */ |
9 | -FILE *errfp = stderr;/* Error message stream */ | | 13 | -FILE *errfp = stderr;/* Error message stream */ |
10 | +FILE *errfp;/* Error message stream */ | | 14 | +FILE *errfp;/* Error message stream */ |
11 | | | 15 | |
12 | | | 16 | |
13 | /*********************** | | 17 | /*********************** |
| | | 18 | @@ -95,7 +95,7 @@ usage(int argc, char **argv) |
| | | 19 | * main |
| | | 20 | * The main function |
| | | 21 | */ |
| | | 22 | -void |
| | | 23 | +int |
| | | 24 | main(int argc, char **argv) |
| | | 25 | { |
| | | 26 | XtAppContext app; |
14 | @@ -103,6 +103,7 @@ main(int argc, char **argv) | | 27 | @@ -103,6 +103,7 @@ main(int argc, char **argv) |
15 | | | 28 | |
16 | /* Initialize variables */ | | 29 | /* Initialize variables */ |
17 | exit_flag = FALSE; | | 30 | exit_flag = FALSE; |
18 | + errfp = stderr; | | 31 | + errfp = stderr; |
19 | | | 32 | |
20 | /* Handle some signals */ | | 33 | /* Handle some signals */ |
21 | signal(SIGINT, onsig); | | 34 | signal(SIGINT, onsig); |
22 | @@ -159,7 +160,7 @@ main(int argc, char **argv) | | 35 | @@ -159,7 +160,7 @@ main(int argc, char **argv) |
23 | post_realize_config(&widgets); | | 36 | post_realize_config(&widgets); |
24 | | | 37 | |
25 | /* Register callback routines */ | | 38 | /* Register callback routines */ |
26 | - register_callbacks(&widgets); | | 39 | - register_callbacks(&widgets); |