racket/collects/readline/rep.ss
Eli Barzilay bab0a88ada * print a newline before reading if not at column 0
* flush the output before reading in `read-cmdline-syntax'
* rep.ss starts readline only when the input is a terminal

svn: r6128
2007-05-03 09:17:24 +00:00

11 lines
427 B
Scheme

;; This is a wrapper around "rep-start.ss" -- use it if we're using a terminal
(module rep mzscheme
(require (lib "runtime-path.ss"))
(define-runtime-path rep-start "rep-start.ss")
(let ([inp (current-input-port)] [outp (current-output-port)])
(when (and (eq? 'stdin (object-name inp)) (terminal-port? inp))
(dynamic-require rep-start #f)
(when (terminal-port? outp)
(port-count-lines! outp)))))