blob: f17774d911a2b6a6bff26e81e248446d948f1951 [file] [log] [blame]
Jari Aalto726f6381996-08-26 18:22:31 +00001/* make_cmd.h -- Declarations of functions found in make_cmd.c */
2
Jari Aalto31859422009-01-12 13:36:28 +00003/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
Jari Aalto726f6381996-08-26 18:22:31 +00004
5 This file is part of GNU Bash, the Bourne Again SHell.
6
Jari Aalto31859422009-01-12 13:36:28 +00007 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.
Jari Aalto726f6381996-08-26 18:22:31 +000011
Jari Aalto31859422009-01-12 13:36:28 +000012 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.
Jari Aalto726f6381996-08-26 18:22:31 +000016
Jari Aalto31859422009-01-12 13:36:28 +000017 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*/
Jari Aalto726f6381996-08-26 18:22:31 +000020
21#if !defined (_MAKE_CMD_H_)
22#define _MAKE_CMD_H_
23
24#include "stdc.h"
25
Jari Aalto7117c2d2002-07-17 14:10:11 +000026extern void cmd_init __P((void));
Jari Aalto726f6381996-08-26 18:22:31 +000027
Jari Aalto95732b42005-12-07 14:08:12 +000028extern WORD_DESC *alloc_word_desc __P((void));
Jari Aaltof73dda02001-11-13 17:56:06 +000029extern WORD_DESC *make_bare_word __P((const char *));
30extern WORD_DESC *make_word_flags __P((WORD_DESC *, const char *));
31extern WORD_DESC *make_word __P((const char *));
Jari Aalto726f6381996-08-26 18:22:31 +000032extern WORD_DESC *make_word_from_token __P((int));
33
Jari Aalto7117c2d2002-07-17 14:10:11 +000034extern WORD_LIST *make_word_list __P((WORD_DESC *, WORD_LIST *));
35
36#define add_string_to_list(s, l) make_word_list (make_word(s), (l))
37
Jari Aalto726f6381996-08-26 18:22:31 +000038extern COMMAND *make_command __P((enum command_type, SIMPLE_COM *));
39extern COMMAND *command_connect __P((COMMAND *, COMMAND *, int));
Jari Aaltob80f6442004-07-27 13:29:18 +000040extern COMMAND *make_for_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int));
Jari Aalto726f6381996-08-26 18:22:31 +000041extern COMMAND *make_group_command __P((COMMAND *));
Jari Aaltob80f6442004-07-27 13:29:18 +000042extern COMMAND *make_case_command __P((WORD_DESC *, PATTERN_LIST *, int));
Jari Aalto726f6381996-08-26 18:22:31 +000043extern PATTERN_LIST *make_pattern_list __P((WORD_LIST *, COMMAND *));
44extern COMMAND *make_if_command __P((COMMAND *, COMMAND *, COMMAND *));
45extern COMMAND *make_while_command __P((COMMAND *, COMMAND *));
46extern COMMAND *make_until_command __P((COMMAND *, COMMAND *));
47extern COMMAND *make_bare_simple_command __P((void));
48extern COMMAND *make_simple_command __P((ELEMENT, COMMAND *));
Jari Aalto31859422009-01-12 13:36:28 +000049extern void make_here_document __P((REDIRECT *, int));
Chet Ramey00018032011-11-21 20:51:19 -050050extern REDIRECT *make_redirection __P((REDIRECTEE, enum r_instruction, REDIRECTEE, int));
Jari Aaltoccc6cda1996-12-23 17:02:34 +000051extern COMMAND *make_function_def __P((WORD_DESC *, COMMAND *, int, int));
Jari Aalto726f6381996-08-26 18:22:31 +000052extern COMMAND *clean_simple_command __P((COMMAND *));
Jari Aalto726f6381996-08-26 18:22:31 +000053
Jari Aaltocce855b1998-04-17 19:52:44 +000054extern COMMAND *make_arith_command __P((WORD_LIST *));
55
Jari Aaltob80f6442004-07-27 13:29:18 +000056extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int));
Jari Aalto726f6381996-08-26 18:22:31 +000057
Jari Aaltocce855b1998-04-17 19:52:44 +000058#if defined (COND_COMMAND)
59extern COND_COM *make_cond_node __P((int, WORD_DESC *, COND_COM *, COND_COM *));
60extern COMMAND *make_cond_command __P((COND_COM *));
61#endif
62
Jari Aaltobb706242000-03-17 21:46:59 +000063extern COMMAND *make_arith_for_command __P((WORD_LIST *, COMMAND *, int));
64
65extern COMMAND *make_subshell_command __P((COMMAND *));
Jari Aalto31859422009-01-12 13:36:28 +000066extern COMMAND *make_coproc_command __P((char *, COMMAND *));
Jari Aaltobb706242000-03-17 21:46:59 +000067
Jari Aalto726f6381996-08-26 18:22:31 +000068extern COMMAND *connect_async_list __P((COMMAND *, COMMAND *, int));
69
70#endif /* !_MAKE_CMD_H */