]> cloudbase.mooo.com Git - z180-stamp.git/commitdiff
Rename getenv_char() --> getenv_str()
authorLeo C <erbl259-lmu@yahoo.de>
Fri, 17 Jun 2016 13:46:30 +0000 (15:46 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Fri, 17 Jun 2016 18:52:19 +0000 (20:52 +0200)
avr/cli.c
avr/cmd_gpio.c
avr/cmd_loadcpm3.c
avr/cmd_run.c
avr/env.c
avr/main.c
include/env.h

index 1a26206673bb12c54eae48c5328359e6f3da3a98..77876afb9687a4e9b53b522c26462cb18c6471a3 100644 (file)
--- a/avr/cli.c
+++ b/avr/cli.c
@@ -177,7 +177,7 @@ char *process_macros(char *input, char *output)
                                if (c == '}') {
                                        /* Terminate variable name */
                                        *(inp-1) = '\0';
-                                       const char *envval = getenv_char(varname);
+                                       const char *envval = getenv_str(varname);
                                        *(inp-1) = '}';
                                        /* Copy into the line if it exists */
                                        if (envval != NULL)
@@ -210,7 +210,7 @@ char *process_macros(char *input, char *output)
  * WARNING:
  *
  * We must create a temporary copy of the command since the command we get
- * may be the result from getenv_char(), which returns a pointer directly to
+ * may be the result from getenv_str(), which returns a pointer directly to
  * the environment data, which may change magicly when the command we run
  * creates or modifies environment variables (like "bootp" does).
  *
index d3ef716f0e10ed98bbfe4ccbe796abbb68a719ba..5cc02d0d46bc1d3ebb1bf331f29206fb8ac9a8ac 100644 (file)
@@ -37,7 +37,7 @@ static void pinnames_get(void)
 
 /* TODO: enters endless loop on wrong parameters */
 
-       if ((lp = getenv_char(PSTR(ENV_PINALIAS))) != NULL) {
+       if ((lp = getenv_str(PSTR(ENV_PINALIAS))) != NULL) {
                pin_names[namestr] = strdup(lp);
                ptr = strtok_P(pin_names[namestr], delim1);
                while (ptr != NULL) {
index 6b2f62fe320f9f4665e5b3fecb22d4a30697f411..02ec47fcf69e8eea6283b8a07a4991313289b44f 100644 (file)
@@ -92,7 +92,7 @@ command_ret_t do_loadcpm3(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg
        if (argc > 2)
                common_base = strtoul(argv[2], NULL, 16);
 
-       fname = getenv_char(PSTR(ENV_CPM3_SYSFILE));
+       fname = getenv_str(PSTR(ENV_CPM3_SYSFILE));
        if (argc > 1) {
                fname = argv[1];
        }
index 97d39d19c5e51201966120e0d56557961b6d6b91..8593ef5472e2e3b0b2076cd184459c6e1e85f954 100644 (file)
@@ -27,7 +27,7 @@ command_ret_t do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        for (i = 1; i < argc; ++i) {
                char *arg;
 
-               arg = getenv_char(argv[i]);
+               arg = getenv_str(argv[i]);
                if (arg == NULL) {
                        printf_P(PSTR("## Error: \"%s\" is not set\n"), argv[i]);
                        return CMD_RET_FAILURE;
index f0679402bb32f5eb1019520dafc7f59a3952eb43..952c88a0b9081b827d58ee6cfbe9c8ef0e41b88f 100644 (file)
--- a/avr/env.c
+++ b/avr/env.c
@@ -318,7 +318,7 @@ int env_init(void)
 }
 
 
-char *getenv_char(const MEMX char *name)
+char *getenv_str(const MEMX char *name)
 {
        env_item_t *ep;
        char *ret = NULL;
@@ -631,7 +631,7 @@ unsigned long getenv_ulong(const MEMX char *name, int base, unsigned long defaul
  */
 bool getenv_yesno(const MEMX char *name)
 {
-       char *s = getenv_char(name);
+       char *s = getenv_str(name);
 
        if (s == NULL)
                return false;
index 423b48a7806e8a11ad7f528fdf99152af3c8f83b..86dcc50caa6c506476e333ed06434c5bb1509552 100644 (file)
@@ -223,7 +223,7 @@ const char *bootdelay_process(void)
        debug("### main_loop entered: bootdelay=%d\n\n", bootdelay);
        _delay_ms(20);
 
-       s = getenv_char(PSTR(ENV_BOOTCMD));
+       s = getenv_str(PSTR(ENV_BOOTCMD));
        stored_bootdelay = bootdelay;
        return s;
 }
index 63bd7d227d954ae231406190b61e1009fc77d59c..bc4441302bc3ef18c919cfd0894bab86da4df051 100644 (file)
@@ -11,7 +11,7 @@
 
 int env_init(void);
 
-char *getenv_char(const MEMX char *name);
+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_ulong(const MEMX char *varname, unsigned long value);