linux/fs/nls/nls_euc-jp.c
<<
ptio1.1/spa 1.1/form 1.1a ptio1. href="../linux+v3"v4.2/fs/nls/nls_euc-jp.c">ptio1.1img src="../.static/gfx/right.png" alt=">>">pt1/spa pt1spa class="lxr_search">ptio ="+search" method="post" onsubmit="return do_search(this);">ptio1.1input typluehidden" namluenavtarget" on>alue">ptio1.1input typluetext" namluesearch" iduesearch">ptio1.1buttptitypluesubmit">Searchptio1.Prefs 1.1/a>pt1/spa io1. .1/div io1. .1form ac > ="ajax+*" method="post" onsubmit="return false;">pt1input typluehidden" namlueajax_lookup" idueajax_lookup" on>alue">pio1. .1/form pio1. .1div class="headingbottpm">
1div iduefile_contents"
. .11/a>1spa
 class="comment">/*1/spa
  . .21/a>1spa
 class="comment"> * linux/fs/nls/nls_euc-jp.c1/spa
  . .31/a>1spa
 class="comment"> *1/spa
  . .41/a>1spa
 class="comment"> * Added `OSF/JVC Recommended Code Set ConversoptiSpecifica  >
1/spa
  . .51/a>1spa
 class="comment"> * between Japa
ese EUC and Shift-JIS' support: <hirofumi@mail.parknet.co.jp>1/spa
  . .61/a>1spa
 class="comment"> * (http://www.opengroup.or.jp/jvc/cde/sjis-euc-e.html)1/spa
  . .71/a>1spa
 class="comment"> */1/spa
  . .81/a>p. .91/a>#include <linux/module.h1/a>>p. .11"a>#include <linux/kernel.h1/a>>p. 111"a>#include <linux/string.h1/a>>p. 121"a>#include <linux/nls.h1/a>>p. 131"a>#include <linux/errno.h1/a>>p. 141/a>p. 151/a>static struct.1a href="+code=nls_table" class="sref">nls_table1/a> *1a href="+code=p_nls" class="sref">p_nls1/a>;p. 161/a>p. 171/a>#define.1a href="+code=IS_SJIS_LOW_BYTE" class="sref">IS_SJIS_LOW_BYTE1/a>(1a href="+code=l" class="sref">l1/a>)o1. .((0x40 <= (1a href="+code=l" class="sref">l1/a>)) &&.((1a href="+code=l" class="sref">l1/a>)o<= 0xFC) &&.((1a href="+code=l" class="sref">l1/a>)o!= 0x7F))p. 181/a>1spa
 class="comment">/* JIS X 0208 (include NEC spesial charac ers) */1/spa
  . 191/a>#define.1a href="+code=IS_SJIS_JISX0208" class="sref">IS_SJIS_JISX02081/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1((((0x81 <= (1a href="+code=h" class="sref">h1/a>)) &&.((1a href="+code=h" class="sref">h1/a>)o<= 0x9F))io1. .\ . 211"a>                                 ||.((0xE0 <= (1a href="+code=h" class="sref">h1/a>)) &&.((1a href="+code=h" class="sref">h1/a>)o<= 0xEA)))io1\ . 211"a>                                 &&.1a href="+code=IS_SJIS_LOW_BYTE" class="sref">IS_SJIS_LOW_BYTE1/a>(1a href="+code=l" class="sref">l1/a>))p. 221/a>#define.1a href="+code=IS_SJIS_JISX0201KANA" class="sref">IS_SJIS_JISX0201KANA1/a>(1a href="+code=c" class="sref">c1/a>)o((0xA1 <= (1a href="+code=c" class="sref">c1/a>)) &&.((1a href="+code=c" class="sref">c1/a>)o<= 0xDF))p. 231/a>#define.1a href="+code=IS_SJIS_UDC_LOW" class="sref">IS_SJIS_UDC_LOW1/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1 (((0xF0 <= (1a href="+code=h" class="sref">h1/a>)) &&.((1a href="+code=h" class="sref">h1/a>)o<= 0xF4))io1. .1\ . 241"a>                                 &&.1a href="+code=IS_SJIS_LOW_BYTE" class="sref">IS_SJIS_LOW_BYTE1/a>(1a href="+code=l" class="sref">l1/a>))p. 251/a>#define.1a href="+code=IS_SJIS_UDC_HI" class="sref">IS_SJIS_UDC_HI1/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1  (((0xF5 <= (1a href="+code=h" class="sref">h1/a>)) &&.((1a href="+code=h" class="sref">h1/a>)o<= 0xF9))io1. .1\ . 261"a>                                 &&.1a href="+code=IS_SJIS_LOW_BYTE" class="sref">IS_SJIS_LOW_BYTE1/a>(1a href="+code=l" class="sref">l1/a>))p. 271/a>#define.1a href="+code=IS_SJIS_IBM" class="sref">IS_SJIS_IBM1/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1  1  (((0xFA <= (1a href="+code=h" class="sref">h1/a>)) &&.((1a href="+code=h" class="sref">h1/a>)o<= 0xFC))io1. .1\ . 281"a>                                 &&.1a href="+code=IS_SJIS_LOW_BYTE" class="sref">IS_SJIS_LOW_BYTE1/a>(1a href="+code=l" class="sref">l1/a>))p. 291/a>#define.1a href="+code=IS_SJIS_NECIBM" class="sref">IS_SJIS_NECIBM1/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1  (((0xED <= (1a href="+code=h" class="sref">h1/a>)) &&.((1a href="+code=h" class="sref">h1/a>)o<= 0xEE))io1. .1\ . 311"a>                                 &&.1a href="+code=IS_SJIS_LOW_BYTE" class="sref">IS_SJIS_LOW_BYTE1/a>(1a href="+code=l" class="sref">l1/a>))p. 311/a>#define.1a href="+code=MAP_SJIS2EUC" class="sref">MAP_SJIS2EUC1/a>(1a href="+code=sjis_hi" class="sref">sjis_hi1/a>,.1a href="+code=sjis_lo" class="sref">sjis_lo1/a>,.1a href="+code=sjis_p" class="sref">sjis_p1/a>,.1a href="+code=euc_hi" class="sref">euc_hi1/a>,.1a href="+code=euc_lo" class="sref">euc_lo1/a>,.1a href="+code=euc_p" class="sref">euc_p1/a>)o{         \ . 321"a>        if.((1a href="+code=sjis_lo" class="sref">sjis_lo1/a>)o>= 0x9F)o{                                                \ . 331"a>                (1a href="+code=euc_hi" class="sref">euc_hi1/a>) = (1a href="+code=sjis_hi" class="sref">sjis_hi1/a>) * 2 - (((1a href="+code=sjis_p" class="sref">sjis_p1/a>) * 2 - (1a href="+code=euc_p" class="sref">euc_p1/a>)) - 1);      \ . 341"a>                (1a href="+code=euc_lo" class="sref">euc_lo1/a>) = (1a href="+code=sjis_lo" class="sref">sjis_lo1/a>)o+ 2;                                       \ . 351"a>        } elseo{                                                                \ . 361"a>                (1a href="+code=euc_hi" class="sref">euc_hi1/a>) = (1a href="+code=sjis_hi" class="sref">sjis_hi1/a>) * 2 - ((1a href="+code=sjis_p" class="sref">sjis_p1/a>) * 2 - (1a href="+code=euc_p" class="sref">euc_p1/a>));            \ . 371"a>                (1a href="+code=euc_lo" class="sref">euc_lo1/a>) = (1a href="+code=sjis_lo" class="sref">sjis_lo1/a>)o+ ((1a href="+code=sjis_lo" class="sref">sjis_lo1/a>)o>= 0x7F ? 0x60 : 0x61);       \ . 381"a>        }                                                                       \ . 391/a>} while(0)p. 401/a>p. 411/a>#define.1a href="+code=SS2" class="sref">SS21"a>             (0x8E)          1spa
 class="comment">/* Single Shift 2 */1/spa
  . 421/a>#define.1a href="+code=SS3" class="sref">SS31"a>             (0x8F)          1spa
 class="comment">/* Single Shift 3 */1/spa
  . 431/a>#define.1a href="+code=IS_EUC_BYTE" class="sref">IS_EUC_BYTE1/a>(1a href="+code=c" class="sref">c1/a>)o         ((0xA1 <= (1a href="+code=c" class="sref">c1/a>)) &&.((1a href="+code=c" class="sref">c1/a>)o<= 0xFE))p. 441/a>#define.1a href="+code=IS_EUC_JISX0208" class="sref">IS_EUC_JISX02081/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1 (1a href="+code=IS_EUC_BYTE" class="sref">IS_EUC_BYTE1/a>(1a href="+code=h" class="sref">h1/a>)o&&.1a href="+code=IS_EUC_BYTE" class="sref">IS_EUC_BYTE1/a>(1a href="+code=l" class="sref">l1/a>))p. 451/a>#define.1a href="+code=IS_EUC_JISX0201KANA" class="sref">IS_EUC_JISX0201KANA1/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1  1  (((1a href="+code=h" class="sref">h1/a>)o==.1a href="+code=SS2" class="sref">SS21"a>) &&.(0xA1 <= (1a href="+code=l" class="sref">l1/a>)o&&.(1a href="+code=l" class="sref">l1/a>)o<= 0xDF))p. 461/a>#define.1a href="+code=IS_EUC_UDC_LOW" class="sref">IS_EUC_UDC_LOW1/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1  (((0xF5 <= (1a href="+code=h" class="sref">h1/a>)) &&.((1a href="+code=h" class="sref">h1/a>)o<= 0xFE))io1. .1\ . 471"a>                                 &&.1a href="+code=IS_EUC_BYTE" class="sref">IS_EUC_BYTE1/a>(1a href="+code=l" class="sref">l1/a>))p. 481/a>#define.1a href="+code=IS_EUC_UDC_HI" class="sref">IS_EUC_UDC_HI1/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1  11a href="+code=IS_EUC_UDC_LOW" class="sref">IS_EUC_UDC_LOW1/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o1spa
 class="comment">/* G3 block */1/spa
  . 491/a>#define.1a href="+code=MAP_EUC2SJIS" class="sref">MAP_EUC2SJIS1/a>(1a href="+code=euc_hi" class="sref">euc_hi1/a>,.1a href="+code=euc_lo" class="sref">euc_lo1/a>,.1a href="+code=euc_p" class="sref">euc_p1/a>,.1a href="+code=sjis_hi" class="sref">sjis_hi1/a>,.1a href="+code=sjis_lo" class="sref">sjis_lo1/a>,.1a href="+code=sjis_p" class="sref">sjis_p1/a>)o{         \ . 511"a>        if.((1a href="+code=euc_hi" class="sref">euc_hi1/a>) &.1)o{                                                     \ . 511"a>                (1a href="+code=sjis_hi" class="sref">sjis_hi1/a>) = (1a href="+code=euc_hi" class="sref">euc_hi1/a>) / 2 + ((1a href="+code=sjis_p" class="sref">sjis_p1/a>)o- (1a href="+code=euc_p" class="sref">euc_p1/a>) / 2);            \ . 521"a>                (1a href="+code=sjis_lo" class="sref">sjis_lo1/a>)o= (1a href="+code=euc_lo" class="sref">euc_lo1/a>) - ((1a href="+code=euc_lo" class="sref">euc_lo1/a>) >= 0xE0 ? 0x60 : 0x61);        \ . 531"a>        } elseo{                                                                \ . 541"a>                (1a href="+code=sjis_hi" class="sref">sjis_hi1/a>) = (1a href="+code=euc_hi" class="sref">euc_hi1/a>) / 2 + (((1a href="+code=sjis_p" class="sref">sjis_p1/a>)o- (1a href="+code=euc_p" class="sref">euc_p1/a>) / 2) - 1);      \ . 551"a>                (1a href="+code=sjis_lo" class="sref">sjis_lo1/a>)o= (1a href="+code=euc_lo" class="sref">euc_lo1/a>) - 2;                                       \ . 561"a>        }                                                                       \ . 571/a>} while(0)p. 581/a>p. 591/a>1spa
 class="comment">/* SJIS IBM extended charac ers to EUC map */1/spa
  . 611"a>static const unsigned char.1a href="+code=sjisibm2euc_map" class="sref">sjisibm2euc_map1"a>[][2]o= { . 611"a>        {0xF3, 0xF3}, {0xF3, 0xF4}, {0xF3, 0xF5}, {0xF3, 0xF6}, {0xF3, 0xF7}, . 621"a>        {0xF3, 0xF8}, {0xF3, 0xF9}, {0xF3, 0xFA}, {0xF3, 0xFB}, {0xF3, 0xFC}, . 631"a>        {0xF3, 0xFD}, {0xF3, 0xFE}, {0xF4, 0xA1}, {0xF4, 0xA2}, {0xF4, 0xA3}, . 641"a>        {0xF4, 0xA4}, {0xF4, 0xA5}, {0xF4, 0xA6}, {0xF4, 0xA7}, {0xF4, 0xA8}, . 651"a>        {0xA2, 0xCC}, {0xA2, 0xC3}, {0xF4, 0xA9}, {0xF4, 0xAA}, {0xF4, 0xAB}, . 661"a>        {0xF4, 0xAC}, {0xF4, 0xAD}, {0xA2, 0xE8}, {0xD4, 0xE3}, {0xDC, 0xDF}, . 671"a>        {0xE4, 0xE9}, {0xE3, 0xF8}, {0xD9, 0xA1}, {0xB1, 0xBB}, {0xF4, 0xAE}, . 681"a>        {0xC2, 0xAD}, {0xC3, 0xFC}, {0xE4, 0xD0}, {0xC2, 0xBF}, {0xBC, 0xF4}, . 691"a>        {0xB0, 0xA9}, {0xB0, 0xC8}, {0xF4, 0xAF}, {0xB0, 0xD2}, {0xB0, 0xD4}, . 701"a>        {0xB0, 0xE3}, {0xB0, 0xEE}, {0xB1, 0xA7}, {0xB1, 0xA3}, {0xB1, 0xAC}, . 711"a>        {0xB1, 0xA9}, {0xB1, 0xBE}, {0xB1, 0xDF}, {0xB1, 0xD8}, {0xB1, 0xC8}, . 721"a>        {0xB1, 0xD7}, {0xB1, 0xE3}, {0xB1, 0xF4}, {0xB1, 0xE1}, {0xB2, 0xA3}, . 731"a>        {0xF4, 0xB0}, {0xB2, 0xBB}, {0xB2, 0xE6}, {0x00, 0x00}, {0xB2, 0xED}, . 741"a>        {0xB2, 0xF5}, {0xB2, 0xFC}, {0xF4, 0xB1}, {0xB3, 0xB5}, {0xB3, 0xD8}, . 751"a>        {0xB3, 0xDB}, {0xB3, 0xE5}, {0xB3, 0xEE}, {0xB3, 0xFB}, {0xF4, 0xB2}, . 761"a>        {0xF4, 0xB3}, {0xB4, 0xC0}, {0xB4, 0xC7}, {0xB4, 0xD0}, {0xB4, 0xDE}, . 771"a>        {0xF4, 0xB4}, {0xB5, 0xAA}, {0xF4, 0xB5}, {0xB5, 0xAF}, {0xB5, 0xC4}, . 781"a>        {0xB5, 0xE8}, {0xF4, 0xB6}, {0xB7, 0xC2}, {0xB7, 0xE4}, {0xB7, 0xE8}, . 791"a>        {0xB7, 0xE7}, {0xF4, 0xB7}, {0xF4, 0xB8}, {0xF4, 0xB9}, {0xB8, 0xCE}, . 801"a>        {0xB8, 0xE1}, {0xB8, 0xF5}, {0xB8, 0xF7}, {0xB8, 0xF8}, {0xB8, 0xFC}, . 811"a>        {0xB9, 0xAF}, {0xB9, 0xB7}, {0xBA, 0xBE}, {0xBA, 0xDB}, {0xCD, 0xAA}, . 821"a>        {0xBA, 0xE1}, {0xF4, 0xBA}, {0xBA, 0xEB}, {0xBB, 0xB3}, {0xBB, 0xB8}, . 831"a>        {0xF4, 0xBB}, {0xBB, 0xCA}, {0xF4, 0xBC}, {0xF4, 0xBD}, {0xBB, 0xD0}, . 841"a>        {0xBB, 0xDE}, {0xBB, 0xF4}, {0xBB, 0xF5}, {0xBB, 0xF9}, {0xBC, 0xE4}, . 851"a>        {0xBC, 0xED}, {0xBC, 0xFE}, {0xF4, 0xBE}, {0xBD, 0xC2}, {0xBD, 0xE7}, . 861"a>        {0xF4, 0xBF}, {0xBD, 0xF0}, {0xBE, 0xB0}, {0xBE, 0xAC}, {0xF4, 0xC0}, . 871"a>        {0xBE, 0xB3}, {0xBE, 0xBD}, {0xBE, 0xCD}, {0xBE, 0xC9}, {0xBE, 0xE4}, . 881"a>        {0xBF, 0xA8}, {0xBF, 0xC9}, {0xC0, 0xC4}, {0xC0, 0xE4}, {0xC0, 0xF4}, . 891"a>        {0xC1, 0xA6}, {0xF4, 0xC1}, {0xC1, 0xF5}, {0xC1, 0xFC}, {0xF4, 0xC2}, . 901"a>        {0xC1, 0xF8}, {0xC2, 0xAB}, {0xC2, 0xA1}, {0xC2, 0xA5}, {0xF4, 0xC3}, . 911"a>        {0xC2, 0xB8}, {0xC2, 0xBA}, {0xF4, 0xC4}, {0xC2, 0xC4}, {0xC2, 0xD2}, . 921"a>        {0xC2, 0xD7}, {0xC2, 0xDB}, {0xC2, 0xDE}, {0xC2, 0xED}, {0xC2, 0xF0}, . 931"a>        {0xF4, 0xC5}, {0xC3, 0xA1}, {0xC3, 0xB5}, {0xC3, 0xC9}, {0xC3, 0xB9}, . 941"a>        {0xF4, 0xC6}, {0xC3, 0xD8}, {0xC3, 0xFE}, {0xF4, 0xC7}, {0xC4, 0xCC}, . 951"a>        {0xF4, 0xC8}, {0xC4, 0xD9}, {0xC4, 0xEA}, {0xC4, 0xFD}, {0xF4, 0xC9}, . 961"a>        {0xC5, 0xA7}, {0xC5, 0xB5}, {0xC5, 0xB6}, {0xF4, 0xCA}, {0xC5, 0xD5}, . 971"a>        {0xC6, 0xB8}, {0xC6, 0xD7}, {0xC6, 0xE0}, {0xC6, 0xEA}, {0xC6, 0xE3}, . 981"a>        {0xC7, 0xA1}, {0xC7, 0xAB}, {0xC7, 0xC7}, {0xC7, 0xC3}, {0xC7, 0xCB}, . 991"a>        {0xC7, 0xCF}, {0xC7, 0xD9}, {0xF4, 0xCB}, {0xF4, 0xCC}, {0xC7, 0xE6},p.1001"a>        {0xC7, 0xEE}, {0xC7, 0xFC}, {0xC7, 0xEB}, {0xC7, 0xF0}, {0xC8, 0xB1},p.1011"a>        {0xC8, 0xE5}, {0xC8, 0xF8}, {0xC9, 0xA6}, {0xC9, 0xAB}, {0xC9, 0xAD}, .1021"a>        {0xF4, 0xCD}, {0xC9, 0xCA}, {0xC9, 0xD3}, {0xC9, 0xE9}, {0xC9, 0xE3}, .1031"a>        {0xC9, 0xFC}, {0xC9, 0xF4}, {0xC9, 0xF5}, {0xF4, 0xCE}, {0xCA, 0xB3}, .1041"a>        {0xCA, 0xBD}, {0xCA, 0xEF}, {0xCA, 0xF1}, {0xCB, 0xAE}, {0xF4, 0xCF}, .1051"a>        {0xCB, 0xCA}, {0xCB, 0xE6}, {0xCB, 0xEA}, {0xCB, 0xF0}, {0xCB, 0xF4}, .1061"a>        {0xCB, 0xEE}, {0xCC, 0xA5}, {0xCB, 0xF9}, {0xCC, 0xAB}, {0xCC, 0xAE}, .1071"a>        {0xCC, 0xAD}, {0xCC, 0xB2}, {0xCC, 0xC2}, {0xCC, 0xD0}, {0xCC, 0xD9}, .1081"a>        {0xF4, 0xD0}, {0xCD, 0xBB}, {0xF4, 0xD1}, {0xCE, 0xBB}, {0xF4, 0xD2}, .1091"a>        {0xCE, 0xBA}, {0xCE, 0xC3}, {0xF4, 0xD3}, {0xCE, 0xF2}, {0xB3, 0xDD}, .1101"a>        {0xCF, 0xD5}, {0xCF, 0xE2}, {0xCF, 0xE9}, {0xCF, 0xED}, {0xF4, 0xD4}, .1111"a>        {0xF4, 0xD5}, {0xF4, 0xD6}, {0x00, 0x00}, {0xF4, 0xD7}, {0xD0, 0xE5}, .1121"a>        {0xF4, 0xD8}, {0xD0, 0xE9}, {0xD1, 0xE8}, {0xF4, 0xD9}, {0xF4, 0xDA}, .1131"a>        {0xD1, 0xEC}, {0xD2, 0xBB}, {0xF4, 0xDB}, {0xD3, 0xE1}, {0xD3, 0xE8}, .1141"a>        {0xD4, 0xA7}, {0xF4, 0xDC}, {0xF4, 0xDD}, {0xD4, 0xD4}, {0xD4, 0xF2}, .1151"a>        {0xD5, 0xAE}, {0xF4, 0xDE}, {0xD7, 0xDE}, {0xF4, 0xDF}, {0xD8, 0xA2}, .1161"a>        {0xD8, 0xB7}, {0xD8, 0xC1}, {0xD8, 0xD1}, {0xD8, 0xF4}, {0xD9, 0xC6},p.1171"a>        {0xD9, 0xC8}, {0xD9, 0xD1}, {0xF4, 0xE0}, {0xF4, 0xE1}, {0xF4, 0xE2}, .1181"a>        {0xF4, 0xE3}, {0xF4, 0xE4}, {0xDC, 0xD3}, {0xDD, 0xC8}, {0xDD, 0xD4}, .1191"a>        {0xDD, 0xEA}, {0xDD, 0xFA}, {0xDE, 0xA4}, {0xDE, 0xB0}, {0xF4, 0xE5}, .1201"a>        {0xDE, 0xB5}, {0xDE, 0xCB}, {0xF4, 0xE6}, {0xDF, 0xB9}, {0xF4, 0xE7}, .1211"a>        {0xDF, 0xC3}, {0xF4, 0xE8}, {0xF4, 0xE9}, {0xE0, 0xD9}, {0xF4, 0xEA}, .1221"a>        {0xF4, 0xEB}, {0xE1, 0xE2}, {0xF4, 0xEC}, {0xF4, 0xED}, {0xF4, 0xEE}, .1231"a>        {0xE2, 0xC7}, {0xE3, 0xA8}, {0xE3, 0xA6}, {0xE3, 0xA9}, {0xE3, 0xAF}, .1241"a>        {0xE3, 0xB0}, {0xE3, 0xAA}, {0xE3, 0xAB}, {0xE3, 0xBC}, {0xE3, 0xC1},p.1251"a>        {0xE3, 0xBF}, {0xE3, 0xD5}, {0xE3, 0xD8}, {0xE3, 0xD6}, {0xE3, 0xDF}, .1261"a>        {0xE3, 0xE3}, {0xE3, 0xE1}, {0xE3, 0xD4}, {0xE3, 0xE9}, {0xE4, 0xA6}, .1271"a>        {0xE3, 0xF1}, {0xE3, 0xF2}, {0xE4, 0xCB}, {0xE4, 0xC1}, {0xE4, 0xC3}, .1281"a>        {0xE4, 0xBE}, {0xF4, 0xEF}, {0xE4, 0xC0}, {0xE4, 0xC7}, {0xE4, 0xBF}, .1291"a>        {0xE4, 0xE0}, {0xE4, 0xDE}, {0xE4, 0xD1}, {0xF4, 0xF0}, {0xE4, 0xDC}, .1301"a>        {0xE4, 0xD2}, {0xE4, 0xDB}, {0xE4, 0xD4}, {0xE4, 0xFA}, {0xE4, 0xEF}, .1311"a>        {0xE5, 0xB3}, {0xE5, 0xBF}, {0xE5, 0xC9}, {0xE5, 0xD0}, {0xE5, 0xE2}, .1321"a>        {0xE5, 0xEA}, {0xE5, 0xEB}, {0xF4, 0xF1}, {0xF4, 0xF2}, {0xF4, 0xF3}, .1331"a>        {0xE6, 0xE8}, {0xE6, 0xEF}, {0xE7, 0xAC}, {0xF4, 0xF4}, {0xE7, 0xAE}, .1341"a>        {0xF4, 0xF5}, {0xE7, 0xB1}, {0xF4, 0xF6}, {0xE7, 0xB2}, {0xE8, 0xB1},p.1351"a>        {0xE8, 0xB6}, {0xF4, 0xF7}, {0xF4, 0xF8}, {0xE8, 0xDD}, {0xF4, 0xF9}, .1361"a>        {0xF4, 0xFA}, {0xE9, 0xD1}, {0xF4, 0xFB}, {0xE9, 0xED}, {0xEA, 0xCD}, .1371"a>        {0xF4, 0xFC}, {0xEA, 0xDB}, {0xEA, 0xE6}, {0xEA, 0xEA}, {0xEB, 0xA5}, .1381"a>        {0xEB, 0xFB}, {0xEB, 0xFA}, {0xF4, 0xFD}, {0xEC, 0xD6}, {0xF4, 0xFE}, .1391/a>};p.1401/a>p.1411/a>#define.1a href="+code=IS_EUC_IBM2JISX0208" class="sref">IS_EUC_IBM2JISX02081/a>(1a href="+code=h" class="sref">h1/a>,.1a href="+code=l" class="sref">l1/a>)o\ .1421"a>                (((1a href="+code=h" class="sref">h1/a>)o==.0xA2o&&.(1a href="+code=l" class="sref">l1/a>)o==.0xCC) ||.((1a href="+code=h" class="sref">h1/a>)o==.0xA2o&&.(1a href="+code=l" class="sref">l1/a>)o==.0xE8))p.1431/a>p.1441/a>1spa
 class="comment">/* EUC to SJIS IBM extended charac ers map (G3 JIS X 0212 block) */1/spa
  .1451/a>static struct.{ .1461"a>        unsigned short.1a href="+code=euc" class="sref">euc1"a>;p.1471"a>        unsigned char.1a href="+code=sjis" class="sref">sjis1"a>[2];p.1481/a>}.1a href="+code=euc2sjisibm_jisx0212_map" class="sref">euc2sjisibm_jisx0212_map1"a>[]o= { .1491"a>        {0xA2C3, {0xFA, 0x55}}, {0xB0A9, {0xFA, 0x68}}, {0xB0C8, {0xFA, 0x69}}, .1501"a>        {0xB0D2, {0xFA, 0x6B}}, {0xB0D4, {0xFA, 0x6C}}, {0xB0E3, {0xFA, 0x6D}}, .1511"a>        {0xB0EE, {0xFA, 0x6E}}, {0xB1A3, {0xFA, 0x70}}, {0xB1A7, {0xFA, 0x6F}}, .1521"a>        {0xB1A9, {0xFA, 0x72}}, {0xB1AC, {0xFA, 0x71}}, {0xB1BB, {0xFA, 0x61}}, .1531"a>        {0xB1BE, {0xFA, 0x73}}, {0xB1C8, {0xFA, 0x76}}, {0xB1D7, {0xFA, 0x77}}, .1541"a>        {0xB1D8, {0xFA, 0x75}}, {0xB1DF, {0xFA, 0x74}}, {0xB1E1, {0xFA, 0x7A}}, .1551"a>        {0xB1E3, {0xFA, 0x78}}, {0xB1F4, {0xFA, 0x79}}, {0xB2A3, {0xFA, 0x7B}}, .1561"a>        {0xB2BB, {0xFA, 0x7D}}, {0xB2E6, {0xFA, 0x7E}}, {0xB2ED, {0xFA, 0x80}}, .1571"a>        {0xB2F5, {0xFA, 0x81}}, {0xB2FC, {0xFA, 0x82}}, {0xB3B5, {0xFA, 0x84}}, .1581"a>        {0xB3D8, {0xFA, 0x85}}, {0xB3DB, {0xFA, 0x86}}, {0xB3DD, {0xFB, 0x77}}, .1591"a>        {0xB3E5, {0xFA, 0x87}}, {0xB3EE, {0xFA, 0x88}}, {0xB3FB, {0xFA, 0x89}}, .1601"a>        {0xB4C0, {0xFA, 0x8C}}, {0xB4C7, {0xFA, 0x8D}}, {0xB4D0, {0xFA, 0x8E}}, .1611"a>        {0xB4DE, {0xFA, 0x8F}}, {0xB5AA, {0xFA, 0x91}}, {0xB5AF, {0xFA, 0x93}}, .1621"a>        {0xB5C4, {0xFA, 0x94}}, {0xB5E8, {0xFA, 0x95}}, {0xB7C2, {0xFA, 0x97}}, .1631"a>        {0xB7E4, {0xFA, 0x98}}, {0xB7E7, {0xFA, 0x9A}}, {0xB7E8, {0xFA, 0x99}}, .1641"a>        {0xB8CE, {0xFA, 0x9E}}, {0xB8E1, {0xFA, 0x9F}}, {0xB8F5, {0xFA, 0xA0}}, .1651"a>        {0xB8F7, {0xFA, 0xA1}}, {0xB8F8, {0xFA, 0xA2}}, {0xB8FC, {0xFA, 0xA3}}, .1661"a>        {0xB9AF, {0xFA, 0xA4}}, {0xB9B7, {0xFA, 0xA5}}, {0xBABE, {0xFA, 0xA6}}, .1671"a>        {0xBADB, {0xFA, 0xA7}}, {0xBAE1, {0xFA, 0xA9}}, {0xBAEB, {0xFA, 0xAB}}, .1681"a>        {0xBBB3, {0xFA, 0xAC}}, {0xBBB8, {0xFA, 0xAD}}, {0xBBCA, {0xFA, 0xAF}}, .1691"a>        {0xBBD0, {0xFA, 0xB2}}, {0xBBDE, {0xFA, 0xB3}}, {0xBBF4, {0xFA, 0xB4}}, .1701"a>        {0xBBF5, {0xFA, 0xB5}}, {0xBBF9, {0xFA, 0xB6}}, {0xBCE4, {0xFA, 0xB7}}, .1711"a>        {0xBCED, {0xFA, 0xB8}}, {0xBCF4, {0xFA, 0x67}}, {0xBCFE, {0xFA, 0xB9}}, .1721"a>        {0xBDC2, {0xFA, 0xBB}}, {0xBDE7, {0xFA, 0xBC}}, {0xBDF0, {0xFA, 0xBE}}, .1731"a>        {0xBEAC, {0xFA, 0xC0}}, {0xBEB0, {0xFA, 0xBF}}, {0xBEB3, {0xFA, 0xC2}}, .1741"a>        {0xBEBD, {0xFA, 0xC3}}, {0xBEC9, {0xFA, 0xC5}}, {0xBECD, {0xFA, 0xC4}}, .1751"a>        {0xBEE4, {0xFA, 0xC6}}, {0xBFA8, {0xFA, 0xC7}}, {0xBFC9, {0xFA, 0xC8}}, .1761"a>        {0xC0C4, {0xFA, 0xC9}}, {0xC0E4, {0xFA, 0xCA}}, {0xC0F4, {0xFA, 0xCB}}, .1771"a>        {0xC1A6, {0xFA, 0xCC}}, {0xC1F5, {0xFA, 0xCE}}, {0xC1F8, {0xFA, 0xD1}}, .1781"a>        {0xC1FC, {0xFA, 0xCF}}, {0xC2A1, {0xFA, 0xD3}}, {0xC2A5, {0xFA, 0xD4}}, .1791"a>        {0xC2AB, {0xFA, 0xD2}}, {0xC2AD, {0xFA, 0x63}}, {0xC2B8, {0xFA, 0xD6}}, .1801"a>        {0xC2BA, {0xFA, 0xD7}}, {0xC2BF, {0xFA, 0x66}}, {0xC2C4, {0xFA, 0xD9}}, .1811"a>        {0xC2D2, {0xFA, 0xDA}}, {0xC2D7, {0xFA, 0xDB}}, {0xC2DB, {0xFA, 0xDC}}, .1821"a>        {0xC2DE, {0xFA, 0xDD}}, {0xC2ED, {0xFA, 0xDE}}, {0xC2F0, {0xFA, 0xDF}}, .1831"a>        {0xC3A1, {0xFA, 0xE1}}, {0xC3B5, {0xFA, 0xE2}}, {0xC3B9, {0xFA, 0xE4}}, .1841"a>        {0xC3C9, {0xFA, 0xE3}}, {0xC3D8, {0xFA, 0xE6}}, {0xC3FC, {0xFA, 0x64}}, .1851"a>        {0xC3FE, {0xFA, 0xE7}}, {0xC4CC, {0xFA, 0xE9}}, {0xC4D9, {0xFA, 0xEB}}, .1861"a>        {0xC4EA, {0xFA, 0xEC}}, {0xC4FD, {0xFA, 0xED}}, {0xC5A7, {0xFA, 0xEF}}, .1871"a>        {0xC5B5, {0xFA, 0xF0}}, {0xC5B6, {0xFA, 0xF1}}, {0xC5D5, {0xFA, 0xF3}}, .1881"a>        {0xC6B8, {0xFA, 0xF4}}, {0xC6D7, {0xFA, 0xF5}}, {0xC6E0, {0xFA, 0xF6}}, .1891"a>        {0xC6E3, {0xFA, 0xF8}}, {0xC6EA, {0xFA, 0xF7}}, {0xC7A1, {0xFA, 0xF9}}, .1901"a>        {0xC7AB, {0xFA, 0xFA}}, {0xC7C3, {0xFA, 0xFC}}, {0xC7C7, {0xFA, 0xFB}}, .1911"a>        {0xC7CB, {0xFB, 0x40}}, {0xC7CF, {0xFB, 0x41}}, {0xC7D9, {0xFB, 0x42}}, .1921"a>        {0xC7E6, {0xFB, 0x45}}, {0xC7EB, {0xFB, 0x48}}, {0xC7EE, {0xFB, 0x46}}, .1931"a>        {0xC7F0, {0xFB, 0x49}}, {0xC7FC, {0xFB, 0x47}}, {0xC8B1, {0xFB, 0x4A}}, .1941"a>        {0xC8E5, {0xFB, 0x4B}}, {0xC8F8, {0xFB, 0x4C}}, {0xC9A6, {0xFB, 0x4D}}, .1951"a>        {0xC9AB, {0xFB, 0x4E}}, {0xC9AD, {0xFB, 0x4F}}, {0xC9CA, {0xFB, 0x51}}, .1961"a>        {0xC9D3, {0xFB, 0x52}}, {0xC9E3, {0xFB, 0x54}}, {0xC9E9, {0xFB, 0x53}}, .1971"a>        {0xC9F4, {0xFB, 0x56}}, {0xC9F5, {0xFB, 0x57}}, {0xC9FC, {0xFB, 0x55}}, .1981"a>        {0xCAB3, {0xFB, 0x59}}, {0xCABD, {0xFB, 0x5A}}, {0xCAEF, {0xFB, 0x5B}}, .1991"a>        {0xCAF1, {0xFB, 0x5C}}, {0xCBAE, {0xFB, 0x5D}}, {0xCBCA, {0xFB, 0x5F}}, .2001"a>        {0xCBE6, {0xFB, 0x60}}, {0xCBEA, {0xFB, 0x61}}, {0xCBEE, {0xFB, 0x64}}, .2011"a>        {0xCBF0, {0xFB, 0x62}}, {0xCBF4, {0xFB, 0x63}}, {0xCBF9, {0xFB, 0x66}}, .2021"a>        {0xCCA5, {0xFB, 0x65}}, {0xCCAB, {0xFB, 0x67}}, {0xCCAD, {0xFB, 0x69}}, .2031"a>        {0xCCAE, {0xFB, 0x68}}, {0xCCB2, {0xFB, 0x6A}}, {0xCCC2, {0xFB, 0x6B}}, .2041"a>        {0xCCD0, {0xFB, 0x6C}}, {0xCCD9, {0xFB, 0x6D}}, {0xCDAA, {0xFA, 0xA8}}, .2051"a>        {0xCDBB, {0xFB, 0x6F}}, {0xCEBA, {0xFB, 0x73}}, {0xCEBB, {0xFB, 0x71}}, .2061"a>        {0xCEC3, {0xFB, 0x74}}, {0xCEF2, {0xFB, 0x76}}, {0xCFD5, {0xFB, 0x78}}, .2071"a>        {0xCFE2, {0xFB, 0x79}}, {0xCFE9, {0xFB, 0x7A}}, {0xCFED, {0xFB, 0x7B}}, .2081"a>        {0xD0E5, {0xFB, 0x81}}, {0xD0E9, {0xFB, 0x83}}, {0xD1E8, {0xFB, 0x84}}, .2091"a>        {0xD1EC, {0xFB, 0x87}}, {0xD2BB, {0xFB, 0x88}}, {0xD3E1, {0xFB, 0x8A}}, .2101"a>        {0xD3E8, {0xFB, 0x8B}}, {0xD4A7, {0xFB, 0x8C}}, {0xD4D4, {0xFB, 0x8F}}, .2111"a>        {0xD4E3, {0xFA, 0x5C}}, {0xD4F2, {0xFB, 0x90}}, {0xD5AE, {0xFB, 0x91}}, .2121"a>        {0xD7DE, {0xFB, 0x93}}, {0xD8A2, {0xFB, 0x95}}, {0xD8B7, {0xFB, 0x96}}, .2131"a>        {0xD8C1, {0xFB, 0x97}}, {0xD8D1, {0xFB, 0x98}}, {0xD8F4, {0xFB, 0x99}}, .2141"a>        {0xD9A1, {0xFA, 0x60}}, {0xD9C6, {0xFB, 0x9A}}, {0xD9C8, {0xFB, 0x9B}}, .2151"a>        {0xD9D1, {0xFB, 0x9C}}, {0xDCD3, {0xFB, 0xA2}}, {0xDCDF, {0xFA, 0x5D}}, .2161"a>        {0xDDC8, {0xFB, 0xA3}}, {0xDDD4, {0xFB, 0xA4}}, {0xDDEA, {0xFB, 0xA5}}, .2171"a>        {0xDDFA, {0xFB, 0xA6}}, {0xDEA4, {0xFB, 0xA7}}, {0xDEB0, {0xFB, 0xA8}}, .2181"a>        {0xDEB5, {0xFB, 0xAA}}, {0xDECB, {0xFB, 0xAB}}, {0xDFB9, {0xFB, 0xAD}}, .2191"a>        {0xDFC3, {0xFB, 0xAF}}, {0xE0D9, {0xFB, 0xB2}}, {0xE1E2, {0xFB, 0xB5}}, .2201"a>        {0xE2C7, {0xFB, 0xB9}}, {0xE3A6, {0xFB, 0xBB}}, {0xE3A8, {0xFB, 0xBA}}, .2211"a>        {0xE3A9, {0xFB, 0xBC}}, {0xE3AA, {0xFB, 0xBF}}, {0xE3AB, {0xFB, 0xC0}}, .2221"a>        {0xE3AF, {0xFB, 0xBD}}, {0xE3B0, {0xFB, 0xBE}}, {0xE3BC, {0xFB, 0xC1}}, .2231"a>        {0xE3BF, {0xFB, 0xC3}}, {0xE3C1, {0xFB, 0xC2}}, {0xE3D4, {0xFB, 0xCA}}, .2241"a>        {0xE3D5, {0xFB, 0xC4}}, {0xE3D6, {0xFB, 0xC6}}, {0xE3D8, {0xFB, 0xC5}}, .2251"a>        {0xE3DF, {0xFB, 0xC7}}, {0xE3E1, {0xFB, 0xC9}}, {0xE3E3, {0xFB, 0xC8}}, .2261"a>        {0xE3E9, {0xFB, 0xCB}}, {0xE3F1, {0xFB, 0xCD}}, {0xE3F2, {0xFB, 0xCE}}, .2271"a>        {0xE3F8, {0xFA, 0x5F}}, {0xE4A6, {0xFB, 0xCC}}, {0xE4BE, {0xFB, 0xD2}}, .2281"a>        {0xE4BF, {0xFB, 0xD6}}, {0xE4C0, {0xFB, 0xD4}}, {0xE4C1, {0xFB, 0xD0}}, .2291"a>        {0xE4C3, {0xFB, 0xD1}}, {0xE4C7, {0xFB, 0xD5}}, {0xE4CB, {0xFB, 0xCF}}, .2301"a>        {0xE4D0, {0xFA, 0x65}}, {0xE4D1, {0xFB, 0xD9}}, {0xE4D2, {0xFB, 0xDC}}, .2311"a>        {0xE4D4, {0xFB, 0xDE}}, {0xE4DB, {0xFB, 0xDD}}, {0xE4DC, {0xFB, 0xDB}}, .2321"a>        {0xE4DE, {0xFB, 0xD8}}, {0xE4E0, {0xFB, 0xD7}}, {0xE4E9, {0xFA, 0x5E}}, .2331"a>        {0xE4EF, {0xFB, 0xE0}}, {0xE4FA, {0xFB, 0xDF}}, {0xE5B3, {0xFB, 0xE1}}, .2341"a>        {0xE5BF, {0xFB, 0xE2}}, {0xE5C9, {0xFB, 0xE3}}, {0xE5D0, {0xFB, 0xE4}}, .2351"a>        {0xE5E2, {0xFB, 0xE5}}, {0xE5EA, {0xFB, 0xE6}}, {0xE5EB, {0xFB, 0xE7}}, .2361"a>        {0xE6E8, {0xFB, 0xEB}}, {0xE6EF, {0xFB, 0xEC}}, {0xE7AC, {0xFB, 0xED}}, .2371"a>        {0xE7AE, {0xFB, 0xEF}}, {0xE7B1, {0xFB, 0xF1}}, {0xE7B2, {0xFB, 0xF3}}, .2381"a>        {0xE8B1, {0xFB, 0xF4}}, {0xE8B6, {0xFB, 0xF5}}, {0xE8DD, {0xFB, 0xF8}}, .2391"a>        {0xE9D1, {0xFB, 0xFB}}, {0xE9ED, {0xFC, 0x40}}, {0xEACD, {0xFC, 0x41}}, .2401"a>        {0xEADB, {0xFC, 0x43}}, {0xEAE6, {0xFC, 0x44}}, {0xEAEA, {0xFC, 0x45}}, .2411"a>        {0xEBA5, {0xFC, 0x46}}, {0xEBFA, {0xFC, 0x48}}, {0xEBFB, {0xFC, 0x47}}, .2421"a>        {0xECD6, {0xFC, 0x4A}}, .2431/a>};p.2441/a>p.2451/a>1spa
 class="comment">/* EUC to SJIS IBM extended charac ers map (G3 Upper block) */1/spa
  .2461"a>static const unsigned char.1a href="+code=euc2sjisibm_g3upper_map" class="sref">euc2sjisibm_g3upper_map1"a>[][2]o= { .2471"a>        {0xFA, 0x40}, {0xFA, 0x41}, {0xFA, 0x42}, {0xFA, 0x43}, {0xFA, 0x44}, .2481"a>        {0xFA, 0x45}, {0xFA, 0x46}, {0xFA, 0x47}, {0xFA, 0x48}, {0xFA, 0x49}, .2491"a>        {0xFA, 0x4A}, {0xFA, 0x4B}, {0xFA, 0x4C}, {0xFA, 0x4D}, {0xFA, 0x4E}, .2501"a>        {0xFA, 0x4F}, {0xFA, 0x50}, {0xFA, 0x51}, {0xFA, 0x52}, {0xFA, 0x53}, .2511"a>        {0xFA, 0x56}, {0xFA, 0x57}, {0xFA, 0x58}, {0xFA, 0x59}, {0xFA, 0x5A}, .2521"a>        {0xFA, 0x62}, {0xFA, 0x6A}, {0xFA, 0x7C}, {0xFA, 0x83}, {0xFA, 0x8A}, .2531"a>        {0xFA, 0x8B}, {0xFA, 0x90}, {0xFA, 0x92}, {0xFA, 0x96}, {0xFA, 0x9B}, .2541"a>        {0xFA, 0x9C}, {0xFA, 0x9D}, {0xFA, 0xAA}, {0xFA, 0xAE}, {0xFA, 0xB0}, .2551"a>        {0xFA, 0xB1}, {0xFA, 0xBA}, {0xFA, 0xBD}, {0xFA, 0xC1}, {0xFA, 0xCD}, .2561"a>        {0xFA, 0xD0}, {0xFA, 0xD5}, {0xFA, 0xD8}, {0xFA, 0xE0}, {0xFA, 0xE5}, .2571"a>        {0xFA, 0xE8}, {0xFA, 0xEA}, {0xFA, 0xEE}, {0xFA, 0xF2}, {0xFB, 0x43}, .2581"a>        {0xFB, 0x44}, {0xFB, 0x50}, {0xFB, 0x58}, {0xFB, 0x5E}, {0xFB, 0x6E}, .2591"a>        {0xFB, 0x70}, {0xFB, 0x72}, {0xFB, 0x75}, {0xFB, 0x7C}, {0xFB, 0x7D}, .2601"a>        {0xFB, 0x7E}, {0xFB, 0x80}, {0xFB, 0x82}, {0xFB, 0x85}, {0xFB, 0x86}, .2611"a>        {0xFB, 0x89}, {0xFB, 0x8D}, {0xFB, 0x8E}, {0xFB, 0x92}, {0xFB, 0x94}, .2621"a>        {0xFB, 0x9D}, {0xFB, 0x9E}, {0xFB, 0x9F}, {0xFB, 0xA0}, {0xFB, 0xA1},p.2631"a>        {0xFB, 0xA9}, {0xFB, 0xAC}, {0xFB, 0xAE}, {0xFB, 0xB0}, {0xFB, 0xB1},p.2641"a>        {0xFB, 0xB3}, {0xFB, 0xB4}, {0xFB, 0xB6}, {0xFB, 0xB7}, {0xFB, 0xB8}, .2651"a>        {0xFB, 0xD3}, {0xFB, 0xDA}, {0xFB, 0xE8}, {0xFB, 0xE9}, {0xFB, 0xEA}, .2661"a>        {0xFB, 0xEE}, {0xFB, 0xF0}, {0xFB, 0xF2}, {0xFB, 0xF6}, {0xFB, 0xF7}, .2671"a>        {0xFB, 0xF9}, {0xFB, 0xFA}, {0xFB, 0xFC}, {0xFC, 0x42}, {0xFC, 0x49}, .2681"a>        {0xFC, 0x4B}, .2691/a>};p.2701/a>p.2711"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=sjisibm2euc" class="sref">sjisibm2euc1"a>(unsigned char.*1a href="+code=euc" class="sref">euc1"a>, const unsigned char.1a href="+code=sjis_hi" class="sref">sjis_hi1"a>,p.2721"a>                              const unsigned char.1a href="+code=sjis_lo" class="sref">sjis_lo1"a>);p.2731"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=euc2sjisibm_jisx0212" class="sref">euc2sjisibm_jisx02121"a>(unsigned char.*1a href="+code=sjis" class="sref">sjis1"a>, const unsigned char.1a href="+code=euc_hi" class="sref">euc_hi1"a>,p.2741"a>                                       const unsigned char.1a href="+code=euc_lo" class="sref">euc_lo1"a>);p.2751"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=euc2sjisibm_g3upper" class="sref">euc2sjisibm_g3upper1"a>(unsigned char.*1a href="+code=sjis" class="sref">sjis1"a>, const unsigned char.1a href="+code=euc_hi" class="sref">euc_hi1"a>,p.2761"a>                                      const unsigned char.1a href="+code=euc_lo" class="sref">euc_lo1"a>);p.2771"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=euc2sjisibm" class="sref">euc2sjisibm1"a>(unsigned char.*1a href="+code=sjis" class="sref">sjis1"a>, const unsigned char.1a href="+code=euc_hi" class="sref">euc_hi1"a>,p.2781"a>                              const unsigned char.1a href="+code=euc_lo" class="sref">euc_lo1"a>);p.2791"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=sjisnec2sjisibm" class="sref">sjisnec2sjisibm1"a>(unsigned char.*1a href="+code=sjisibm" class="sref">sjisibm1"a>,p.2801"a>                                  const unsigned char.1a href="+code=sjisnec_hi" class="sref">sjisnec_hi1"a>,p.2811"a>                                  const unsigned char.1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a>);p.2821"a>p.2831"a>1spa
 class="comment">/* SJIS IBM extended charac ers to EUC */1/spa
  .2841"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=sjisibm2euc" class="sref">sjisibm2euc1"a>(unsigned char.*1a href="+code=euc" class="sref">euc1"a>, const unsigned char.1a href="+code=sjis_hi" class="sref">sjis_hi1"a>,p.2851"a>                              const unsigned char.1a href="+code=sjis_lo" class="sref">sjis_lo1"a>)p.2861"a>{ .2871"a>        int.1a href="+code=index" class="sref">index1"a>;p.2881"a>p.2891"a>        1a href="+code=index" class="sref">index1"a> =.((1a href="+code=sjis_hi" class="sref">sjis_hi1"a> - 0xFA) * (0xFD - 0x40)) +.(1a href="+code=sjis_lo" class="sref">sjis_lo1"a> - 0x40);p.2901"a>        if.(1a href="+code=IS_EUC_IBM2JISX0208" class="sref">IS_EUC_IBM2JISX02081/a>(1a href="+code=sjisibm2euc_map" class="sref">sjisibm2euc_map1"a>[1a href="+code=index" class="sref">index1"a>][0],p.2911"a>                                1a href="+code=sjisibm2euc_map" class="sref">sjisibm2euc_map1"a>[1a href="+code=index" class="sref">index1"a>][1])) { .2921"a>                1a href="+code=euc" class="sref">euc1"a>[0] =.1a href="+code=sjisibm2euc_map" class="sref">sjisibm2euc_map1"a>[1a href="+code=index" class="sref">index1"a>][0];p.2931"a>                1a href="+code=euc" class="sref">euc1"a>[1] =.1a href="+code=sjisibm2euc_map" class="sref">sjisibm2euc_map1"a>[1a href="+code=index" class="sref">index1"a>][1];p.2941"a>                return 2;p.2951"a>        } else { .2961"a>                1a href="+code=euc" class="sref">euc1"a>[0] =.1a href="+code=SS3" class="sref">SS31"a>;p.2971"a>                1a href="+code=euc" class="sref">euc1"a>[1] =.1a href="+code=sjisibm2euc_map" class="sref">sjisibm2euc_map1"a>[1a href="+code=index" class="sref">index1"a>][0];p.2981"a>                1a href="+code=euc" class="sref">euc1"a>[2] =.1a href="+code=sjisibm2euc_map" class="sref">sjisibm2euc_map1"a>[1a href="+code=index" class="sref">index1"a>][1];p.2991"a>                return 3;p.3001"a>        }p.3011"a>}p.3021"a>p.3031"a>1spa
 class="comment">/* EUC to SJIS IBM extended charac ers (G3 JIS X 0212 block) */1/spa
  .3041"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=euc2sjisibm_jisx0212" class="sref">euc2sjisibm_jisx02121"a>(unsigned char.*1a href="+code=sjis" class="sref">sjis1"a>, const unsigned char.1a href="+code=euc_hi" class="sref">euc_hi1"a>,p.3051"a>                                       const unsigned char.1a href="+code=euc_lo" class="sref">euc_lo1"a>)p.3061"a>{ .3071"a>        int.1a href="+code=index" class="sref">index1"a>,.1a href="+code=min_index" class="sref">min_index1"a>,.1a href="+code=max_index" class="sref">max_index1"a>;p.3081"a>        unsigned short.1a href="+code=euc" class="sref">euc1"a>;p.3091"a>p.3101"a>        1a href="+code=min_index" class="sref">min_index1"a> =.0;p.3111"a>        1a href="+code=max_index" class="sref">max_index1"a> =.1a href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZE1/a>(1a href="+code=euc2sjisibm_jisx0212_map" class="sref">euc2sjisibm_jisx0212_map1"a>) - 1;p.3121"a>        1a href="+code=euc" class="sref">euc1"a> =.(1a href="+code=euc_hi" class="sref">euc_hi1"a> << 8) |.1a href="+code=euc_lo" class="sref">euc_lo1"a>;p.3131/a>p.3141"a>        while.(1a href="+code=min_index" class="sref">min_index1"a> <=.1a href="+code=max_index" class="sref">max_index1"a>) { .3151"a>                1a href="+code=index" class="sref">index1"a> =.(1a href="+code=min_index" class="sref">min_index1"a> +.1a href="+code=max_index" class="sref">max_index1"a>) / 2;p.3161"a>                if.(1a href="+code=euc" class="sref">euc1"a> < 1a href="+code=euc2sjisibm_jisx0212_map" class="sref">euc2sjisibm_jisx0212_map1"a>[1a href="+code=index" class="sref">index1"a>].1a href="+code=euc" class="sref">euc1"a>)p.3171"a>                        1a href="+code=max_index" class="sref">max_index1"a> =.1a href="+code=index" class="sref">index1"a> - 1;p.3181"a>                elsep.3191"a>                        1a href="+code=min_index" class="sref">min_index1"a> =.1a href="+code=index" class="sref">index1"a> + 1;p.3201"a>                if.(1a href="+code=euc" class="sref">euc1"a> ==.1a href="+code=euc2sjisibm_jisx0212_map" class="sref">euc2sjisibm_jisx0212_map1"a>[1a href="+code=index" class="sref">index1"a>].1a href="+code=euc" class="sref">euc1"a>) { .3211"a>                        1a href="+code=sjis" class="sref">sjis1"a>[0] =.1a href="+code=euc2sjisibm_jisx0212_map" class="sref">euc2sjisibm_jisx0212_map1"a>[1a href="+code=index" class="sref">index1"a>].1a href="+code=sjis" class="sref">sjis1"a>[0];p.3221"a>                        1a href="+code=sjis" class="sref">sjis1"a>[1] =.1a href="+code=euc2sjisibm_jisx0212_map" class="sref">euc2sjisibm_jisx0212_map1"a>[1a href="+code=index" class="sref">index1"a>].1a href="+code=sjis" class="sref">sjis1"a>[1];p.3231"a>                        return 3;p.3241"a>                }p.3251"a>        }p.3261"a>        return 0;p.3271"a>}p.3281"a>p.3291"a>1spa
 class="comment">/* EUC to SJIS IBM extended charac ers (G3 Upper block) */1/spa
  .3301"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=euc2sjisibm_g3upper" class="sref">euc2sjisibm_g3upper1"a>(unsigned char.*1a href="+code=sjis" class="sref">sjis1"a>, const unsigned char.1a href="+code=euc_hi" class="sref">euc_hi1"a>,p.3311"a>                                      const unsigned char.1a href="+code=euc_lo" class="sref">euc_lo1"a>)p.3321"a>{ .3331"a>        int.1a href="+code=index" class="sref">index1"a>;p.3341/a>p.3351"a>        if.(1a href="+code=euc_hi" class="sref">euc_hi1"a> ==.0xF3)p.3361"a>                1a href="+code=index" class="sref">index1"a> =.((1a href="+code=euc_hi" class="sref">euc_hi1"a> << 8) |.1a href="+code=euc_lo" class="sref">euc_lo1"a>) - 0xF3F3;p.3371"a>        elsep.3381"a>                1a href="+code=index" class="sref">index1"a> =.((1a href="+code=euc_hi" class="sref">euc_hi1"a> << 8) |.1a href="+code=euc_lo" class="sref">euc_lo1"a>) - 0xF4A1 + 12;p.3391"a>p.3401"a>        if.((1a href="+code=index" class="sref">index1"a> < 0) ||.(1a href="+code=index" class="sref">index1"a> >=.1a href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZE1/a>(1a href="+code=euc2sjisibm_g3upper_map" class="sref">euc2sjisibm_g3upper_map1"a>)))p.3411"a>                return 0;p.3421"a>p.3431"a>        1a href="+code=sjis" class="sref">sjis1"a>[0] =.1a href="+code=euc2sjisibm_g3upper_map" class="sref">euc2sjisibm_g3upper_map1"a>[1a href="+code=index" class="sref">index1"a>][0];p.3441"a>        1a href="+code=sjis" class="sref">sjis1"a>[1] =.1a href="+code=euc2sjisibm_g3upper_map" class="sref">euc2sjisibm_g3upper_map1"a>[1a href="+code=index" class="sref">index1"a>][1];p.3451/a>p.3461"a>        return 3;p.3471"a>}p.3481"a>p.3491"a>1spa
 class="comment">/* EUC to SJIS IBM extended charac ers (G3 block) */1/spa
  .3501"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=euc2sjisibm" class="sref">euc2sjisibm1"a>(unsigned char.*1a href="+code=sjis" class="sref">sjis1"a>, const unsigned char.1a href="+code=euc_hi" class="sref">euc_hi1"a>,p.3511"a>                              const unsigned char.1a href="+code=euc_lo" class="sref">euc_lo1"a>)p.3521"a>{ .3531"a>        int.1a href="+code=n" class="sref">n1"a>;p.3541/a>p.3551"a>#if.0p.3561"a>        if.((1a href="+code=euc_hi" class="sref">euc_hi1"a> ==.0xA2) &&.(1a href="+code=euc_lo" class="sref">euc_lo1"a> ==.0xCC)) { .3571"a>                1a href="+code=sjis" class="sref">sjis1"a>[0] =.0xFA;p.3581"a>                1a href="+code=sjis" class="sref">sjis1"a>[1] =.0x54;p.3591"a>                return 2;p.3601"a>        } else if.((1a href="+code=euc_hi" class="sref">euc_hi1"a> ==.0xA2) &&.(1a href="+code=euc_lo" class="sref">euc_lo1"a> ==.0xE8)) { .3611"a>                1a href="+code=sjis" class="sref">sjis1"a>[0] =.0xFA;p.3621"a>                1a href="+code=sjis" class="sref">sjis1"a>[1] =.0x5B;p.3631"a>                return 2;p.3641"a>        }p.3651"a>#endifp.3661"a>        if.((1a href="+code=n" class="sref">n1"a> =.1a href="+code=euc2sjisibm_g3upper" class="sref">euc2sjisibm_g3upper1"a>(1a href="+code=sjis" class="sref">sjis1"a>, 1a href="+code=euc_hi" class="sref">euc_hi1"a>,.1a href="+code=euc_lo" class="sref">euc_lo1"a>))) { .3671"a>                return 1a href="+code=n" class="sref">n1"a>;p.3681"a>        } else if.((1a href="+code=n" class="sref">n1"a> =.1a href="+code=euc2sjisibm_jisx0212" class="sref">euc2sjisibm_jisx02121"a>(1a href="+code=sjis" class="sref">sjis1"a>, 1a href="+code=euc_hi" class="sref">euc_hi1"a>,.1a href="+code=euc_lo" class="sref">euc_lo1"a>))) { .3691"a>                return 1a href="+code=n" class="sref">n1"a>;p.3701"a>        }p.3711"a>p.3721"a>        return 0;p.3731"a>}p.3741/a>p.3751/a>1spa
 class="comment">/* NEC/IBM extended charac ers to IBM extended charac ers */1/spa
  .3761"a>static 1a href="+code=inline" class="sref">inline1"a> int.1a href="+code=sjisnec2sjisibm" class="sref">sjisnec2sjisibm1"a>(unsigned char.*1a href="+code=sjisibm" class="sref">sjisibm1"a>,p.3771"a>                                  const unsigned char.1a href="+code=sjisnec_hi" class="sref">sjisnec_hi1"a>,p.3781"a>                                  const unsigned char.1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a>)p.3791"a>{ .3801"a>        int.1a href="+code=count" class="sref">count1"a>;p.3811"a>p.3821"a>        if.(!.1a href="+code=IS_SJIS_NECIBM" class="sref">IS_SJIS_NECIBM1"a>(1a href="+code=sjisnec_hi" class="sref">sjisnec_hi1"a>,.1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a>))p.3831"a>                return 0;p.3841/a>p.3851"a>        if.((1a href="+code=sjisnec_hi" class="sref">sjisnec_hi1"a> ==.0xEE) &&.(1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a> ==.0xF9)) { .3861"a>                1a href="+code=sjisibm" class="sref">sjisibm1"a>[0] =.0x81;p.3871"a>                1a href="+code=sjisibm" class="sref">sjisibm1"a>[1] =.0xCA;p.3881"a>                return 2;p.3891"a>        }p.3901/a>p.3911"a>        if.((1a href="+code=sjisnec_hi" class="sref">sjisnec_hi1"a> ==.0xEE) &&.(1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a> >=.0xEF)) { .3921"a>                1a href="+code=count" class="sref">count1"a> =.(1a href="+code=sjisnec_hi" class="sref">sjisnec_hi1"a> << 8 |.1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a>)p.3931"a>                        -.(1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a> <=.0xF9 ?.0xEEEF : (0xEEEF - 10));p.3941"a>        } else { .3951"a>                1a href="+code=count" class="sref">count1"a> =.(1a href="+code=sjisnec_hi" class="sref">sjisnec_hi1"a> - 0xED) * (0xFC - 0x40) .3961"a>                        +.(1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a> - 0x40) +.(0x5C - 0x40);p.3971"a>                if.(1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a> >=.0x7F) .3981"a>                        1a href="+code=count" class="sref">count1"a>--;p.3991"a>        }p.4001/a>p.4011"a>        1a href="+code=sjisibm" class="sref">sjisibm1"a>[0] =.0xFA +.(1a href="+code=count" class="sref">count1"a> / (0xFC - 0x40));p.4021"a>        1a href="+code=sjisibm" class="sref">sjisibm1"a>[1] =.0x40 +.(1a href="+code=count" class="sref">count1"a> % (0xFC - 0x40));p.4031"a>        if.(1a href="+code=sjisibm" class="sref">sjisibm1"a>[1] >=.0x7F) .4041"a>                1a href="+code=sjisibm" class="sref">sjisibm1"a>[1]++;p.4051/a>p.4061"a>        return 2;p.4071"a>}p.4081"a>p.4091"a>static int.1a href="+code=uni2char" class="sref">uni2char1"a>(const 1a href="+code=wchar_t" class="sref">wchar_t1"a> 1a href="+code=uni" class="sref">uni1"a>,p.4101"a>                    unsigned char.*1a href="+code=out" class="sref">out1"a>,.int.1a href="+code=boundlen" class="sref">boundlen1"a>)p.4111"a>{ .4121"a>        int.1a href="+code=n" class="sref">n1"a>;p.4131/a>p.4141"a>        if.(!1a href="+code=p_nls" class="sref">p_nls1"a>)p.4151"a>                return -1a href="+code=EINVAL" class="sref">EINVAL1"a>;p.4161"a>        if.((1a href="+code=n" class="sref">n1"a> =.1a href="+code=p_nls" class="sref">p_nls1"a>->1a href="+code=uni2char" class="sref">uni2char1"a>(1a href="+code=uni" class="sref">uni1"a>,.1a href="+code=out" class="sref">out1"a>,.1a href="+code=boundlen" class="sref">boundlen1"a>)) < 0)p.4171"a>                return 1a href="+code=n" class="sref">n1"a>;p.4181"a>p.4191"a>        1spa
 class="comment">/* translate SJIS into EUC-JP */1/spa
  .4201"a>        if.(1a href="+code=n" class="sref">n1"a> == 1) { .4211"a>                if.(1a href="+code=IS_SJIS_JISX0201KANA" class="sref">IS_SJIS_JISX0201KANA1"a>(1a href="+code=out" class="sref">out1"a>[0])) { .4221"a>                        1spa
 class="comment">/* JIS X 0201 KANA */1/spa
  .4231"a>                        if.(1a href="+code=boundlen" class="sref">boundlen1"a> < 2)p.4241"a>                                return -1a href="+code=ENAMETOOLONG" class="sref">ENAMETOOLONG1"a>;p.4251/a>p.4261"a>                        1a href="+code=out" class="sref">out1"a>[1] =.1a href="+code=out" class="sref">out1"a>[0];p.4271"a>                        1a href="+code=out" class="sref">out1"a>[0] =.1a href="+code=SS2" class="sref">SS21"a>;p.4281"a>                        return 2;p.4291"a>                }p.4301"a>        } else if.(1a href="+code=n" class="sref">n1"a> == 2) { .4311"a>                1spa
 class="comment">/* NEC/IBM extended charac ers to IBM extended charac ers */1/spa
  .4321"a>                1a href="+code=sjisnec2sjisibm" class="sref">sjisnec2sjisibm1"a>(1a href="+code=out" class="sref">out1"a>,.1a href="+code=out" class="sref">out1"a>[0],.1a href="+code=out" class="sref">out1"a>[1]);p.4331/a>p.4341"a>                if.(1a href="+code=IS_SJIS_UDC_LOW" class="sref">IS_SJIS_UDC_LOW1"a>(1a href="+code=out" class="sref">out1"a>[0],.1a href="+code=out" class="sref">out1"a>[1])) { .4351"a>                        1spa
 class="comment">/* User defined charac ers half low */1/spa
  .4361"a>                        1a href="+code=MAP_SJIS2EUC" class="sref">MAP_SJIS2EUC1"a>(1a href="+code=out" class="sref">out1"a>[0],.1a href="+code=out" class="sref">out1"a>[1], 0xF0,.1a href="+code=out" class="sref">out1"a>[0],.1a href="+code=out" class="sref">out1"a>[1], 0xF5);p.4371"a>                } else if.(1a href="+code=IS_SJIS_UDC_HI" class="sref">IS_SJIS_UDC_HI1"a>(1a href="+code=out" class="sref">out1"a>[0],.1a href="+code=out" class="sref">out1"a>[1])) { .4381"a>                        1spa
 class="comment">/* User defined charac ers half high */1/spa
  .4391"a>                        unsigned char.1a href="+code=ch" class="sref">ch1"a>,.1a href="+code=cl" class="sref">cl1"a>;p.4401/a>p.4411"a>                        if.(1a href="+code=boundlen" class="sref">boundlen1"a> < 3)p.4421"a>                                return -1a href="+code=ENAMETOOLONG" class="sref">ENAMETOOLONG1"a>;p.4431/a>p.4441"a>                        1a href="+code=n" class="sref">n1"a> =.3; 1a href="+code=ch" class="sref">ch1"a> =.1a href="+code=out" class="sref">out1"a>[0];.1a href="+code=cl" class="sref">cl1"a> =.1a href="+code=out" class="sref">out1"a>[1];p.4451"a>                        1a href="+code=out" class="sref">out1"a>[0] =.1a href="+code=SS3" class="sref">SS31"a>;p.4461"a>                        1a href="+code=MAP_SJIS2EUC" class="sref">MAP_SJIS2EUC1"a>(1a href="+code=ch" class="sref">ch1"a>,.1a href="+code=cl" class="sref">cl1"a>, 0xF5,.1a href="+code=out" class="sref">out1"a>[1], 1a href="+code=out" class="sref">out1"a>[2], 0xF5);p.4471"a>                } else if.(1a href="+code=IS_SJIS_IBM" class="sref">IS_SJIS_IBM1"a>(1a href="+code=out" class="sref">out1"a>[0],.1a href="+code=out" class="sref">out1"a>[1])) { .4481"a>                        1spa
 class="comment">/* IBM extended charac ers */1/spa
  .4491"a>                        unsigned char.1a href="+code=euc" class="sref">euc1"a>[3],.1a href="+code=i" class="sref">i1"a>;p.4501/a>p.4511"a>                        1a href="+code=n" class="sref">n1"a> =.1a href="+code=sjisibm2euc" class="sref">sjisibm2euc1"a>(1a href="+code=euc" class="sref">euc1"a>,.1a href="+code=out" class="sref">out1"a>[0],.1a href="+code=out" class="sref">out1"a>[1]);p.4521"a>                        if.(1a href="+code=boundlen" class="sref">boundlen1"a> < 1a href="+code=n" class="sref">n1"a>)p.4531"a>                                return -1a href="+code=ENAMETOOLONG" class="sref">ENAMETOOLONG1"a>;p.4541"a>                        for.(1a href="+code=i" class="sref">i1"a> =.0;.1a href="+code=i" class="sref">i1"a> < 1a href="+code=n" class="sref">n1"a>;.1a href="+code=i" class="sref">i1"a>++)p.4551"a>                                1a href="+code=out" class="sref">out1"a>[1a href="+code=i" class="sref">i1"a>] =.1a href="+code=euc" class="sref">euc1"a>[1a href="+code=i" class="sref">i1"a>];p.4561"a>                } else if.(1a href="+code=IS_SJIS_JISX0208" class="sref">IS_SJIS_JISX02081"a>(1a href="+code=out" class="sref">out1"a>[0],.1a href="+code=out" class="sref">out1"a>[1])) { .4571"a>                        1spa
 class="comment">/* JIS X 0208 (include NEC special charac ers) */1/spa
  .4581"a>                        1a href="+code=out" class="sref">out1"a>[0] =.(1a href="+code=out" class="sref">out1"a>[0]^0xA0)*2 +.0x5F;p.4591"a>                        if.(1a href="+code=out" class="sref">out1"a>[1] >.0x9E)p.4601"a>                                1a href="+code=out" class="sref">out1"a>[0]++;p.4611"a>p.4621"a>                        if.(1a href="+code=out" class="sref">out1"a>[1] < 0x7F) .4631"a>                                1a href="+code=out" class="sref">out1"a>[1] =.1a href="+code=out" class="sref">out1"a>[1] +.0x61;p.4641"a>                        else if.(1a href="+code=out" class="sref">out1"a>[1] < 0x9F) .4651"a>                                1a href="+code=out" class="sref">out1"a>[1] =.1a href="+code=out" class="sref">out1"a>[1] +.0x60;p.4661"a>                        elsep.4671"a>                                1a href="+code=out" class="sref">out1"a>[1] =.1a href="+code=out" class="sref">out1"a>[1] +.0x02;p.4681"a>                } else { .4691"a>                        1spa
 class="comment">/* Invalid charac ers */1/spa
  .4701"a>                        return -1a href="+code=EINVAL" class="sref">EINVAL1"a>;p.4711"a>                }p.4721"a>        }p.4731"a>        elsep.4741"a>                return -1a href="+code=EINVAL" class="sref">EINVAL1"a>;p.4751/a>p.4761"a>        return 1a href="+code=n" class="sref">n1"a>;p.4771"a>}p.4781"a>p.4791"a>static int.1a href="+code=char2uni" class="sref">char2uni1"a>(const unsigned char.*1a href="+code=rawstring" class="sref">rawstring1"a>,.int.1a href="+code=boundlen" class="sref">boundlen1"a>,p.4801"a>                    1a href="+code=wchar_t" class="sref">wchar_t1"a> *1a href="+code=uni" class="sref">uni1"a>) .4811"a>{ .4821"a>        unsigned char.1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[2];p.4831"a>        int.1a href="+code=euc_offset" class="sref">euc_offset1"a>,.1a href="+code=n" class="sref">n1"a>;p.4841/a>p.4851"a>        if.( !1a href="+code=p_nls" class="sref">p_nls1"a> ) .4861"a>                return -1a href="+code=EINVAL" class="sref">EINVAL1"a>;p.4871"a>        if.(1a href="+code=boundlen" class="sref">boundlen1"a> <= 0)p.4881"a>                return -1a href="+code=ENAMETOOLONG" class="sref">ENAMETOOLONG1"a>;p.4891"a>p.4901"a>        1spa
 class="comment">/* translate EUC-JP into SJIS */1/spa
  .4911"a>        if.(1a href="+code=rawstring" class="sref">rawstring1"a>[0] >.0x7F) { .4921"a>                if.(1a href="+code=rawstring" class="sref">rawstring1"a>[0] ==.1a href="+code=SS3" class="sref">SS31"a>) { .4931"a>                        if.(1a href="+code=boundlen" class="sref">boundlen1"a> < 3)p.4941"a>                                return -1a href="+code=EINVAL" class="sref">EINVAL1"a>;p.4951"a>                        1a href="+code=euc_offset" class="sref">euc_offset1"a> =.3;p.4961"a>p.4971"a>                        if.(1a href="+code=IS_EUC_UDC_HI" class="sref">IS_EUC_UDC_HI1"a>(1a href="+code=rawstring" class="sref">rawstring1"a>[1], 1a href="+code=rawstring" class="sref">rawstring1"a>[2])) { .4981"a>                                1spa
 class="comment">/* User defined charac ers half high */1/spa
  .4991"a>                                1a href="+code=MAP_EUC2SJIS" class="sref">MAP_EUC2SJIS1"a>(1a href="+code=rawstring" class="sref">rawstring1"a>[1], 1a href="+code=rawstring" class="sref">rawstring1"a>[2], 0xF5, .5001"a>                                             1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[0],.1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[1], 0xF5);p.5011"a>                        } else if.(1a href="+code=euc2sjisibm" class="sref">euc2sjisibm1"a>(1a href="+code=sjis_temp" class="sref">sjis_temp1"a>,1a href="+code=rawstring" class="sref">rawstring1"a>[1],1a href="+code=rawstring" class="sref">rawstring1"a>[2])) { .5021"a>                                1spa
 class="comment">/* IBM extended charac ers */1/spa
  .5031"a>                        } else { .5041"a>                                1spa
 class="comment">/* JIS X 0212 and Invalid charac ers*/1/spa
  .5051"a>                                return -1a href="+code=EINVAL" class="sref">EINVAL1"a>;p.5061"a>p.5071"a>                                1spa
 class="comment">/* 'GETA' with SJIS coding */1/spa
  .5081"a>                                1spa
 class="comment">/* sjis_temp[0] =.0x81; */1/spa
  .5091"a>                                1spa
 class="comment">/* sjis_temp[1] =.0xAC; */1/spa
  .5101"a>                        }p.5111"a>                } else { .5121"a>                        if.(1a href="+code=boundlen" class="sref">boundlen1"a> < 2)p.5131"a>                                return -1a href="+code=EINVAL" class="sref">EINVAL1"a>;p.5141"a>                        1a href="+code=euc_offset" class="sref">euc_offset1"a> =.2;p.5151/a>p.5161"a>                        if.(1a href="+code=IS_EUC_JISX0201KANA" class="sref">IS_EUC_JISX0201KANA1"a>(1a href="+code=rawstring" class="sref">rawstring1"a>[0],.1a href="+code=rawstring" class="sref">rawstring1"a>[1])) { .5171"a>                                1spa
 class="comment">/* JIS X 0201 KANA */1/spa
  .5181"a>                                1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[0] =.1a href="+code=rawstring" class="sref">rawstring1"a>[1];p.5191"a>                                1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[1] =.0x00;p.5201"a>                        } else if.(1a href="+code=IS_EUC_UDC_LOW" class="sref">IS_EUC_UDC_LOW1"a>(1a href="+code=rawstring" class="sref">rawstring1"a>[0],.1a href="+code=rawstring" class="sref">rawstring1"a>[1])) { .5211"a>                                1spa
 class="comment">/* User defined charac ers half low */1/spa
  .5221"a>                                1a href="+code=MAP_EUC2SJIS" class="sref">MAP_EUC2SJIS1"a>(1a href="+code=rawstring" class="sref">rawstring1"a>[0],.1a href="+code=rawstring" class="sref">rawstring1"a>[1], 0xF5, .5231"a>                                             1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[0],.1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[1], 0xF0);p.5241"a>                        } else if.(1a href="+code=IS_EUC_JISX0208" class="sref">IS_EUC_JISX02081"a>(1a href="+code=rawstring" class="sref">rawstring1"a>[0],.1a href="+code=rawstring" class="sref">rawstring1"a>[1])) { .5251"a>                                1spa
 class="comment">/* JIS X 0208 (include NEC spesial charac ers) */1/spa
  .5261"a>                                1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[0] =.((1a href="+code=rawstring" class="sref">rawstring1"a>[0]-0x5f)/2) ^.0xA0;p.5271"a>                                if.(!(1a href="+code=rawstring" class="sref">rawstring1"a>[0] &.1))p.5281"a>                                        1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[1] =.1a href="+code=rawstring" class="sref">rawstring1"a>[1] - 0x02;p.5291"a>                                else if.(1a href="+code=rawstring" class="sref">rawstring1"a>[1] < 0xE0)p.5301"a>                                        1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[1] =.1a href="+code=rawstring" class="sref">rawstring1"a>[1] - 0x61;p.5311"a>                                elsep.5321"a>                                        1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[1] =.1a href="+code=rawstring" class="sref">rawstring1"a>[1] - 0x60;p.5331"a>                        } else { .5341"a>                                1spa
 class="comment">/* Invalid charac ers */1/spa
  .5351"a>                                return -1a href="+code=EINVAL" class="sref">EINVAL1"a>;p.5361"a>                        }p.5371"a>                }p.5381"a>        } else { .5391"a>                1a href="+code=euc_offset" class="sref">euc_offset1"a> =.1;p.5401/a>p.5411"a>                1spa
 class="comment">/* JIS X 0201 ROMAJI */1/spa
  .5421"a>                1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[0] =.1a href="+code=rawstring" class="sref">rawstring1"a>[0];p.5431"a>                1a href="+code=sjis_temp" class="sref">sjis_temp1"a>[1] =.0x00;p.5441"a>        }p.5451/a>p.5461"a>        if.(.(1a href="+code=n" class="sref">n1"a> =.1a href="+code=p_nls" class="sref">p_nls1"a>->1a href="+code=char2uni" class="sref">char2uni1"a>(1a href="+code=sjis_temp" class="sref">sjis_temp1"a>, sizeof(1a href="+code=sjis_temp" class="sref">sjis_temp1"a>),.1a href="+code=uni" class="sref">uni1"a>)) < 0)p.5471"a>                return 1a href="+code=n" class="sref">n1"a>;p.5481"a>p.5491"a>        return 1a href="+code=euc_offset" class="sref">euc_offset1"a>;p.5501/a>}p.5511"a>p.5521"a>static struct.1a href="+code=nls_table" class="sref">nls_table1"a> 1a href="+code=table" class="sref">table1"a> = { .5531"a>        .1a href="+code=charset" class="sref">charset1"a>        = 1spa
 class="string">"euc-jp"1/spa
 ,         >rawstring1"a>[161"a>p[161"a>p[161s/nls/nls_euc-jp.c#L552" idueL552" clas.3931"a>                        -.(1a href="+code=sjisnec_lo" class="sref">sjisnec_lo1"a> <=.0xF9 ?.0xEEEF : (0xEEEF - 10));praw2 href="+code=jp.c#L394" i12ss" idueL507" class="line" namlueL507ownsjis1"a>, 1a hrefownsjs/nls/nls_euc-> <=.0xF9 ?.0xTHIS_MODULEis1"a>, 1a hrefTHIS_MODULE"fs/nls/nls_euc-jp.c#L394" i12ss="sreff="+code=omment">/* JIS X 0208 (i5clude5NEC sp}01/a>}pout1"5>[0] 55>.5491"a>        return 1a href="+cod1a href="5code=out" class="sref">o5t1"a>55signed char.*1a href="+code=raw__ini;1/spa
 ,                 return 1a hr    1a hr5f="+code=out" class="sre5">out5"a>[0]31"a>        .1a href="+code=charc#L462" i5ueL462" class="line" nam5ueL46561a href="+code=count" class=" class="line" namlueL486">.48> <=.0xF9 ?.0xload class="line" namluload cla+code=#L554" idueL554" class="licp932mlueL5ine" 55241"a>                        } el1a href="5code=out" class="sref">o5t1"a>51] <1"a>                        } el1et" classf="+code=out" class="sre5">out560x7F) .415531"a>        .1a href="+code=char if.(1a h5ef="+code=out" class="sr5f">ou51"a>[1] < 0x9F) ing">"euc-jp"2uppsjis1"a>, 1a hrefp"2uppsj2uni" class="sref">char2uni1"a>(1a href="+code=sjis_temp" class="sref">sjisot;2uppsjis1"a>, 1a hrefp"2uppsj2uni41"a>                        } el1p.c#L552"f="+code=out" class="sre5">out5"a>[1] =.1a href="+cod.c#L553" idueL553" class="line" namlueL553">ing">"euc-jp"2lowsjis1"a>, 1a hrefp"2lowsj2uni" class="sref">char2uni1"a>(1a href="+code=sjis_temp" class="sref">sjisot;2lowsjis1"a>, 1a hrefp"2lowsj2uni41"a>                        } el1">raw2 hrfs/nls/nls_euc-jp.c#L4675 idue5467" class="line" namlnls/nls_euc-jp.c#L550"register2uni1"a>(1a href="+register2uni+code528">.c#L553" idueL553" class="line" namlueL553">241"a>                        } el1f="+code=f="+code=out" class="sre5">out5"a>[1] =.1a hr11"a>p.5491"a>        return 1a href="+cod
 class="5omment">/* Invalid chara5 ers 56p.5361"a>                        }p57">.5511"a>p.5521"a>static struct.1a href="+codes_euc-jp.5#L473" idueL473" class="5ine" 57href="+code=void href="+code=raw__exi;1/spa
 ,                 return 1a hr/nls_euc-5p.c#L474" idueL474" clas5="lin5" naml31"a>        .1a href="+code=charref="+cod5=EINVAL" class="sref">EI5VAL1"5>;p[register2uni1"a>(1a href="+>[register2uni+code528">.c#L553" idueL553" class="line" namlueL553">241"a>                        } elc#L476" i5ueL476" class="line" nam5ueL47575p[load class="line" namlu>[load cla+code=sjis_temp" cla class="line" namlueL415">.41541"a>                        } elc">raw2 hr="sref">n1"a>;pp.471"a>p.479=sjis_temp" clamodule_ini;1/spa
 ,                 return 1a hr/ class="5ass="sref">char2uni1"a>(5onst 5nsigne=sjis_temp" clamodule_exi;1/spa
 ,                 return 1a hr"+code=wc5ar_t" class="sref">wchar5t1"a>58>.5411"a>                1spa
 class=.c#L482" 5dueL482" class="line" na5lueL452">.48awstring" class=ODULE_LICENSEis1"a>, 1a href=ODULE_LICENSE+code=#L554" idueL554" class="liDual BSD/GPLmlueL5ine" 55241"a>                        } elf="+code=5jis_temp" class="sref">s5is_te5p1"a>[


The original LXR software by the "a> http://sourceforge.net/projects/lxr">LXR idueuni;y="+codthis expsjieL54al version by "a> mailto:lxr@lasux.nolulxr@lasux.no53">i lxr.lasux.no kindly hosted by "a> http://www.redpill-laspro.noluRedpill Laspro AS="+codprovider of Lasux int.ultlueL" clopsjcodnt. service. since 1995.