diff options
author | pommicket <pommicket@gmail.com> | 2022-01-08 10:15:43 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-01-08 10:15:43 -0500 |
commit | d74f349e27a1ba20bd549362f95915ee6d2dd9d1 (patch) | |
tree | 900ab7d53c215e47c5bfb83acea94e1c74e3a19e /04a/in04 | |
parent | 262824b21491446bb20acba8be1054207b5f50f0 (diff) |
allow terms to be more complicated
Diffstat (limited to '04a/in04')
-rw-r--r-- | 04a/in04 | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -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 |