From 521d01e8ad87e931af3e9a763cc84a6cf7fe5ee3 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 5 Dec 2021 09:47:21 -0800 Subject: Feat: basic string and memory functions Continue filling out the basic standard lib functions. Included prototypes of the str* and mem* families. Plan to add e(str|mem) and n(str|mem) variants as well. --- src/base/io/getc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/base/io/getc.c') diff --git a/src/base/io/getc.c b/src/base/io/getc.c index 68e1772..0f0d62e 100644 --- a/src/base/io/getc.c +++ b/src/base/io/getc.c @@ -23,7 +23,7 @@ loop: * get next buffer, try to keep io·BufUngets bytes * pre-catenated from the previous read to allow for ungets */ - mem·move(io->b-io·BufUngets, io->e-io·BufUngets, io·BufUngets); + mem·move(io->b-io·BufUngets, io·BufUngets, io->e-io·BufUngets); if(sys·read(io->fd, io->cap, io->b, &nr)){ io->state = io·BufNil; return io·BufEof; @@ -34,7 +34,7 @@ loop: } if(nr < io->cap){ - mem·move(io->e-i-io·BufUngets, io->b-io·BufUngets, i+io·BufUngets); + mem·move(io->e-i-io·BufUngets, i+io·BufUngets, io->b-io·BufUngets); io->g = io->e-i; } -- cgit v1.2.1