4 echo Generating entity table.
6 sed -n '/^[^#]/,$p' < entities.txt |
while read line
; do \
7 name
=$
(echo "$line" | cut
-f 1); \
8 code
=$
(echo "$line" | cut
-f 3); \
9 desc
=$
(echo "$line" | cut
-f 4 |
sed 's/# //'); \
10 test "$code" = "0x????" && continue
11 printf "\t{ %-12s %s }, /* %-46s */\n" \
12 "\"$name\"," "$code" "$desc"; \
13 done | LC_ALL
=C
sort > tmp
16 cat > ..
/src
/intl
/entity.inc
<<EOF
17 /* Automatically generated by gen-ent */
19 static const struct entity { char *s; unicode_val_T c; } entities [$(expr $N + 1)] = {