blob: c180d1fa466e2e794648e859465ccabb20e0fd2d [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"
Jack Jansen9ae898b2000-07-11 21:16:03 +000036#ifdef HAVE_UNISTD_H
37#include <unistd.h>
38#endif
Jack Jansen12fce3e1995-08-14 12:31:44 +000039
40
41/* Return the initial python search path. This is called once from
42** initsys() to initialize sys.path.
43**
44** If USE_BUILTIN_PATH is defined the path defined here is used
45** (after prepending the python home dir to each item).
46** If it is not defined the path is gotten from a resource in the
47** Preferences file.
48**
49** XXXX This code needs cleaning up. The routines here have moved
50** around quite a bit, and they're pretty messy for that reason.
51*/
52
53#include <Files.h>
54#include <Aliases.h>
55#include <Folders.h>
56#include <Resources.h>
57#include <TextUtils.h>
Jack Jansenb39be211995-09-01 11:48:10 +000058#include <Dialogs.h>
Jack Jansen12fce3e1995-08-14 12:31:44 +000059
Jack Jansen2d1306b2000-04-07 09:10:49 +000060#ifdef USE_GUSI1
Jack Jansen3f7d2b41996-09-06 22:21:07 +000061#include <GUSI.h>
62#endif
63
Jack Jansen9ae898b2000-07-11 21:16:03 +000064#ifndef USE_BUILTIN_PATH
65staticforward char *PyMac_GetPythonPath();
66#endif
67
Jack Jansen12fce3e1995-08-14 12:31:44 +000068#define PYTHONPATH "\
69:\n\
70:Lib\n\
71:Lib:stdwin\n\
72:Lib:test\n\
73:Lib:mac"
74
Jack Jansenac82b6a1998-07-13 13:38:29 +000075static int
Jack Jansen83c74df1996-10-22 15:25:42 +000076getpreffilefss(FSSpec *fssp)
77{
78 static int diditbefore=0;
Jack Jansenac82b6a1998-07-13 13:38:29 +000079 static int rv = 1;
Jack Jansen83c74df1996-10-22 15:25:42 +000080 static FSSpec fss;
Jack Jansenabdf93c1998-07-31 09:33:28 +000081 short prefdirRefNum;
82 long prefdirDirID;
Just van Rossum26a69db1999-02-02 15:49:03 +000083 long pyprefdirDirID;
Jack Jansenabdf93c1998-07-31 09:33:28 +000084 Handle namehandle;
Just van Rossum26a69db1999-02-02 15:49:03 +000085 OSErr err;
Jack Jansenabdf93c1998-07-31 09:33:28 +000086
87 if ( !diditbefore ) {
Jack Jansenabdf93c1998-07-31 09:33:28 +000088 if ( (namehandle=GetNamedResource('STR ', PREFFILENAME_NAME)) == NULL ) {
89 (void)StopAlert(NOPREFNAME_ID, NULL);
90 exit(1);
91 }
92
Jack Jansenabdf93c1998-07-31 09:33:28 +000093 if ( **namehandle == '\0' ) {
94 /* Empty string means don't use preferences file */
95 rv = 0;
96 } else {
97 /* There is a filename, construct the fsspec */
Just van Rossum26a69db1999-02-02 15:49:03 +000098 if ( FindFolder(kOnSystemDisk, 'pref', kDontCreateFolder, &prefdirRefNum,
99 &prefdirDirID) != noErr ) {
100 /* Something wrong with preferences folder */
101 (void)StopAlert(NOPREFDIR_ID, NULL);
102 exit(1);
103 }
104 /* make fsspec for the "Python" folder inside the prefs folder */
105 err = FSMakeFSSpec(prefdirRefNum, prefdirDirID, "\pPython", &fss);
106 if (err == fnfErr) {
107 /* it doesn't exist: create it */
108 err = FSpDirCreate(&fss, smSystemScript, &pyprefdirDirID);
109 } else {
110 /* it does exist, now find out the dirID of the Python prefs folder, brrr. */
111 CInfoPBRec info;
112 info.dirInfo.ioVRefNum = fss.vRefNum;
113 info.dirInfo.ioDrDirID = fss.parID;
114 info.dirInfo.ioNamePtr = fss.name;
115 info.dirInfo.ioFDirIndex = 0;
116 info.dirInfo.ioACUser = 0;
117 err = PBGetCatInfo(&info, 0);
118 if (err == noErr) {
119 pyprefdirDirID = info.dirInfo.ioDrDirID;
120 }
121 }
122 if (err != noErr) {
123 (void)StopAlert(NOPREFDIR_ID, NULL);
124 exit(1);
125 }
126 HLock(namehandle);
127 err = FSMakeFSSpec(fss.vRefNum, pyprefdirDirID, (unsigned char *)*namehandle, &fss);
128 HUnlock(namehandle);
129 if (err != noErr && err != fnfErr) {
130 (void)StopAlert(NOPREFDIR_ID, NULL);
131 exit(1);
132 }
Jack Jansenac82b6a1998-07-13 13:38:29 +0000133 }
Jack Jansen83c74df1996-10-22 15:25:42 +0000134 ReleaseResource(namehandle);
135 diditbefore = 1;
136 }
137 *fssp = fss;
Jack Jansenac82b6a1998-07-13 13:38:29 +0000138 return rv;
Jack Jansen83c74df1996-10-22 15:25:42 +0000139}
Jack Jansen12fce3e1995-08-14 12:31:44 +0000140
141char *
Jack Jansena547dca1996-07-10 15:48:25 +0000142Py_GetPath()
Jack Jansen12fce3e1995-08-14 12:31:44 +0000143{
144 /* Modified by Jack to do something a bit more sensible:
145 ** - Prepend the python home-directory (which is obtained from a Preferences
146 ** resource)
147 ** - Add :
148 */
149 static char *pythonpath;
Jack Jansen12fce3e1995-08-14 12:31:44 +0000150 char *p, *endp;
151 int newlen;
Jack Jansen83c74df1996-10-22 15:25:42 +0000152 char *curwd;
Jack Jansen12fce3e1995-08-14 12:31:44 +0000153
154 if ( pythonpath ) return pythonpath;
Jack Jansen12fce3e1995-08-14 12:31:44 +0000155#ifndef USE_BUILTIN_PATH
Jack Jansen83c74df1996-10-22 15:25:42 +0000156 if ( pythonpath = PyMac_GetPythonPath() )
Jack Jansen12fce3e1995-08-14 12:31:44 +0000157 return pythonpath;
158 printf("Warning: No pythonpath resource found, using builtin default\n");
159#endif
Jack Jansen83c74df1996-10-22 15:25:42 +0000160 curwd = PyMac_GetPythonDir();
Jack Jansen12fce3e1995-08-14 12:31:44 +0000161 p = PYTHONPATH;
162 endp = p;
163 pythonpath = malloc(2);
164 if ( pythonpath == NULL ) return PYTHONPATH;
165 strcpy(pythonpath, ":");
166 while (*endp) {
167 endp = strchr(p, '\n');
168 if ( endp == NULL )
169 endp = p + strlen(p);
170 newlen = strlen(pythonpath) + 1 + strlen(curwd) + (endp-p);
171 pythonpath = realloc(pythonpath, newlen+1);
172 if ( pythonpath == NULL ) return PYTHONPATH;
173 strcat(pythonpath, "\n");
174 if ( *p == ':' ) {
175 p++;
176 strcat(pythonpath, curwd);
177 strncat(pythonpath, p, (endp-p));
178 newlen--; /* Ok, ok, we've allocated one byte too much */
179 } else {
180 /* We've allocated too much in this case */
181 newlen -= strlen(curwd);
182 pythonpath = realloc(pythonpath, newlen+1);
183 if ( pythonpath == NULL ) return PYTHONPATH;
184 strncat(pythonpath, p, (endp-p));
185 }
186 pythonpath[newlen] = '\0';
187 p = endp + 1;
188 }
189 return pythonpath;
190}
191
Jack Jansen83c74df1996-10-22 15:25:42 +0000192
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000193/*
194** Open/create the Python Preferences file, return the handle
195*/
Jack Jansenee081042000-04-21 23:53:37 +0000196short
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000197PyMac_OpenPrefFile()
198{
Jack Jansenabdf93c1998-07-31 09:33:28 +0000199 AliasHandle handle;
200 FSSpec dirspec;
201 short prefrh;
202 OSErr err;
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000203
Jack Jansenac82b6a1998-07-13 13:38:29 +0000204 if ( !getpreffilefss(&dirspec))
205 return -1;
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000206 prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm);
207 if ( prefrh < 0 ) {
Jack Jansen83c74df1996-10-22 15:25:42 +0000208#if 0
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000209 action = CautionAlert(NOPREFFILE_ID, NULL);
210 if ( action == NOPREFFILE_NO )
211 exit(1);
Jack Jansen83c74df1996-10-22 15:25:42 +0000212#endif
Jack Jansen532e3c21996-02-21 15:36:26 +0000213 FSpCreateResFile(&dirspec, 'Pyth', 'pref', 0);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000214 prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm);
215 if ( prefrh == -1 ) {
216 /* This "cannot happen":-) */
Jack Jansenb39be211995-09-01 11:48:10 +0000217 printf("Cannot create preferences file, error %d\n", ResError());
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000218 exit(1);
219 }
Jack Jansen26ee1261996-11-09 18:45:18 +0000220 if ( (err=PyMac_init_process_location()) != 0 ) {
221 printf("Cannot get application location, error %d\n", err);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000222 exit(1);
223 }
Jack Jansen26ee1261996-11-09 18:45:18 +0000224 dirspec = PyMac_ApplicationFSSpec;
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000225 dirspec.name[0] = 0;
Jack Jansenb39be211995-09-01 11:48:10 +0000226 if ((err=NewAlias(NULL, &dirspec, &handle)) != 0 ) {
227 printf("Cannot make alias to application directory, error %d\n", err);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000228 exit(1);
229 }
Jack Jansenabdf93c1998-07-31 09:33:28 +0000230 AddResource((Handle)handle, 'alis', PYTHONHOME_ID, "\p");
231 UpdateResFile(prefrh);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000232
233 } else {
234 UseResFile(prefrh);
235 }
236 return prefrh;
237}
Jack Jansen12fce3e1995-08-14 12:31:44 +0000238
239/*
240** Return the name of the Python directory
241*/
Jack Jansen5b3c9711997-09-08 13:22:49 +0000242char *
Jack Jansen12fce3e1995-08-14 12:31:44 +0000243PyMac_GetPythonDir()
244{
Jack Jansen83c74df1996-10-22 15:25:42 +0000245 static int diditbefore = 0;
Jack Jansenabdf93c1998-07-31 09:33:28 +0000246 static char name[256] = {':', '\0'};
247 AliasHandle handle;
248 FSSpec dirspec;
249 Boolean modified = 0;
250 short oldrh, prefrh = -1, homerh;
251
252 if ( diditbefore )
253 return name;
254
255 oldrh = CurResFile();
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000256
Jack Jansenabdf93c1998-07-31 09:33:28 +0000257 /* First look for an override in the application file */
258 UseResFile(PyMac_AppRefNum);
259 handle = (AliasHandle)Get1Resource('alis', PYTHONHOMEOVERRIDE_ID);
260 UseResFile(oldrh);
261 if ( handle != NULL ) {
262 homerh = PyMac_AppRefNum;
263 } else {
264 /* Try to open preferences file in the preferences folder. */
265 prefrh = PyMac_OpenPrefFile();
266 handle = (AliasHandle)Get1Resource('alis', PYTHONHOME_ID);
267 if ( handle == NULL ) {
268 /* (void)StopAlert(BADPREFFILE_ID, NULL); */
269 diditbefore=1;
270 return ":";
271 }
272 homerh = prefrh;
273 }
274 /* It exists. Resolve it (possibly updating it) */
275 if ( ResolveAlias(NULL, handle, &dirspec, &modified) != noErr ) {
276 (void)StopAlert(BADPREFFILE_ID, NULL);
277 diditbefore=1;
278 return ":";
279 }
280 if ( modified ) {
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000281 ChangedResource((Handle)handle);
Jack Jansenabdf93c1998-07-31 09:33:28 +0000282 UpdateResFile(homerh);
283 }
284 if ( prefrh != -1 ) CloseResFile(prefrh);
285 UseResFile(oldrh);
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000286
Jack Jansen26ee1261996-11-09 18:45:18 +0000287 if ( PyMac_GetFullPath(&dirspec, name) == 0 ) {
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000288 strcat(name, ":");
Jack Jansenabdf93c1998-07-31 09:33:28 +0000289 } else {
Jack Jansen41fa7ea1995-08-31 13:59:36 +0000290 /* If all fails, we return the current directory */
291 printf("Python home dir exists but I cannot find the pathname!!\n");
Jack Jansen12fce3e1995-08-14 12:31:44 +0000292 name[0] = 0;
293 (void)getwd(name);
294 }
Jack Jansen83c74df1996-10-22 15:25:42 +0000295 diditbefore = 1;
Jack Jansen12fce3e1995-08-14 12:31:44 +0000296 return name;
297}
298
299#ifndef USE_BUILTIN_PATH
Jack Jansen5b3c9711997-09-08 13:22:49 +0000300char *
Jack Jansen9ae898b2000-07-11 21:16:03 +0000301PyMac_GetPythonPath(void)
Jack Jansen12fce3e1995-08-14 12:31:44 +0000302{
Jack Jansenabdf93c1998-07-31 09:33:28 +0000303 short oldrh, prefrh = -1;
304 char *rv;
305 int i, newlen;
306 Str255 pathitem;
307 int resource_id;
308 OSErr err;
309 Handle h;
310
311 oldrh = CurResFile();
312 /*
313 ** This is a bit tricky. We check here whether the application file
314 ** contains an override. This is to forestall us finding another STR# resource
315 ** with "our" id and using that for path initialization
316 */
317 UseResFile(PyMac_AppRefNum);
318 SetResLoad(0);
319 if ( (h=Get1Resource('STR#', PYTHONPATHOVERRIDE_ID)) ) {
320 ReleaseResource(h);
321 resource_id = PYTHONPATHOVERRIDE_ID;
322 } else {
323 resource_id = PYTHONPATH_ID;
324 }
325 SetResLoad(1);
326 UseResFile(oldrh);
327
328 /* Open the preferences file only if there is no override */
329 if ( resource_id != PYTHONPATHOVERRIDE_ID )
330 prefrh = PyMac_OpenPrefFile();
331 /* At this point, we may or may not have the preferences file open, and it
332 ** may or may not contain a sys.path STR# resource. We don't care, if it doesn't
333 ** exist we use the one from the application (the default).
334 ** We put an initial '\n' in front of the path that we don't return to the caller
335 */
336 if( (rv = malloc(2)) == NULL )
337 goto out;
338 strcpy(rv, "\n");
Jack Jansenf12e7091996-09-05 15:19:24 +0000339
Jack Jansenabdf93c1998-07-31 09:33:28 +0000340 for(i=1; ; i++) {
341 GetIndString(pathitem, resource_id, i);
342 if( pathitem[0] == 0 )
343 break;
344 if ( pathitem[0] >= 9 && strncmp((char *)pathitem+1, "$(PYTHON)", 9) == 0 ) {
345 /* We have to put the directory in place */
346 char *dir = PyMac_GetPythonDir();
347
348 newlen = strlen(rv) + strlen(dir) + (pathitem[0]-9) + 2;
349 if( (rv=realloc(rv, newlen)) == NULL)
350 goto out;
351 strcat(rv, dir);
352 /* Skip a colon at the beginning of the item */
353 if ( pathitem[0] > 9 && pathitem[1+9] == ':' ) {
Jack Jansen12fce3e1995-08-14 12:31:44 +0000354 memcpy(rv+strlen(rv), pathitem+1+10, pathitem[0]-10);
355 newlen--;
356 } else {
357 memcpy(rv+strlen(rv), pathitem+1+9, pathitem[0]-9);
358 }
Jack Jansenabdf93c1998-07-31 09:33:28 +0000359 rv[newlen-2] = '\n';
360 rv[newlen-1] = 0;
361 } else if ( pathitem[0] >= 14 && strncmp((char *)pathitem+1, "$(APPLICATION)", 14) == 0 ) {
362 /* This is the application itself */
Jack Jansena486a551996-04-04 15:39:18 +0000363
Jack Jansenabdf93c1998-07-31 09:33:28 +0000364 if ( (err=PyMac_init_process_location()) != 0 ) {
Jack Jansen26ee1261996-11-09 18:45:18 +0000365 printf("Cannot get application location, error %d\n", err);
Jack Jansena486a551996-04-04 15:39:18 +0000366 exit(1);
367 }
Jack Jansen26ee1261996-11-09 18:45:18 +0000368
369 newlen = strlen(rv) + strlen(PyMac_ApplicationPath) + 2;
Jack Jansenabdf93c1998-07-31 09:33:28 +0000370 if( (rv=realloc(rv, newlen)) == NULL)
371 goto out;
372 strcpy(rv+strlen(rv), PyMac_ApplicationPath);
373 rv[newlen-2] = '\n';
374 rv[newlen-1] = 0;
Jack Jansena486a551996-04-04 15:39:18 +0000375
Jack Jansenabdf93c1998-07-31 09:33:28 +0000376 } else {
377 /* Use as-is */
378 newlen = strlen(rv) + (pathitem[0]) + 2;
379 if( (rv=realloc(rv, newlen)) == NULL)
380 goto out;
381 memcpy(rv+strlen(rv), pathitem+1, pathitem[0]);
382 rv[newlen-2] = '\n';
383 rv[newlen-1] = 0;
384 }
Jack Jansen12fce3e1995-08-14 12:31:44 +0000385 }
386 if( strlen(rv) == 1) {
387 free(rv);
388 rv = NULL;
389 }
390 if ( rv ) {
391 rv[strlen(rv)-1] = 0;
392 rv++;
393 }
394out:
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000395 if ( prefrh != -1) CloseResFile(prefrh);
396 UseResFile(oldrh);
Jack Jansen12fce3e1995-08-14 12:31:44 +0000397 return rv;
398}
399#endif /* !USE_BUILTIN_PATH */
400
Jack Jansena4b7e141996-02-21 16:46:57 +0000401void
Jack Jansen7d5f9e81996-09-07 17:09:31 +0000402PyMac_PreferenceOptions(PyMac_PrefRecord *pr)
Jack Jansena4b7e141996-02-21 16:46:57 +0000403{
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000404 short oldrh, prefrh = -1;
Jack Jansena4b7e141996-02-21 16:46:57 +0000405 Handle handle;
406 int size;
Jack Jansen5b3c9711997-09-08 13:22:49 +0000407 PyMac_PrefRecord *p;
408 int action;
Jack Jansena4b7e141996-02-21 16:46:57 +0000409
410
Jack Jansenabdf93c1998-07-31 09:33:28 +0000411 oldrh = CurResFile();
412
413 /* Attempt to load overrides from application */
414 UseResFile(PyMac_AppRefNum);
415 handle = Get1Resource('Popt', PYTHONOPTIONSOVERRIDE_ID);
416 UseResFile(oldrh);
417
418 /* Otherwise get options from prefs file or any other open resource file */
419 if ( handle == NULL ) {
420 prefrh = PyMac_OpenPrefFile();
421 handle = GetResource('Popt', PYTHONOPTIONS_ID);
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000422 }
Jack Jansenabdf93c1998-07-31 09:33:28 +0000423 if ( handle == NULL ) {
424 return;
425 }
426 HLock(handle);
427 size = GetHandleSize(handle);
428 p = (PyMac_PrefRecord *)*handle;
429 if ( p->version == POPT_VERSION_CURRENT && size == sizeof(PyMac_PrefRecord) ) {
430 *pr = *p;
431 } else {
432 action = CautionAlert(BADPREFERENCES_ID, NULL);
433 if ( action == BADPREF_DELETE ) {
434 OSErr err;
435
436 RemoveResource(handle);
437 if ( (err=ResError()) ) printf("RemoveResource: %d\n", err);
438 if ( prefrh != -1 ) {
439 UpdateResFile(prefrh);
440 if ( (err=ResError()) ) printf("UpdateResFile: %d\n", err);
441 }
442 } else if ( action == BADPREF_QUIT )
443 exit(1);
444 }
445 HUnlock(handle);
Jack Jansena4b7e141996-02-21 16:46:57 +0000446
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000447 if ( prefrh != -1) CloseResFile(prefrh);
Jack Jansenabdf93c1998-07-31 09:33:28 +0000448 UseResFile(oldrh);
Jack Jansena4b7e141996-02-21 16:46:57 +0000449}
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000450
Jack Jansen2d1306b2000-04-07 09:10:49 +0000451#ifdef USE_GUSI1
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000452void
453PyMac_SetGUSIOptions()
454{
455 Handle h;
456 short oldrh, prefrh = -1;
457
458 oldrh = CurResFile();
459
460 /* Try override from the application resource fork */
461 UseResFile(PyMac_AppRefNum);
462 h = Get1Resource('GU\267I', GUSIOPTIONSOVERRIDE_ID);
463 UseResFile(oldrh);
464
465 /* If that didn't work try nonoverride from anywhere */
466 if ( h == NULL ) {
467 prefrh = PyMac_OpenPrefFile();
468 h = GetResource('GU\267I', GUSIOPTIONS_ID);
469 }
470 if ( h ) GUSILoadConfiguration(h);
471 if ( prefrh != -1) CloseResFile(prefrh);
Jack Jansenabdf93c1998-07-31 09:33:28 +0000472 UseResFile(oldrh);
Jack Jansen3f7d2b41996-09-06 22:21:07 +0000473}
Jack Jansenee081042000-04-21 23:53:37 +0000474#endif /* USE_GUSI1 */