Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5a793295
Kaydet (Commit)
5a793295
authored
Şub 06, 2003
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Got rid of FSSpecs.
üst
5aac4e63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
29 deletions
+28
-29
mkestrres.py
Mac/scripts/mkestrres.py
+28
-29
No files found.
Mac/scripts/mkestrres.py
Dosyayı görüntüle @
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