Commit 43b02983 authored by Seblu's avatar Seblu
Browse files

ajout des fichiers d'execution dans le makefile.am

correction de ses fichiers
correction d'un problem leger dans le parser
nettoyage
parent cf1158bc
Loading
Loading
Loading
Loading
+8 −1
Changes for Makefile.am: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -27,7 +27,14 @@ bin_PROGRAMS=42sh
		src/common/strvmerge.c			\
		src/common/strndup.c			\
		src/exec/exec.h				\
		src/exec/exec_and.c			\
		src/exec/exec_bang.c			\
		src/exec/exec_node.c			\
		src/exec/exec_or.c			\
		src/exec/exec_if.c			\
		src/exec/exec_sep.c			\
		src/exec/exec_sepand.c			\
		src/exec/exec_while.c			\
		src/parser/alias.h			\
		src/parser/alias.c			\
		src/parser/getline.h			\
@@ -44,7 +51,7 @@ bin_PROGRAMS=42sh
		src/shell/shell_destroy.c		\
		src/shell/prompt.c

CLEANFILES= *~ '\#*'
CLEANFILES= *~ \#*\#

EXTRA_DIST = AUTHORS README TODO

−50

File deleted.

+3 −3
Changes for src/exec/exec.h: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
** Login   <seblu@epita.fr>
**
** Started on  Sun Mar 30 16:02:07 2006 Seblu
** Last update Tue Aug 29 00:15:59 2006 Seblu
** Last update Sun Nov 12 03:43:20 2006 seblu
*/

#ifndef EXEC_H_
@@ -14,10 +14,10 @@
# include <assert.h>
# include <stdio.h>
# include "../ast/ast.h"
# include "../shell/shell.h"

void	exec_node(s_ast_node *node);

/* void exec_node(struct s_ast *node, struct s_42sh *sh); */
/* void exec_list(struct s_list *node, struct s_42sh *sh); */
/* void exec_if(struct s_if *node, struct s_42sh *sh); */
/* void exec_while(struct s_while *node, struct s_42sh *sh); */
@@ -32,7 +32,7 @@ void exec_node(s_ast_node *node);
/* void exec_line(struct s_op *node, struct s_42sh *sh); */
/* void exec_subshell(struct s_subshell *node, struct s_42sh *sh); */

/* /\* FIXME *\/ */
/* FIXME */

/* void exec_for(struct s_for *node, struct s_42sh *sh); */
/* void exec_case(struct s_case *node, struct s_42sh *sh); */
+9 −16
Changes for src/exec/exec_and.c: 9 added lines, 16 removed lines.
Original line number Diff line number Diff line
/*
** exec_and.c for 42sh in /home/seblu
** exec_and.c for 42sh
**
** Made by Seblu
** Login   <seblu@epita.fr>
**
** Started on  Sat Mar 25 15:27:20 2006 Seblu
** Last update Sun Apr  9 12:04:03 2006 SIGOURE Benoit
** Last update Sun Nov 12 03:43:57 2006 seblu
*/

#include "execution.h"
#include "exec.h"

#include "mem.h"

/*!
** Execution an AND node
**
** @param node node to treat
** @param sh sh data
*/
void		exec_and(struct s_op *node, struct s_42sh *sh)
void		exec_and(s_bin_node *node)
{
  assert(node && sh);
  exec_node(node->left, sh);
  if (!sh->last_status)
    exec_node(node->right, sh);
  assert(node && node->lhs && node->rhs);
  exec_node(node->lhs);
  //FIXME: error with chained "or" and "and"
  if (!shell->status)
    exec_node(node->rhs);
}
−55

File deleted.

Loading