summaryrefslogtreecommitdiff
path: root/04a
diff options
context:
space:
mode:
Diffstat (limited to '04a')
-rw-r--r--04a/in0416
1 files changed, 4 insertions, 12 deletions
diff --git a/04a/in04 b/04a/in04
index 7abe8ae..8c0d2cc 100644
--- a/04a/in04
+++ b/04a/in04
@@ -331,11 +331,9 @@ function memchr
argument mem
argument c
local p
- local a
p = mem
:memchr_loop
- a = *1p
- if a == c goto memchr_loop_end
+ if *1p == c goto memchr_loop_end
p += 1
goto memchr_loop
:memchr_loop_end
@@ -343,12 +341,10 @@ function memchr
function strlen
argument s
- local c
local p
p = s
:strlen_loop
- c = *1p
- if c == 0 goto strlen_loop_end
+ if *1p == 0 goto strlen_loop_end
p += 1
goto strlen_loop
:strlen_loop_end
@@ -414,9 +410,7 @@ function fputn
function fputc
argument fd
argument c
- local p
- p = &c
- syscall(1, fd, p, 1)
+ syscall(1, fd, &c, 1)
return
function putc
@@ -428,10 +422,8 @@ function putc
function fgetc
argument fd
local c
- local p
c = 0
- p = &c
- syscall(0, fd, p, 1)
+ syscall(0, fd, &c, 1)
return c
; read a line from fd as a null-terminated string