aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archive/docs-old.txt (renamed from docs-old.txt)0
-rw-r--r--archive/extras.c.txt11
2 files changed, 11 insertions, 0 deletions
diff --git a/docs-old.txt b/archive/docs-old.txt
index 1045b27..1045b27 100644
--- a/docs-old.txt
+++ b/archive/docs-old.txt
diff --git a/archive/extras.c.txt b/archive/extras.c.txt
new file mode 100644
index 0000000..beb48d9
--- /dev/null
+++ b/archive/extras.c.txt
@@ -0,0 +1,11 @@
+// useless file.
+
+cstr getenv(cstr name) {
+ extern cstr *environ;
+ size_t len = lenstr(name);
+ for (char **e = environ; *e; e++) {
+ if (safe_cmp(*e, name, len) && (*e)[len] == '=')
+ return *e + len + 1;
+ }
+ return NULL;
+} \ No newline at end of file