Update of /cvsroot/wisp/wisp/src/builtin
In directory usw-pr-cvs1:/tmp/cvs-serv6849/src/builtin
Modified Files:
dictbase.wisp strings.wisp
Log Message:
Started the string format transition.
Index: dictbase.wisp
===================================================================
RCS file: /cvsroot/wisp/wisp/src/builtin/dictbase.wisp,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -d -r1.239 -r1.240
--- dictbase.wisp 7 Sep 2002 21:55:58 -0000 1.239
+++ dictbase.wisp 7 Sep 2002 22:02:42 -0000 1.240
@@ -138,7 +138,7 @@
(local string-compare (asm NN_strcomp))
(local string-fill! (asm NN_string_fill))
(local string-length (asm NN_string_length))
-(local string-move! (asm NN_string_move))
+;(local string-move! (asm NN_string_move))
(local string? (asm NN_string_huh))
(local symbol? (asm NN_symbol_huh))
(local sys:exit (asm NN_sys_exit))
Index: strings.wisp
===================================================================
RCS file: /cvsroot/wisp/wisp/src/builtin/strings.wisp,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- strings.wisp 7 Sep 2002 22:00:41 -0000 1.101
+++ strings.wisp 7 Sep 2002 22:02:43 -0000 1.102
@@ -6,6 +6,26 @@
;;
;;;; @(#) $Id$
+; This procedure is temporary--it will be rewritten in a low-level
+; fashion after the string format transition is over.
+(define (string-move! dest destind src srcind amount)
+ (if (and (eq? dest src)
+ (< srcind destind))
+ (begin
+ (incr! srcind amount)
+ (incr! destind amount)
+ (while (positive? amount)
+ (decr! destind)
+ (decr! srcind)
+ (decr! amount)
+ (set! dest[destind] src[srcind])))
+ (while (positive? amount)
+ (set! dest[destind] src[srcind])
+ (incr! destind)
+ (incr! srcind)
+ (decr! amount)))
+ (begin))
+
(define (string->symbol s)
(set! s (string-copy s)) ; avoid entanglement
(and (fit-for-symbol? s)
|