3
# $Id: mk_sb_tbl.awk,v 1.1.2.2 2005/02/21 08:01:03 moriyoshi Exp $
5
# Description: a script that generates a single byte code set to Unicode
10
if (!match(str, "^0[xX]")) {
16
for (i = 3; i <= length(str); i++) {
17
n = index("0123456789abcdefABCDEF", substr(str, i, 1)) - 1
25
retval = retval * 16 + n
40
tbl[conv($1)] = conv($2)
44
print "/* This file is automatically generated. Do not edit! */"
46
print "#ifndef " IFNDEF_NAME
49
print "static const int " TABLE_NAME "[] = {"
52
printf("\t0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x", tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++]);
63
print "#endif /* " IFNDEF_NAME " */"