about summary refs log tree commit diff
path: root/transform.e
diff options
context:
space:
mode:
Diffstat (limited to 'transform.e')
-rw-r--r--transform.e32
1 files changed, 24 insertions, 8 deletions
diff --git a/transform.e b/transform.e
index 5bec117..b8afb1d 100644
--- a/transform.e
+++ b/transform.e
@@ -2780,6 +2780,7 @@ allocate-transformation-state s" transformation-state" variable
 ~   ~ : Do a thing with # and # ?
 ~   ~ : Do a different #swap # thing to # now.
 ~   ~ : provide-decimal
+~   ~ : provide-hex
 ~   ~ : provide-hex8
 ~   ~ : provide-hex16
 ~   ~ : provide-hex32
@@ -3204,14 +3205,15 @@ allocate-transformation-state s" transformation-state" variable
 : hex-output-metadata-entry-type-raw-string-literal 6 ;
 : hex-output-metadata-entry-type-alignment 7 ;
 : hex-output-metadata-entry-type-push-substring-decimal 8 ;
-: hex-output-metadata-entry-type-push-substring-hex8 9 ;
-: hex-output-metadata-entry-type-push-substring-hex16 10 ;
-: hex-output-metadata-entry-type-push-substring-hex32 11 ;
-: hex-output-metadata-entry-type-push-substring-hex64 12 ;
-: hex-output-metadata-entry-type-push-substring-string 13 ;
-: hex-output-metadata-entry-type-drop-substring 14 ;
-: hex-output-metadata-entry-type-swap-substrings 15 ;
-: hex-output-metadata-entry-type-roll-substrings 16 ;
+: hex-output-metadata-entry-type-push-substring-hex 9 ;
+: hex-output-metadata-entry-type-push-substring-hex8 10 ;
+: hex-output-metadata-entry-type-push-substring-hex16 11 ;
+: hex-output-metadata-entry-type-push-substring-hex32 12 ;
+: hex-output-metadata-entry-type-push-substring-hex64 13 ;
+: hex-output-metadata-entry-type-push-substring-string 14 ;
+: hex-output-metadata-entry-type-drop-substring 15 ;
+: hex-output-metadata-entry-type-swap-substrings 16 ;
+: hex-output-metadata-entry-type-roll-substrings 17 ;
 
 ~   Initialize the contents of the output metadata to all zeroes. This is
 ~ called from hex-transform at its top level, at the very start, to make sure
@@ -3263,6 +3265,7 @@ allocate-transformation-state s" transformation-state" variable
   ~ push-substring entries.
   hex-output-metadata-entry-type @
   dup hex-output-metadata-entry-type-push-substring-decimal = swap
+  dup hex-output-metadata-entry-type-push-substring-hex = 3roll || swap
   dup hex-output-metadata-entry-type-push-substring-hex8 = 3roll || swap
   dup hex-output-metadata-entry-type-push-substring-hex16 = 3roll || swap
   dup hex-output-metadata-entry-type-push-substring-hex32 = 3roll || swap
@@ -3796,6 +3799,12 @@ allocate-transformation-state s" transformation-state" variable
           } if
 
           dup hex-output-metadata-entry-type @
+          hex-output-metadata-entry-type-push-substring-hex = {
+            ." 0x"
+            dup hex-output-metadata-entry-string @ .hex
+          } if
+
+          dup hex-output-metadata-entry-type @
           hex-output-metadata-entry-type-push-substring-hex8 = {
             ." 0x"
             dup hex-output-metadata-entry-string @ .hex8
@@ -4935,6 +4944,13 @@ allocate-transformation-state s" transformation-state" variable
     add-hex-output-metadata-entry
     exit
   } if
+  dup s" provide-hex" stringcmp 0 = {
+    ~ Create a new "push substring hex" entry.
+    drop drop
+    2 pick hex-output-metadata-entry-type-push-substring-hex swap
+    add-hex-output-metadata-entry
+    exit
+  } if
   dup s" provide-hex8" stringcmp 0 = {
     ~ Create a new "push substring hex8" entry.
     drop drop