summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbiouman <biouman>2001-04-28 18:31:04 +0000
committerbiouman <biouman>2001-04-28 18:31:04 +0000
commitab778d7f896b16f3e6f2b068c2b34d219723002b (patch)
treeb9a3c63616f25003dc7e263523fd24905813f7f5
parent892950d2c402691cc12e58b556944c19b4013601 (diff)
*** empty log message ***
-rw-r--r--Makefile2
-rw-r--r--exceptions.c3
-rw-r--r--hash.c4
-rw-r--r--main.c6
-rw-r--r--parser.c2
-rw-r--r--pile.c5
6 files changed, 11 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index da10b70..b8868b9 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,6 @@ clean:
CC=gcc
LDFLAGS=-lm
-CFLAGS=-Wall -O3
+CFLAGS=-Wall -O3 -DDEBUG
polynom: exceptions.o hash.o parser.o main.o numbers.o pile.o polynom.o scalaires.o
diff --git a/exceptions.c b/exceptions.c
index 8333b82..cd8bf81 100644
--- a/exceptions.c
+++ b/exceptions.c
@@ -51,6 +51,9 @@ void pushcontext(char *c)
exception(1, _("Too much error contexts during pushcontext()."));
}
contexts[clevel++] = Estrdup(c);
+#ifdef DEBUG
+ fprintf(stderr,"%s\n",c);
+#endif
}
void popcontext(void)
diff --git a/hash.c b/hash.c
index 938024e..9ac65bb 100644
--- a/hash.c
+++ b/hash.c
@@ -138,11 +138,7 @@ static _TypeVariable NomVarToVarListe(char *Nom, _ListeChaine l, char *trouve)
}
l = l->Suivant;
}
-#ifdef HAVE_CONFIG_H
return (NULL);
-#else
- return 0;
-#endif
}
_TypeVariable NomVarToVar(char *Nom, _TableauVariable t, char *trouve)
diff --git a/main.c b/main.c
index 8305ad4..19f2fb6 100644
--- a/main.c
+++ b/main.c
@@ -24,9 +24,9 @@ int main(void)
Initialise(&variables);
mute = 'x'; /* nom de la variable utilisee pour la saisie des polynomes, a recuperer en argv eventuellt */
- parse_line("P = x^2+x+1;");
- parse_line("P(2);");
- printf("%s\n", affichage_level_1());
+ parse_line("x^2+x+1;");
+ //parse_line("P(2);");
+ //printf("%s\n", affichage_level_1());
return 0;
diff --git a/parser.c b/parser.c
index cd0a03b..3f0c6ce 100644
--- a/parser.c
+++ b/parser.c
@@ -182,7 +182,7 @@ static char *getword(char *line, char *p)
return line;
}
-/* Cette fonction va parcourire une chaine afin d'appeler les fonction push_pule() et act_pile() */
+/* Cette fonction va parcourir une chaine afin d'appeler les fonction push_pile() et act_pile() */
void parse_line(char *line)
{
diff --git a/pile.c b/pile.c
index 9f4bead..a1cac21 100644
--- a/pile.c
+++ b/pile.c
@@ -22,7 +22,8 @@ unsigned int pile_ptr = 0;
void push_pile(char *st)
{
- int valid1, valid2, valid3, valid4=0;
+ int valid1, valid2, valid3;
+ char valid4=0;
int i_number;
double d_number;
polynome poly;
@@ -31,7 +32,7 @@ void push_pile(char *st)
i_number = char_to_number(st, &valid1);
d_number = char_to_double(st, &valid2);
valid3 = is_mute(st);
- poly = (polynome) NomVarToVar(st, variables, (char *) valid4);
+ poly = (polynome) NomVarToVar(st, variables, &valid4);
if (valid1) { /* il s agit d un entier */
push_pile_poly(ply_constr(rat_constr(i_number, 1), 0));