From 5e2f3c541681b36efc92cc2eed51567ca2ff40a8 Mon Sep 17 00:00:00 2001 From: crc Date: Wed, 12 Feb 2020 15:00:47 +0000 Subject: [PATCH] retro.forth: smaller `s:format` FossilOrigin-Name: bd0394df6f05b634f7c70efe030f6f3292b504703a4980127cd153234784d3eb --- image/retro.forth | 7 +- ngaImage | Bin 37676 -> 37608 bytes vm/nga-c/retro-image.c | 803 ++++++++++++++++++++--------------------- 3 files changed, 403 insertions(+), 407 deletions(-) diff --git a/image/retro.forth b/image/retro.forth index 16a88dd..893357d 100644 --- a/image/retro.forth +++ b/image/retro.forth @@ -1224,13 +1224,10 @@ The format language is simple: $0 [ ASCII:NUL buffer:add ] case buffer:add ; - :string (a-a) - repeat fetch-next 0; buffer:add again ; - :type (aac-) $c [ swap buffer:add ] case - $s [ swap string drop ] case - $n [ swap n:to-string string drop ] case + $s [ swap &buffer:add s:for-each ] case + $n [ swap n:to-string &buffer:add s:for-each ] case drop ; :handle (ac-a) diff --git a/ngaImage b/ngaImage index 65f74b156c85407f10696118fb8f211a88192e77..549157f209d0bb792f6b11594baf8dda945848df 100644 GIT binary patch delta 3893 zcmai14NTPM8UO#$KNIk(x9f4k<2a84nNoLx6~Qmcs6)#@jnhq;-B`0tv!a50$d_{E zOOWp;rqk3ml3`{hrmX8$vaQTilGV&57oAzx+KFqE+RaASHC@&k_WK?0%Pu#!Uh?uh z&+qv?U+??=|96}}8}r^sjLrOX88=-9&hKUtxgPdm=$qNi4USTiD)P7gN%bEpmzUzOpN5Nx;;yA;Y zgAB~l32ahU9SC@Sue`a;4OSs+UFUTP9&qKo8O7+2U|d%|=4LdzWppC&4-rKrFi&lJ8b!de{*&ufd``0GpAW zki#-sm1&-rH>$kOvk^S{Pr@D-+o8;u;beKQmE&3De$djVY9C}lJ3p>_hNJjNWbFoxZd(9;2 z#b1YvR=blDJTn!pgQX)rhMp}`)hn$f@NSmgI+v`d*<|jN`kD-9sfy4&Jqr72dAX+8 zY!I_Hu>4?@zYKO8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