Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
per-gron committed Jul 5, 2010
1 parent fb89b79 commit 5ca38aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
6 changes: 1 addition & 5 deletions srfi/14.scm
Expand Up @@ -88,13 +88,9 @@

;/cj

(define-record-type :char-set
(make-char-set s)
char-set?
(define-type char-set
(s char-set:s))

(define char-set make-char-set)

(define (%string-copy s) (substring s 0 (string-length s)))

;;; Parse, type-check & default a final optional BASE-CS parameter from
Expand Down
20 changes: 10 additions & 10 deletions string/base64.scm
Expand Up @@ -31,10 +31,10 @@
(define-macro (macro-fifo-elem fifo) `(##car ,fifo))
(define-macro (macro-fifo-elem-set! fifo x) `(##set-car! ,fifo ,x))

(##define-macro (macro-fifo->list fifo)
(define-macro (macro-fifo->list fifo)
`(macro-fifo-next ,fifo))

(##define-macro (macro-fifo-remove-all! fifo)
(define-macro (macro-fifo-remove-all! fifo)
`(let ((fifo ,fifo))

(##declare (not interrupts-enabled))
Expand All @@ -44,7 +44,7 @@
(macro-fifo-next-set! fifo '())
head)))

(##define-macro (macro-fifo-remove-head! fifo)
(define-macro (macro-fifo-remove-head! fifo)
`(let ((fifo ,fifo))

(##declare (not interrupts-enabled))
Expand All @@ -69,7 +69,7 @@
(macro-fifo-tail-set! fifo x)
(##void)))))

(##define-macro (macro-fifo-insert-at-head! fifo elem)
(define-macro (macro-fifo-insert-at-head! fifo elem)
`(let ((fifo ,fifo) (elem ,elem))
(let ((x (##cons elem '())))

Expand All @@ -89,15 +89,15 @@
(macro-fifo-next-set! x head)
(##void)))))

(##define-macro (macro-fifo-advance-to-tail! fifo)
(define-macro (macro-fifo-advance-to-tail! fifo)
`(let ((fifo ,fifo))
; It is assumed that the fifo contains at least one element
; (i.e. the fifo's tail does not change).
(let ((new-head (macro-fifo-tail fifo)))
(macro-fifo-next-set! fifo new-head)
(macro-fifo-elem new-head))))

(##define-macro (macro-fifo-advance! fifo)
(define-macro (macro-fifo-advance! fifo)
`(let ((fifo ,fifo))
; It is assumed that the fifo contains at least two elements
; (i.e. the fifo's tail does not change).
Expand All @@ -106,16 +106,16 @@
(macro-fifo-next-set! fifo new-head)
(macro-fifo-elem new-head))))

(##define-macro (fifo->u8vector fifo start end)
(define-macro (fifo->u8vector fifo start end)
`(##fifo->u8vector ,fifo ,start ,end))

(##define-macro (u8vector-shrink! u8vect len)
(define-macro (u8vector-shrink! u8vect len)
`(##u8vector-shrink! ,u8vect ,len))

(##define-macro (fifo->string fifo start end)
(define-macro (fifo->string fifo start end)
`(##fifo->string ,fifo ,start ,end))

(##define-macro (string-shrink! str len)
(define-macro (string-shrink! str len)
`(##string-shrink! ,str ,len))

;==============================================================================
Expand Down

0 comments on commit 5ca38aa

Please sign in to comment.