summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2015-01-11 01:08:02 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2015-01-12 02:11:16 +0100
commit491b7775b273daf1325a1b050345dbf75b394315 (patch)
treeef1e1b3e2f60e80c71c09948196b37b6f7585eb4 /Makefile
parent009fe0141445275c495d0825a1d5c0a374fc9d90 (diff)
Reduce size of gperf entity table
Don't store length of UTF-8 string. It can be computed by NULL-terminating strings shorter than 4 bytes and using strnlen. Use gperf's string pool option. This allows to use an 'int' index into the string pool instead of a pointer and is helpful on 64-bit systems. Shaves about 75 KB off the 32-bit binaries on Linux and 128 KB off the 64-bit binaries on OS X.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5d421e8..c5665e4 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ clean:
# normally need to be generated.
$(SRCDIR)/html_unescape.h: $(SRCDIR)/html_unescape.gperf
gperf -L ANSI-C -I -t -N find_entity -H hash_entity -K entity -C -l \
- -F ',0,{0}' --null-strings -m5 $< > $@
+ -F ',{0}' --null-strings -m5 -P -Q entity_pool $< > $@
# We include case_fold_switch.inc in the repository, so this shouldn't
# normally need to be generated.