File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /* Configuration containing EVERYTHING */
2+
3+ /* At CWI, this implies stdwin, audio, Amoeba and the NASA Panel Library */
4+ #define USE_AUDIO
5+ #define USE_AMOEBA
6+ #define USE_PANEL
7+
8+ static int use_stdwin;
9+
10+ /*ARGSUSED*/
11+ void
12+ initargs(p_argc, p_argv)
13+ int *p_argc;
14+ char ***p_argv;
15+ {
16+ extern char *getenv();
17+ char *display;
18+
19+ /* Assume we have to initialize stdwin if either of the following
20+ conditions holds:
21+ - the environment variable $DISPLAY is set
22+ - there is an argument "-display" somewhere
23+ */
24+
25+ display = getenv("DISPLAY");
26+ if (display != 0)
27+ use_stdwin = 1;
28+ else {
29+ int i;
30+ /* Scan through the arguments looking for "-display" */
31+ for (i = 1; i < *p_argc; i++) {
32+ if (strcmp((*p_argv)[i], "-display") == 0) {
33+ use_stdwin = 1;
34+ break;
35+ }
36+ }
37+ }
38+
39+ if (use_stdwin)
40+ winitargs(p_argc, p_argv);
41+ }
42+
43+ void
44+ initcalls()
45+ {
46+ inittime();
47+ initmath();
48+ initposix();
49+ #ifdef USE_AUDIO
50+ initaudio();
51+ #endif
52+ #ifdef USE_AMOEBA
53+ initamoeba();
54+ #endif
55+ initgl();
56+ #ifdef USE_PANEL
57+ initpanel();
58+ #endif
59+ if (use_stdwin)
60+ initstdwin();
61+ }
62+
63+ void
64+ donecalls()
65+ {
66+ if (use_stdwin)
67+ wdone();
68+ #ifdef USE_AUDIO
69+ asa_done();
70+ #endif
71+ }
72+
73+ #ifndef PYTHONPATH
74+ #define PYTHONPATH ".:/usr/local/lib/python"
75+ #endif
76+
77+ extern char *getenv();
78+
79+ char *
80+ getpythonpath()
81+ {
82+ char *path = getenv("PYTHONPATH");
83+ if (path == 0)
84+ path = PYTHONPATH;
85+ return path;
86+ }
You can’t perform that action at this time.
0 commit comments