[Wisp-cvs] wisp/src/builtin sys.wisp,1.119,1.120
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-26 18:22:41
|
Update of /cvsroot/wisp/wisp/src/builtin In directory usw-pr-cvs1:/tmp/cvs-serv28730/src/builtin Modified Files: sys.wisp Log Message: Made Worth's syntax stack visible to the source being translated. Index: sys.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/sys.wisp,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- sys.wisp 18 Sep 2002 21:08:01 -0000 1.119 +++ sys.wisp 26 Sep 2002 18:22:37 -0000 1.120 @@ -66,12 +66,13 @@ (local (sys:getcwd) (let (loop (bufsize 16)) - (my buffer (make-c8string size) + (my buffer (make-c8string bufsize) (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])))))) + ; Note that /res/ includes the terminating NUL byte. + (else buffer[... (- res 1)])))))) (local (sys:nanosleep req) (my res ((asm NN_sys_ns_nanosleep) |