Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b39be217
Commit
b39be217
authored
Sep 01, 1995
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed to work on 68K (could be yet another optimizer bug or something)
parent
54bc679d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Mac/Python/macgetpath.c
Mac/Python/macgetpath.c
+7
-5
No files found.
Mac/Python/macgetpath.c
View file @
b39be217
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment