blob: bc957cc7c4385e180c50ad71441b657512c047ae [file] [log] [blame]
Jack Jansen42218ce1997-01-31 16:15:11 +00001/***********************************************************
2Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
3The Netherlands.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI or Corporation for National Research Initiatives or
13CNRI not be used in advertising or publicity pertaining to
14distribution of the software without specific, written prior
15permission.
16
17While CWI is the initial source for this software, a modified version
18is made available by the Corporation for National Research Initiatives
19(CNRI) at the Internet address ftp://ftp.python.org.
20
21STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
22REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
23MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
24CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
25DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
26PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
27TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28PERFORMANCE OF THIS SOFTWARE.
29
30******************************************************************/
31
Jack Jansen12fce3e1995-08-14 12:31:44 +000032#include "Python.h"
33#include "osdefs.h"
Jack Jansen3f7d2b41996-09-06 22:21:07 +000034#include "macglue.h"
Jack Jansen12fce3e1995-08-14 12:31:44 +000035#include "pythonresources.h"
36
37
38/* Return the initial python search path. This is called once from
39** initsys() to initialize sys.path.
40**
41** If USE_BUILTIN_PATH is defined the path defined here is used
42** (after prepending the python home dir to each item).
43** If it is not defined the path is gotten from a resource in the
44** Preferences file.
45**
46** XXXX This code needs cleaning up. The routines here have moved
47** around quite a bit, and they're pretty messy for that reason.
48*/
49
50#include <Files.h>
51#include <Aliases.h>
52#include <Folders.h>
53#include <Resources.h>
54#include <TextUtils.h>
Jack Jansenb39be211995-09-01 11:48:10 +000055#include <Dialogs.h>
Jack Jansen12fce3e1995-08-14 12:31:44 +000056
Jack Jansen2d1306b2000-04-07 09:10:49 +000057#ifdef USE_GUSI1
Jack Jansen3f7d2b41996-09-06 22:21:07 +000058#include <GUSI.h>
59#endif
60
Jack Jansen12fce3e1995-08-14 12:31:44 +000061#define PYTHONPATH "\
62:\n\
63:Lib\n\
64:Lib:stdwin\n\
65:Lib:test\n\
66:Lib:mac"
67
Jack Jansenac82b6a1998-07-13 13:38:29 +000068static int
Jack Jansen83c74df1996-10-22 15:25:42 +000069getpreffilefss(FSSpec *fssp)
70{
71 static int diditbefore=0;
Jack Jansenac82b6a1998-07-13 13:38:29 +000072 static int rv = 1;
Jack Jansen83c74df1996-10-22 15:25:42 +000073 static FSSpec fss;
Jack Jansenabdf93c1998-07-31 09:33:28 +000074 short prefdirRefNum;
75 long prefdirDirID;
Just van Rossum26a69db1999-02-02 15:49:03 +000076 long pyprefdirDirID;
Jack Jansenabdf93c1998-07-31 09:33:28 +000077 Handle namehandle;
Just van Rossum26a69db1999-02-02 15:49:03 +000078 OSErr err;
Jack Jansenabdf93c1998-07-31 09:33:28 +000079
80 if ( !diditbefore ) {
Jack Jansenabdf93c1998-07-31 09:33:28 +000081 if ( (namehandle=GetNamedResource('STR ', PREFFILENAME_NAME)) == NULL ) {
82 (void)StopAlert(NOPREFNAME_ID, NULL);
83 exit(1);
84 }
85
Jack Jansenabdf93c1998-07-31 09:33:28 +000086 if ( **namehandle == '\0' ) {
87 /* Empty string means don't use preferences file */
88 rv = 0;
89 } else {
90 /* There is a filename, construct the fsspec */
Just van Rossum26a69db1999-02-02 15:49:03 +000091 if ( FindFolder(kOnSystemDisk, 'pref', kDontCreateFolder, &prefdirRefNum,
92 &prefdirDirID) != noErr ) {
93 /* Something wrong with preferences folder */
94 (void)StopAlert(NOPREFDIR_ID, NULL);
95 exit(1);
96 }
97 /* make fsspec for the "Python" folder inside the prefs folder */
98 err = FSMakeFSSpec(prefdirRefNum, prefdirDirID, "\pPython", &fss);
99 if (err == fnfErr) {
100 /* it doesn't exist: create it */
101 err = FSpDirCreate(&fss, smSystemScript, &pyprefdirDirID);
102 } else {
103 /* it does exist, now find out the dirID of the Python prefs folder, brrr. */
104 CInfoPBRec info;
105 info.dirInfo.ioVRefNum = fss.vRefNum;
106 info.dirInfo.ioDrDirID = fss.parID;
107 info.dirInfo.ioNamePtr = fss.name;
108 info.dirInfo.ioFDirIndex = 0;
109 info.dirInfo.ioACUser = 0;
110 err = PBGetCatInfo(&info, 0);
111 if (err == noErr) {
112 pyprefdirDirID = info.dirInfo.ioDrDirID;
113 }
114 }
115 if (err != noErr) {
116 (void)StopAlert(NOPREFDIR_ID, NULL);
117 exit(1);
118 }
119 HLock(namehandle);
120 err = FSMakeFSSpec(fss.vRefNum, pyprefdirDirID, (unsigned char *)*namehandle, &fss);
121 HUnlock(namehandle);
122 if (err != noErr && err != fnfErr) {
123 (void)StopAlert(NOPREFDIR_ID, NULL);
124 exit(1);
125 }
Jack Jansenac82b6a1998-07-13 13:38:29 +0000126 }
Jack Jansen83c74df1996-10-22 15:25:42 +0000127 ReleaseResource(namehandle);
128 diditbefore = 1;
129 }
130 *fssp = fss;
Jack Jansenac82b6a1998-07-13 13:38:29 +0000131 return rv;
Jack Jansen83c74df1996-10-22 15:25:42 +0000132}
Jack Jansen12fce3e1995-08-14 12:31:44 +0000133
134char *
Jack Jansena547dca1996-07-10 15:48:25 +0000135Py_GetPath()
Jack Jansen12fce3e1995-08-14 12:31:44 +0000136{
137 /* Modified by Jack to do something a bit more sensible:
138 ** - Prepend the python home-directory (which is obtained from a Preferences
139 ** resource)
140 ** - Add :
141 */
142 static char *pythonpath;
Jack Jansen12fce3e1995-08-14 12:31:44 +0000143 char *p, *endp;
144 int newlen;
Jack Jansen83c74df1996-10-22 15:25:42 +0000145 char *curwd;
Jack Jansen12fce3e1995-08-14 12:31:44 +0000146#ifndef USE_BUILTIN_PATH
Jack Jansen01fbc681996-02-28 15:42:47 +0000147 staticforward char *PyMac_GetPythonPath();
Jack Jansen12fce3e1995-08-14 12:31:44 +0000148#endif
149
150 if ( pythonpath ) return pythonpath;
Jack Jansen12fce3e1995-08-14 12:31:44 +0000151#ifndef USE_BUILTIN_PATH
Jack Jansen83c74df1996-10-22 15:25:42 +0000152 if ( pythonpath = PyMac_GetPythonPath() )
Jack Jansen12fce3e1995-08-14 12:31:44 +0000153 return pythonpath;
154 printf("Warning: No pythonpath resource found, using builtin default\n");
155#endif
Jack Jansen83c74df1996-10-22 15:25:42 +0000156 curwd = PyMac_GetPythonDir();
Jack Jansen12fce3e1995-08-14 12:31:44 +0000157 p = PYTHONPATH;
158 endp = p;
159 pythonpath = malloc(2);
160 if ( pythonpath == NULL ) return PYTHONPATH;
161 strcpy(pythonpath, ":");
162 while (*endp) {
163 endp = strchr(p, '\n');
164 if ( endp == NULL )
165 endp = p + strlen(p);
166 newlen = strlen(pythonpath) + 1 + strlen(curwd) + (endp-p);
167 pythonpath = realloc(pythonpath, newlen+1);
168 if ( pythonpath == NULL ) return PYTHONPATH;
169 strcat(pythonpath, "\n");
170 if ( *p == ':' ) {
171 p++;
172 strcat(pythonpath, curwd);
173 strncat(pythonpath, p, (endp-p));
174 newlen--; /* Ok, ok, we've allocated one byte too much */
175 } else {
176 /* We've allocated too much in this case */
177 newlen -= strlen(curwd);
178 pythonpath = realloc(pythonpath, newlen+1);
179 if ( pythonpath == NULL ) return PYTHONPATH;
180 strncat(pythonpath, p, (endp-p));
181 }
182 pythonpath[newlen] = '\0';
183 p = endp + 1;
184 }
185 return pythonpath;
186}
187
Jack Jansen83c74df1996-10-22 15:25:42 +0000188
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000189/*
190** Open/create the Python Preferences file, return the handle
191*/
Jack Jansenee081042000-04-21 23:53:37 +0000192short
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000193PyMac_OpenPrefFile()
194{
Jack Jansenabdf93c1998-07-31 09:33:28 +0000195 AliasHandle handle;
196 FSSpec dirspec;
197 short prefrh;
198 OSErr err;
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000199
Jack Jansenac82b6a1998-07-13 13:38:29 +0000200 if ( !getpreffilefss(&dirspec))
201 return -1;
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000202 prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm);
203 if ( prefrh < 0 ) {
Jack Jansen83c74df1996-10-22 15:25:42 +0000204#if 0
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000205 action = CautionAlert(NOPREFFILE_ID, NULL);
206 if ( action == NOPREFFILE_NO )
207 exit(1);
Jack Jansen83c74df1996-10-22 15:25:42 +0000208#endif
Jack Jansen532e3c21996-02-21 15:36:26 +0000209 FSpCreateResFile(&dirspec, 'Pyth', 'pref', 0);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000210 prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm);
211 if ( prefrh == -1 ) {
212 /* This "cannot happen":-) */
Jack Jansenb39be211995-09-01 11:48:10 +0000213 printf("Cannot create preferences file, error %d\n", ResError());
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000214 exit(1);
215 }
Jack Jansen26ee1261996-11-09 18:45:18 +0000216 if ( (err=PyMac_init_process_location()) != 0 ) {
217 printf("Cannot get application location, error %d\n", err);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000218 exit(1);
219 }
Jack Jansen26ee1261996-11-09 18:45:18 +0000220 dirspec = PyMac_ApplicationFSSpec;
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000221 dirspec.name[0] = 0;
Jack Jansenb39be211995-09-01 11:48:10 +0000222 if ((err=NewAlias(NULL, &dirspec, &handle)) != 0 ) {
223 printf("Cannot make alias to application directory, error %d\n", err);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000224 exit(1);
225 }
Jack Jansenabdf93c1998-07-31 09:33:28 +0000226 AddResource((Handle)handle, 'alis', PYTHONHOME_ID, "\p");
227 UpdateResFile(prefrh);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000228
229 } else {
230 UseResFile(prefrh);
231 }
232 return prefrh;
233}
Jack Jansen12fce3e1995-08-14 12:31:44 +0000234
235/*
236** Return the name of the Python directory
237*/
Jack Jansen5b3c9711997-09-08 13:22:49 +0000238char *
Jack Jansen12fce3e1995-08-14 12:31:44 +0000239PyMac_GetPythonDir()
240{
Jack Jansen83c74df1996-10-22 15:25:42 +0000241 static int diditbefore = 0;
Jack Jansenabdf93c1998-07-31 09:33:28 +0000242 static char name[256] = {':', '\0'};
243 AliasHandle handle;
244 FSSpec dirspec;
245 Boolean modified = 0;
246 short oldrh, prefrh = -1, homerh;
247
248 if ( diditbefore )
249 return name;
250
251 oldrh = CurResFile();
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000252
Jack Jansenabdf93c1998-07-31 09:33:28 +0000253 /* First look for an override in the application file */
254 UseResFile(PyMac_AppRefNum);
255 handle = (AliasHandle)Get1Resource('alis', PYTHONHOMEOVERRIDE_ID);
256 UseResFile(oldrh);
257 if ( handle != NULL ) {
258 homerh = PyMac_AppRefNum;
259 } else {
260 /* Try to open preferences file in the preferences folder. */
261 prefrh = PyMac_OpenPrefFile();
262 handle = (AliasHandle)Get1Resource('alis', PYTHONHOME_ID);
263 if ( handle == NULL ) {
264 /* (void)StopAlert(BADPREFFILE_ID, NULL); */
265 diditbefore=1;
266 return ":";
267 }
268 homerh = prefrh;
269 }
270 /* It exists. Resolve it (possibly updating it) */
271 if ( ResolveAlias(NULL, handle, &dirspec, &modified) != noErr ) {
272 (void)StopAlert(BADPREFFILE_ID, NULL);
273 diditbefore=1;
274 return ":";
275 }
276 if ( modified ) {
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000277 ChangedResource((Handle)handle);
Jack Jansenabdf93c1998-07-31 09:33:28 +0000278 UpdateResFile(homerh);
279 }
280 if ( prefrh != -1 ) CloseResFile(prefrh);
281 UseResFile(oldrh);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000282
Jack Jansen26ee1261996-11-09 18:45:18 +0000283 if ( PyMac_GetFullPath(&dirspec, name) == 0 ) {
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000284 strcat(name, ":");
Jack Jansenabdf93c1998-07-31 09:33:28 +0000285 } else {
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000286 /* If all fails, we return the current directory */
287 printf("Python home dir exists but I cannot find the pathname!!\n");
Jack Jansen12fce3e1995-08-14 12:31:44 +0000288 name[0] = 0;
289 (void)getwd(name);
290 }
Jack Jansen83c74df1996-10-22 15:25:42 +0000291 diditbefore = 1;
Jack Jansen12fce3e1995-08-14 12:31:44 +0000292 return name;
293}
294
295#ifndef USE_BUILTIN_PATH
Jack Jansen5b3c9711997-09-08 13:22:49 +0000296char *
Jack Jansen83c74df1996-10-22 15:25:42 +0000297PyMac_GetPythonPath()
Jack Jansen12fce3e1995-08-14 12:31:44 +0000298{
Jack Jansenabdf93c1998-07-31 09:33:28 +0000299 short oldrh, prefrh = -1;
300 char *rv;
301 int i, newlen;
302 Str255 pathitem;
303 int resource_id;
304 OSErr err;
305 Handle h;
306
307 oldrh = CurResFile();
308 /*
309 ** This is a bit tricky. We check here whether the application file
310 ** contains an override. This is to forestall us finding another STR# resource
311 ** with "our" id and using that for path initialization
312 */
313 UseResFile(PyMac_AppRefNum);
314 SetResLoad(0);
315 if ( (h=Get1Resource('STR#', PYTHONPATHOVERRIDE_ID)) ) {
316 ReleaseResource(h);
317 resource_id = PYTHONPATHOVERRIDE_ID;
318 } else {
319 resource_id = PYTHONPATH_ID;
320 }
321 SetResLoad(1);
322 UseResFile(oldrh);
323
324 /* Open the preferences file only if there is no override */
325 if ( resource_id != PYTHONPATHOVERRIDE_ID )
326 prefrh = PyMac_OpenPrefFile();
327 /* At this point, we may or may not have the preferences file open, and it
328 ** may or may not contain a sys.path STR# resource. We don't care, if it doesn't
329 ** exist we use the one from the application (the default).
330 ** We put an initial '\n' in front of the path that we don't return to the caller
331 */
332 if( (rv = malloc(2)) == NULL )
333 goto out;
334 strcpy(rv, "\n");
Jack Jansenf12e7091996-09-05 15:19:24 +0000335
Jack Jansenabdf93c1998-07-31 09:33:28 +0000336 for(i=1; ; i++) {
337 GetIndString(pathitem, resource_id, i);
338 if( pathitem[0] == 0 )
339 break;
340 if ( pathitem[0] >= 9 && strncmp((char *)pathitem+1, "$(PYTHON)", 9) == 0 ) {
341 /* We have to put the directory in place */
342 char *dir = PyMac_GetPythonDir();
343
344 newlen = strlen(rv) + strlen(dir) + (pathitem[0]-9) + 2;
345 if( (rv=realloc(rv, newlen)) == NULL)
346 goto out;
347 strcat(rv, dir);
348 /* Skip a colon at the beginning of the item */
349 if ( pathitem[0] > 9 && pathitem[1+9] == ':' ) {
Jack Jansen12fce3e1995-08-14 12:31:44 +0000350 memcpy(rv+strlen(rv), pathitem+1+10, pathitem[0]-10);
351 newlen--;
352 } else {
353 memcpy(rv+strlen(rv), pathitem+1+9, pathitem[0]-9);
354 }
Jack Jansenabdf93c1998-07-31 09:33:28 +0000355 rv[newlen-2] = '\n';
356 rv[newlen-1] = 0;
357 } else if ( pathitem[0] >= 14 && strncmp((char *)pathitem+1, "$(APPLICATION)", 14) == 0 ) {
358 /* This is the application itself */
Jack Jansena486a551996-04-04 15:39:18 +0000359
Jack Jansenabdf93c1998-07-31 09:33:28 +0000360 if ( (err=PyMac_init_process_location()) != 0 ) {
Jack Jansen26ee1261996-11-09 18:45:18 +0000361 printf("Cannot get application location, error %d\n", err);
Jack Jansena486a551996-04-04 15:39:18 +0000362 exit(1);
363 }
Jack Jansen26ee1261996-11-09 18:45:18 +0000364
365 newlen = strlen(rv) + strlen(PyMac_ApplicationPath) + 2;
Jack Jansenabdf93c1998-07-31 09:33:28 +0000366 if( (rv=realloc(rv, newlen)) == NULL)
367 goto out;
368 strcpy(rv+strlen(rv), PyMac_ApplicationPath);
369 rv[newlen-2] = '\n';
370 rv[newlen-1] = 0;
Jack Jansena486a551996-04-04 15:39:18 +0000371
Jack Jansenabdf93c1998-07-31 09:33:28 +0000372 } else {
373 /* Use as-is */
374 newlen = strlen(rv) + (pathitem[0]) + 2;
375 if( (rv=realloc(rv, newlen)) == NULL)
376 goto out;
377 memcpy(rv+strlen(rv), pathitem+1, pathitem[0]);
378 rv[newlen-2] = '\n';
379 rv[newlen-1] = 0;
380 }
Jack Jansen12fce3e1995-08-14 12:31:44 +0000381 }
382 if( strlen(rv) == 1) {
383 free(rv);
384 rv = NULL;
385 }
386 if ( rv ) {
387 rv[strlen(rv)-1] = 0;
388 rv++;
389 }
390out:
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000391 if ( prefrh != -1) CloseResFile(prefrh);
392 UseResFile(oldrh);
Jack Jansen12fce3e1995-08-14 12:31:44 +0000393 return rv;
394}
395#endif /* !USE_BUILTIN_PATH */
396
Jack Jansena4b7e141996-02-21 16:46:57 +0000397void
Jack Jansen7d5f9e81996-09-07 17:09:31 +0000398PyMac_PreferenceOptions(PyMac_PrefRecord *pr)
Jack Jansena4b7e141996-02-21 16:46:57 +0000399{
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000400 short oldrh, prefrh = -1;
Jack Jansena4b7e141996-02-21 16:46:57 +0000401 Handle handle;
402 int size;
Jack Jansen5b3c9711997-09-08 13:22:49 +0000403 PyMac_PrefRecord *p;
404 int action;
Jack Jansena4b7e141996-02-21 16:46:57 +0000405
406
Jack Jansenabdf93c1998-07-31 09:33:28 +0000407 oldrh = CurResFile();
408
409 /* Attempt to load overrides from application */
410 UseResFile(PyMac_AppRefNum);
411 handle = Get1Resource('Popt', PYTHONOPTIONSOVERRIDE_ID);
412 UseResFile(oldrh);
413
414 /* Otherwise get options from prefs file or any other open resource file */
415 if ( handle == NULL ) {
416 prefrh = PyMac_OpenPrefFile();
417 handle = GetResource('Popt', PYTHONOPTIONS_ID);
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000418 }
Jack Jansenabdf93c1998-07-31 09:33:28 +0000419 if ( handle == NULL ) {
420 return;
421 }
422 HLock(handle);
423 size = GetHandleSize(handle);
424 p = (PyMac_PrefRecord *)*handle;
425 if ( p->version == POPT_VERSION_CURRENT && size == sizeof(PyMac_PrefRecord) ) {
426 *pr = *p;
427 } else {
428 action = CautionAlert(BADPREFERENCES_ID, NULL);
429 if ( action == BADPREF_DELETE ) {
430 OSErr err;
431
432 RemoveResource(handle);
433 if ( (err=ResError()) ) printf("RemoveResource: %d\n", err);
434 if ( prefrh != -1 ) {
435 UpdateResFile(prefrh);
436 if ( (err=ResError()) ) printf("UpdateResFile: %d\n", err);
437 }
438 } else if ( action == BADPREF_QUIT )
439 exit(1);
440 }
441 HUnlock(handle);
Jack Jansena4b7e141996-02-21 16:46:57 +0000442
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000443 if ( prefrh != -1) CloseResFile(prefrh);
Jack Jansenabdf93c1998-07-31 09:33:28 +0000444 UseResFile(oldrh);
Jack Jansena4b7e141996-02-21 16:46:57 +0000445}
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000446
Jack Jansen2d1306b2000-04-07 09:10:49 +0000447#ifdef USE_GUSI1
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000448void
449PyMac_SetGUSIOptions()
450{
451 Handle h;
452 short oldrh, prefrh = -1;
453
454 oldrh = CurResFile();
455
456 /* Try override from the application resource fork */
457 UseResFile(PyMac_AppRefNum);
458 h = Get1Resource('GU\267I', GUSIOPTIONSOVERRIDE_ID);
459 UseResFile(oldrh);
460
461 /* If that didn't work try nonoverride from anywhere */
462 if ( h == NULL ) {
463 prefrh = PyMac_OpenPrefFile();
464 h = GetResource('GU\267I', GUSIOPTIONS_ID);
465 }
466 if ( h ) GUSILoadConfiguration(h);
467 if ( prefrh != -1) CloseResFile(prefrh);
Jack Jansenabdf93c1998-07-31 09:33:28 +0000468 UseResFile(oldrh);
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000469}
Jack Jansenee081042000-04-21 23:53:37 +0000470#endif /* USE_GUSI1 */