diff options
author | biouman <biouman> | 2001-05-02 02:18:16 +0000 |
---|---|---|
committer | biouman <biouman> | 2001-05-02 02:18:16 +0000 |
commit | 4dcf34866fac9e0c64768bf2f543007dfcf77ae9 (patch) | |
tree | 6432917b7aa0541ad47e73ee16c651f4f18e8940 | |
parent | 2160d5e1b4e0651ec0dc4ac8f27decc57cf1a8cb (diff) |
*** empty log message ***
-rw-r--r-- | lib/fonctions.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/lib/fonctions.c b/lib/fonctions.c index 94bb338..c99cbac 100644 --- a/lib/fonctions.c +++ b/lib/fonctions.c @@ -87,8 +87,9 @@ void printvars(polynome p1, polynome p2, polynome p3) } void ans(polynome p1, polynome p2, polynome p3) -{ polynome poly; - int valid; +{ + polynome poly; + int valid=0; polynome = return_last(&valid); if (valid) { @@ -117,22 +118,23 @@ void setdisplay(polynome p1, polynome p2, polynome p3) { if (p1) if ((!p1->degre)) - switch (p1->coef) { - 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->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")); + } } else { exception(1, _("setdisplay: invalid arg")); } |