[Wisp-cvs] wisp/src/builtin dictbase.wisp,1.242,1.243 sys.wisp,1.112,1.113
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-11 17:36:50
|
Update of /cvsroot/wisp/wisp/src/builtin In directory usw-pr-cvs1:/tmp/cvs-serv4849/src/builtin Modified Files: dictbase.wisp sys.wisp Log Message: Dropped |sys:raw:getcwd|. Index: dictbase.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/dictbase.wisp,v retrieving revision 1.242 retrieving revision 1.243 diff -u -d -r1.242 -r1.243 --- dictbase.wisp 11 Sep 2002 17:35:03 -0000 1.242 +++ dictbase.wisp 11 Sep 2002 17:36:47 -0000 1.243 @@ -133,7 +133,6 @@ (local ref (asm NN_ref)) (local remainder (asm NN_remainder)) (local rvec-set! (asm NN_rvec_set)) -(local salloc (asm NN_salloc)) (local string (asm NN_string)) (local string-fill! (asm NN_string_fill)) (local string-length (asm NN_string_length)) Index: sys.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/sys.wisp,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 --- sys.wisp 7 Sep 2002 22:03:56 -0000 1.112 +++ sys.wisp 11 Sep 2002 17:36:47 -0000 1.113 @@ -59,19 +59,13 @@ (sys:setpgid 0 0)) (local (sys:getcwd) - (my size 16 - (let (loop) - (my buffer (salloc (decui size)) - (my res (encsi ((asm NN_sys_raw_getcwd) buffer (decui size))) - (if (negative? res) - (if (= (- res) (system-constant 'errno 'ERANGE)) - (begin - (set! size (* size 2)) - (loop)) - (signal-system-error res `(sys:getcwd))) - (my s (valloc (asm () (tn . 3))) - (asm ((decui (- res 1)) s . buffer) pt (s . 2) p (s . 1) (tn . 9) s0) - s))))))) + (let (loop (bufsize 16)) + (my buffer (make-c8string size) + (my res ((asm NN_sys_low_getcwd) buffer) + (cond + ((not res) (loop (* bufsize 2))) + ((negative? res) (signal-system-error res `(sys:getcwd))) + (else buffer[... res])))))) (local (%wsv->0tv wsv) (my i (length wsv) |