Mercurial > cpython-lru_cache-weakref
annotate Objects/unicodectype.c @ 58925:eecf1bef052d 2.6
Merged revisions 78207 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line
#7930: fix stripid
........
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Tue, 16 Feb 2010 23:29:44 +0000 |
| parents | c92e93a54298 |
| children | e38335d4df91 a9864417286b |
| rev | line source |
|---|---|
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 /* |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 Unicode character type helpers. |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
4 Written by Marc-Andre Lemburg (mal@lemburg.com). |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
5 Modified for Python 2.0 by Fredrik Lundh (fredrik@pythonware.com) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
7 Copyright (c) Corporation for National Research Initiatives. |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
9 */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 #include "Python.h" |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 #include "unicodeobject.h" |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
14 #define ALPHA_MASK 0x01 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
15 #define DECIMAL_MASK 0x02 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
16 #define DIGIT_MASK 0x04 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
17 #define LOWER_MASK 0x08 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
18 #define LINEBREAK_MASK 0x10 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
19 #define SPACE_MASK 0x20 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
20 #define TITLE_MASK 0x40 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
21 #define UPPER_MASK 0x80 |
|
49124
c37c7dbd7880
Issue #3811: The Unicode database was updated to 5.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
38422
diff
changeset
|
22 #define NODELTA_MASK 0x100 |
|
13380
d166a1e60760
Conditionally (currently on ifdef macintosh) break the large switch up
Jack Jansen <jack.jansen@cwi.nl>
parents:
13355
diff
changeset
|
23 |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
24 typedef struct { |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
25 const Py_UNICODE upper; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
26 const Py_UNICODE lower; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
27 const Py_UNICODE title; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
28 const unsigned char decimal; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
29 const unsigned char digit; |
|
32197
3a84e23b042f
- SF #962502: Add two more methods for unicode type; width() and
Hye-Shik Chang <hyeshik@gmail.com>
parents:
31273
diff
changeset
|
30 const unsigned short flags; |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
31 } _PyUnicode_TypeRecord; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
32 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
33 #include "unicodetype_db.h" |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
34 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
35 static const _PyUnicode_TypeRecord * |
|
18287
f6078a30f70a
more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) >
Fredrik Lundh <fredrik@pythonware.com>
parents:
14854
diff
changeset
|
36 gettyperecord(Py_UNICODE code) |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
37 { |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
38 int index; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
39 |
|
31273
25519d6c97b8
Fix gcc 3.3 warnings related to Py_UNICODE_WIDE.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
25856
diff
changeset
|
40 #ifdef Py_UNICODE_WIDE |
|
25852
1f5f6481886d
Update to Unicode 3.2 database.
Martin v. Löwis <martin@v.loewis.de>
parents:
18332
diff
changeset
|
41 if (code >= 0x110000) |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
42 index = 0; |
|
31273
25519d6c97b8
Fix gcc 3.3 warnings related to Py_UNICODE_WIDE.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
25856
diff
changeset
|
43 else |
|
25519d6c97b8
Fix gcc 3.3 warnings related to Py_UNICODE_WIDE.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
25856
diff
changeset
|
44 #endif |
|
25519d6c97b8
Fix gcc 3.3 warnings related to Py_UNICODE_WIDE.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
25856
diff
changeset
|
45 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
46 index = index1[(code>>SHIFT)]; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
47 index = index2[(index<<SHIFT)+(code&((1<<SHIFT)-1))]; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
48 } |
|
18287
f6078a30f70a
more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) >
Fredrik Lundh <fredrik@pythonware.com>
parents:
14854
diff
changeset
|
49 |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
50 return &_PyUnicode_TypeRecords[index]; |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
51 } |
|
13380
d166a1e60760
Conditionally (currently on ifdef macintosh) break the large switch up
Jack Jansen <jack.jansen@cwi.nl>
parents:
13355
diff
changeset
|
52 |
|
35741
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
53 /* Returns 1 for Unicode characters having the category 'Zl', 'Zp' or |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
54 type 'B', 0 otherwise. */ |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
55 |
|
35741
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
56 int _PyUnicode_IsLinebreak(register const Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
57 { |
|
35741
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
58 switch (ch) { |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
59 case 0x000A: /* LINE FEED */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
60 case 0x000D: /* CARRIAGE RETURN */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
61 case 0x001C: /* FILE SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
62 case 0x001D: /* GROUP SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
63 case 0x001E: /* RECORD SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
64 case 0x0085: /* NEXT LINE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
65 case 0x2028: /* LINE SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
66 case 0x2029: /* PARAGRAPH SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
67 return 1; |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
68 default: |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
69 return 0; |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
70 } |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
71 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
72 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
73 /* Returns the titlecase Unicode characters corresponding to ch or just |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
74 ch if no titlecase mapping is known. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
75 |
|
18298
982163c4e9d2
Encode surrogates in UTF-8 even for a wide Py_UNICODE.
Martin v. Löwis <martin@v.loewis.de>
parents:
18287
diff
changeset
|
76 Py_UNICODE _PyUnicode_ToTitlecase(register Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
77 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
78 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
53450
c92e93a54298
Merged revisions 71947 via svnmerge from
Martin v. Löwis <martin@v.loewis.de>
parents:
49124
diff
changeset
|
79 int delta = ctype->title; |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
80 |
|
49124
c37c7dbd7880
Issue #3811: The Unicode database was updated to 5.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
38422
diff
changeset
|
81 if (ctype->flags & NODELTA_MASK) |
|
c37c7dbd7880
Issue #3811: The Unicode database was updated to 5.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
38422
diff
changeset
|
82 return delta; |
|
c37c7dbd7880
Issue #3811: The Unicode database was updated to 5.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
38422
diff
changeset
|
83 |
|
25856
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
84 if (delta >= 32768) |
|
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
85 delta -= 65536; |
|
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
86 |
|
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
87 return ch + delta; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
88 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
89 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
90 /* Returns 1 for Unicode characters having the category 'Lt', 0 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
91 otherwise. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
92 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
93 int _PyUnicode_IsTitlecase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
94 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
95 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
96 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
97 return (ctype->flags & TITLE_MASK) != 0; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
98 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
99 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
100 /* Returns the integer decimal (0-9) for Unicode characters having |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
101 this property, -1 otherwise. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
102 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
103 int _PyUnicode_ToDecimalDigit(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
104 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
105 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
106 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
107 return (ctype->flags & DECIMAL_MASK) ? ctype->decimal : -1; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
108 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
109 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
110 int _PyUnicode_IsDecimalDigit(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
111 { |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
112 if (_PyUnicode_ToDecimalDigit(ch) < 0) |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
113 return 0; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
114 return 1; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
115 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
116 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
117 /* Returns the integer digit (0-9) for Unicode characters having |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
118 this property, -1 otherwise. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
119 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
120 int _PyUnicode_ToDigit(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
121 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
122 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
123 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
124 return (ctype->flags & DIGIT_MASK) ? ctype->digit : -1; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
125 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
126 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
127 int _PyUnicode_IsDigit(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
128 { |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
129 if (_PyUnicode_ToDigit(ch) < 0) |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
130 return 0; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
131 return 1; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
132 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
133 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
134 /* Returns the numeric value as double for Unicode characters having |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
135 this property, -1.0 otherwise. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
136 |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
137 /* TODO: replace with unicodetype_db.h table */ |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
138 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
139 double _PyUnicode_ToNumeric(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
140 { |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
141 switch (ch) { |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
142 case 0x0F33: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
143 return (double) -1 / 2; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
144 case 0x17F0: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
145 case 0x3007: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
146 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
147 case 0x1018A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
148 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
149 return (double) 0; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
150 case 0x09F4: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
151 case 0x17F1: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
152 case 0x215F: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
153 case 0x2160: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
154 case 0x2170: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
155 case 0x3021: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
156 case 0x3192: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
157 case 0x3220: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
158 case 0x3280: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
159 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
160 case 0x10107: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
161 case 0x10142: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
162 case 0x10158: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
163 case 0x10159: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
164 case 0x1015A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
165 case 0x10320: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
166 case 0x103D1: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
167 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
168 return (double) 1; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
169 case 0x00BD: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
170 case 0x0F2A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
171 case 0x2CFD: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
172 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
173 case 0x10141: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
174 case 0x10175: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
175 case 0x10176: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
176 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
177 return (double) 1 / 2; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
178 case 0x2153: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
179 return (double) 1 / 3; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
180 case 0x00BC: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
181 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
182 case 0x10140: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
183 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
184 return (double) 1 / 4; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
185 case 0x2155: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
186 return (double) 1 / 5; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
187 case 0x2159: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
188 return (double) 1 / 6; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
189 case 0x215B: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
190 return (double) 1 / 8; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
191 case 0x0BF0: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
192 case 0x1372: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
193 case 0x2169: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
194 case 0x2179: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
195 case 0x2469: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
196 case 0x247D: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
197 case 0x2491: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
198 case 0x24FE: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
199 case 0x277F: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
200 case 0x2789: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
201 case 0x2793: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
202 case 0x3038: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
203 case 0x3229: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
204 case 0x3289: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
205 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
206 case 0x10110: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
207 case 0x10149: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
208 case 0x10150: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
209 case 0x10157: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
210 case 0x10160: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
211 case 0x10161: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
212 case 0x10162: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
213 case 0x10163: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
214 case 0x10164: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
215 case 0x10322: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
216 case 0x103D3: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
217 case 0x10A44: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
218 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
219 return (double) 10; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
220 case 0x0BF1: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
221 case 0x137B: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
222 case 0x216D: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
223 case 0x217D: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
224 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
225 case 0x10119: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
226 case 0x1014B: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
227 case 0x10152: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
228 case 0x1016A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
229 case 0x103D5: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
230 case 0x10A46: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
231 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
232 return (double) 100; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
233 case 0x0BF2: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
234 case 0x216F: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
235 case 0x217F: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
236 case 0x2180: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
237 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
238 case 0x10122: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
239 case 0x1014D: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
240 case 0x10154: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
241 case 0x10171: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
242 case 0x10A47: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
243 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
244 return (double) 1000; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
245 case 0x137C: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
246 case 0x2182: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
247 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
248 case 0x1012B: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
249 case 0x10155: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
250 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
251 return (double) 10000; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
252 case 0x216A: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
253 case 0x217A: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
254 case 0x246A: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
255 case 0x247E: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
256 case 0x2492: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
257 case 0x24EB: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
258 return (double) 11; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
259 case 0x0F2F: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
260 return (double) 11 / 2; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
261 case 0x216B: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
262 case 0x217B: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
263 case 0x246B: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
264 case 0x247F: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
265 case 0x2493: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
266 case 0x24EC: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
267 return (double) 12; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
268 case 0x246C: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
269 case 0x2480: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
270 case 0x2494: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
271 case 0x24ED: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
272 return (double) 13; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
273 case 0x0F30: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
274 return (double) 13 / 2; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
275 case 0x246D: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
276 case 0x2481: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
277 case 0x2495: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
278 case 0x24EE: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
279 return (double) 14; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
280 case 0x246E: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
281 case 0x2482: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
282 case 0x2496: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
283 case 0x24EF: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
284 return (double) 15; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
285 case 0x0F31: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
286 return (double) 15 / 2; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
287 case 0x09F9: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
288 case 0x246F: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
289 case 0x2483: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
290 case 0x2497: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
291 case 0x24F0: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
292 return (double) 16; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
293 case 0x16EE: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
294 case 0x2470: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
295 case 0x2484: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
296 case 0x2498: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
297 case 0x24F1: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
298 return (double) 17; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
299 case 0x0F32: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
300 return (double) 17 / 2; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
301 case 0x16EF: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
302 case 0x2471: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
303 case 0x2485: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
304 case 0x2499: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
305 case 0x24F2: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
306 return (double) 18; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
307 case 0x16F0: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
308 case 0x2472: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
309 case 0x2486: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
310 case 0x249A: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
311 case 0x24F3: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
312 return (double) 19; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
313 case 0x09F5: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
314 case 0x17F2: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
315 case 0x2161: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
316 case 0x2171: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
317 case 0x3022: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
318 case 0x3193: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
319 case 0x3221: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
320 case 0x3281: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
321 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
322 case 0x10108: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
323 case 0x1015B: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
324 case 0x1015C: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
325 case 0x1015D: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
326 case 0x1015E: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
327 case 0x103D2: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
328 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
329 return (double) 2; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
330 case 0x2154: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
331 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
332 case 0x10177: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
333 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
334 return (double) 2 / 3; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
335 case 0x2156: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
336 return (double) 2 / 5; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
337 case 0x1373: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
338 case 0x2473: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
339 case 0x2487: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
340 case 0x249B: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
341 case 0x24F4: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
342 case 0x3039: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
343 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
344 case 0x10111: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
345 case 0x103D4: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
346 case 0x10A45: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
347 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
348 return (double) 20; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
349 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
350 case 0x1011A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
351 return (double) 200; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
352 case 0x10123: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
353 return (double) 2000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
354 case 0x1012C: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
355 return (double) 20000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
356 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
357 case 0x3251: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
358 return (double) 21; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
359 case 0x3252: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
360 return (double) 22; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
361 case 0x3253: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
362 return (double) 23; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
363 case 0x3254: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
364 return (double) 24; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
365 case 0x3255: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
366 return (double) 25; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
367 case 0x3256: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
368 return (double) 26; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
369 case 0x3257: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
370 return (double) 27; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
371 case 0x3258: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
372 return (double) 28; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
373 case 0x3259: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
374 return (double) 29; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
375 case 0x09F6: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
376 case 0x17F3: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
377 case 0x2162: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
378 case 0x2172: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
379 case 0x3023: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
380 case 0x3194: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
381 case 0x3222: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
382 case 0x3282: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
383 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
384 case 0x10109: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
385 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
386 return (double) 3; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
387 case 0x0F2B: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
388 return (double) 3 / 2; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
389 case 0x00BE: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
390 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
391 case 0x10178: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
392 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
393 return (double) 3 / 4; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
394 case 0x2157: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
395 return (double) 3 / 5; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
396 case 0x215C: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
397 return (double) 3 / 8; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
398 case 0x1374: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
399 case 0x303A: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
400 case 0x325A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
401 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
402 case 0x10112: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
403 case 0x10165: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
404 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
405 return (double) 30; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
406 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
407 case 0x1011B: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
408 case 0x1016B: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
409 return (double) 300; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
410 case 0x10124: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
411 return (double) 3000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
412 case 0x1012D: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
413 return (double) 30000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
414 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
415 case 0x325B: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
416 return (double) 31; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
417 case 0x325C: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
418 return (double) 32; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
419 case 0x325D: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
420 return (double) 33; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
421 case 0x325E: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
422 return (double) 34; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
423 case 0x325F: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
424 return (double) 35; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
425 case 0x32B1: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
426 return (double) 36; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
427 case 0x32B2: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
428 return (double) 37; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
429 case 0x32B3: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
430 return (double) 38; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
431 case 0x32B4: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
432 return (double) 39; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
433 case 0x09F7: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
434 case 0x17F4: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
435 case 0x2163: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
436 case 0x2173: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
437 case 0x3024: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
438 case 0x3195: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
439 case 0x3223: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
440 case 0x3283: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
441 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
442 case 0x1010A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
443 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
444 return (double) 4; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
445 case 0x2158: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
446 return (double) 4 / 5; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
447 case 0x1375: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
448 case 0x32B5: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
449 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
450 case 0x10113: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
451 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
452 return (double) 40; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
453 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
454 case 0x1011C: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
455 return (double) 400; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
456 case 0x10125: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
457 return (double) 4000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
458 case 0x1012E: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
459 return (double) 40000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
460 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
461 case 0x32B6: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
462 return (double) 41; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
463 case 0x32B7: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
464 return (double) 42; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
465 case 0x32B8: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
466 return (double) 43; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
467 case 0x32B9: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
468 return (double) 44; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
469 case 0x32BA: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
470 return (double) 45; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
471 case 0x32BB: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
472 return (double) 46; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
473 case 0x32BC: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
474 return (double) 47; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
475 case 0x32BD: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
476 return (double) 48; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
477 case 0x32BE: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
478 return (double) 49; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
479 case 0x17F5: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
480 case 0x2164: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
481 case 0x2174: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
482 case 0x3025: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
483 case 0x3224: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
484 case 0x3284: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
485 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
486 case 0x1010B: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
487 case 0x10143: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
488 case 0x10148: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
489 case 0x1014F: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
490 case 0x1015F: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
491 case 0x10173: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
492 case 0x10321: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
493 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
494 return (double) 5; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
495 case 0x0F2C: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
496 return (double) 5 / 2; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
497 case 0x215A: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
498 return (double) 5 / 6; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
499 case 0x215D: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
500 return (double) 5 / 8; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
501 case 0x1376: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
502 case 0x216C: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
503 case 0x217C: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
504 case 0x32BF: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
505 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
506 case 0x10114: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
507 case 0x10144: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
508 case 0x1014A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
509 case 0x10151: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
510 case 0x10166: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
511 case 0x10167: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
512 case 0x10168: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
513 case 0x10169: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
514 case 0x10174: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
515 case 0x10323: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
516 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
517 return (double) 50; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
518 case 0x216E: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
519 case 0x217E: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
520 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
521 case 0x1011D: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
522 case 0x10145: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
523 case 0x1014C: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
524 case 0x10153: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
525 case 0x1016C: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
526 case 0x1016D: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
527 case 0x1016E: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
528 case 0x1016F: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
529 case 0x10170: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
530 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
531 return (double) 500; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
532 case 0x2181: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
533 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
534 case 0x10126: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
535 case 0x10146: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
536 case 0x1014E: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
537 case 0x10172: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
538 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
539 return (double) 5000; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
540 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
541 case 0x1012F: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
542 case 0x10147: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
543 case 0x10156: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
544 return (double) 50000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
545 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
546 case 0x17F6: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
547 case 0x2165: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
548 case 0x2175: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
549 case 0x3026: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
550 case 0x3225: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
551 case 0x3285: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
552 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
553 case 0x1010C: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
554 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
555 return (double) 6; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
556 case 0x1377: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
557 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
558 case 0x10115: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
559 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
560 return (double) 60; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
561 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
562 case 0x1011E: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
563 return (double) 600; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
564 case 0x10127: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
565 return (double) 6000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
566 case 0x10130: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
567 return (double) 60000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
568 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
569 case 0x17F7: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
570 case 0x2166: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
571 case 0x2176: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
572 case 0x3027: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
573 case 0x3226: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
574 case 0x3286: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
575 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
576 case 0x1010D: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
577 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
578 return (double) 7; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
579 case 0x0F2D: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
580 return (double) 7 / 2; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
581 case 0x215E: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
582 return (double) 7 / 8; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
583 case 0x1378: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
584 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
585 case 0x10116: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
586 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
587 return (double) 70; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
588 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
589 case 0x1011F: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
590 return (double) 700; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
591 case 0x10128: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
592 return (double) 7000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
593 case 0x10131: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
594 return (double) 70000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
595 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
596 case 0x17F8: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
597 case 0x2167: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
598 case 0x2177: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
599 case 0x3028: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
600 case 0x3227: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
601 case 0x3287: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
602 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
603 case 0x1010E: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
604 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
605 return (double) 8; |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
606 case 0x1379: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
607 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
608 case 0x10117: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
609 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
610 return (double) 80; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
611 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
612 case 0x10120: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
613 return (double) 800; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
614 case 0x10129: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
615 return (double) 8000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
616 case 0x10132: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
617 return (double) 80000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
618 #endif |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
619 case 0x17F9: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
620 case 0x2168: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
621 case 0x2178: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
622 case 0x3029: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
623 case 0x3228: |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
624 case 0x3288: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
625 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
626 case 0x1010F: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
627 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
628 return (double) 9; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
629 case 0x0F2E: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
630 return (double) 9 / 2; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
631 case 0x137A: |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
632 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
633 case 0x10118: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
634 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
635 return (double) 90; |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
636 #ifdef Py_UNICODE_WIDE |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
637 case 0x10121: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
638 case 0x1034A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
639 return (double) 900; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
640 case 0x1012A: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
641 return (double) 9000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
642 case 0x10133: |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
643 return (double) 90000; |
|
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
644 #endif |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
645 default: |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
646 return (double) _PyUnicode_ToDigit(ch); |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
647 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
648 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
649 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
650 int _PyUnicode_IsNumeric(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
651 { |
|
38422
dfbd457ca67a
Patch 1494554: Update numeric properties to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
35741
diff
changeset
|
652 return _PyUnicode_ToNumeric(ch) != -1.0; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
653 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
654 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
655 #ifndef WANT_WCTYPE_FUNCTIONS |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
656 |
| 12370 | 657 /* Returns 1 for Unicode characters having the bidirectional type |
| 658 'WS', 'B' or 'S' or the category 'Zs', 0 otherwise. */ | |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
659 |
|
35741
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
660 int _PyUnicode_IsWhitespace(register const Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
661 { |
|
35741
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
662 switch (ch) { |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
663 case 0x0009: /* HORIZONTAL TABULATION */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
664 case 0x000A: /* LINE FEED */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
665 case 0x000B: /* VERTICAL TABULATION */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
666 case 0x000C: /* FORM FEED */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
667 case 0x000D: /* CARRIAGE RETURN */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
668 case 0x001C: /* FILE SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
669 case 0x001D: /* GROUP SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
670 case 0x001E: /* RECORD SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
671 case 0x001F: /* UNIT SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
672 case 0x0020: /* SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
673 case 0x0085: /* NEXT LINE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
674 case 0x00A0: /* NO-BREAK SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
675 case 0x1680: /* OGHAM SPACE MARK */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
676 case 0x2000: /* EN QUAD */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
677 case 0x2001: /* EM QUAD */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
678 case 0x2002: /* EN SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
679 case 0x2003: /* EM SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
680 case 0x2004: /* THREE-PER-EM SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
681 case 0x2005: /* FOUR-PER-EM SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
682 case 0x2006: /* SIX-PER-EM SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
683 case 0x2007: /* FIGURE SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
684 case 0x2008: /* PUNCTUATION SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
685 case 0x2009: /* THIN SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
686 case 0x200A: /* HAIR SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
687 case 0x200B: /* ZERO WIDTH SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
688 case 0x2028: /* LINE SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
689 case 0x2029: /* PARAGRAPH SEPARATOR */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
690 case 0x202F: /* NARROW NO-BREAK SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
691 case 0x205F: /* MEDIUM MATHEMATICAL SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
692 case 0x3000: /* IDEOGRAPHIC SPACE */ |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
693 return 1; |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
694 default: |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
695 return 0; |
|
3716051830c2
Enhance the performance of two important Unicode character
Marc-André Lemburg <mal@egenix.com>
parents:
32951
diff
changeset
|
696 } |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
697 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
698 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
699 /* Returns 1 for Unicode characters having the category 'Ll', 0 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
700 otherwise. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
701 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
702 int _PyUnicode_IsLowercase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
703 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
704 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
705 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
706 return (ctype->flags & LOWER_MASK) != 0; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
707 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
708 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
709 /* Returns 1 for Unicode characters having the category 'Lu', 0 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
710 otherwise. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
711 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
712 int _PyUnicode_IsUppercase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
713 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
714 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
715 |
|
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
716 return (ctype->flags & UPPER_MASK) != 0; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
717 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
718 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
719 /* Returns the uppercase Unicode characters corresponding to ch or just |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
720 ch if no uppercase mapping is known. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
721 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
722 Py_UNICODE _PyUnicode_ToUppercase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
723 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
724 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
25856
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
725 int delta = ctype->upper; |
|
49124
c37c7dbd7880
Issue #3811: The Unicode database was updated to 5.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
38422
diff
changeset
|
726 if (ctype->flags & NODELTA_MASK) |
|
c37c7dbd7880
Issue #3811: The Unicode database was updated to 5.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
38422
diff
changeset
|
727 return delta; |
|
25856
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
728 if (delta >= 32768) |
|
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
729 delta -= 65536; |
|
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
730 return ch + delta; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
731 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
732 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
733 /* Returns the lowercase Unicode characters corresponding to ch or just |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
734 ch if no lowercase mapping is known. */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
735 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
736 Py_UNICODE _PyUnicode_ToLowercase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
737 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
738 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
25856
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
739 int delta = ctype->lower; |
|
49124
c37c7dbd7880
Issue #3811: The Unicode database was updated to 5.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
38422
diff
changeset
|
740 if (ctype->flags & NODELTA_MASK) |
|
c37c7dbd7880
Issue #3811: The Unicode database was updated to 5.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
38422
diff
changeset
|
741 return delta; |
|
25856
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
742 if (delta >= 32768) |
|
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
743 delta -= 65536; |
|
84a3dd994cd1
Make lower/upper/title work for non-BMP characters.
Martin v. Löwis <martin@v.loewis.de>
parents:
25852
diff
changeset
|
744 return ch + delta; |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
745 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
746 |
|
13355
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
747 /* Returns 1 for Unicode characters having the category 'Ll', 'Lu', 'Lt', |
|
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
748 'Lo' or 'Lm', 0 otherwise. */ |
|
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
749 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
750 int _PyUnicode_IsAlpha(Py_UNICODE ch) |
|
13355
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
751 { |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
752 const _PyUnicode_TypeRecord *ctype = gettyperecord(ch); |
|
13355
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
753 |
|
14854
89bc8475fc84
unicode database compression, step 3:
Fredrik Lundh <fredrik@pythonware.com>
parents:
13939
diff
changeset
|
754 return (ctype->flags & ALPHA_MASK) != 0; |
|
13355
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
755 } |
|
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
756 |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
757 #else |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
758 |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
759 /* Export the interfaces using the wchar_t type for portability |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
760 reasons: */ |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
761 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
762 int _PyUnicode_IsWhitespace(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
763 { |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
764 return iswspace(ch); |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
765 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
766 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
767 int _PyUnicode_IsLowercase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
768 { |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
769 return iswlower(ch); |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
770 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
771 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
772 int _PyUnicode_IsUppercase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
773 { |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
774 return iswupper(ch); |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
775 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
776 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
777 Py_UNICODE _PyUnicode_ToLowercase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
778 { |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
779 return towlower(ch); |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
780 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
781 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
782 Py_UNICODE _PyUnicode_ToUppercase(Py_UNICODE ch) |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
783 { |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
784 return towupper(ch); |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
785 } |
|
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
786 |
|
18332
49acc8ac60c2
removed "register const" from scalar arguments to the unicode
Fredrik Lundh <fredrik@pythonware.com>
parents:
18324
diff
changeset
|
787 int _PyUnicode_IsAlpha(Py_UNICODE ch) |
|
13355
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
788 { |
|
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
789 return iswalpha(ch); |
|
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
790 } |
|
b4aedd90c864
Added new lookup API which matches all alphabetic Unicode characters,
Marc-André Lemburg <mal@egenix.com>
parents:
12370
diff
changeset
|
791 |
|
11967
507833b18213
Unicode character type helpers, written by Marc-Andre Lemburg.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
792 #endif |
