char_conversio symbol mixup

parent 80d56991
......@@ -31,7 +31,7 @@
(set-procedure-property! xx 'name 'f)))
(define do-print #t)
(define do-print #f)
(define pp
(case-lambda
((s x)
......
......@@ -24,7 +24,6 @@
(define (init-char-conversion)
(fluid-set! *conversion* vlist-null))
(set! do-character-convert (lambda () #f))
(define (char-convert ch)
(if (do-character-convert)
(let ((l (vhash-assq ch (fluid-ref *conversion*))))
......@@ -77,7 +76,7 @@
(define (<-ch x)
(list->string (list x)))
(<define> (char_conversion ch1 ch2)
(<define> (char_conversion_ ch1 ch2)
(<let> ((ch1 (<lookup> ch1))
(ch2 (<lookup> ch2)))
(if (or (<var?> ch1) (<var?> ch2))
......@@ -90,8 +89,10 @@
((not ch2-)
(representation_error character))
(else
(<code> (add-char-conversion ch1- ch2-))))))))
(<code> (add-char-conversion ch1- ch2-))))))))
(set! char_conversion char_conversion_)
(init-flags)
(<define> (current_char_conversion ch1 ch2)
(<let*> ((ch1 (<lookup> ch1))
(ch1- (->ch ch1))
......
......@@ -20,7 +20,7 @@
#:use-module (ice-9 pretty-print)
#:replace (include)
#:export (dynamic multifile discontiguous op set_prolog_flag get-flag
set-flag
set-flag init-flags
do-character-convert
current_op
current_prolog_flag
......@@ -256,7 +256,9 @@
(cdr ret)
ret)))
(define *flags* `((,bounded #f ,false ,true ,false)
(define *flags* #f)
(define (init-flags)
(set! *flags* `((,bounded #f ,false ,true ,false)
(,auto_sym #f ,on ,on ,off)
(,max_integer #f ,(ash 1 60))
(,min_integer #f ,(- (ash 1 60)))
......@@ -267,17 +269,18 @@
(,max_arity #f ,1024)
(,unknown #t ,error ,error ,fail ,warning)
(,double_quotes #t ,chars ,chars ,codes ,atom)))
(for-each
(lambda (x)
(match x
((k _ default . _) (set-flag k default))))
*flags*))
(set! do-character-convert
(lambda ()
(eq? (get-flag char_conversion) on)))
;; Setting up the default flags
(for-each
(lambda (x)
(match x
((k _ default . _) (set-flag k default))))
*flags*)
(define p (lambda x #f))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment