diff options
Diffstat (limited to 'include/env.h')
-rw-r--r-- | include/env.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h new file mode 100644 index 0000000..71bc98c --- /dev/null +++ b/include/env.h @@ -0,0 +1,27 @@ +/* + * (C) Copyright 2014, 2018 Leo C. <erbl259-lmu@yahoo.de> + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#ifndef ENV_H +#define ENV_H + +#include "command.h" + +extern cmd_tbl_t cmd_tbl_env[]; + +command_ret_t do_env(cmd_tbl_t *, uint_fast8_t, int, char * const []); +int env_init(void); +char *getenv_str(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(const MEMX char *varname, const char *varvalue); +int setenv_ulong(const MEMX char *varname, unsigned long value); +int setenv_hex(const MEMX char *varname, unsigned long value); + +#if defined(CONFIG_AUTO_COMPLETE) +int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf); +#endif + +#endif /* ENV_H */ |