aboutsummaryrefslogtreecommitdiff
path: root/src/base/bufio/refill.h
diff options
context:
space:
mode:
authorNicholas <nbnoll@eml.cc>2021-11-20 11:55:55 -0800
committerNicholas <nbnoll@eml.cc>2021-11-20 12:34:01 -0800
commite97c8c469db0aa27985dab2879dc1f14905c7387 (patch)
treef10f7ed68f1ad5212eebb0985ef040c5e96235ba /src/base/bufio/refill.h
parenta9bfe650038afea8b751175cac16f6027345e45f (diff)
chore: simplify makefiles
Diffstat (limited to 'src/base/bufio/refill.h')
-rw-r--r--src/base/bufio/refill.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/base/bufio/refill.h b/src/base/bufio/refill.h
deleted file mode 100644
index 41e357e..0000000
--- a/src/base/bufio/refill.h
+++ /dev/null
@@ -1,28 +0,0 @@
-int
-refill(io·Buffer *buf)
-{
- int n;
-
- if(buf->state & bufio·end)
- return bufio·err;
-
- memcpy(buf->buf, buf->pos - bufio·ungets, bufio·ungets);
-
- n = buf->rdr.read(buf->h, 1, buf->size, buf->beg);
- if(n < 0)
- return bufio·err;
- if(n == 0){
- buf->state |= bufio·end;
- return 0;
- }
-
- buf->pos = buf->beg;
- buf->end = buf->pos + n;
-
- // TEST: put a physical EOF byte at the end
- // this would allow for an unget operation
- if(n < buf->size)
- *buf->end++ = EOF;
-
- return n;
-}