Commit cf1158bc authored by Seblu's avatar Seblu

parent 3229f519
SUBDIRS = src
bin_PROGRAMS=42sh
42sh_SOURCES= src/ast/ast.h \
src/ast/ast_and.c \
src/ast/ast_bang.c \
src/ast/ast_case.c \
src/ast/ast_cmd.c \
src/ast/ast_destruct.c \
src/ast/ast_for.c \
src/ast/ast_funcdec.c \
src/ast/ast_if.c \
src/ast/ast_or.c \
src/ast/ast_pipe.c \
src/ast/ast_print.c \
src/ast/ast_red.c \
src/ast/ast_sep.c \
src/ast/ast_sepand.c \
src/ast/ast_subshell.c \
src/ast/ast_while.c \
src/common/basename.c \
src/common/common.h \
src/common/constant.h \
src/common/isdigitstr.c \
src/common/macro.h \
src/common/strmerge.c \
src/common/strvectoradd.c \
src/common/strvmerge.c \
src/common/strndup.c \
src/exec/exec.h \
src/exec/exec_node.c \
src/parser/alias.h \
src/parser/alias.c \
src/parser/getline.h \
src/parser/getline.c \
src/parser/parser.h \
src/parser/parser.c \
src/parser/lexer.c \
src/shell/getoptions.c \
src/shell/option.h \
src/shell/option.c \
src/shell/shell.h \
src/shell/shell_entry.c \
src/shell/shell_init.c \
src/shell/shell_destroy.c \
src/shell/prompt.c
noinst_DATA=42sh$(EXEEXT)
DISTCLEANFILES=42sh$(EXEEXT)
CLEANFILES= *~ '\#*'
.PHONY: tar doc re
EXTRA_DIST = AUTHORS README TODO
42sh$(EXEEXT): src/42sh$(EXEEXT)
.PHONY: tar doc re
tar: distcheck
......@@ -13,7 +56,3 @@ re: clean all
doc:
cd $(srcdir)/doc && $(MAKE) doc
CLEANFILES= *~ '\#*'
EXTRA_DIST = AUTHORS README TODO
......@@ -5,4 +5,7 @@ Maintenant il renvoie EOF a la place du token.
- Parser
-- aliases
-- history
\ No newline at end of file
-- history
- Option
-- voir probleme de non initialisation envoye par valgrind a chaque tour de boucle
\ No newline at end of file
......@@ -100,6 +100,16 @@ AC_ARG_WITH([noerror],
]
)
AC_ARG_WITH([dynamic],
[AS_HELP_STRING([--with-dynamic], [Compiling with dynamic libraries])],
[dnl action-if-given
dynamic=true
],
[dnl action-if-not-given
dynamic=false
]
)
AC_ARG_WITH([debug],
[AS_HELP_STRING([--with-debug], [use -g and don't use -DNDEBUG -O3])],
[dnl action-if-given
......@@ -117,7 +127,7 @@ AC_ARG_WITH([efence],
CFLAGS="$CFLAGS -include stdlib.h -include efence.h"
],
[dnl action-if-not-given
LDFLAGS="$LDFLAGS -static"
test "$dynamic" = "true" || LDFLAGS="$LDFLAGS -static"
]
)
......@@ -131,7 +141,6 @@ AC_CONFIG_HEADERS([config.h])
# define Autoconf config files
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
\ No newline at end of file
.TH 42sh 1 "2006 jan 21"
.SH NAME
42sh \- The 42 Shell
.SH SYNOPSIS
\fB42sh\fP [options] [file]
.SH DESCRIPTION
42sh is a complete implementation of a standard shell.
.SS Options
option petace
.TP
\fB-c\fP
Cafe chaud
.SH FILES
.TP
\fI~/.42shrc\fP
The personal initialization file
.TP
\fI/etc/42shrc\fP
The systemwide initialization file
.SH AUTHORS
Sebastien LUTTRINGER
.br
seblu@seblu.net
.SH "SEE ALSO"
bash (1)
\ No newline at end of file
#SUBDIRS=
bin_PROGRAMS=42sh
#42sh_LDADD = parser/libparse.a ../check/leaktrack/libmem.a evalexpr/libevalexpr.a
......
......@@ -5,7 +5,7 @@
** Login <seblu@epita.fr>
**
** Started on Sat Mar 25 23:11:01 2006 Seblu
** Last update Thu Oct 12 13:12:31 2006 seblu
** Last update Thu Oct 19 13:02:30 2006 seblu
*/
#include <string.h>
......@@ -49,7 +49,7 @@ static char *newastfilename(void);
void ast_print(s_ast_node *ast, const char *filename)
{
FILE *fs;
unsigned int index;
unsigned int index = 0;
if (ast == NULL)
return;
......
......@@ -5,7 +5,7 @@
** Login <seblu@epita.fr>
**
** Started on Sun Jul 30 04:36:53 2006 Seblu
** Last update Wed Oct 18 18:27:39 2006 seblu
** Last update Thu Oct 19 13:18:20 2006 seblu
*/
#include <stdio.h>
......@@ -181,8 +181,10 @@ s_lexer *lexer_init(int fd)
new->stream = getline_open(fd);
new->buf = NULL;
new->buf_size = new->buf_pos = 0;
token_set(&new->previous, TOK_NONE, NULL);
token_set(&new->current, TOK_NONE, NULL);
//dont use token_set, because it make comparaison on uninitialized values
new->previous.id = new->current.id = TOK_NONE;
new->previous.str = new->current.str = NULL;
new->previous.len = new->current.len = 0;
new->eof = 0;
return new;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment