[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA: [pzn@terra.com.br: Bug#169746: geda-gnetlist: protelII backend uses LF, but protel requires CR+LF]
Ales Hvezda <ahvezda@seul.org> writes:
(define* (newline #&optional port)
(if (bound? port)
(begin (display #\cr port) (display #\nl port))
(begin (display #\cr) (display #\nl))))
here is an alternative approach, supporting a compatible but expanded
interface (not necessarily better, just different):
(define *geda-option:newline-includes-CR* #f)
(define* (newline #&optional port)
(let ((outp (if (bound? port) port (current-output-port))))
(and *geda-option:newline-includes-CR* (display #\cr outp))
(display #\nl outp)))
it introduces a global option (tweak to preferred syntax) which when
non-#f makes calls to `newline' also output CR. (insert standard warning
re global var (ab)use here.)
thi