Lines Matching refs:e
28 static bool env_name_is_valid_n(const char *e, size_t n) { in env_name_is_valid_n() argument
29 if (!e) in env_name_is_valid_n()
35 if (e[0] >= '0' && e[0] <= '9') in env_name_is_valid_n()
46 for (const char *p = e; p < e + n; p++) in env_name_is_valid_n()
53 bool env_name_is_valid(const char *e) { in env_name_is_valid() argument
54 return env_name_is_valid_n(e, strlen_ptr(e)); in env_name_is_valid()
57 bool env_value_is_valid(const char *e) { in env_value_is_valid() argument
58 if (!e) in env_value_is_valid()
61 if (!utf8_is_valid(e)) in env_value_is_valid()
71 if (strlen(e) > sc_arg_max() - 3) in env_value_is_valid()
77 bool env_assignment_is_valid(const char *e) { in env_assignment_is_valid() argument
80 eq = strchr(e, '='); in env_assignment_is_valid()
84 if (!env_name_is_valid_n(e, eq - e)) in env_assignment_is_valid()
92 if (strlen(e) > sc_arg_max() - 1) in env_assignment_is_valid()
98 bool strv_env_is_valid(char **e) { in strv_env_is_valid() argument
99 STRV_FOREACH(p, e) { in strv_env_is_valid()
501 char **strv_env_clean_with_callback(char **e, void (*invalid_callback)(const char *p, void *userdat… in strv_env_clean_with_callback() argument
504 STRV_FOREACH(p, e) { in strv_env_clean_with_callback()
527 e[k++] = *p; in strv_env_clean_with_callback()
530 if (e) in strv_env_clean_with_callback()
531 e[k] = NULL; in strv_env_clean_with_callback()
533 return e; in strv_env_clean_with_callback()
547 … const char *e, *word = format, *test_value = NULL; /* test_value is initialized to appease gcc */ in replace_env_n() local
555 for (e = format, i = 0; *e && i < n; e ++, i ++) in replace_env_n()
559 if (*e == '$') in replace_env_n()
564 if (*e == '{') { in replace_env_n()
565 k = strnappend(r, word, e-word-1); in replace_env_n()
571 word = e-1; in replace_env_n()
574 } else if (*e == '$') { in replace_env_n()
575 k = strnappend(r, word, e-word); in replace_env_n()
581 word = e+1; in replace_env_n()
584 … } else if (flags & REPLACE_ENV_ALLOW_BRACELESS && strchr(VALID_BASH_ENV_NAME_CHARS, *e)) { in replace_env_n()
585 k = strnappend(r, word, e-word-1); in replace_env_n()
591 word = e-1; in replace_env_n()
599 if (*e == '}') { in replace_env_n()
602 t = strv_env_get_n(env, word+2, e-word-2, flags); in replace_env_n()
607 word = e+1; in replace_env_n()
610 } else if (*e == ':') { in replace_env_n()
612 len = e - word - 2; in replace_env_n()
621 if (*e == '-') in replace_env_n()
623 else if (*e == '+') in replace_env_n()
630 test_value = e+1; in replace_env_n()
637 if (*e == '{') { in replace_env_n()
642 if (*e != '}') in replace_env_n()
653 t = v = replace_env_n(test_value, e-test_value, env, flags); in replace_env_n()
655 t = v = replace_env_n(test_value, e-test_value, env, flags); in replace_env_n()
660 word = e+1; in replace_env_n()
668 if (!strchr(VALID_BASH_ENV_NAME_CHARS, *e)) { in replace_env_n()
671 t = strv_env_get_n(env, word+1, e-word-1, flags); in replace_env_n()
676 word = e--; in replace_env_n()
688 t = strv_env_get_n(env, word+1, e-word-1, flags); in replace_env_n()
691 return strnappend(r, word, e-word); in replace_env_n()
708 char *e; in replace_env_argv() local
712 e = strv_env_get(env, *i+1); in replace_env_argv()
713 if (e) { in replace_env_argv()
716 … r = strv_split_full(&m, e, WHITESPACE, EXTRACT_RELAX|EXTRACT_UNQUOTE); in replace_env_argv()
760 const char *e; in getenv_bool() local
762 e = getenv(p); in getenv_bool()
763 if (!e) in getenv_bool()
766 return parse_boolean(e); in getenv_bool()
770 const char *e; in getenv_bool_secure() local
772 e = secure_getenv(p); in getenv_bool_secure()
773 if (!e) in getenv_bool_secure()
776 return parse_boolean(e); in getenv_bool_secure()
789 const char *e, *n; in putenv_dup() local
791 e = strchr(assignment, '='); in putenv_dup()
792 if (!e) in putenv_dup()
795 n = strndupa_safe(assignment, e - assignment); in putenv_dup()
798 return RET_NERRNO(setenv(n, e + 1, override)); in putenv_dup()
803 const char *e; in setenv_systemd_exec_pid() local
807 e = secure_getenv("SYSTEMD_EXEC_PID"); in setenv_systemd_exec_pid()
808 if (!e && update_only) in setenv_systemd_exec_pid()
811 if (streq_ptr(e, "*")) in setenv_systemd_exec_pid()
824 const char *e; in getenv_path_list() local
830 e = secure_getenv(name); in getenv_path_list()
831 if (!e) in getenv_path_list()
834 r = strv_split_full(&l, e, ":", EXTRACT_DONT_COALESCE_SEPARATORS); in getenv_path_list()
862 char *e; in getenv_steal_erase() local
870 e = getenv(name); in getenv_steal_erase()
871 if (!e) { in getenv_steal_erase()
878 a = strdup(e); in getenv_steal_erase()
883 string_erase(e); in getenv_steal_erase()