diff options
author | Pixel <Pixel> | 2001-05-02 02:21:33 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-05-02 02:21:33 +0000 |
commit | ef162e51ed50ba0d495cd3beb471bcca01dd3b09 (patch) | |
tree | 44485a4d18e5f38296dc213ec1e7c6779abe6a19 | |
parent | 4dcf34866fac9e0c64768bf2f543007dfcf77ae9 (diff) |
Zop
-rw-r--r-- | lib/fonctions.c | 39 | ||||
-rw-r--r-- | lib/parser.c | 1 | ||||
-rw-r--r-- | lib/pile.c | 2 |
3 files changed, 21 insertions, 21 deletions
diff --git a/lib/fonctions.c b/lib/fonctions.c index c99cbac..6eb8a08 100644 --- a/lib/fonctions.c +++ b/lib/fonctions.c @@ -91,7 +91,7 @@ void ans(polynome p1, polynome p2, polynome p3) polynome poly; int valid=0; - polynome = return_last(&valid); + poly = return_last(&valid); if (valid) { push_pile_poly(poly); } @@ -116,25 +116,24 @@ void help(polynome p1, polynome p2, polynome p3) void setdisplay(polynome p1, polynome p2, polynome p3) { - if (p1) - if ((!p1->degre)) - if (p1->coef.denom==1) - switch (p1->coef.num) { - case 1: - display=DEC; - break; - case 2: - display=HEX; - break; - case 3: - display=OCT; - break; - case 4: - display=FLT; - break; - default: - exception(1, _("setdisplay: invalid arg")); - } + if (p1) { + if ((!p1->degre)) { + switch (p1->coef.num) { + case 1: + display=DEC; + break; + case 2: + display=HEX; + break; + case 3: + display=OCT; + break; + case 4: + display=FLT; + break; + default: + exception(1, _("setdisplay: invalid arg")); + } } else { exception(1, _("setdisplay: invalid arg")); } diff --git a/lib/parser.c b/lib/parser.c index 3483d1e..6a2ab34 100644 --- a/lib/parser.c +++ b/lib/parser.c @@ -246,6 +246,7 @@ void parse_line(char *line) exception(1, _("Parse error: enclosure mismatch")); act_pile(get_func(op)); } + if (global_error) break; if (op == '(') { nbrargs = pop_call(); push_pile_int(nbrargs); @@ -11,7 +11,7 @@ #include "parser.h" #include "scalaires.h" #include "config.h" - +#include "fonctions.h" pile_elem pile[PILE_MAX]; pile_elem result_pile[PILE_MAX]; |