Mercurial > cpython-lru_cache-weakref
diff Mac/Python/macgetpath.c @ 3057:24af8eab7b76 legacy-trunk
Fixed to work on 68K (could be yet another optimizer bug or something)
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Fri, 01 Sep 1995 11:48:10 +0000 |
| parents | 2cb1416010b3 |
| children | 022474ac2451 |
line wrap: on
line diff
--- a/Mac/Python/macgetpath.c Fri Sep 01 11:46:27 1995 +0000 +++ b/Mac/Python/macgetpath.c Fri Sep 01 11:48:10 1995 +0000 @@ -21,6 +21,7 @@ #include <Folders.h> #include <Resources.h> #include <TextUtils.h> +#include <Dialogs.h> #define PYTHONPATH "\ :\n\ @@ -97,6 +98,7 @@ short prefdirRefNum; long prefdirDirID; short action; + OSErr err; if ( FindFolder(kOnSystemDisk, 'pref', kDontCreateFolder, &prefdirRefNum, &prefdirDirID) != noErr ) { @@ -116,16 +118,16 @@ prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm); if ( prefrh == -1 ) { /* This "cannot happen":-) */ - printf("Cannot create preferences file!!\n"); + printf("Cannot create preferences file, error %d\n", ResError()); exit(1); } - if ( PyMac_process_location(&dirspec) != 0 ) { - printf("Cannot get FSSpec for application!!\n"); + if ( (err=PyMac_process_location(&dirspec)) != 0 ) { + printf("Cannot get FSSpec for application, error %d\n", err); exit(1); } dirspec.name[0] = 0; - if (NewAlias(NULL, &dirspec, &handle) != 0 ) { - printf("Cannot make alias to application directory!!\n"); + if ((err=NewAlias(NULL, &dirspec, &handle)) != 0 ) { + printf("Cannot make alias to application directory, error %d\n", err); exit(1); } AddResource((Handle)handle, 'alis', PYTHONHOME_ID, "\p");
