Commit | Line | Data |
---|---|---|
9e8e5516 C |
1 | /* $Header: /f/osi/others/quipu/uips/xd/RCS/main.c,v 7.1 91/02/22 09:33:02 mrose Interim $ */ |
2 | #ifndef lint | |
3 | static char *rcsid = "$Id: main.c,v 7.1 91/02/22 09:33:02 mrose Interim $"; | |
4 | #endif | |
5 | /* | |
6 | $Log: main.c,v $ | |
7 | * Revision 7.1 91/02/22 09:33:02 mrose | |
8 | * Interim 6.8 | |
9 | * | |
10 | * Revision 7.0 90/06/12 13:10:51 mrose | |
11 | * *** empty log message *** | |
12 | * | |
13 | * Revision 1.5 90/04/26 10:22:42 emsrssn | |
14 | * Installation fixed | |
15 | * | |
16 | * | |
17 | * Revision 1.4 90/04/25 17:28:12 emsrssn | |
18 | * Lint tidy up | |
19 | * | |
20 | * | |
21 | * Revision 1.3 90/04/19 13:54:14 emsrssn | |
22 | * keyboard accelerator now activates button highlight. | |
23 | * | |
24 | * search types available is dependent on current position | |
25 | * to prevent unreasonable searches. | |
26 | * | |
27 | * the help popup changes automatically depending on the | |
28 | * position of the cursor | |
29 | * | |
30 | * buttons remain a fixed size when the application is | |
31 | * resized | |
32 | * | |
33 | * command line options are now handled properly | |
34 | * | |
35 | * logging added | |
36 | * | |
37 | * "reads" are now sorted to show mail address at top etc. | |
38 | * | |
39 | * | |
40 | * Revision 1.2 90/03/09 15:57:32 emsrssn | |
41 | * First public distribution | |
42 | * | |
43 | * | |
44 | * Revision 1.1 90/03/08 13:18:40 emsrssn | |
45 | * Initial revision | |
46 | * | |
47 | * | |
48 | */ | |
49 | ||
50 | #include "quipu/util.h" | |
51 | #include <varargs.h> | |
52 | #include <X11/Intrinsic.h> | |
53 | ||
54 | extern void Loop(), xprint(), init_widgets(); | |
55 | extern int print_parse_errors; | |
56 | extern XtAppContext app_con; | |
57 | extern Widget toplevel; | |
58 | ||
59 | char *local_dit; | |
60 | ||
61 | void | |
62 | main (argc, argv) | |
63 | int argc; | |
64 | char **argv; | |
65 | { | |
66 | print_parse_errors = FALSE; | |
67 | ||
68 | toplevel = XtAppInitialize(&app_con, "Xd", NULL, 0, | |
69 | &argc, argv, NULL , NULL, 0); | |
70 | ||
71 | quipu_syntaxes(); | |
72 | dsap_init(&argc, &argv); | |
73 | user_tailor(); | |
74 | init_widgets(); | |
75 | cnnct_bind(); | |
76 | Set_Search_Area(local_dit); | |
77 | Loop(); | |
78 | free_memory(); /* frees up memory used for result_list & lookback_list */ | |
79 | } | |
80 | ||
81 | ||
82 | die(sig, str) | |
83 | int sig; | |
84 | char *str; | |
85 | { | |
86 | xprint(str); | |
87 | quit (sig); | |
88 | } | |
89 | ||
90 | quit(sig) | |
91 | int sig; | |
92 | { | |
93 | free_all(); | |
94 | (void) ds_unbind(); | |
95 | exit(sig); | |
96 | } | |
97 | ||
98 | ||
99 | void advise (va_alist) | |
100 | va_dcl | |
101 | { | |
102 | va_list ap; | |
103 | extern LLog * log_dsap; | |
104 | ||
105 | va_start (ap); | |
106 | (void) va_arg (ap, int); | |
107 | va_end (ap); | |
108 | } |