diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1995-09-01 11:48:10 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1995-09-01 11:48:10 (GMT) |
commit | b39be2173bb8d3b75c85e9e3c6dc3ab773c87d6f (patch) | |
tree | 9c21c087e27eaf3379ff68a52e46f59020dfc2ca /Mac/Python | |
parent | 54bc679d0a7968a553ade958a5ef2a9bb3b4ce7c (diff) | |
download | cpython-b39be2173bb8d3b75c85e9e3c6dc3ab773c87d6f.zip cpython-b39be2173bb8d3b75c85e9e3c6dc3ab773c87d6f.tar.gz cpython-b39be2173bb8d3b75c85e9e3c6dc3ab773c87d6f.tar.bz2 |
Fixed to work on 68K (could be yet another optimizer bug or something)
Diffstat (limited to 'Mac/Python')
-rw-r--r-- | Mac/Python/macgetpath.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Mac/Python/macgetpath.c b/Mac/Python/macgetpath.c index 4d9b8da..d97dd4e 100644 --- a/Mac/Python/macgetpath.c +++ b/Mac/Python/macgetpath.c @@ -21,6 +21,7 @@ #include <Folders.h> #include <Resources.h> #include <TextUtils.h> +#include <Dialogs.h> #define PYTHONPATH "\ :\n\ @@ -97,6 +98,7 @@ PyMac_OpenPrefFile() short prefdirRefNum; long prefdirDirID; short action; + OSErr err; if ( FindFolder(kOnSystemDisk, 'pref', kDontCreateFolder, &prefdirRefNum, &prefdirDirID) != noErr ) { @@ -116,16 +118,16 @@ PyMac_OpenPrefFile() 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"); |