[Ttssh2-commit] [7407] combining_map_t, codemap_t テーブルをconstにした

scmno****@osdn***** scmno****@osdn*****
2019年 1月 25日 (金) 21:38:03 JST


Revision: 7407
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7407
Author:   zmatsuo
Date:     2019-01-25 21:38:03 +0900 (Fri, 25 Jan 2019)
Log Message:
-----------
combining_map_t, codemap_t テーブルをconstにした

Modified Paths:
--------------
    trunk/teraterm/teraterm/uni2sjis.map
    trunk/teraterm/teraterm/uni_combining.map
    trunk/teraterm/teraterm/unisym2decsp.map
    trunk/teraterm/teraterm/vtterm.c
    trunk/teraterm/ttpcmn/language.c
    trunk/teraterm/ttpcmn/language.h

-------------- next part --------------
Modified: trunk/teraterm/teraterm/uni2sjis.map
===================================================================
--- trunk/teraterm/teraterm/uni2sjis.map	2019-01-25 12:37:51 UTC (rev 7406)
+++ trunk/teraterm/teraterm/uni2sjis.map	2019-01-25 12:38:03 UTC (rev 7407)
@@ -31,7 +31,7 @@
  * cf. ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT
  *
  */
-static codemap_t mapUnicodeToSJIS[] = {
+static const codemap_t mapUnicodeToSJIS[] = {
 	{ 0x0020, 0x0020 },
 	{ 0x0021, 0x0021 },
 	{ 0x0022, 0x0022 },

Modified: trunk/teraterm/teraterm/uni_combining.map
===================================================================
--- trunk/teraterm/teraterm/uni_combining.map	2019-01-25 12:37:51 UTC (rev 7406)
+++ trunk/teraterm/teraterm/uni_combining.map	2019-01-25 12:38:03 UTC (rev 7407)
@@ -35,7 +35,7 @@
  * cf. http://developer.apple.com/technotes/tn/tn1150table.html
  *
  */
-static combining_map_t mapCombiningToPrecomposed[] = {
+static const combining_map_t mapCombiningToPrecomposed[] = {
 	 {0x00C0,   0x0041, 0x0300},
 	 {0x00C1,   0x0041, 0x0301},
 	 {0x00C2,   0x0041, 0x0302},

Modified: trunk/teraterm/teraterm/unisym2decsp.map
===================================================================
--- trunk/teraterm/teraterm/unisym2decsp.map	2019-01-25 12:37:51 UTC (rev 7406)
+++ trunk/teraterm/teraterm/unisym2decsp.map	2019-01-25 12:38:03 UTC (rev 7407)
@@ -30,7 +30,7 @@
 /*
  * Map of Unicode Symbols to Dec Special Characters
  */
-static codemap_t mapUnicodeSymbolToDecSp[] = {
+static const codemap_t mapUnicodeSymbolToDecSp[] = {
 	/*
 	 * Latin-1 supplement
 	 *   http://www.unicode.org/charts/PDF/U0080.pdf

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2019-01-25 12:37:51 UTC (rev 7406)
+++ trunk/teraterm/teraterm/vtterm.c	2019-01-25 12:38:03 UTC (rev 7407)
@@ -5421,8 +5421,8 @@
 //
 #include "uni_combining.map"
 
-unsigned short GetPrecomposedChar(int start_index, unsigned short first_code, unsigned short code,
-								 combining_map_t *table, int tmax)
+static unsigned short GetPrecomposedChar(int start_index, unsigned short first_code, unsigned short code,
+										 const combining_map_t *table, int tmax)
 {
 	unsigned short result = 0;
 	int i;
@@ -5441,7 +5441,7 @@
 	return (result);
 }
 
-int GetIndexOfCombiningFirstCode(unsigned short code, combining_map_t *table, int tmax)
+static int GetIndexOfCombiningFirstCode(unsigned short code, const combining_map_t *table, int tmax)
 {
 	int low, mid, high;
 	int index = -1;

Modified: trunk/teraterm/ttpcmn/language.c
===================================================================
--- trunk/teraterm/ttpcmn/language.c	2019-01-25 12:37:51 UTC (rev 7406)
+++ trunk/teraterm/ttpcmn/language.c	2019-01-25 12:38:03 UTC (rev 7407)
@@ -38,7 +38,7 @@
 #include "codeconv.h"
 #include "sjis2uni.map"
 
-unsigned short ConvertUnicode(unsigned short code, codemap_t *table, int tmax)
+unsigned short ConvertUnicode(unsigned short code, const codemap_t *table, int tmax)
 {
 	int low, mid, high;
 	unsigned short result;
@@ -188,7 +188,7 @@
 
 /* Russian charset conversion table by Andrey Nikiforov 19971114 */
 /* Updated by NAGATA Shinya 20111228 */
-static BYTE cpconv[4][4][128] =
+static const BYTE cpconv[4][4][128] =
 {
 #if 0
 // 1251 -> 1251 = dummy

Modified: trunk/teraterm/ttpcmn/language.h
===================================================================
--- trunk/teraterm/ttpcmn/language.h	2019-01-25 12:37:51 UTC (rev 7406)
+++ trunk/teraterm/ttpcmn/language.h	2019-01-25 12:38:03 UTC (rev 7407)
@@ -41,7 +41,7 @@
 WORD PASCAL JIS2SJIS(WORD KCode);
 BYTE PASCAL RussConv(int cin, int cout, BYTE b);
 void PASCAL RussConvStr(int cin, int cout, PCHAR Str, int count);
-unsigned short ConvertUnicode(unsigned short code, codemap_t *table, int tmax);
+unsigned short ConvertUnicode(unsigned short code, const codemap_t *table, int tmax);
 
 #ifdef __cplusplus
 }


Ttssh2-commit メーリングリストの案内