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
d6a15ada
Kaydet (Commit)
d6a15ada
authored
Haz 24, 1991
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Generalize to macintosh.
üst
1e2293d1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
24 deletions
+34
-24
pgenheaders.h
Include/pgenheaders.h
+6
-2
intrcheck.c
Parser/intrcheck.c
+22
-12
pgenmain.c
Parser/pgenmain.c
+3
-3
tokenizer.c
Parser/tokenizer.c
+1
-1
import.c
Python/import.c
+1
-5
sysmodule.c
Python/sysmodule.c
+1
-1
No files found.
Include/pgenheaders.h
Dosyayı görüntüle @
d6a15ada
...
@@ -25,11 +25,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -25,11 +25,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Include files and extern declarations used by most of the parser.
/* Include files and extern declarations used by most of the parser.
This is a precompiled header for THINK C. */
This is a precompiled header for THINK C. */
#ifdef THINK_C
#define macintosh
/* #define THINK_C_3_0 /*** TURN THIS ON FOR THINK C 3.0 ***/
#endif
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#ifdef THINK_C
#ifdef THINK_C
/* #define THINK_C_3_0 /*** TURN THIS ON FOR THINK C 3.0 ****/
#define label label_
#define label label_
#undef label
#undef label
#endif
#endif
...
@@ -38,7 +42,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -38,7 +42,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <proto.h>
#include <proto.h>
#endif
#endif
#ifdef
THINK_C
#ifdef
macintosh
#ifndef THINK_C_3_0
#ifndef THINK_C_3_0
#include <stdlib.h>
#include <stdlib.h>
#endif
#endif
...
...
Parser/intrcheck.c
Dosyayı görüntüle @
d6a15ada
...
@@ -24,6 +24,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -24,6 +24,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Check for interrupts */
/* Check for interrupts */
#ifdef THINK_C
#define macintosh
#endif
#ifdef MSDOS
#ifdef MSDOS
/* This might work for MS-DOS (untested though): */
/* This might work for MS-DOS (untested though): */
...
@@ -49,19 +54,26 @@ intrcheck()
...
@@ -49,19 +54,26 @@ intrcheck()
#endif
#endif
#ifdef
THINK_C
#ifdef
macintosh
#ifdef THINK_C
/* This is for THINK C 4.0.
/* This is for THINK C 4.0.
For 3.0, you may have to remove the signal stuff. */
For 3.0, you may have to remove the signal stuff. */
#include <MacHeaders>
#include <MacHeaders>
#else
/* This is for MPW 3.1 */
/* XXX Untested */
#include <OSEvents.h>
#include <SysEqu.h>
#endif
#include <signal.h>
#include <signal.h>
#include "sigtype.h"
#include "sigtype.h"
static
int
interrupted
;
static
int
interrupted
;
static
SIGTYPE
static
SIGTYPE
intcatcher
(
s
ig
)
intcatcher
(
ig
)
int
sig
;
int
sig
;
{
{
interrupted
=
1
;
interrupted
=
1
;
...
@@ -80,17 +92,15 @@ intrcheck()
...
@@ -80,17 +92,15 @@ intrcheck()
{
{
register
EvQElPtr
q
;
register
EvQElPtr
q
;
/* This is like THINK C 4.0's <console.h>.
/* This is like THINK C 4.0's <console.h> */
I'm not sure why FlushEvents must be called from asm{}. */
/* q = (EvQElPtr) EventQueue.qHead; */
for
(
q
=
(
EvQElPtr
)
EventQueue
.
qHead
;
q
;
q
=
(
EvQElPtr
)
q
->
qLink
)
{
q
=
(
EvQElPtr
)
GetEvQHdr
()
->
qHead
;
for
(;
q
;
q
=
(
EvQElPtr
)
q
->
qLink
)
{
if
(
q
->
evtQWhat
==
keyDown
&&
if
(
q
->
evtQWhat
==
keyDown
&&
(
char
)
q
->
evtQMessage
==
'.'
&&
(
char
)
q
->
evtQMessage
==
'.'
&&
(
q
->
evtQModifiers
&
cmdKey
)
!=
0
)
{
(
q
->
evtQModifiers
&
cmdKey
)
!=
0
)
{
FlushEvents
(
keyDownMask
,
0
);
asm
{
moveq
#
keyDownMask
,
d0
_FlushEvents
}
interrupted
=
1
;
interrupted
=
1
;
break
;
break
;
}
}
...
@@ -104,7 +114,7 @@ intrcheck()
...
@@ -104,7 +114,7 @@ intrcheck()
#define OK
#define OK
#endif
/*
THINK_C
*/
#endif
/*
macintosh
*/
#ifndef OK
#ifndef OK
...
...
Parser/pgenmain.c
Dosyayı görüntüle @
d6a15ada
...
@@ -42,7 +42,7 @@ int debugging;
...
@@ -42,7 +42,7 @@ int debugging;
/* Forward */
/* Forward */
grammar
*
getgrammar
PROTO
((
char
*
filename
));
grammar
*
getgrammar
PROTO
((
char
*
filename
));
#ifdef
THINK_C
#ifdef
macintosh
int
main
PROTO
((
int
,
char
**
));
int
main
PROTO
((
int
,
char
**
));
char
*
askfile
PROTO
((
void
));
char
*
askfile
PROTO
((
void
));
#endif
#endif
...
@@ -57,7 +57,7 @@ main(argc, argv)
...
@@ -57,7 +57,7 @@ main(argc, argv)
FILE
*
fp
;
FILE
*
fp
;
char
*
filename
;
char
*
filename
;
#ifdef
THINK_C
#ifdef
macintosh
filename
=
askfile
();
filename
=
askfile
();
#else
#else
if
(
argc
!=
2
)
{
if
(
argc
!=
2
)
{
...
@@ -115,7 +115,7 @@ getgrammar(filename)
...
@@ -115,7 +115,7 @@ getgrammar(filename)
return
g
;
return
g
;
}
}
#ifdef
THINK_C
#ifdef
macintosh
char
*
char
*
askfile
()
askfile
()
{
{
...
...
Parser/tokenizer.c
Dosyayı görüntüle @
d6a15ada
...
@@ -37,7 +37,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -37,7 +37,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "tokenizer.h"
#include "tokenizer.h"
#include "errcode.h"
#include "errcode.h"
#ifdef
THINK_C
#ifdef
macintosh
#define TABSIZE 4
#define TABSIZE 4
#endif
#endif
...
...
Python/import.c
Dosyayı görüntüle @
d6a15ada
...
@@ -37,13 +37,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -37,13 +37,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "compile.h"
#include "compile.h"
#include "ceval.h"
#include "ceval.h"
#ifdef THINK_C
#define macintosh
#endif
/* Define pathname separator used in file names */
/* Define pathname separator used in file names */
#ifdef
THINK_C
#ifdef
macintosh
#define SEP ':'
#define SEP ':'
#endif
#endif
...
...
Python/sysmodule.c
Dosyayı görüntüle @
d6a15ada
...
@@ -45,7 +45,7 @@ Data members:
...
@@ -45,7 +45,7 @@ Data members:
/* Define delimiter used in $PYTHONPATH */
/* Define delimiter used in $PYTHONPATH */
#ifdef
THINK_C
#ifdef
macintosh
#define DELIM ' '
#define DELIM ' '
#endif
#endif
...
...
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