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
edabdc1e
Kaydet (Commit)
edabdc1e
authored
Tem 08, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ANSI-fied sources, converted to four-space indentation.
üst
da940d8f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
getpath.c
Modules/getpath.c
+12
-21
No files found.
Modules/getpath.c
Dosyayı görüntüle @
edabdc1e
...
...
@@ -139,8 +139,7 @@ static char *module_search_path = NULL;
static
char
lib_python
[
20
];
/* Dynamically set to "lib/python" VERSION */
static
void
reduce
(
dir
)
char
*
dir
;
reduce
(
char
*
dir
)
{
size_t
i
=
strlen
(
dir
);
while
(
i
>
0
&&
dir
[
i
]
!=
SEP
)
...
...
@@ -158,8 +157,7 @@ reduce(dir)
#endif
static
int
isfile
(
filename
)
/* Is file, not directory */
char
*
filename
;
isfile
(
char
*
filename
)
/* Is file, not directory */
{
struct
stat
buf
;
if
(
stat
(
filename
,
&
buf
)
!=
0
)
...
...
@@ -171,8 +169,7 @@ isfile(filename) /* Is file, not directory */
static
int
ismodule
(
filename
)
/* Is module -- check for .pyc/.pyo too */
char
*
filename
;
ismodule
(
char
*
filename
)
/* Is module -- check for .pyc/.pyo too */
{
if
(
isfile
(
filename
))
return
1
;
...
...
@@ -188,8 +185,7 @@ ismodule(filename) /* Is module -- check for .pyc/.pyo too */
static
int
isxfile
(
filename
)
/* Is executable file */
char
*
filename
;
isxfile
(
char
*
filename
)
/* Is executable file */
{
struct
stat
buf
;
if
(
stat
(
filename
,
&
buf
)
!=
0
)
...
...
@@ -203,8 +199,7 @@ isxfile(filename) /* Is executable file */
static
int
isdir
(
filename
)
/* Is directory */
char
*
filename
;
isdir
(
char
*
filename
)
/* Is directory */
{
struct
stat
buf
;
if
(
stat
(
filename
,
&
buf
)
!=
0
)
...
...
@@ -216,9 +211,7 @@ isdir(filename) /* Is directory */
static
void
joinpath
(
buffer
,
stuff
)
char
*
buffer
;
char
*
stuff
;
joinpath
(
char
*
buffer
,
char
*
stuff
)
{
size_t
n
,
k
;
if
(
stuff
[
0
]
==
SEP
)
...
...
@@ -237,9 +230,7 @@ joinpath(buffer, stuff)
static
int
search_for_prefix
(
argv0_path
,
home
)
char
*
argv0_path
;
char
*
home
;
search_for_prefix
(
char
*
argv0_path
,
char
*
home
)
{
size_t
n
;
char
*
vpath
;
...
...
@@ -306,9 +297,7 @@ search_for_prefix(argv0_path, home)
static
int
search_for_exec_prefix
(
argv0_path
,
home
)
char
*
argv0_path
;
char
*
home
;
search_for_exec_prefix
(
char
*
argv0_path
,
char
*
home
)
{
size_t
n
;
...
...
@@ -389,8 +378,10 @@ calculate_path()
/* Frameworks have support for versioning */
strcpy
(
lib_python
,
"lib"
);
}
else
{
/* If we're not in a framework, fall back to the old way (even though NSNameOfModule() probably does the same thing.) */
}
else
{
/* If we're not in a framework, fall back to the old way
(even though NSNameOfModule() probably does the same thing.) */
#endif
/* Initialize this dynamically for K&R C */
...
...
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