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
d210a5be
Kaydet (Commit)
d210a5be
authored
Ock 23, 2004
tarafından
Hye-Shik Chang
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix MSVC6 warnings. (spotted by Tim Peters)
üst
0d8da3a6
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
48 additions
and
48 deletions
+48
-48
_big5.c
Modules/cjkcodecs/_big5.c
+1
-1
_cp932.c
Modules/cjkcodecs/_cp932.c
+1
-1
_cp949.c
Modules/cjkcodecs/_cp949.c
+1
-1
_cp950.c
Modules/cjkcodecs/_cp950.c
+1
-1
_euc_jisx0213.c
Modules/cjkcodecs/_euc_jisx0213.c
+6
-6
_euc_jp.c
Modules/cjkcodecs/_euc_jp.c
+1
-1
_euc_kr.c
Modules/cjkcodecs/_euc_kr.c
+1
-1
_gb2312.c
Modules/cjkcodecs/_gb2312.c
+1
-1
_gbk.c
Modules/cjkcodecs/_gbk.c
+1
-1
_hz.c
Modules/cjkcodecs/_hz.c
+2
-2
_iso2022_jp.c
Modules/cjkcodecs/_iso2022_jp.c
+4
-4
_iso2022_jp_1.c
Modules/cjkcodecs/_iso2022_jp_1.c
+4
-4
_iso2022_jp_2.c
Modules/cjkcodecs/_iso2022_jp_2.c
+4
-4
_iso2022_jp_3.c
Modules/cjkcodecs/_iso2022_jp_3.c
+5
-5
_iso2022_jp_ext.c
Modules/cjkcodecs/_iso2022_jp_ext.c
+4
-4
_iso2022_kr.c
Modules/cjkcodecs/_iso2022_kr.c
+2
-2
_johab.c
Modules/cjkcodecs/_johab.c
+1
-1
_shift_jis.c
Modules/cjkcodecs/_shift_jis.c
+1
-1
_shift_jisx0213.c
Modules/cjkcodecs/_shift_jisx0213.c
+6
-6
iso2022common.h
Modules/cjkcodecs/iso2022common.h
+1
-1
No files found.
Modules/cjkcodecs/_big5.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -18,7 +18,7 @@ ENCODER(big5)
if
(
c
<
0x80
)
{
RESERVE_OUTBUF
(
1
)
**
outbuf
=
c
;
**
outbuf
=
(
unsigned
char
)
c
;
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_cp932.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -20,7 +20,7 @@ ENCODER(cp932)
unsigned
char
c1
,
c2
;
if
(
c
<=
0x80
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
continue
;
}
else
if
(
c
>=
0xff61
&&
c
<=
0xff9f
)
{
...
...
Modules/cjkcodecs/_cp949.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -18,7 +18,7 @@ ENCODER(cp949)
DBCHAR
code
;
if
(
c
<
0x80
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_cp950.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -19,7 +19,7 @@ ENCODER(cp950)
DBCHAR
code
;
if
(
c
<
0x80
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_euc_jisx0213.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -43,18 +43,18 @@ ENCODER(euc_jisx0213)
if
(
code
==
MULTIC
)
{
if
(
inleft
<
2
)
{
if
(
flags
&
MBENC_FLUSH
)
{
code
=
find_pairencmap
(
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
return
1
;
}
else
return
MBERR_TOOFEW
;
}
else
{
code
=
find_pairencmap
(
c
,
(
*
inbuf
)[
1
],
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
(
*
inbuf
)[
1
],
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
{
code
=
find_pairencmap
(
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
return
1
;
}
else
...
...
Modules/cjkcodecs/_euc_jp.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -18,7 +18,7 @@ ENCODER(euc_jp)
DBCHAR
code
;
if
(
c
<
0x80
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_euc_kr.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -17,7 +17,7 @@ ENCODER(euc_kr)
DBCHAR
code
;
if
(
c
<
0x80
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_gb2312.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -17,7 +17,7 @@ ENCODER(gb2312)
DBCHAR
code
;
if
(
c
<
0x80
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_gbk.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -19,7 +19,7 @@ ENCODER(gbk)
DBCHAR
code
;
if
(
c
<
0x80
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_hz.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -36,10 +36,10 @@ ENCODER(hz)
if
(
c
<
0x80
)
{
if
(
state
->
i
==
0
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
}
else
{
WRITE3
(
'~'
,
'}'
,
c
)
WRITE3
(
'~'
,
'}'
,
(
unsigned
char
)
c
)
NEXT
(
1
,
3
)
state
->
i
=
0
;
}
...
...
Modules/cjkcodecs/_iso2022_jp.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -49,7 +49,7 @@ ENCODER(iso2022_jp)
if
(
c
<
0x80
)
{
switch
(
STATE_GETG0
(
state
))
{
case
CHARSET_ASCII
:
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
break
;
case
CHARSET_JISX0201_R
:
...
...
@@ -61,7 +61,7 @@ ENCODER(iso2022_jp)
STATE_SETG0
(
state
,
CHARSET_ASCII
)
code
=
c
;
}
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
break
;
}
...
...
@@ -77,7 +77,7 @@ ENCODER(iso2022_jp)
code
=
DBCINV
;
JISX0201_R_ENCODE
(
c
,
code
)
if
(
code
!=
DBCINV
)
{
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
continue
;
}
...
...
@@ -101,7 +101,7 @@ jisx0208encode: if (charset != CHARSET_JISX0208) {
else
return
1
;
/* if (charset == CHARSET_JISX0201_R) : already checked */
WRITE4
(
ESC
,
'('
,
'J'
,
code
)
WRITE4
(
ESC
,
'('
,
'J'
,
(
unsigned
char
)
code
)
STATE_SETG0
(
state
,
CHARSET_JISX0201_R
)
NEXT
(
1
,
4
)
}
...
...
Modules/cjkcodecs/_iso2022_jp_1.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -51,7 +51,7 @@ ENCODER(iso2022_jp_1)
if
(
c
<
0x80
)
{
switch
(
STATE_GETG0
(
state
))
{
case
CHARSET_ASCII
:
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
break
;
case
CHARSET_JISX0201_R
:
...
...
@@ -63,7 +63,7 @@ ENCODER(iso2022_jp_1)
STATE_SETG0
(
state
,
CHARSET_ASCII
)
code
=
c
;
}
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
break
;
}
...
...
@@ -79,7 +79,7 @@ ENCODER(iso2022_jp_1)
code
=
DBCINV
;
JISX0201_R_ENCODE
(
c
,
code
)
if
(
code
!=
DBCINV
)
{
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
continue
;
}
...
...
@@ -110,7 +110,7 @@ jisx0208encode: if (charset != CHARSET_JISX0208) {
else
return
1
;
/* if (charset == CHARSET_JISX0201_R) : already checked */
WRITE4
(
ESC
,
'('
,
'J'
,
code
)
WRITE4
(
ESC
,
'('
,
'J'
,
(
unsigned
char
)
code
)
STATE_SETG0
(
state
,
CHARSET_JISX0201_R
)
NEXT
(
1
,
4
)
}
...
...
Modules/cjkcodecs/_iso2022_jp_2.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -57,7 +57,7 @@ ENCODER(iso2022_jp_2)
if
(
c
<
0x80
)
{
switch
(
STATE_GETG0
(
state
))
{
case
CHARSET_ASCII
:
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
break
;
case
CHARSET_JISX0201_R
:
...
...
@@ -69,7 +69,7 @@ ENCODER(iso2022_jp_2)
STATE_SETG0
(
state
,
CHARSET_ASCII
)
code
=
c
;
}
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
break
;
}
...
...
@@ -85,7 +85,7 @@ ENCODER(iso2022_jp_2)
code
=
DBCINV
;
JISX0201_R_ENCODE
(
c
,
code
)
if
(
code
!=
DBCINV
)
{
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
continue
;
}
...
...
@@ -140,7 +140,7 @@ jisx0208encode: if (charset != CHARSET_JISX0208) {
return
1
;
}
/* if (charset == CHARSET_JISX0201_R) : already checked */
WRITE4
(
ESC
,
'('
,
'J'
,
code
)
WRITE4
(
ESC
,
'('
,
'J'
,
(
unsigned
char
)
code
)
STATE_SETG0
(
state
,
CHARSET_JISX0201_R
)
NEXT
(
1
,
4
)
}
...
...
Modules/cjkcodecs/_iso2022_jp_3.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -80,18 +80,18 @@ ENCODER(iso2022_jp_3)
if
(
code
==
MULTIC
)
{
if
(
inleft
<
2
)
{
if
(
flags
&
MBENC_FLUSH
)
{
code
=
find_pairencmap
(
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
return
1
;
}
else
return
MBERR_TOOFEW
;
}
else
{
code
=
find_pairencmap
(
c
,
IN2
,
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
IN2
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
{
code
=
find_pairencmap
(
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
return
1
;
}
else
...
...
Modules/cjkcodecs/_iso2022_jp_ext.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -49,7 +49,7 @@ ENCODER(iso2022_jp_ext)
if
(
c
<
0x80
)
{
switch
(
STATE_GETG0
(
state
))
{
case
CHARSET_ASCII
:
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
break
;
case
CHARSET_JISX0201_R
:
...
...
@@ -61,7 +61,7 @@ ENCODER(iso2022_jp_ext)
STATE_SETG0
(
state
,
CHARSET_ASCII
)
code
=
c
;
}
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
break
;
}
...
...
@@ -77,7 +77,7 @@ ENCODER(iso2022_jp_ext)
code
=
DBCINV
;
JISX0201_R_ENCODE
(
c
,
code
)
if
(
code
!=
DBCINV
)
{
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
continue
;
}
...
...
@@ -110,7 +110,7 @@ jisx0208encode: if (charset != CHARSET_JISX0208) {
if
(
code
<
0x80
)
{
/* JIS X 0201 Roman */
/* if (charset == CHARSET_JISX0201_R) : already checked */
WRITE4
(
ESC
,
'('
,
'J'
,
code
)
WRITE4
(
ESC
,
'('
,
'J'
,
(
unsigned
char
)
code
)
STATE_SETG0
(
state
,
CHARSET_JISX0201_R
)
NEXT
(
1
,
4
)
}
else
{
/* JIS X 0201 Katakana */
...
...
Modules/cjkcodecs/_iso2022_kr.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -43,11 +43,11 @@ ENCODER(iso2022_kr)
if
(
c
<
0x80
)
{
if
(
STATE_GETFLAG
(
state
,
F_SHIFTED
))
{
WRITE2
(
SI
,
c
)
WRITE2
(
SI
,
(
unsigned
char
)
c
)
STATE_CLEARFLAG
(
state
,
F_SHIFTED
)
NEXT
(
1
,
2
)
}
else
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
}
if
(
c
==
'\n'
)
...
...
Modules/cjkcodecs/_johab.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -44,7 +44,7 @@ ENCODER(johab)
DBCHAR
code
;
if
(
c
<
0x80
)
{
WRITE1
(
c
)
WRITE1
(
(
unsigned
char
)
c
)
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_shift_jis.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -32,7 +32,7 @@ ENCODER(shift_jis)
if
(
code
<
0x80
||
(
code
>=
0xa1
&&
code
<=
0xdf
))
{
RESERVE_OUTBUF
(
1
)
OUT1
(
code
)
OUT1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
continue
;
}
...
...
Modules/cjkcodecs/_shift_jisx0213.c
Dosyayı görüntüle @
d210a5be
...
...
@@ -33,7 +33,7 @@ ENCODER(shift_jisx0213)
else
DECODE_SURROGATE
(
c
)
if
(
code
<
0x80
||
(
code
>=
0xa1
&&
code
<=
0xdf
))
{
WRITE1
(
code
)
WRITE1
(
(
unsigned
char
)
code
)
NEXT
(
1
,
1
)
continue
;
}
...
...
@@ -47,18 +47,18 @@ ENCODER(shift_jisx0213)
if
(
code
==
MULTIC
)
{
if
(
inleft
<
2
)
{
if
(
flags
&
MBENC_FLUSH
)
{
code
=
find_pairencmap
(
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
return
1
;
}
else
return
MBERR_TOOFEW
;
}
else
{
code
=
find_pairencmap
(
c
,
IN2
,
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
IN2
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
{
code
=
find_pairencmap
(
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
code
=
find_pairencmap
(
(
ucs2_t
)
c
,
0
,
jisx0213_pairencmap
,
JISX0213_ENCPAIRS
);
if
(
code
==
DBCINV
)
return
1
;
}
else
...
...
Modules/cjkcodecs/iso2022common.h
Dosyayı görüntüle @
d210a5be
...
...
@@ -183,7 +183,7 @@ iso2022processesc(MultibyteCodec_State *state,
const
unsigned
char
**
inbuf
,
size_t
*
inleft
)
{
unsigned
char
charset
,
designation
;
in
t
i
,
esclen
;
size_
t
i
,
esclen
;
for
(
i
=
1
;
i
<
MAX_ESCSEQLEN
;
i
++
)
{
if
(
i
>=
*
inleft
)
...
...
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