View | Details | Raw Unified | Return to bug 25895
Collapse All | Expand All

(-)sh.char.c (+55 lines)
Lines 813-818 Link Here
813
    _MB1|_MB2,	0,		0,		0,
813
    _MB1|_MB2,	0,		0,		0,
814
};
814
};
815
815
816
/* Add by Yen-Ming Lee <leeym@cae.ce.ntu.edu.tw> */
817
unsigned short _mbmap_big5[256] = {
818
/* first byte   0xa1 - 0xfe */
819
/* second byte  0x40 - 0x7e, 0xa1 - 0xfe */
820
/* 0x00-0x3f = 0, 0x40-0x7e = 2, 0x7f-0xa0 = 0, 0xa1-0xfe = 3, 0xff = 0 */
821
/* 0x00 - 0x3f = 0 */
822
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
823
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
824
/* 0x40 - 0x7e = 2 */
825
    _MB2,	_MB2,		_MB2,		_MB2,
826
    _MB2,	_MB2,		_MB2,		_MB2,
827
    _MB2,	_MB2,		_MB2,		_MB2,
828
    _MB2,	_MB2,		_MB2,		_MB2,
829
    _MB2,	_MB2,		_MB2,		_MB2,
830
    _MB2,	_MB2,		_MB2,		_MB2,
831
    _MB2,	_MB2,		_MB2,		_MB2,
832
    _MB2,	_MB2,		_MB2,		_MB2,
833
    _MB2,	_MB2,		_MB2,		_MB2,
834
    _MB2,	_MB2,		_MB2,		_MB2,
835
    _MB2,	_MB2,		_MB2,		_MB2,
836
    _MB2,	_MB2,		_MB2,		_MB2,
837
    _MB2,	_MB2,		_MB2,		_MB2,
838
    _MB2,	_MB2,		_MB2,		_MB2,
839
    _MB2,	_MB2,		_MB2,		_MB2,
840
						/* 0x7f - 0xa0 = 0 */
841
    _MB2,	_MB2,		_MB2,		0,
842
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
843
		/* a1 - fe = 3 */
844
    0,		_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
845
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
846
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
847
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
848
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
849
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
850
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
851
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,    
852
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
853
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
854
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
855
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
856
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
857
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
858
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
859
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
860
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
861
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
862
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
863
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
864
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
865
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
866
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,
867
						/* 0xff = 0 */
868
    _MB1|_MB2,	_MB1|_MB2,	_MB1|_MB2,	0,
869
};
870
816
#else /* !(defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE)) */
871
#else /* !(defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE)) */
817
unsigned short _cmap[256] = {
872
unsigned short _cmap[256] = {
818
/*	  0 nul		  1 soh		  2 stx		  3 etx	*/
873
/*	  0 nul		  1 soh		  2 stx		  3 etx	*/
(-)sh.char.h (+1 lines)
Lines 58-63 Link Here
58
extern unsigned short _mbmap[];
58
extern unsigned short _mbmap[];
59
extern unsigned short _mbmap_euc[];
59
extern unsigned short _mbmap_euc[];
60
extern unsigned short _mbmap_sjis[];
60
extern unsigned short _mbmap_sjis[];
61
extern unsigned short _mbmap_big5[];
61
/* VARIABLE Check str */
62
/* VARIABLE Check str */
62
/* same compiler require #define even not define DSPMBYTE */
63
/* same compiler require #define even not define DSPMBYTE */
63
#define _MB1	0x0001
64
#define _MB1	0x0001
(-)sh.set.c (+8 lines)
Lines 1103-1108 Link Here
1103
	    iskcode = 1;
1103
	    iskcode = 1;
1104
	else if (eq(dstr1, STRKEUC))
1104
	else if (eq(dstr1, STRKEUC))
1105
	    iskcode = 2;
1105
	    iskcode = 2;
1106
	else if (eq(dstr1, STRKBIG5))
1107
	    iskcode = 3;
1106
	else if ((dstr1[0] - '0') >= 0 && (dstr1[0] - '0') <= 3) {
1108
	else if ((dstr1[0] - '0') >= 0 && (dstr1[0] - '0') <= 3) {
1107
	    iskcode = 0;
1109
	    iskcode = 0;
1108
	}
1110
	}
Lines 1127-1132 Link Here
1127
		_cmap[lp] = _cmap_mbyte[lp];
1129
		_cmap[lp] = _cmap_mbyte[lp];
1128
		_mbmap[lp] = _mbmap_euc[lp];
1130
		_mbmap[lp] = _mbmap_euc[lp];
1129
		break;
1131
		break;
1132
	    case 3:
1133
		/* 3 ... big5 */
1134
		_cmap[lp] = _cmap_mbyte[lp];
1135
		_mbmap[lp] = _mbmap_big5[lp];
1136
		break;
1130
	    default:
1137
	    default:
1131
		xprintf(CGETS(18, 3,
1138
		xprintf(CGETS(18, 3,
1132
		    "Warning: unknown multibyte code %d; multibyte disabled\n"),
1139
		    "Warning: unknown multibyte code %d; multibyte disabled\n"),
Lines 1204-1209 Link Here
1204
	{ STRLANGEUCKRB, STRKEUC },
1211
	{ STRLANGEUCKRB, STRKEUC },
1205
	{ STRLANGSJIS, STRKSJIS },
1212
	{ STRLANGSJIS, STRKSJIS },
1206
	{ STRLANGSJISB, STRKSJIS },
1213
	{ STRLANGSJISB, STRKSJIS },
1214
	{ STRLANGBIG5, STRKBIG5 },
1207
	{ NULL, NULL }
1215
	{ NULL, NULL }
1208
    };
1216
    };
1209
1217
(-)tc.const.c (+8 lines)
Lines 125-130 Link Here
125
Char STRmmliteral[]	= { '-', '-', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\0' };
125
Char STRmmliteral[]	= { '-', '-', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\0' };
126
Char STRKEUC[]		= { 'e', 'u', 'c', '\0' };
126
Char STRKEUC[]		= { 'e', 'u', 'c', '\0' };
127
Char STRKSJIS[]		= { 's', 'j', 'i', 's', '\0' };
127
Char STRKSJIS[]		= { 's', 'j', 'i', 's', '\0' };
128
Char STRKBIG5[]         = { 'b', 'i', 'g', '5', '\0' };
128
#  ifdef MBYTEDEBUG	/* Sorry, use for beta testing */
129
#  ifdef MBYTEDEBUG	/* Sorry, use for beta testing */
129
Char STRmbytemap[]	= { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' };
130
Char STRmbytemap[]	= { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' };
130
#  endif /* MBYTEMAP */
131
#  endif /* MBYTEMAP */
Lines 153-158 Link Here
153
Char STRLANGSJIS[]	= { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
154
Char STRLANGSJIS[]	= { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
154
			    '\0' };
155
			    '\0' };
155
Char STRLANGSJISB[]	= { '\0' };
156
Char STRLANGSJISB[]	= { '\0' };
157
Char STRLANGBIG5[]	= { 'z', 'h', '_', 'T', 'W', '.', 'B', 'i', 'g', '5',
158
			    '\0' };
156
#  elif defined(linux)
159
#  elif defined(linux)
157
Char STRLANGEUC[]	= { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J',
160
Char STRLANGEUC[]	= { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J',
158
			    'P', '\0' };
161
			    'P', '\0' };
Lines 161-166 Link Here
161
Char STRLANGSJIS[]	= { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
164
Char STRLANGSJIS[]	= { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
162
			    '\0' };
165
			    '\0' };
163
Char STRLANGSJISB[]	= { '\0' };
166
Char STRLANGSJISB[]	= { '\0' };
167
Char STRLANGBIG5[]	= { '\0' };
164
#  elif defined(__uxpm__)
168
#  elif defined(__uxpm__)
165
Char STRLANGEUCJP[]	= { 'j', 'a', 'p', 'a', 'n', '\0' };
169
Char STRLANGEUCJP[]	= { 'j', 'a', 'p', 'a', 'n', '\0' };
166
Char STRLANGEUCKR[]	= { 'k', 'o', 'r', 'e', 'a', '\0' };
170
Char STRLANGEUCKR[]	= { 'k', 'o', 'r', 'e', 'a', '\0' };
Lines 168-173 Link Here
168
Char STRLANGEUCKRB[]	= { '\0' };
172
Char STRLANGEUCKRB[]	= { '\0' };
169
Char STRLANGSJIS[]	= { '\0' };
173
Char STRLANGSJIS[]	= { '\0' };
170
Char STRLANGSJISB[]	= { '\0' };
174
Char STRLANGSJISB[]	= { '\0' };
175
Char STRLANGBIG5[]	= { '\0' };
171
#  elif defined(SOLARIS2)
176
#  elif defined(SOLARIS2)
172
Char STRLANGEUCJP[]	= { 'j', 'a', '\0' };
177
Char STRLANGEUCJP[]	= { 'j', 'a', '\0' };
173
Char STRLANGEUCKR[]	= { 'k', 'o', '\0' };
178
Char STRLANGEUCKR[]	= { 'k', 'o', '\0' };
Lines 175-180 Link Here
175
Char STRLANGEUCKRB[]	= { 'k', 'o', 'r', 'e', 'a', 'n', '\0' };
180
Char STRLANGEUCKRB[]	= { 'k', 'o', 'r', 'e', 'a', 'n', '\0' };
176
Char STRLANGSJIS[]	= { '\0' };
181
Char STRLANGSJIS[]	= { '\0' };
177
Char STRLANGSJISB[]	= { '\0' };
182
Char STRLANGSJISB[]	= { '\0' };
183
Char STRLANGBIG5[]	= { '\0' };
178
#  elif defined(hpux)
184
#  elif defined(hpux)
179
Char STRLANGEUCJP[]	= { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J', 'P' };
185
Char STRLANGEUCJP[]	= { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J', 'P' };
180
Char STRLANGEUCKR[]	= { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', 'K', 'R' };
186
Char STRLANGEUCKR[]	= { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', 'K', 'R' };
Lines 182-187 Link Here
182
Char STRLANGEUCKRB[]	= { '\0' };
188
Char STRLANGEUCKRB[]	= { '\0' };
183
Char STRLANGSJIS[]	= { '\0' };
189
Char STRLANGSJIS[]	= { '\0' };
184
Char STRLANGSJISB[]	= { '\0' };
190
Char STRLANGSJISB[]	= { '\0' };
191
Char STRLANGBIG5[]	= { '\0' };
185
#  else
192
#  else
186
Char STRLANGEUCJP[]	= { '\0' };
193
Char STRLANGEUCJP[]	= { '\0' };
187
Char STRLANGEUCKR[]	= { '\0' };
194
Char STRLANGEUCKR[]	= { '\0' };
Lines 189-194 Link Here
189
Char STRLANGEUCKRB[]	= { '\0' };
196
Char STRLANGEUCKRB[]	= { '\0' };
190
Char STRLANGSJIS[]	= { '\0' };
197
Char STRLANGSJIS[]	= { '\0' };
191
Char STRLANGSJISB[]	= { '\0' };
198
Char STRLANGSJISB[]	= { '\0' };
199
Char STRLANGBIG5[]	= { '\0' };
192
#  endif
200
#  endif
193
# endif /* defined(DSPMBYTE) */
201
# endif /* defined(DSPMBYTE) */
194
#endif
202
#endif

Return to bug 25895