aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-12-02 09:18:24 -0800
committerNicholas Noll <nbnoll@eml.cc>2021-12-02 09:18:24 -0800
commitf7a916f7620c749d440cb6a76010641675217689 (patch)
treea77f29c25f6143645f11cefa6f30c22daa1c6549 /include
parentabd5a5b67e5b87a1de73761172ff51cf2f8e1213 (diff)
many small updates
Diffstat (limited to 'include')
-rw-r--r--include/base/io.h3
-rw-r--r--include/base/string.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/include/base/io.h b/include/base/io.h
index 22606ad..5c8fdd9 100644
--- a/include/base/io.h
+++ b/include/base/io.h
@@ -115,7 +115,7 @@ struct io·Header
int state, fd, flag;
int ilen; /* negative number of bytes at end of buffer */
int olen; /* number of bytes at start of buffer */
- int line; /* number of bytes after last readline */
+ int nread; /* number of bytes after last readline */
int runesz; /* number of bytes of last getrune */
int cap; /* size of buffer */
intptr pos; /* position in file */
@@ -138,6 +138,7 @@ int bio·initcap(io·Header *io, int fd, int mode, int cap, uchar *buf);
int bio·flush(io·Header *io);
intptr bio·read(io·Header *io, intptr len, void *buf);
void *bio·readuntil(io·Header *io, int delim);
+void *bio·readline(io·Header *io, int null);
intptr bio·write(io·Header *io, intptr len, void *buf);
int bio·getc(io·Header *io);
diff --git a/include/base/string.h b/include/base/string.h
index 08466fa..157129f 100644
--- a/include/base/string.h
+++ b/include/base/string.h
@@ -28,3 +28,6 @@ string str·join(vlong len, byte** fields, const byte* sep);
/* raw C string functions */
char *str·copyn(char *dst, char *src, int n);
+
+/* string parsing */
+int str·atoi(char *s);