Lines Matching full:variable
78 /// Gets the value of an environment variable.
80 /// \param name The name of the environment variable to query.
82 /// \return The value of the environment variable if it is defined, or none
89 LD(F("Environment variable '%s' is not defined") % name); in getenv()
92 LD(F("Environment variable '%s' is '%s'") % name % value); in getenv()
98 /// Gets the value of an environment variable with a default fallback.
100 /// \param name The name of the environment variable to query.
101 /// \param default_value The value to return if the variable is not defined.
103 /// \return The value of the environment variable.
110 LD(F("Environment variable '%s' is not defined; using default '%s'") % in getenv_with_default()
114 LD(F("Environment variable '%s' is '%s'") % name % value); in getenv_with_default()
120 /// Gets the value of the HOME environment variable with path validation.
122 /// \return The value of the HOME environment variable if it is a valid path;
132 LW(F("Invalid value '%s' in HOME environment variable: %s") % in get_home()
142 /// Sets the value of an environment variable.
144 /// \param name The name of the environment variable to set.
145 /// \param val The value to set the environment variable to. May be empty.
148 /// variable.
152 LD(F("Setting environment variable '%s' to '%s'") % name % val); in setenv()
156 throw std::runtime_error(F("Failed to set environment variable '%s' to " in setenv()
163 throw std::runtime_error(F("Failed to set environment variable '%s' to " in setenv()
168 # error "Don't know how to set an environment variable." in setenv()
173 /// Unsets an environment variable.
175 /// \param name The name of the environment variable to unset.
178 /// variable.
182 LD(F("Unsetting environment variable '%s'") % name); in unsetenv()
186 throw std::runtime_error(F("Failed to unset environment variable " in unsetenv()
193 throw std::runtime_error(F("Failed to unset environment variable " in unsetenv()
198 # error "Don't know how to unset an environment variable." in unsetenv()