aboutsummaryrefslogtreecommitdiff
path: root/sys/libn
diff options
context:
space:
mode:
Diffstat (limited to 'sys/libn')
-rw-r--r--sys/libn/error.c10
-rw-r--r--sys/libn/memory.c5
-rw-r--r--sys/libn/rules.mk2
3 files changed, 12 insertions, 5 deletions
diff --git a/sys/libn/error.c b/sys/libn/error.c
index 95a534a..a9d684c 100644
--- a/sys/libn/error.c
+++ b/sys/libn/error.c
@@ -1,6 +1,16 @@
#include <u.h>
#include <libn.h>
+void
+exits(char *s)
+{
+ if (s == nil || *s == 0)
+ exit(0);
+
+ fputs(s, stderr);
+ exit(1);
+}
+
void
errorf(byte* fmt, ...)
{
diff --git a/sys/libn/memory.c b/sys/libn/memory.c
index 31f910e..999819b 100644
--- a/sys/libn/memory.c
+++ b/sys/libn/memory.c
@@ -194,8 +194,3 @@ memset64(void *dst, uint64 val, uintptr size)
((byte*)dst)[i] = ((byte*)&val)[i&7];
}
}
-
-// -------------------------------------------------------------------------
-// First argument
-
-char *argv0;
diff --git a/sys/libn/rules.mk b/sys/libn/rules.mk
index 61a56fe..abcd60d 100644
--- a/sys/libn/rules.mk
+++ b/sys/libn/rules.mk
@@ -6,11 +6,13 @@ include share/push.mk
# Local sources
SRCS_$(d) := \
+ $(d)/arg.c \
$(d)/bufio.c \
$(d)/coro_unix_x64.s \
$(d)/coro.c \
$(d)/error.c \
$(d)/flate.c \
+ $(d)/fs.c \
$(d)/gz.c \
$(d)/io.c \
$(d)/os.c \