mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
- Forgot to add this one.
This commit is contained in:
parent
5b5e012bc2
commit
a796dc2b81
42
ext/mbstring/libmbfl/filters/mk_sb_tbl.awk
Executable file
42
ext/mbstring/libmbfl/filters/mk_sb_tbl.awk
Executable file
@ -0,0 +1,42 @@
|
||||
#!/usr/bin/awk -f
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Description: a script that generates a single byte code set to Unicode
|
||||
# mapping table.
|
||||
#
|
||||
BEGIN {
|
||||
FS="[ \t#]"
|
||||
}
|
||||
|
||||
/^#/ {
|
||||
# Do nothing
|
||||
}
|
||||
|
||||
{
|
||||
tbl[$1 + 0] = $2
|
||||
}
|
||||
|
||||
END {
|
||||
print "/* This file is automatically generated. Do not edit! */"
|
||||
if (IFNDEF_NAME) {
|
||||
print "#ifndef " IFNDEF_NAME
|
||||
}
|
||||
|
||||
print "static const unsigned int " TABLE_NAME "[] = {"
|
||||
i = 160;
|
||||
for (;;) {
|
||||
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++]);
|
||||
if (i != 256) {
|
||||
printf(",\n");
|
||||
} else {
|
||||
print
|
||||
break;
|
||||
}
|
||||
}
|
||||
print "};"
|
||||
|
||||
if (IFNDEF_NAME) {
|
||||
print "#endif /* " IFNDEF_NAME " */"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user