summaryrefslogtreecommitdiff
path: root/Unicode/gen-ent
diff options
context:
space:
mode:
Diffstat (limited to 'Unicode/gen-ent')
-rwxr-xr-xUnicode/gen-ent20
1 files changed, 20 insertions, 0 deletions
diff --git a/Unicode/gen-ent b/Unicode/gen-ent
new file mode 100755
index 0000000..7f43f7c
--- /dev/null
+++ b/Unicode/gen-ent
@@ -0,0 +1,20 @@
+#!/bin/sh
+LC_ALL=c
+export LC_ALL
+echo
+echo Generating entity table.
+(
+cat entities.lnx | sed 's/ $//' | grep '^[ ]*{"' | sort >tmp
+N=`cat tmp | wc -l`
+echo '/* Automatically generated by gen-ent */'
+echo
+echo 'static struct { unsigned char *s; int c; } entities ['`expr $N + 1`'] = {'
+cat tmp
+echo ' {NULL, 0}'
+echo '};'
+echo
+echo '#define N_ENTITIES' $N
+) > ../entity.inc
+rm -f tmp
+echo Done.
+echo