forked from gitGNU/gnu_bash
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrayfunc.h
More file actions
Latest commit
80 lines (55 loc) · 3 KB
/
Copy patharrayfunc.h
File metadata and controls
80 lines (55 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/* arrayfunc.h -- declarations for miscellaneous array functions in arrayfunc.c */
/* Copyright (C) 2001-2010 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Bash is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bash. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined (_ARRAYFUNC_H_)
#define_ARRAYFUNC_H_
/* Must include variables.h before including this file. */
#if defined (ARRAY_VARS)
/* Flags for array_value_internal and callers array_value/get_array_value */
#defineAV_ALLOWALL 0x001
#defineAV_QUOTED 0x002
#defineAV_USEIND 0x004
#defineAV_USEVAL 0x008 /* XXX - should move this */
#defineAV_ASSIGNRHS 0x010 /* no splitting, special case ${a[@]} */
externSHELL_VAR*convert_var_to_array__P((SHELL_VAR*));
externSHELL_VAR*convert_var_to_assoc__P((SHELL_VAR*));
externchar*make_array_variable_value__P((SHELL_VAR*, arrayind_t, char*, char*, int));
externSHELL_VAR*bind_array_variable__P((char*, arrayind_t, char*, int));
externSHELL_VAR*bind_array_element__P((SHELL_VAR*, arrayind_t, char*, int));
externSHELL_VAR*assign_array_element__P((char*, char*, int));
externSHELL_VAR*bind_assoc_variable__P((SHELL_VAR*, char*, char*, char*, int));
externSHELL_VAR*find_or_make_array_variable__P((char*, int));
externSHELL_VAR*assign_array_from_string__P((char*, char*, int));
externSHELL_VAR*assign_array_var_from_word_list__P((SHELL_VAR*, WORD_LIST*, int));
externWORD_LIST*expand_compound_array_assignment__P((SHELL_VAR*, char*, int));
externvoidassign_compound_array_list__P((SHELL_VAR*, WORD_LIST*, int));
externSHELL_VAR*assign_array_var_from_string__P((SHELL_VAR*, char*, int));
externintunbind_array_element__P((SHELL_VAR*, char*));
externintskipsubscript__P((constchar*, int, int));
externvoidprint_array_assignment__P((SHELL_VAR*, int));
externvoidprint_assoc_assignment__P((SHELL_VAR*, int));
externarrayind_tarray_expand_index__P((SHELL_VAR*, char*, int));
externintvalid_array_reference__P((constchar*, int));
externchar*array_value__P((constchar*, int, int, int*, arrayind_t*));
externchar*get_array_value__P((constchar*, int, int*, arrayind_t*));
externchar*array_keys__P((char*, int));
externchar*array_variable_name__P((constchar*, char**, int*));
externSHELL_VAR*array_variable_part__P((constchar*, char**, int*));
#else
#defineAV_ALLOWALL 0
#defineAV_QUOTED 0
#defineAV_USEIND 0
#defineAV_ASSIGNRHS 0
#endif
#endif/* !_ARRAYFUNC_H_ */