反応が面白いなぁ(笑
int jisTosjis(unsigned char *a);
int main(int argc, char* argv[])
{
unsigned char c[3]={""};
int i,j,iRet;
for(i=0x021;i<=0x23;i++){
for(j=0x021;j<=0x07E;j++){
c[0]=i;c[1]=j;
iRet = jisTosjis(&c[0]);
printf("%X%X ",c[0],c[1]);
}
printf("\n");
}
return (0);
}
int jisTosjis(unsigned char *a)
{
int i,ia,ib;
i=((a[0]-0x021)*0x05e)+a[1]-0x021;
ia =i / 0x0bc; ib =i % 0x0bc;
ia+=0x081; ib+=0x040;
if(ia>0x09f) ia+=0x040;
if(ib>0x07e) ib++;
a[0]=ia; a[1]=ib;
return (0);
}