summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-03-28 16:35:15 -0400
committerJakob Kaivo <jkk@ung.org>2022-03-28 16:35:15 -0400
commitfba0a90c7d18a2350d3a5f5da1d9b47c7763d557 (patch)
tree5f022d17e0850083df603660d854803185366be6
parent8d2224f1227e8da595ff4db29d805908a91609bf (diff)
rename bignegate() to big_negate()
-rw-r--r--big.c6
-rw-r--r--big.h2
-rw-r--r--reduce.c2
-rw-r--r--rules.y2
-rw-r--r--y.tab.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/big.c b/big.c
index 8396d48..3d7f84b 100644
--- a/big.c
+++ b/big.c
@@ -417,7 +417,7 @@ long long big_toll(word x)
return (sign ? -n : n);
}
-word bignegate(word x)
+word big_negate(word x)
{
if (bigzero(x)) {
return x;
@@ -518,7 +518,7 @@ word bigtimes(word x, word y)
y = rest(y);
}
- return (s != big_is_negative(x) ? bignegate(r) : r);
+ return (s != big_is_negative(x) ? big_negate(r) : r);
}
/* may assume y~=0 */
@@ -586,7 +586,7 @@ word big_remainder(word x, word y)
}
}
- return (s1 ? bignegate(bd.rem) : bd.rem);
+ return (s1 ? big_negate(bd.rem) : bd.rem);
}
/* NB - above have entier based handling of signed cases (as Miranda) in
diff --git a/big.h b/big.h
index 325754a..d0a1495 100644
--- a/big.h
+++ b/big.h
@@ -30,7 +30,7 @@ double big_log10(word);
int big_compare(word,word);
word big_divide(word, word);
word big_remainder(word,word);
-word bignegate(word);
+word big_negate(word);
word bigoscan(char *,char *);
word bigplus(word,word);
word bigpow(word,word);
diff --git a/reduce.c b/reduce.c
index 5a7208d..a75f0a4 100644
--- a/reduce.c
+++ b/reduce.c
@@ -1856,7 +1856,7 @@ L3: if(arg1==NIL)lexfail(lastarg);
case READY(NEG): /* NEG x => -x, if x is a number */
UPLEFT;
- if(tag[lastarg]==INT)simpl(bignegate(lastarg));
+ if(tag[lastarg]==INT)simpl(big_negate(lastarg));
else setdbl(e,-get_dbl(lastarg));
goto DONE;
diff --git a/rules.y b/rules.y
index 31d70d0..837e3f7 100644
--- a/rules.y
+++ b/rules.y
@@ -1270,7 +1270,7 @@ v1:
= { /* if(tag[$2]==DOUBLE)
$$ = cons(CONST,sto_dbl(-get_dbl($2))); else */
if(tag[$2]==INT)
- $$ = cons(CONST,bignegate($2)); else
+ $$ = cons(CONST,big_negate($2)); else
syntax("inappropriate use of \"-\" in pattern\n"); }|
v2 INFIXNAME v1
= { $$ = ap2($2,$1,$3); }|
diff --git a/y.tab.c b/y.tab.c
index ead6a39..2b2fd42 100644
--- a/y.tab.c
+++ b/y.tab.c
@@ -3078,7 +3078,7 @@ case 231:
{ /* if(tag[$2]==DOUBLE)
$$ = cons(CONST,sto_dbl(-get_dbl($2))); else */
if(tag[yystack.l_mark[0]]==INT)
- yyval = cons(CONST,bignegate(yystack.l_mark[0])); else
+ yyval = cons(CONST,big_negate(yystack.l_mark[0])); else
syntax("inappropriate use of \"-\" in pattern\n"); }
break;
case 232: