/* * */ #ifndef H_HUSH_COMMAND #define H_HUSH_COMMAND #include #include "lexer.h" #include "config.h" typedef struct command { char *command; char *infile; char *outfile; struct command *next; struct command *prev; pid_t pid; int pipe[2]; char *args[MAX_ARGUMENT_CNT + 2]; } command; command *commands_from_tokens(token *parsed_cmdstr, size_t *cnt); void print_commands(FILE *file, command *cmds); void destroy_commands(command *cmds); int execute_command(command *cmd); #endif