From 6e30b0bbaa50af7404307a723b0e189b9777aa2e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 19 May 2015 20:55:34 -0700 Subject: 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. --- ChangeLog | 11 +++++++++++ Makefile | 4 ++-- lisplib.c | 2 +- 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 + + 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 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); } -- cgit v1.2.3