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
5a793295
Commit
5a793295
authored
Feb 06, 2003
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of FSSpecs.
parent
5aac4e63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
29 deletions
+28
-29
Mac/scripts/mkestrres.py
Mac/scripts/mkestrres.py
+28
-29
No files found.
Mac/scripts/mkestrres.py
View file @
5a793295
"""Parse sys/errno.h and Errors.h and create Estr resource"""
import
re
import
macfs
import
string
from
Carbon
import
Res
import
os
...
...
@@ -105,47 +104,47 @@ def parse_errors_h(fp, dict):
def
main
():
dict
=
{}
fss
,
ok
=
macfs
.
PromptGetFile
(
"Where is GUSI sys/errno.h?"
)
if
not
ok
:
return
fp
=
open
(
fss
.
as_pathname
()
)
parse_errno_h
(
fp
,
dict
)
fp
.
close
()
pathname
=
EasyDialogs
.
AskFileForOpen
(
message
=
"Where is GUSI sys/errno.h?"
)
if
pathname
:
fp
=
open
(
pathname
)
parse_errno_h
(
fp
,
dict
)
fp
.
close
()
fss
,
ok
=
macfs
.
PromptGetFile
(
"Select cerrno (MSL) or cancel"
)
if
not
ok
:
return
fp
=
open
(
fss
.
as_pathname
()
)
parse_errno_h
(
fp
,
dict
)
fp
.
close
()
pathname
=
EasyDialogs
.
AskFileForOpen
(
message
=
"Select cerrno (MSL) or cancel"
)
if
pathname
:
fp
=
open
(
pathname
)
parse_errno_h
(
fp
,
dict
)
fp
.
close
()
fss
,
ok
=
macfs
.
PromptGetFile
(
"Where is MacErrors.h?"
)
if
not
ok
:
return
fp
=
open
(
fss
.
as_pathname
()
)
parse_errors_h
(
fp
,
dict
)
fp
.
close
()
pathname
=
EasyDialogs
.
AskFileForOpen
(
message
=
"Where is MacErrors.h?"
)
if
pathname
:
fp
=
open
(
pathname
)
parse_errors_h
(
fp
,
dict
)
fp
.
close
()
fss
,
ok
=
macfs
.
PromptGetFile
(
"Where is mkestrres-MacErrors.h?"
)
if
not
ok
:
return
fp
=
open
(
fss
.
as_pathname
()
)
parse_errors_h
(
fp
,
dict
)
fp
.
close
()
pathname
=
EasyDialogs
.
AskFileForOpen
(
message
=
"Where is mkestrres-MacErrors.h?"
)
if
pathname
:
fp
=
open
(
pathname
)
parse_errors_h
(
fp
,
dict
)
fp
.
close
()
if
not
dict
:
return
fss
,
ok
=
macfs
.
StandardPutFile
(
"Resource output file?"
,
"errors.rsrc"
)
if
ok
:
pathname
=
EasyDialogs
.
AskFileForSave
(
message
=
"Resource output file?"
,
savedFileName
=
"errors.rsrc"
)
if
pathname
:
writeestr
(
fss
,
dict
)
fss
,
ok
=
macfs
.
StandardPutFile
(
"Python output file?"
,
"macerrors.py"
)
if
ok
:
fp
=
open
(
fss
.
as_pathname
()
,
"w"
)
pathname
=
EasyDialogs
.
AskFileForSave
(
message
=
"Python output file?"
,
savedFileName
=
"macerrors.py"
)
if
pathname
:
fp
=
open
(
pathname
,
"w"
)
writepython
(
fp
,
dict
)
fp
.
close
()
fss
.
SetCreatorType
(
'Pyth'
,
'TEXT'
)
fss
,
ok
=
macfs
.
StandardPutFile
(
"Text output file?"
,
"errors.txt"
)
if
ok
:
fp
=
open
(
fss
.
as_pathname
()
,
"w"
)
pathname
=
EasyDialogs
.
AskFileForSave
(
message
=
"Text output file?"
,
savedFileName
=
"errors.txt"
)
if
pathname
:
fp
=
open
(
pathname
,
"w"
)
k
=
dict
.
keys
()
k
.
sort
()
...
...
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