1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

Move the SGML entity database back to the format used by unicode.org

This commit is contained in:
Jonas Fonseca 2006-01-03 16:43:31 +01:00 committed by Jonas Fonseca
parent a5d71488a2
commit 3e6c08ce12
3 changed files with 1046 additions and 1113 deletions

File diff suppressed because it is too large Load Diff

1027
Unicode/entities.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,18 +2,26 @@
echo
echo Generating entity table.
(
cat entities.lnx | grep '^[ ]*{"' | sort >tmp
sed -n '/^[^#]/,$p' < entities.txt | while read line; do \
name=$(echo "$line" | cut -f 1); \
code=$(echo "$line" | cut -f 3); \
desc=$(echo "$line" | cut -f 4 | sed 's/# //'); \
printf "\t{ %-12s %s }, /* %-46s */\n" \
"\"$name\"," "$code" "$desc"; \
done | LC_ALL=C sort > tmp
N=`cat tmp | wc -l`
echo '/* Automatically generated by gen-ent */'
echo
echo 'struct entity { char *s; unicode_val_T c; } entities ['`expr $N + 1`'] = {'
cat tmp
echo ' {NULL, 0}'
echo '};'
echo
echo '#define N_ENTITIES' $N
) > ../src/intl/entity.inc
cat > ../src/intl/entity.inc <<EOF
/* Automatically generated by gen-ent */
struct entity { char *s; unicode_val_T c; } entities [$(expr $N + 1)] = {
$(cat tmp)
{ NULL, 0 }
};
#define N_ENTITIES $N
EOF
rm -f tmp
echo Done.
echo