Home | History | Annotate | Download | only in glib

Lines Matching refs:variable

430  * the <envar>PATHEXT</envar> environment variable. 
437 * variable. If the program is found, the return value contains the
1064 * @variable: the environment variable to get, in the GLib file name encoding.
1066 * Returns the value of an environment variable. The name and value
1070 * environment variable's value contains references to other
1073 * Return value: the value of the environment variable, or %NULL if
1074 * the environment variable is not found. The returned string may be
1079 g_getenv (const gchar *variable)
1083 g_return_val_if_fail (variable != NULL, NULL);
1085 return getenv (variable);
1094 g_return_val_if_fail (variable != NULL, NULL);
1095 g_return_val_if_fail (g_utf8_validate (variable, -1, NULL), NULL);
1107 wname = g_utf8_to_utf16 (variable, -1, NULL, NULL, NULL);
1164 * variable name and the contents) and for contents < 1024 chars in
1168 _g_getenv_nomalloc (const gchar *variable,
1171 const gchar *retval = getenv (variable);
1187 * @variable: the environment variable to set, must not contain '='.
1188 * @value: the value for to set the variable to.
1189 * @overwrite: whether to change the variable if it already exists.
1191 * Sets an environment variable. Both the variable's name and value
1199 * Returns: %FALSE if the environment variable couldn't be set.
1204 g_setenv (const gchar *variable,
1215 g_return_val_if_fail (variable != NULL, FALSE);
1216 g_return_val_if_fail (strchr (variable, '=') == NULL, FALSE);
1219 result = setenv (variable, value, overwrite);
1221 if (!overwrite && getenv (variable) != NULL)
1228 string = g_strconcat (variable, "=", value, NULL);
1239 g_return_val_if_fail (variable != NULL, FALSE);
1240 g_return_val_if_fail (strchr (variable, '=') == NULL, FALSE);
1241 g_return_val_if_fail (g_utf8_validate (variable, -1, NULL), FALSE);
1244 if (!overwrite && g_getenv (variable) != NULL)
1247 /* We want to (if possible) set both the environment variable copy
1261 wname = g_utf8_to_utf16 (variable, -1, NULL, NULL, NULL);
1263 tem = g_strconcat (variable, "=", value, NULL);
1292 * @variable: the environment variable to remove, must not contain '='.
1294 * Removes an environment variable from the environment.
1304 g_unsetenv (const gchar *variable)
1309 g_return_if_fail (variable != NULL);
1310 g_return_if_fail (strchr (variable, '=') == NULL);
1312 unsetenv (variable);
1317 g_return_if_fail (variable != NULL);
1318 g_return_if_fail (strchr (variable, '=') == NULL);
1320 len = strlen (variable);
1326 * the variable name, not just the first.
1331 if (strncmp (*e, variable, len) != 0 || (*e)[len] != '=')
1346 g_return_if_fail (variable != NULL);
1347 g_return_if_fail (strchr (variable, '=') == NULL);
1348 g_return_if_fail (g_utf8_validate (variable, -1, NULL));
1350 wname = g_utf8_to_utf16 (variable, -1, NULL, NULL, NULL);
1351 tem = g_strconcat (variable, "=", NULL);
1839 * environment variable.
3010 variable. This is a GNU extension. */
3029 /* Last possibility is the LANG environment variable. */
3362 g_getenv (const gchar *variable)
3364 gchar *utf8_variable = g_locale_to_utf8 (variable, -1, NULL, NULL, NULL);
3382 g_setenv (const gchar *variable,
3386 gchar *utf8_variable = g_locale_to_utf8 (variable, -1, NULL, NULL, NULL);
3399 g_unsetenv (const gchar *variable)
3401 gchar *utf8_variable = g_locale_to_utf8 (variable, -1, NULL, NULL, NULL);