From 7ea7654db6e827038e38c3589c8d5b314db3fcb2 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Mon, 18 May 2020 20:28:51 -0700 Subject: fix: line accounting is less buggy --- include/libn.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libn.h b/include/libn.h index 8e21056..a307dde 100644 --- a/include/libn.h +++ b/include/libn.h @@ -185,9 +185,9 @@ enum ExecOK = X_OK, }; +/* file handling */ Stream *io·open(byte *name, byte *mode); int io·fd(Stream *s); -int io·exists(byte *path, int flag); error io·stat(Stream *s, io·Stat *buf); error io·close(Stream *s); byte io·getbyte(Stream *s); @@ -200,8 +200,12 @@ int io·write(Stream *s, int sz, int n, void *buf); int io·flush(Stream *s); int io·seek(Stream *s, long off, enum SeekPos whence); -/* generic I/O interfaces */ +/* basic os helpers */ +int os·exists(byte *path, int flag); +byte *os·basename(byte *path); +int os·sep(void); +/* io interfaces */ typedef struct io·Reader { int (*read)(void*, int sz, int n, void *buf); -- cgit v1.2.1