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
48a680c0
Kaydet (Commit)
48a680c0
authored
Mar 02, 2001
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
RISCOS changes by dschwertberger.
üst
1ca8bb37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
1 deletion
+80
-1
socketmodule.c
Modules/socketmodule.c
+0
-0
timemodule.c
Modules/timemodule.c
+5
-1
intrcheck.c
Parser/intrcheck.c
+4
-0
myreadline.c
Parser/myreadline.c
+13
-0
import.c
Python/import.c
+58
-0
No files found.
Modules/socketmodule.c
Dosyayı görüntüle @
48a680c0
This diff is collapsed.
Click to expand it.
Modules/timemodule.c
Dosyayı görüntüle @
48a680c0
...
...
@@ -16,7 +16,9 @@
#define GUSI_TO_MSL_EPOCH (4*365*24*60*60)
#endif
/* USE_GUSI2 */
#else
#ifndef RISCOS
#include <sys/types.h>
#endif
/* RISCOS */
#endif
#ifdef QUICKWIN
...
...
@@ -38,7 +40,7 @@ extern int ftime(struct timeb *);
#include <i86.h>
#else
#ifdef MS_WINDOWS
#
include <windows.h>
include
<
windows
.
h
>
#ifdef MS_WIN16
/* These overrides not needed for Win32 */
#define timezone _timezone
...
...
@@ -747,7 +749,9 @@ floatsleep(double secs)
#if defined(__WATCOMC__) && !defined(__QNX__)
/* XXX Can't interrupt this sleep */
Py_BEGIN_ALLOW_THREADS
#ifndef RISCOS
delay
((
int
)(
secs
*
1000
+
0
.
5
));
/* delay() uses milliseconds */
#endif
Py_END_ALLOW_THREADS
#else
/* !__WATCOMC__ || __QNX__ */
#ifdef MSDOS
...
...
Parser/intrcheck.c
Dosyayı görüntüle @
48a680c0
...
...
@@ -137,7 +137,11 @@ intcatcher(int sig)
case
0
:
break
;
case
1
:
#ifdef RISCOS
fprintf
(
stderr
,
message
);
#else
write
(
2
,
message
,
strlen
(
message
));
#endif
break
;
case
2
:
interrupted
=
0
;
...
...
Parser/myreadline.c
Dosyayı görüntüle @
48a680c0
...
...
@@ -13,6 +13,10 @@
int
(
*
PyOS_InputHook
)(
void
)
=
NULL
;
#ifdef RISCOS
int
Py_RISCOSWimpFlag
;
#endif
/* This function restarts a fgets() after an EINTR error occurred
except if PyOS_InterruptOccurred() returns true. */
...
...
@@ -58,8 +62,17 @@ PyOS_StdioReadline(char *prompt)
if
((
p
=
PyMem_MALLOC
(
n
))
==
NULL
)
return
NULL
;
fflush
(
stdout
);
#ifndef RISCOS
if
(
prompt
)
fprintf
(
stderr
,
"%s"
,
prompt
);
#else
if
(
prompt
)
{
if
(
Py_RISCOSWimpFlag
)
fprintf
(
stderr
,
"
\x0c
r%s
\x0c
"
,
prompt
);
else
fprintf
(
stderr
,
"%s"
,
prompt
);
}
#endif
fflush
(
stderr
);
switch
(
my_fgets
(
p
,
(
int
)
n
,
stdin
))
{
case
0
:
/* Normal case */
...
...
Python/import.c
Dosyayı görüntüle @
48a680c0
...
...
@@ -60,11 +60,20 @@ struct _inittab *PyImport_Inittab = _PyImport_Inittab;
/* these tables define the module suffixes that Python recognizes */
struct
filedescr
*
_PyImport_Filetab
=
NULL
;
#ifdef RISCOS
static
const
struct
filedescr
_PyImport_StandardFiletab
[]
=
{
{
"/py"
,
"r"
,
PY_SOURCE
},
{
"/pyc"
,
"rb"
,
PY_COMPILED
},
{
0
,
0
}
};
#else
static
const
struct
filedescr
_PyImport_StandardFiletab
[]
=
{
{
".py"
,
"r"
,
PY_SOURCE
},
{
".pyc"
,
"rb"
,
PY_COMPILED
},
{
0
,
0
}
};
#endif
/* Initialize things */
...
...
@@ -95,8 +104,13 @@ _PyImport_Init(void)
if
(
Py_OptimizeFlag
)
{
/* Replace ".pyc" with ".pyo" in _PyImport_Filetab */
for
(;
filetab
->
suffix
!=
NULL
;
filetab
++
)
{
#ifndef RISCOS
if
(
strcmp
(
filetab
->
suffix
,
".pyc"
)
==
0
)
filetab
->
suffix
=
".pyo"
;
#else
if
(
strcmp
(
filetab
->
suffix
,
"/pyc"
)
==
0
)
filetab
->
suffix
=
"/pyo"
;
#endif
}
}
...
...
@@ -842,7 +856,9 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
struct
_frozen
*
f
;
struct
filedescr
*
fdp
=
NULL
;
FILE
*
fp
=
NULL
;
#ifndef RISCOS
struct
stat
statbuf
;
#endif
static
struct
filedescr
fd_frozen
=
{
""
,
""
,
PY_FROZEN
};
static
struct
filedescr
fd_builtin
=
{
""
,
""
,
C_BUILTIN
};
static
struct
filedescr
fd_package
=
{
""
,
""
,
PKG_DIRECTORY
};
...
...
@@ -951,6 +967,15 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
}
#else
/* XXX How are you going to test for directories? */
#ifdef RISCOS
{
static
struct
filedescr
fd
=
{
""
,
""
,
PKG_DIRECTORY
};
if
(
isdir
(
buf
))
{
if
(
find_init_module
(
buf
))
return
&
fd
;
}
}
#endif
#endif
#ifdef macintosh
fdp
=
PyMac_FindModuleExtension
(
buf
,
&
len
,
name
);
...
...
@@ -1196,6 +1221,39 @@ find_init_module(char *buf)
buf
[
save_len
]
=
'\0'
;
return
0
;
}
#else
#ifdef RISCOS
static
int
find_init_module
(
buf
)
char
*
buf
;
{
int
save_len
=
strlen
(
buf
);
int
i
=
save_len
;
if
(
save_len
+
13
>=
MAXPATHLEN
)
return
0
;
buf
[
i
++
]
=
SEP
;
strcpy
(
buf
+
i
,
"__init__/py"
);
if
(
isfile
(
buf
))
{
buf
[
save_len
]
=
'\0'
;
return
1
;
}
if
(
Py_OptimizeFlag
)
strcpy
(
buf
+
i
,
"o"
);
else
strcpy
(
buf
+
i
,
"c"
);
if
(
isfile
(
buf
))
{
buf
[
save_len
]
=
'\0'
;
return
1
;
}
buf
[
save_len
]
=
'\0'
;
return
0
;
}
#endif
/*RISCOS*/
#endif
/* HAVE_STAT */
...
...
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