From e1f5c4e72830cc9ce900e1884d3338f1c82060fd Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Tue, 15 Sep 2026 18:00:31 -0700 Subject: redo the hex dump comments for alignment to use the regular magic commands previously, alignment had been a special-cased type of metadata entry, with a special trap on packalign. now it uses the same programmable setup everything else does. much simpler, and prettier output. this CL also contains some modest reformatting of section headers in the hex dump Force-Push: yes Change-Id: I21554e92f6af6ddefa937dad8073b89657f85d64 --- core.e | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'core.e') diff --git a/core.e b/core.e index 44f9fd5..e181d4f 100644 --- a/core.e +++ b/core.e @@ -1219,8 +1219,14 @@ here ! ~ (output point, alignment byte width -- output point) : packalign + ~ It's possible the padding will be of length zero, so we have to put the + ~ magic comment provide-* command first. + ~ : provide-decimal + ~ : 0 Alignment padding to width # { 2dup /% drop { drop exit } unless - swap 0 pack8 swap } forever ; + swap 0 pack8 swap + ~ : 1 adjust-length + } forever ; ~ Binary unpacking -- cgit 1.4.1