libs/web: rewrite template engine, merge lmo library
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Nov 2012 19:17:55 +0000 (19:17 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Nov 2012 19:17:55 +0000 (19:17 +0000)
commit0e50aa690af6cd9f37fa97b4a521fe523cce3c39
treec0ab4edc0dd221dfa3e6fb4eeba049ecc05326fe
parentc647ff9f0e1af211a762dc9a773c1b5c4aacd168
libs/web: rewrite template engine, merge lmo library

- template parser: merge lmo library
- template parser: rewrite to operate on memory mapped files
- template parser: implement proper line number reporting on syntax errors
- template parser: process translate tags directly and bypass Lua
- template lmo: introduce load_catalog(), change_catalog() and close_catalog()
- template lmo: rewrite index processing to operate directly on the memory mapped file
- template lmo: implement binary search keys, reducing the lookup complexity to O(log n)
- po2lmo: write sorted indixes when generating *.lmo archives
- i18n: use the template parser for translations
- i18n: stub load(), loadc() and clear()
- i18n: map setlanguage() to load_catalog()
22 files changed:
libs/lmo/Makefile [deleted file]
libs/lmo/src/lmo.h [deleted file]
libs/lmo/src/lmo_core.c [deleted file]
libs/lmo/src/lmo_hash.c [deleted file]
libs/lmo/src/lmo_lookup.c [deleted file]
libs/lmo/src/lmo_lualib.c [deleted file]
libs/lmo/src/lmo_lualib.h [deleted file]
libs/lmo/src/lmo_po2lmo.c [deleted file]
libs/lmo/standalone.mk [deleted file]
libs/web/Makefile
libs/web/luasrc/i18n.lua
libs/web/luasrc/template.lua
libs/web/src/po2lmo.c [new file with mode: 0644]
libs/web/src/template_lmo.c [new file with mode: 0644]
libs/web/src/template_lmo.h [new file with mode: 0644]
libs/web/src/template_lualib.c
libs/web/src/template_lualib.h
libs/web/src/template_parser.c
libs/web/src/template_parser.h
libs/web/src/template_utils.c
libs/web/src/template_utils.h
libs/web/standalone.mk [new file with mode: 0644]