#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
#include <wctype.h>
#include <sys/types.h>
#include <termios.h>
#include <signal.h>
#include "fallback.h"
#include "util.h"
#include "wutil.h"
#include "builtin.h"
#include "env.h"
#include "expand.h"
#include "common.h"
#include "wgetopt.h"
#include "proc.h"
#include "parser.h"
This graph shows which files directly or indirectly include this file:

Defines | |
| #define | BUILTIN_SET_PATH_ERROR L"%ls: Could not add component %ls to %ls.\n" |
| Error message for invalid path operations. | |
| #define | BUILTIN_SET_PATH_HINT L"%ls: Did you mean 'set %ls $%ls %ls'?\n" |
| Hint for invalid path operation with a colon. | |
| #define | BUILTIN_SET_ARG_COUNT L"%ls: The number of variable indexes does not match the number of values\n" |
| Error for mismatch between index count and elements. | |
Functions | |
| static int | is_path_variable (const wchar_t *env) |
| Test if the specified variable should be subject to path validation. | |
| static int | my_env_set (const wchar_t *key, array_list_t *val, int scope) |
| Call env_set. | |
| static int | parse_index (array_list_t *indexes, const wchar_t *src, const wchar_t *name, int var_count) |
| Extract indexes from a destination argument of the form name[index1 index2. | |
| static int | update_values (array_list_t *list, array_list_t *indexes, array_list_t *values) |
Update a list list by writing copies (using wcsdup) of the values specified by values to the indexes specified by indexes. | |
| static int | al_contains_long (array_list_t *list, long val) |
| Return 1 if an array list of longs contains the specified value, 0 otherwise. | |
| static void | erase_values (array_list_t *list, array_list_t *indexes) |
| Erase from a list values at specified indexes. | |
| static void | print_variables (int include_values, int esc, int scope) |
| Print the names of all environment variables in the scope, with or without values, with or without escaping. | |
| static int | builtin_set (wchar_t **argv) |
| The set builtin. | |
Functions used for implementing the set builtin.
|
|
The set builtin. Creates, updates and erases environment variables and environemnt variable arrays. Variables used for parsing the argument list |
|
||||||||||||||||
|
Call env_set. If this is a path variable, e.g. PATH, validate the elements. On error, print a description of the problem to stderr. |
|
||||||||||||||||||||
|
Extract indexes from a destination argument of the form name[index1 index2. ..]
|
|
||||||||||||||||
|
Update a list The previous entries at the specidied position will be free'd.
|
1.4.4