diff --git a/bin/ikarus b/bin/ikarus index 4f08424..b642a97 100755 Binary files a/bin/ikarus and b/bin/ikarus differ diff --git a/bin/ikarus-runtime.c b/bin/ikarus-runtime.c index 13e00b0..1c3b0c6 100644 --- a/bin/ikarus-runtime.c +++ b/bin/ikarus-runtime.c @@ -753,26 +753,6 @@ ikrt_set_code_reloc_vector(ikp code, ikp vec, ikpcb* pcb){ return void_object; } -ikp -ikrt_strftime(ikp outstr, ikp fmtstr){ - time_t t; - struct tm* tmp; - t = time(NULL); - tmp = localtime(&t); - if(tmp == NULL){ - fprintf(stderr, "Error in time: %s\n", strerror(errno)); - } - int rv = - strftime((char*)outstr+off_string_data, - unfix(ref(outstr, off_string_length)) + 1, - (char*)fmtstr+off_string_data, - tmp); - if(rv == 0){ - fprintf(stderr, "Error in strftime: %s\n", strerror(errno)); - } - return fix(rv); -} - ikp ikrt_bvftime(ikp outbv, ikp fmtbv){ time_t t; diff --git a/src/ikarus.boot b/src/ikarus.boot index 4f17c54..5f01e0b 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.date-string.ss b/src/ikarus.date-string.ss index f0cdd64..d7602eb 100644 --- a/src/ikarus.date-string.ss +++ b/src/ikarus.date-string.ss @@ -4,6 +4,7 @@ (import (except (ikarus) date-string)) (define date-string (lambda () - (let ([s (make-string 10)]) - (foreign-call "ikrt_strftime" s "%F") - s)))) + (let ([s (make-bytevector 10)]) + (foreign-call "ikrt_bvftime" s + (string->utf8-bytevector "%F")) + (utf8-bytevector->string s))))) diff --git a/src/ikarus.transcoders.ss b/src/ikarus.transcoders.ss index c7db14d..2a6cc0f 100644 --- a/src/ikarus.transcoders.ss +++ b/src/ikarus.transcoders.ss @@ -201,7 +201,7 @@ [(eq? mode 'replace) ($string-set! str n ($fixnum->char #xFFFD)) (f str x ($fxadd1 i) j ($fxadd1 n) mode)] - [else (error who "BUG: incomplete char sequence")])] + [else (error who "BUG")])] [($fx= ($fxsra b0 3) #b11110) (cond [($fx< ($fx+ i 3) j) @@ -236,7 +236,7 @@ (define (convert bv mode) (fill ($make-string (count bv mode)) bv mode)) (case-lambda - [(bv) (convert bv 'error)] + [(bv) (convert bv 'raise)] [(bv handling-mode) (unless (memq handling-mode '(ignore replace raise)) (error 'utf8-bytevector->string @@ -245,7 +245,3 @@ (convert bv handling-mode)]))) ) - - -#!eof -