]> git.ipfire.org Git - thirdparty/bash.git/blob - make_cmd.h
fix for internal redirection flags colliding with open/fcntl flags; call memfd_create...
[thirdparty/bash.git] / make_cmd.h
1 /* make_cmd.h -- Declarations of functions found in make_cmd.c */
2
3 /* Copyright (C) 1993-2009,2020-2022 Free Software Foundation, Inc.
4
5 This file is part of GNU Bash, the Bourne Again SHell.
6
7 Bash is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 Bash is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Bash. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined (_MAKE_CMD_H_)
22 #define _MAKE_CMD_H_
23
24 #include "stdc.h"
25
26 extern int here_doc_first_line;
27
28 extern void cmd_init (void);
29
30 extern WORD_DESC *alloc_word_desc (void);
31 extern WORD_DESC *make_bare_word (const char *);
32 extern WORD_DESC *make_word_flags (WORD_DESC *, const char *);
33 extern WORD_DESC *make_word (const char *);
34 extern WORD_DESC *make_word_from_token (int);
35
36 extern WORD_LIST *make_word_list (WORD_DESC *, WORD_LIST *);
37
38 #define add_string_to_list(s, l) make_word_list (make_word(s), (l))
39
40 extern COMMAND *make_command (enum command_type, SIMPLE_COM *);
41 extern COMMAND *command_connect (COMMAND *, COMMAND *, int);
42 extern COMMAND *make_for_command (WORD_DESC *, WORD_LIST *, COMMAND *, int);
43 extern COMMAND *make_group_command (COMMAND *);
44 extern COMMAND *make_case_command (WORD_DESC *, PATTERN_LIST *, int);
45 extern PATTERN_LIST *make_pattern_list (WORD_LIST *, COMMAND *);
46 extern COMMAND *make_if_command (COMMAND *, COMMAND *, COMMAND *);
47 extern COMMAND *make_while_command (COMMAND *, COMMAND *);
48 extern COMMAND *make_until_command (COMMAND *, COMMAND *);
49 extern COMMAND *make_bare_simple_command (int);
50 extern COMMAND *make_simple_command (ELEMENT, COMMAND *, int);
51 extern void make_here_document (REDIRECT *, int);
52 extern REDIRECT *make_redirection (REDIRECTEE, enum r_instruction, REDIRECTEE, int);
53 extern COMMAND *make_function_def (WORD_DESC *, COMMAND *, int, int);
54 extern COMMAND *clean_simple_command (COMMAND *);
55
56 extern COMMAND *make_arith_command (WORD_LIST *);
57
58 extern COMMAND *make_select_command (WORD_DESC *, WORD_LIST *, COMMAND *, int);
59
60 #if defined (COND_COMMAND)
61 extern COND_COM *make_cond_node (int, WORD_DESC *, COND_COM *, COND_COM *);
62 extern COMMAND *make_cond_command (COND_COM *);
63 #endif
64
65 extern COMMAND *make_arith_for_command (WORD_LIST *, COMMAND *, int);
66
67 extern COMMAND *make_subshell_command (COMMAND *);
68 extern COMMAND *make_coproc_command (char *, COMMAND *);
69
70 extern COMMAND *connect_async_list (COMMAND *, COMMAND *, int);
71
72 #endif /* !_MAKE_CMD_H */