home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
rxjis096.zip
/
jis2pc.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-08-09
|
2KB
|
48 lines
/* product name: RXJIS */
/* Version: 0.90 */
/* author: YANO Takashi */
/* target: OS/2 Warp J3.0+ (J2.1 is possible) */
/* source name: JIS2PC.CMD */
/* address: tyano@ca2.so-net.or.jp or tyano@yamato.ibm.co.jp */
/* comment: RXJIS is a utility functions for REXX. */
/* This header file is a interface to be called from */
/* C/C++. */
/* History: */
/* */
/* This is a part of build tool. */
arg fn
if fn = '' then fn = 'jis2pc.dat'
parse var fn cfn '.' .
cfn = cfn || '.cpp'
tb. = 0
do while lines(fn)
parse value linein(fn) with jc pc .
if jc = 0 then iterate
tb.i = 1
i = left(jc, 2)
j = right(jc, 2)
tb.i.j = pc
end /* do */
call SysFileDelete cfn
call lineout cfn, '#include <limits.h>'
call lineout cfn, '#include <os2.h>'
call lineout cfn, '#include "jis2pc.hpp"'
call lineout cfn, '#pragma data_seg(rxjistbl)'
do i = 1 to 256
if tb.i = 0 then iterate
call lineout cfn, 'static wchar_t jiscode2pccode_' || d2x(i - 1) || '[UCHAR_MAX+1] = {'
do j = 1 to 256
if tb.i.j = 0 then call lineout cfn, '0x81ac,'
else call lineout cfn, '0x' || tb.i.j || ','
end /* do */
call lineout cfn, '};'
end /* do */
call lineout cfn, 'wchar_t _Export *JisCodeToPcCodeTable[UCHAR_MAX+1] = {'
do i = 1 to 256
if tb.i = 0 then call lineout cfn, 'NULL,'
else call lineout cfn, 'jiscode2pccode_' || d2x(i - 1) || ','
end /* do */
call lineout cfn, '};'
call stream cfn, 'c', 'close'
exit