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
6b9fdf52
Kaydet (Commit)
6b9fdf52
authored
Agu 20, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Globally renamed join() to joinpath() to avoid compilation error on Cray.
üst
725d941f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
getpath.c
Modules/getpath.c
+22
-22
No files found.
Modules/getpath.c
Dosyayı görüntüle @
6b9fdf52
...
@@ -177,7 +177,7 @@ exists(filename)
...
@@ -177,7 +177,7 @@ exists(filename)
static
void
static
void
join
(
buffer
,
stuff
)
join
path
(
buffer
,
stuff
)
char
*
buffer
;
char
*
buffer
;
char
*
stuff
;
char
*
stuff
;
{
{
...
@@ -207,7 +207,7 @@ search_for_prefix(argv0_path, home)
...
@@ -207,7 +207,7 @@ search_for_prefix(argv0_path, home)
/* Check to see if argv[0] is in the build directory */
/* Check to see if argv[0] is in the build directory */
strcpy
(
prefix
,
argv0_path
);
strcpy
(
prefix
,
argv0_path
);
join
(
prefix
,
"Modules/Setup"
);
join
path
(
prefix
,
"Modules/Setup"
);
if
(
exists
(
prefix
))
{
if
(
exists
(
prefix
))
{
/* Check VPATH to see if argv0_path is in the build directory.
/* Check VPATH to see if argv0_path is in the build directory.
* Complication: the VPATH passed in is relative to the
* Complication: the VPATH passed in is relative to the
...
@@ -222,10 +222,10 @@ search_for_prefix(argv0_path, home)
...
@@ -222,10 +222,10 @@ search_for_prefix(argv0_path, home)
if
(
vpath
[
0
]
==
'.'
&&
vpath
[
1
]
==
'.'
&&
vpath
[
2
]
==
'/'
)
if
(
vpath
[
0
]
==
'.'
&&
vpath
[
1
]
==
'.'
&&
vpath
[
2
]
==
'/'
)
vpath
+=
3
;
vpath
+=
3
;
strcpy
(
prefix
,
argv0_path
);
strcpy
(
prefix
,
argv0_path
);
join
(
prefix
,
vpath
);
join
path
(
prefix
,
vpath
);
reduce
(
prefix
);
reduce
(
prefix
);
join
(
prefix
,
"Lib"
);
join
path
(
prefix
,
"Lib"
);
join
(
prefix
,
LANDMARK
);
join
path
(
prefix
,
LANDMARK
);
if
(
exists
(
prefix
))
if
(
exists
(
prefix
))
return
-
1
;
return
-
1
;
}
}
...
@@ -237,8 +237,8 @@ search_for_prefix(argv0_path, home)
...
@@ -237,8 +237,8 @@ search_for_prefix(argv0_path, home)
delim
=
strchr
(
prefix
,
DELIM
);
delim
=
strchr
(
prefix
,
DELIM
);
if
(
delim
)
if
(
delim
)
*
delim
=
'\0'
;
*
delim
=
'\0'
;
join
(
prefix
,
lib_python
);
join
path
(
prefix
,
lib_python
);
join
(
prefix
,
LANDMARK
);
join
path
(
prefix
,
LANDMARK
);
if
(
exists
(
prefix
))
if
(
exists
(
prefix
))
return
1
;
return
1
;
}
}
...
@@ -247,8 +247,8 @@ search_for_prefix(argv0_path, home)
...
@@ -247,8 +247,8 @@ search_for_prefix(argv0_path, home)
strcpy
(
prefix
,
argv0_path
);
strcpy
(
prefix
,
argv0_path
);
do
{
do
{
n
=
strlen
(
prefix
);
n
=
strlen
(
prefix
);
join
(
prefix
,
lib_python
);
join
path
(
prefix
,
lib_python
);
join
(
prefix
,
LANDMARK
);
join
path
(
prefix
,
LANDMARK
);
if
(
exists
(
prefix
))
if
(
exists
(
prefix
))
return
1
;
return
1
;
prefix
[
n
]
=
'\0'
;
prefix
[
n
]
=
'\0'
;
...
@@ -257,8 +257,8 @@ search_for_prefix(argv0_path, home)
...
@@ -257,8 +257,8 @@ search_for_prefix(argv0_path, home)
/* Look at configure's PREFIX */
/* Look at configure's PREFIX */
strcpy
(
prefix
,
PREFIX
);
strcpy
(
prefix
,
PREFIX
);
join
(
prefix
,
lib_python
);
join
path
(
prefix
,
lib_python
);
join
(
prefix
,
LANDMARK
);
join
path
(
prefix
,
LANDMARK
);
if
(
exists
(
prefix
))
if
(
exists
(
prefix
))
return
1
;
return
1
;
...
@@ -276,7 +276,7 @@ search_for_exec_prefix(argv0_path, home)
...
@@ -276,7 +276,7 @@ search_for_exec_prefix(argv0_path, home)
/* Check to see if argv[0] is in the build directory */
/* Check to see if argv[0] is in the build directory */
strcpy
(
exec_prefix
,
argv0_path
);
strcpy
(
exec_prefix
,
argv0_path
);
join
(
exec_prefix
,
"Modules/Setup"
);
join
path
(
exec_prefix
,
"Modules/Setup"
);
if
(
exists
(
exec_prefix
))
{
if
(
exists
(
exec_prefix
))
{
reduce
(
exec_prefix
);
reduce
(
exec_prefix
);
return
-
1
;
return
-
1
;
...
@@ -290,8 +290,8 @@ search_for_exec_prefix(argv0_path, home)
...
@@ -290,8 +290,8 @@ search_for_exec_prefix(argv0_path, home)
strcpy
(
exec_prefix
,
delim
+
1
);
strcpy
(
exec_prefix
,
delim
+
1
);
else
else
strcpy
(
exec_prefix
,
home
);
strcpy
(
exec_prefix
,
home
);
join
(
exec_prefix
,
lib_python
);
join
path
(
exec_prefix
,
lib_python
);
join
(
exec_prefix
,
"sharedmodules"
);
join
path
(
exec_prefix
,
"sharedmodules"
);
if
(
exists
(
exec_prefix
))
if
(
exists
(
exec_prefix
))
return
1
;
return
1
;
}
}
...
@@ -300,8 +300,8 @@ search_for_exec_prefix(argv0_path, home)
...
@@ -300,8 +300,8 @@ search_for_exec_prefix(argv0_path, home)
strcpy
(
exec_prefix
,
argv0_path
);
strcpy
(
exec_prefix
,
argv0_path
);
do
{
do
{
n
=
strlen
(
exec_prefix
);
n
=
strlen
(
exec_prefix
);
join
(
exec_prefix
,
lib_python
);
join
path
(
exec_prefix
,
lib_python
);
join
(
exec_prefix
,
"sharedmodules"
);
join
path
(
exec_prefix
,
"sharedmodules"
);
if
(
exists
(
exec_prefix
))
if
(
exists
(
exec_prefix
))
return
1
;
return
1
;
exec_prefix
[
n
]
=
'\0'
;
exec_prefix
[
n
]
=
'\0'
;
...
@@ -310,8 +310,8 @@ search_for_exec_prefix(argv0_path, home)
...
@@ -310,8 +310,8 @@ search_for_exec_prefix(argv0_path, home)
/* Look at configure's EXEC_PREFIX */
/* Look at configure's EXEC_PREFIX */
strcpy
(
exec_prefix
,
EXEC_PREFIX
);
strcpy
(
exec_prefix
,
EXEC_PREFIX
);
join
(
exec_prefix
,
lib_python
);
join
path
(
exec_prefix
,
lib_python
);
join
(
exec_prefix
,
"sharedmodules"
);
join
path
(
exec_prefix
,
"sharedmodules"
);
if
(
exists
(
exec_prefix
))
if
(
exists
(
exec_prefix
))
return
1
;
return
1
;
...
@@ -361,7 +361,7 @@ calculate_path()
...
@@ -361,7 +361,7 @@ calculate_path()
else
else
strcpy
(
progpath
,
path
);
strcpy
(
progpath
,
path
);
join
(
progpath
,
prog
);
join
path
(
progpath
,
prog
);
if
(
exists
(
progpath
))
if
(
exists
(
progpath
))
break
;
break
;
...
@@ -389,7 +389,7 @@ calculate_path()
...
@@ -389,7 +389,7 @@ calculate_path()
else
{
else
{
/* Interpret relative to progpath */
/* Interpret relative to progpath */
reduce
(
argv0_path
);
reduce
(
argv0_path
);
join
(
argv0_path
,
tmpbuffer
);
join
path
(
argv0_path
,
tmpbuffer
);
}
}
}
}
}
}
...
@@ -401,7 +401,7 @@ calculate_path()
...
@@ -401,7 +401,7 @@ calculate_path()
fprintf
(
stderr
,
fprintf
(
stderr
,
"Could not find platform independent libraries <prefix>
\n
"
);
"Could not find platform independent libraries <prefix>
\n
"
);
strcpy
(
prefix
,
PREFIX
);
strcpy
(
prefix
,
PREFIX
);
join
(
prefix
,
lib_python
);
join
path
(
prefix
,
lib_python
);
}
}
else
else
reduce
(
prefix
);
reduce
(
prefix
);
...
@@ -410,7 +410,7 @@ calculate_path()
...
@@ -410,7 +410,7 @@ calculate_path()
fprintf
(
stderr
,
fprintf
(
stderr
,
"Could not find platform dependent libraries <exec_prefix>
\n
"
);
"Could not find platform dependent libraries <exec_prefix>
\n
"
);
strcpy
(
exec_prefix
,
EXEC_PREFIX
);
strcpy
(
exec_prefix
,
EXEC_PREFIX
);
join
(
exec_prefix
,
"lib/sharedmodules"
);
join
path
(
exec_prefix
,
"lib/sharedmodules"
);
}
}
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
...
...
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