Kaydet (Commit) b39be217 authored tarafından Jack Jansen's avatar Jack Jansen

Fixed to work on 68K (could be yet another optimizer bug or something)

üst 54bc679d
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <Folders.h> #include <Folders.h>
#include <Resources.h> #include <Resources.h>
#include <TextUtils.h> #include <TextUtils.h>
#include <Dialogs.h>
#define PYTHONPATH "\ #define PYTHONPATH "\
:\n\ :\n\
...@@ -97,6 +98,7 @@ PyMac_OpenPrefFile() ...@@ -97,6 +98,7 @@ PyMac_OpenPrefFile()
short prefdirRefNum; short prefdirRefNum;
long prefdirDirID; long prefdirDirID;
short action; short action;
OSErr err;
if ( FindFolder(kOnSystemDisk, 'pref', kDontCreateFolder, &prefdirRefNum, if ( FindFolder(kOnSystemDisk, 'pref', kDontCreateFolder, &prefdirRefNum,
&prefdirDirID) != noErr ) { &prefdirDirID) != noErr ) {
...@@ -116,16 +118,16 @@ PyMac_OpenPrefFile() ...@@ -116,16 +118,16 @@ PyMac_OpenPrefFile()
prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm); prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm);
if ( prefrh == -1 ) { if ( prefrh == -1 ) {
/* This "cannot happen":-) */ /* This "cannot happen":-) */
printf("Cannot create preferences file!!\n"); printf("Cannot create preferences file, error %d\n", ResError());
exit(1); exit(1);
} }
if ( PyMac_process_location(&dirspec) != 0 ) { if ( (err=PyMac_process_location(&dirspec)) != 0 ) {
printf("Cannot get FSSpec for application!!\n"); printf("Cannot get FSSpec for application, error %d\n", err);
exit(1); exit(1);
} }
dirspec.name[0] = 0; dirspec.name[0] = 0;
if (NewAlias(NULL, &dirspec, &handle) != 0 ) { if ((err=NewAlias(NULL, &dirspec, &handle)) != 0 ) {
printf("Cannot make alias to application directory!!\n"); printf("Cannot make alias to application directory, error %d\n", err);
exit(1); exit(1);
} }
AddResource((Handle)handle, 'alis', PYTHONHOME_ID, "\p"); AddResource((Handle)handle, 'alis', PYTHONHOME_ID, "\p");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment