From f7f42b5f4fd22cd16e092de4a6f2a642b5ab8234 Mon Sep 17 00:00:00 2001 From: "Nathan P. Reiner" Date: Fri, 16 Dec 2022 09:38:25 +0100 Subject: add env structre --- lib/env/.gitignore | 1 + lib/env/Makefile | 3 +++ lib/env/env.c | 1 + lib/env/env.h | 7 +++++++ 4 files changed, 12 insertions(+) create mode 100644 lib/env/.gitignore create mode 100644 lib/env/Makefile create mode 100644 lib/env/env.c create mode 100644 lib/env/env.h (limited to 'lib') diff --git a/lib/env/.gitignore b/lib/env/.gitignore new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/lib/env/.gitignore @@ -0,0 +1 @@ +test diff --git a/lib/env/Makefile b/lib/env/Makefile new file mode 100644 index 0000000..6158ef2 --- /dev/null +++ b/lib/env/Makefile @@ -0,0 +1,3 @@ +unit_test: + gcc env.c ../cstr/cstr.c ../sys/start.S -o test -static -nostdlib -fno-stack-protector -Wno-implicit-function-declaration -g + ./test diff --git a/lib/env/env.c b/lib/env/env.c new file mode 100644 index 0000000..df8e361 --- /dev/null +++ b/lib/env/env.c @@ -0,0 +1 @@ +#include "env.h" diff --git a/lib/env/env.h b/lib/env/env.h new file mode 100644 index 0000000..7d95d63 --- /dev/null +++ b/lib/env/env.h @@ -0,0 +1,7 @@ +#ifndef ENV_H +#define ENV_H + +const char *getenv(const char *key); +void setenv(const char *key, const char *value); + +#endif -- cgit v1.2.3-70-g09d2