TextCanvasTarget "forth-text" { 100 } { userdict Ref cvn TID cvn put /TextInit { /KeyHitCallback { % key => - mark exch { hookfile exch write } errored cleartomark } def /InsertValueCallback { % string => - mark exch { hookfile exch writestring } errored cleartomark } def hookproc type /processtype eq { hookproc killprocess /hookproc { { hookfile bytesavailable dup 0 eq { pop [ hookfile 1 string readstring not {exit} if ] } { string hookfile exch readstring not {exit} if 10 dict begin /s exch def /newlines 0 def s {10 eq {/newlines newlines 1 add def} if} forall /a newlines 1 add array def 0 1 newlines 1 sub { pause /i exch def s (\n) search pop /pre exch def pop /s exch def a i pre put } for a newlines s put a } ifelse true writeatcaret } loop [()(*** EOF ***)()] true writeatcaret } fork store } if } def }