Skip to content
shell_entry.c 760 B
Newer Older
Seblu's avatar
Seblu committed
/*
** main.c for 42sh in /home/seblu/devel/c/42sh/src/execution
**
** Made by Seblu
** Login   <seblu@epita.fr>
**
** Started on  Mon Apr 10 23:57:28 2006 Seblu
Seblu's avatar
Seblu committed
** Last update Sun Jul 16 20:26:30 2006 Seblu
Seblu's avatar
Seblu committed
*/

#include <stdio.h>

/*
** Global shell structure
*/
struct s_shell *shell = NULL;

/*!
** Program entry point
**
** @param argc Argument count
** @param argv Argument vector
**
** @return return program value
*/
Seblu's avatar
Seblu committed

#include "shell.h"

Seblu's avatar
Seblu committed
int		main(int argc, char *argv[])
{
  int		ret;

Seblu's avatar
Seblu committed
  /* shell initialization */
  shell = shell_init();
  /* parse arg line */
  argc = argc;
  argv = argv;
Seblu's avatar
Seblu committed
  //open_parse(argc, argv, shell);
Seblu's avatar
Seblu committed
  /*   if (shell->ast) */
  /*      exec_start(shell); */
Seblu's avatar
Seblu committed
  ret = shell->last_status;
Seblu's avatar
Seblu committed
  shell_destroy(shell);
Seblu's avatar
Seblu committed
  return ret;
}