aboutsummaryrefslogtreecommitdiff
path: root/module/output/html.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-04-30 01:10:00 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2019-04-30 01:10:00 +0200
commit0288287f06e3afb4f40459da412206dceaf8067e (patch)
treee664075cfdff5695c6c2d77a88ce25033c59e35b /module/output/html.scm
parentFix makefile so all also builds guile code. (diff)
downloadcalp-0288287f06e3afb4f40459da412206dceaf8067e.tar.gz
calp-0288287f06e3afb4f40459da412206dceaf8067e.tar.xz
Replace 'when' and 'unless'.
Diffstat (limited to '')
-rw-r--r--module/output/html.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index f72122bb..a26f05e6 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -32,13 +32,13 @@
(let inner ((x 0)
(tree (make-tree overlapping?
(sort* lst time>? (lambda (e) (event-length/day e start-of-day))))))
- (if (null? tree) #f
- (let ((w (/ (- 1 x)
- (+ 1 (length-of-longst-branch (left-subtree tree))))))
- (set! (width (car tree)) w
- (x-pos (car tree)) x)
- (inner (+ x w) (left-subtree tree))
- (inner x (right-subtree tree))))))
+ (unless (null? tree)
+ (let ((w (/ (- 1 x)
+ (+ 1 (length-of-longst-branch (left-subtree tree))))))
+ (set! (width (car tree)) w
+ (x-pos (car tree)) x)
+ (inner (+ x w) (left-subtree tree))
+ (inner x (right-subtree tree))))))
;; This should only be used on time intervals, never on absolute times.
;; For that see @var{date->decimal-hour}.