summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-05-19 20:55:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-05-19 20:55:34 -0700
commit6e30b0bbaa50af7404307a723b0e189b9777aa2e (patch)
tree1df9c36da0a775d9a58a38e33439d412e9cb9f37
parent7b0341d13bab3e7c2202327d56d150e2c7887045 (diff)
downloadtxr-6e30b0bbaa50af7404307a723b0e189b9777aa2e.tar.gz
txr-6e30b0bbaa50af7404307a723b0e189b9777aa2e.tar.bz2
txr-6e30b0bbaa50af7404307a723b0e189b9777aa2e.zip
Represent place.tl more compactly in image.
The contents of place.tl are now stored as a UTF-8 ordinary literal instead of a wide char literal. * Makefile (LISP_TO_C_STRING): Generate plain literal. * lisplib.c: Convert plain literal to string.
-rw-r--r--ChangeLog11
-rw-r--r--Makefile4
-rw-r--r--lisplib.c2
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 82fcffbb..ccf7ee9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-05-19 Kaz Kylheku <kaz@kylheku.com>
+
+ Represent place.tl more compactly in image.
+
+ The contents of place.tl are now stored as a UTF-8 ordinary literal
+ instead of a wide char literal.
+
+ * Makefile (LISP_TO_C_STRING): Generate plain literal.
+
+ * lisplib.c: Convert plain literal to string.
+
2015-05-15 Kaz Kylheku <kaz@kylheku.com>
Variables are now deletable places, if they are global.
diff --git a/Makefile b/Makefile
index e66f9d47..a25370fe 100644
--- a/Makefile
+++ b/Makefile
@@ -110,9 +110,9 @@ endef
define LISP_TO_C_STRING
$(call ABBREV,L2C)
-$(V)echo "const wchli_t *${@:.h=}_code = wli(" > $@
+$(V)echo "const char *${@:.h=}_code =" > $@
$(V)sed -e 's/;.*//' -e 's/["\\]/\\&/g' -e 's/$$/\\n/' -e 's/.*/"&"/' $< >> $@
-$(V)echo ");" >> $@
+$(V)echo ";" >> $@
endef
define WINDRES
diff --git a/lisplib.c b/lisplib.c
index a6f4d931..d632f96c 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -67,7 +67,7 @@ static void set_place_dlt_entries(val dlt, val fun)
static val place_instantiate(val dlt)
{
set_place_dlt_entries(dlt, nil);
- return eval_intrinsic(lisp_parse(static_str(place_code), std_error,
+ return eval_intrinsic(lisp_parse(string_utf8(place_code), std_error,
colon_k, lit("place.tl")), nil);
}