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
7330b39a
Kaydet (Commit)
7330b39a
authored
Agu 08, 1997
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adapted for 1.5a3: Py_SupressPrintingFlag is gone, and
Py_SetProgramName replaces Py_GetProgramName
üst
4be0ce3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
21 deletions
+9
-21
macmain.c
Mac/Python/macmain.c
+9
-21
No files found.
Mac/Python/macmain.c
Dosyayı görüntüle @
7330b39a
...
@@ -53,15 +53,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -53,15 +53,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
extern
int
Py_DebugFlag
;
/* For parser.c, declared in pythonrun.c */
extern
int
Py_DebugFlag
;
/* For parser.c, declared in pythonrun.c */
extern
int
Py_VerboseFlag
;
/* For import.c, declared in pythonrun.c */
extern
int
Py_VerboseFlag
;
/* For import.c, declared in pythonrun.c */
extern
int
Py_SuppressPrintingFlag
;
/* For ceval.c, declared in pythonrun.c */
short
PyMac_AppRefNum
;
/* RefNum of application resource fork */
short
PyMac_AppRefNum
;
/* RefNum of application resource fork */
/* Subroutines that live in their own file */
extern
char
*
Py_GetVersion
Py_PROTO
((
void
));
extern
char
*
Py_GetCopyright
Py_PROTO
((
void
));
/* For Py_GetArgcArgv(); set by main() */
/* For Py_GetArgcArgv(); set by main() */
static
char
**
orig_argv
;
static
char
**
orig_argv
;
static
int
orig_argc
;
static
int
orig_argc
;
...
@@ -131,7 +124,7 @@ PyMac_InteractiveOptions(PyMac_PrefRecord *p, int *argcp, char ***argvp)
...
@@ -131,7 +124,7 @@ PyMac_InteractiveOptions(PyMac_PrefRecord *p, int *argcp, char ***argvp)
SET_OPT_ITEM
(
OPT_INSPECT
,
inspect
);
SET_OPT_ITEM
(
OPT_INSPECT
,
inspect
);
SET_OPT_ITEM
(
OPT_VERBOSE
,
verbose
);
SET_OPT_ITEM
(
OPT_VERBOSE
,
verbose
);
SET_OPT_ITEM
(
OPT_SUPPRESS
,
suppress_print
);
/* SET_OPT_ITEM(OPT_SUPPRESS, suppress_print); */
SET_OPT_ITEM
(
OPT_UNBUFFERED
,
unbuffered
);
SET_OPT_ITEM
(
OPT_UNBUFFERED
,
unbuffered
);
SET_OPT_ITEM
(
OPT_DEBUGGING
,
debugging
);
SET_OPT_ITEM
(
OPT_DEBUGGING
,
debugging
);
SET_OPT_ITEM
(
OPT_KEEPNORMAL
,
keep_normal
);
SET_OPT_ITEM
(
OPT_KEEPNORMAL
,
keep_normal
);
...
@@ -176,7 +169,7 @@ PyMac_InteractiveOptions(PyMac_PrefRecord *p, int *argcp, char ***argvp)
...
@@ -176,7 +169,7 @@ PyMac_InteractiveOptions(PyMac_PrefRecord *p, int *argcp, char ***argvp)
OPT_ITEM
(
OPT_INSPECT
,
inspect
);
OPT_ITEM
(
OPT_INSPECT
,
inspect
);
OPT_ITEM
(
OPT_VERBOSE
,
verbose
);
OPT_ITEM
(
OPT_VERBOSE
,
verbose
);
OPT_ITEM
(
OPT_SUPPRESS
,
suppress_print
);
/* OPT_ITEM(OPT_SUPPRESS, suppress_print); */
OPT_ITEM
(
OPT_UNBUFFERED
,
unbuffered
);
OPT_ITEM
(
OPT_UNBUFFERED
,
unbuffered
);
OPT_ITEM
(
OPT_DEBUGGING
,
debugging
);
OPT_ITEM
(
OPT_DEBUGGING
,
debugging
);
OPT_ITEM
(
OPT_KEEPNORMAL
,
keep_normal
);
OPT_ITEM
(
OPT_KEEPNORMAL
,
keep_normal
);
...
@@ -239,7 +232,7 @@ init_common(int *argcp, char ***argvp, int embedded)
...
@@ -239,7 +232,7 @@ init_common(int *argcp, char ***argvp, int embedded)
/* Copy selected options to where the machine-independent stuff wants it */
/* Copy selected options to where the machine-independent stuff wants it */
Py_VerboseFlag
=
options
.
verbose
;
Py_VerboseFlag
=
options
.
verbose
;
Py_SuppressPrintingFlag
=
options
.
suppress_print
;
/* Py_SuppressPrintingFlag = options.suppress_print; */
Py_DebugFlag
=
options
.
debugging
;
Py_DebugFlag
=
options
.
debugging
;
if
(
options
.
noargs
)
{
if
(
options
.
noargs
)
{
/* don't process events at all without the scripts permission */
/* don't process events at all without the scripts permission */
...
@@ -266,6 +259,11 @@ init_common(int *argcp, char ***argvp, int embedded)
...
@@ -266,6 +259,11 @@ init_common(int *argcp, char ***argvp, int embedded)
/* collectSummary or collectDetailed, timebase, #routines, max stack depth */
/* collectSummary or collectDetailed, timebase, #routines, max stack depth */
ProfilerInit
(
collectSummary
,
bestTimeBase
,
2000
,
150
);
ProfilerInit
(
collectSummary
,
bestTimeBase
,
2000
,
150
);
#endif
#endif
/* Tell the rest of python about our argc/argv */
orig_argc
=
*
argcp
;
/* For Py_GetArgcArgv() */
orig_argv
=
*
argvp
;
Py_SetProgramName
((
*
argvp
)[
0
]);
}
}
/*
/*
...
@@ -396,8 +394,6 @@ Py_Main(argc, argv)
...
@@ -396,8 +394,6 @@ Py_Main(argc, argv)
char
*
filename
=
NULL
;
char
*
filename
=
NULL
;
FILE
*
fp
=
stdin
;
FILE
*
fp
=
stdin
;
orig_argc
=
argc
;
/* For Py_GetArgcArgv() */
orig_argv
=
argv
;
filename
=
argv
[
1
];
filename
=
argv
[
1
];
if
(
Py_VerboseFlag
||
if
(
Py_VerboseFlag
||
...
@@ -483,18 +479,10 @@ PyMac_Exit(status)
...
@@ -483,18 +479,10 @@ PyMac_Exit(status)
}
}
/* Return the program name -- some code out there needs this. */
/* Return the program name -- some code out there needs this. */
char
*
Py_GetProgramName
()
{
return
orig_argv
[
0
];
}
/* The same, but used differently */
char
*
char
*
Py_GetProgramFullPath
()
Py_GetProgramFullPath
()
{
{
return
Py_GetProgramName
()
;
return
orig_argv
[
0
]
;
}
}
...
...
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