Duck util-stdout.
This commit is contained in:
parent
323293be0e
commit
b027d19f49
5 changed files with 57 additions and 33 deletions
|
@ -183,3 +183,38 @@ Executes given command ```cmd``` with given argument list ```args```
|
|||
writing all ```lines``` to its standard input and then reads all the
|
||||
process output.
|
||||
|
||||
|
||||
## util-stdout [module]
|
||||
|
||||
(import util-stdout)
|
||||
|
||||
Very simple module wrapping standard output.
|
||||
|
||||
### *stdout-quiet* [parameter]
|
||||
|
||||
(define *stdout-quiet* (make-parameter #f))
|
||||
(*stdout-quiet*)
|
||||
(*stdout-quiet* quiet)
|
||||
|
||||
A boolean parameter which disables all output from procedures in this
|
||||
module if its value is ```#t```.
|
||||
|
||||
### stdout-print [procedure]
|
||||
|
||||
(stdout-print . args)
|
||||
|
||||
If not quiet, passes ```args``` to ```print```.
|
||||
|
||||
### stdout-printf [procedure]
|
||||
|
||||
(stdout-printf fmt
|
||||
. args)
|
||||
|
||||
If not quiet, prints formatted string ```fmt``` by applying ```args```
|
||||
to ```format``` procedure.
|
||||
|
||||
### stdout-newline [procedure]
|
||||
|
||||
(stdout-newline)
|
||||
|
||||
If not quiet, calls ```(newline)```.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue