# support code for batch mode # for backtrace printing etc.. # todo: rename -push/pop stuff # check if input stack can be removed : batch () swapreturn drop # start with clean sheet interpret-stream # interpret stream bye ; # done 0 "" "r" open-fd variable! *stdin* : stdin *stdin* @ batch ;; : file "r" open-file batch ;; : quit postpone [ () swapreturn drop *stdin* @ interpret-stream quit ; # single-process simple alternative to pf-console : debug { "Error: " p p cr quit } >abort "PF gdb-friendly console." p cr "Useful commands:" p cr " gdb SIGTRAP" p cr " bye exit program" p cr cr stdin ;;