From e21f19001551eddbb8d27acea1327590ce124461 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 18 Apr 2015 10:47:14 -0700 Subject: Adding getenv, setenv and unsetenv. * lib.c (setenv, unsetenv): Changed static functions to external. Moved them out of the #if !HAVE_TIMEGM block. * lib.h (setenv, unsetenv): Declared. * sysif.c (getenv_wrap, setenv_wrap, unsetenv_wrap): New functions. (sysif_init): Registered getenv, setenv and unsetenv. * txr.1: Documented getenv, setenv and unsetenv. * tl.vim, txr.vim: Regenerated. --- lib.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 5657bf85..052b46a8 100644 --- a/lib.h +++ b/lib.h @@ -848,6 +848,10 @@ val obj_print(val obj, val stream); val obj_pprint(val obj, val stream); val tostring(val obj); val tostringp(val obj); +#if !HAVE_SETENV +void setenv(const char *name, const char *value, int overwrite); +void unsetenv(const char *name); +#endif val time_sec(void); val time_sec_usec(void); val time_string_local(val time, val format); -- cgit v1.2.3