aboutsummaryrefslogtreecommitdiffstats
path: root/qp.scm
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:27 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:27 -0800
commitfa3f23105ddcf07c5900de47f19af43d1db1b597 (patch)
treeb2c6cce6b97698098f50cbc78c23fdc0f8d401ab /qp.scm
parentf24b9140d6f74804d5599ec225717d38ca443813 (diff)
downloadslib-fa3f23105ddcf07c5900de47f19af43d1db1b597.tar.gz
slib-fa3f23105ddcf07c5900de47f19af43d1db1b597.zip
Import Upstream version 2c3upstream/2c3
Diffstat (limited to 'qp.scm')
-rw-r--r--qp.scm20
1 files changed, 10 insertions, 10 deletions
diff --git a/qp.scm b/qp.scm
index 3eed54d..ab6815c 100644
--- a/qp.scm
+++ b/qp.scm
@@ -19,15 +19,6 @@
(define *qp-width* (output-port-width (current-output-port)))
-(define qp:qpn
- (let ((newline newline) (apply apply))
- (lambda objs (apply qp:qp objs) (newline))))
-
-(define qp:qpr
- (let ((- -) (apply apply) (length length) (list-ref list-ref))
- (lambda objs (apply qp:qpn objs)
- (list-ref objs (- (length objs) 1)))))
-
(define qp:qp
(let
((+ +) (- -) (< <) (= =) (>= >=) (apply apply) (boolean? boolean?)
@@ -136,7 +127,7 @@
(lambda objs
(cond
- ((= 0 *qp-width*)
+ ((or (not *qp-width*) (= 0 *qp-width*))
(for-each (lambda (x) (write x) (display #\ )) objs)
(newline))
(else
@@ -144,6 +135,15 @@
(- *qp-width*
(qp-obj (car objs) (l-elt-room *qp-width* objs))))))))))
+(define qp:qpn
+ (let ((newline newline) (apply apply) (qp:qp qp:qp))
+ (lambda objs (apply qp:qp objs) (newline))))
+
+(define qp:qpr
+ (let ((- -) (apply apply) (length length) (list-ref list-ref) (qp:qpn qp:qpn))
+ (lambda objs (apply qp:qpn objs)
+ (list-ref objs (- (length objs) 1)))))
+
(define qp qp:qp)
(define qpn qp:qpn)
(define qpr qp:qpr)