diff options
author | pommicket <pommicket@gmail.com> | 2022-01-08 10:17:03 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-01-08 10:17:03 -0500 |
commit | d48816e226d5ba081dadbba4bcded92e5c0a23d1 (patch) | |
tree | e97ee2cdccf4d241ecb4f6c9cdfac771f694feee /04a | |
parent | 5d6b490cce1a99a2541d1fcee101df4331d4d86a (diff) | |
parent | d74f349e27a1ba20bd549362f95915ee6d2dd9d1 (diff) |
merge term stuff
Diffstat (limited to '04a')
-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 |