#ifndef H_SISH
#define H_SISH

#include <sys/types.h>
#include <sys/wait.h>

#include <signal.h>
#include <stdbool.h>
#include <string.h>

#define SHELL_NAME "sish$"

#define GET_PROGNAME_ERR "-sish"
#define MAX_ARGS 256 /* Completely arbitrary */

#define IS_SHELL_SPECIAL(s)                                                    \
	((s) == NULL || strcmp((s), ">") == 0 || strcmp((s), ">>") == 0 ||         \
	 strcmp((s), "&") == 0 || strcmp((s), "|") == 0)

#define IS_SHELL_SPECIAL_C(c)                                                  \
	((c) == '|' || (c) == '>' || (c) == '<' || (c) == '&')


extern pid_t last_pid_bg;
extern int last_fg_exit_status;
extern volatile sig_atomic_t interrupted;

extern bool flag_tracing_enabled;
extern bool flag_command_specified;
#endif