Tera Termの個人的な作業用リポジトリ
Révision | 4f0388b81f6f9a9b31c08d7cecbb444fa8f3fe10 (tree) |
---|---|
l'heure | 2019-01-25 21:38:03 |
Auteur | zmatsuo <zmatsuo@user...> |
Commiter | zmatsuo |
combining_map_t, codemap_t テーブルをconstにした
git-svn-id: svn+ssh://svn.osdn.net/svnroot/ttssh2/trunk@7407 f5f01b69-1e22-0410-acbf-894ab4bd6246
@@ -31,7 +31,7 @@ | ||
31 | 31 | * cf. ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT |
32 | 32 | * |
33 | 33 | */ |
34 | -static codemap_t mapUnicodeToSJIS[] = { | |
34 | +static const codemap_t mapUnicodeToSJIS[] = { | |
35 | 35 | { 0x0020, 0x0020 }, |
36 | 36 | { 0x0021, 0x0021 }, |
37 | 37 | { 0x0022, 0x0022 }, |
@@ -35,7 +35,7 @@ typedef struct combining_map { | ||
35 | 35 | * cf. http://developer.apple.com/technotes/tn/tn1150table.html |
36 | 36 | * |
37 | 37 | */ |
38 | -static combining_map_t mapCombiningToPrecomposed[] = { | |
38 | +static const combining_map_t mapCombiningToPrecomposed[] = { | |
39 | 39 | {0x00C0, 0x0041, 0x0300}, |
40 | 40 | {0x00C1, 0x0041, 0x0301}, |
41 | 41 | {0x00C2, 0x0041, 0x0302}, |
@@ -30,7 +30,7 @@ | ||
30 | 30 | /* |
31 | 31 | * Map of Unicode Symbols to Dec Special Characters |
32 | 32 | */ |
33 | -static codemap_t mapUnicodeSymbolToDecSp[] = { | |
33 | +static const codemap_t mapUnicodeSymbolToDecSp[] = { | |
34 | 34 | /* |
35 | 35 | * Latin-1 supplement |
36 | 36 | * http://www.unicode.org/charts/PDF/U0080.pdf |
@@ -5421,8 +5421,8 @@ static void ParseASCII(BYTE b) | ||
5421 | 5421 | // |
5422 | 5422 | #include "uni_combining.map" |
5423 | 5423 | |
5424 | -unsigned short GetPrecomposedChar(int start_index, unsigned short first_code, unsigned short code, | |
5425 | - combining_map_t *table, int tmax) | |
5424 | +static unsigned short GetPrecomposedChar(int start_index, unsigned short first_code, unsigned short code, | |
5425 | + const combining_map_t *table, int tmax) | |
5426 | 5426 | { |
5427 | 5427 | unsigned short result = 0; |
5428 | 5428 | int i; |
@@ -5441,7 +5441,7 @@ unsigned short GetPrecomposedChar(int start_index, unsigned short first_code, un | ||
5441 | 5441 | return (result); |
5442 | 5442 | } |
5443 | 5443 | |
5444 | -int GetIndexOfCombiningFirstCode(unsigned short code, combining_map_t *table, int tmax) | |
5444 | +static int GetIndexOfCombiningFirstCode(unsigned short code, const combining_map_t *table, int tmax) | |
5445 | 5445 | { |
5446 | 5446 | int low, mid, high; |
5447 | 5447 | int index = -1; |
@@ -38,7 +38,7 @@ | ||
38 | 38 | #include "codeconv.h" |
39 | 39 | #include "sjis2uni.map" |
40 | 40 | |
41 | -unsigned short ConvertUnicode(unsigned short code, codemap_t *table, int tmax) | |
41 | +unsigned short ConvertUnicode(unsigned short code, const codemap_t *table, int tmax) | |
42 | 42 | { |
43 | 43 | int low, mid, high; |
44 | 44 | unsigned short result; |
@@ -188,7 +188,7 @@ WORD PASCAL JIS2SJIS(WORD KCode) | ||
188 | 188 | |
189 | 189 | /* Russian charset conversion table by Andrey Nikiforov 19971114 */ |
190 | 190 | /* Updated by NAGATA Shinya 20111228 */ |
191 | -static BYTE cpconv[4][4][128] = | |
191 | +static const BYTE cpconv[4][4][128] = | |
192 | 192 | { |
193 | 193 | #if 0 |
194 | 194 | // 1251 -> 1251 = dummy |
@@ -41,7 +41,7 @@ WORD PASCAL SJIS2EUC(WORD KCode); | ||
41 | 41 | WORD PASCAL JIS2SJIS(WORD KCode); |
42 | 42 | BYTE PASCAL RussConv(int cin, int cout, BYTE b); |
43 | 43 | void PASCAL RussConvStr(int cin, int cout, PCHAR Str, int count); |
44 | -unsigned short ConvertUnicode(unsigned short code, codemap_t *table, int tmax); | |
44 | +unsigned short ConvertUnicode(unsigned short code, const codemap_t *table, int tmax); | |
45 | 45 | |
46 | 46 | #ifdef __cplusplus |
47 | 47 | } |