Changeset 3372


Ignore:
Timestamp:
Oct 17, 2012, 9:05:36 AM (2 years ago)
Author:
quozl
Message:

decompiler - for strings with embedded control characters, render the characters as #, to fix visual debugger rendering, http://dev.laptop.org/ticket/12104

File:
1 edited

Legend:

Unmodified
Added
Removed
  • forth/lib/decomp.fth

    r3329 r3372  
    331331   2swap               ( ip $ name$ ) 
    332332; 
     333 
     334: type#  ( $ -- )  \ render control characters as green # 
     335   bounds ?do 
     336      i c@ dup h# 20 < if 
     337         drop green-letters ." #" red-letters 
     338      else 
     339         emit 
     340      then 
     341   loop 
     342; 
     343 
    333344: .string-tail  ( $ name$ -- ) 
    334345   2 pick over +  3 + ?line    ( $ name$ )  \ Keep word and string on the same line 
    335346   cr".  space                 ( $ ) 
    336    red-letters type            ( ) 
     347   red-letters type#           ( ) 
    337348   magenta-letters             ( ) 
    338349   ." "" "                     ( ) 
Note: See TracChangeset for help on using the changeset viewer.