summaryrefslogtreecommitdiff
path: root/include/env.h
diff options
context:
space:
mode:
authorLeo C2016-04-15 15:29:18 +0200
committerLeo C2016-04-15 15:29:18 +0200
commitbe84a704bf7cb5505c42486e4ace33abab48470d (patch)
treed8026a0dfed262c21cff09a168056881e9bafeb9 /include/env.h
parent19a463f47d00a983e23cfd1c0e769f88667f04f8 (diff)
downloadz180-stamp-be84a704bf7cb5505c42486e4ace33abab48470d.zip
New function: getenv_yesno()
Get boolean value (0/f/n or 1/t/y) of environment variable.
Diffstat (limited to 'include/env.h')
-rw-r--r--include/env.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/env.h b/include/env.h
index c7e49ca..63bd7d2 100644
--- a/include/env.h
+++ b/include/env.h
@@ -1,16 +1,19 @@
/*
* (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
*
- * SPDX-License-Identifier: GPL-2.0+
+ * SPDX-License-Identifier: GPL-2.0
*/
#ifndef ENV_H
#define ENV_H
+#include <stdbool.h>
+
int env_init(void);
char *getenv_char(const MEMX char *name);
unsigned long getenv_ulong(const MEMX char *name, int base, unsigned long default_val);
+bool getenv_yesno(const MEMX char *name);
int setenv_ulong(const MEMX char *varname, unsigned long value);
int setenv_hex(const MEMX char *varname, unsigned long value);