aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-10-06 13:35:20 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-10-06 13:35:20 +0200
commitfeefb97cf9118c8e5d7018e33887a371dadc5eab (patch)
tree33c42222df642813b726f5cc085d0d3569e441a1 /module/vcomponent.scm
parentRemove old C code. (diff)
downloadcalp-feefb97cf9118c8e5d7018e33887a371dadc5eab.tar.gz
calp-feefb97cf9118c8e5d7018e33887a371dadc5eab.tar.xz
Minor cleanup in scheme code.
Diffstat (limited to 'module/vcomponent.scm')
-rw-r--r--module/vcomponent.scm36
1 files changed, 7 insertions, 29 deletions
diff --git a/module/vcomponent.scm b/module/vcomponent.scm
index e7ffb785..4d13dbc8 100644
--- a/module/vcomponent.scm
+++ b/module/vcomponent.scm
@@ -32,13 +32,7 @@
;; TZSET is the generated recurrence set of a timezone
(set! (attr tz 'X-HNH-TZSET)
- (make-tz-set tz)
- #;
- ((@ (srfi srfi-41) stream)
- (list
- (car (children tz))
- (cadr (children tz))))
- ))
+ (make-tz-set tz)))
(for ev in (filter (lambda (o) (eq? 'VEVENT (type o))) (children cal))
(define dptr (attr* ev 'DTSTART))
@@ -50,12 +44,10 @@
(let ((d (set (date-hour date) = (+ 1))))
(set! (attr ev 'DTEND) d
eptr (attr* ev 'DTEND))
- d
- )]
+ d)]
[(value eptr) => parse-datetime]
[else
- (set (date-hour date) = (+ 1))])
- )
+ (set (date-hour date) = (+ 1))]))
(set! (value dptr) (date->time-utc date)
(value eptr) (date->time-utc end-date))
@@ -70,21 +62,6 @@
(value eptr) (date->time-utc end-date)))))
-;; (define-public value caar)
-;; (define-public next cdr)
-;; (define-public next! pop!)
-
-
-;; (define-public (reset! attr-list)
-;; (while (not (car attr-list))
-;; (next! attr-list))
-;; (next! attr-list))
-
-;; value
-;; (define-public v
-;; (make-procedure-with-setter car set-car!))
-
-
(define* (make-vcomponent #:optional path)
(if (not path)
(primitive-make-vcomponent)
@@ -121,9 +98,10 @@
(unless (find (lambda (z)
(string=? (attr z "TZID")
(attr component "TZID")))
- (filter (lambda (o) (eq? 'VTIMEZONE (type o))) (children accum)))
- (push-child! accum component)))
- (else (push-child! accum component)))))
+ (filter (lambda (o) (eq? 'VTIMEZONE (type o)))
+ (children accum)))
+ (add-child! accum component)))
+ (else (add-child! accum component)))))
;; return
accum))