Skip to content
shell.h 734 B
Newer Older
Seblu's avatar
Seblu committed
/*
** shell.h for 42sh in /home/seblu/devel/c/42sh
**
** Made by Seblu
** Login   <seblu@epita.fr>
**
** Started on  Sun Jul 16 20:03:53 2006 Seblu
Seblu's avatar
Seblu committed
** Last update Sun Jul 30 03:42:43 2006 Seblu
Seblu's avatar
Seblu committed
*/

#ifndef SHELL_H_
# define SHELL_H_

# include <errno.h>
# include <stdlib.h>
Seblu's avatar
Seblu committed
# include "../opt/opt.h"
Seblu's avatar
Seblu committed

Seblu's avatar
Seblu committed
static const int SCAN_ERROR = 1;
static const int PARSE_ERROR = 2;
static const int FORK_ERROR = 128;
static const int RED_ERROR = 1;
Seblu's avatar
Seblu committed


Seblu's avatar
Seblu committed
typedef struct
Seblu's avatar
Seblu committed
{
Seblu's avatar
Seblu committed
/*   struct s_ast		*ast; */
/*   struct s_var		*vars; */
/*   struct s_func		*funcs; */
/*   struct s_history	*history; */
Seblu's avatar
Seblu committed
  ts_opt		*opt;
Seblu's avatar
Seblu committed
  int			last_status;
Seblu's avatar
Seblu committed
} ts_shell;

ts_shell		*shell_init(void);
void			shell_destroy(ts_shell *sh);
Seblu's avatar
Seblu committed

Seblu's avatar
Seblu committed
ts_shell *shell;
Seblu's avatar
Seblu committed

#endif /* !SHELL_H_ */