diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-09-17 09:49:25 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-09-17 09:49:25 -0700 |
commit | 4a5a29a76b8e5aa139209aabe310c2179a60608d (patch) | |
tree | 498688e76d70fcf1504b02f105b750eaa4f8371d | |
parent | 01628a8244053ced7dd0f20e13e4ce3ff3e81481 (diff) | |
download | txr-4a5a29a76b8e5aa139209aabe310c2179a60608d.tar.gz txr-4a5a29a76b8e5aa139209aabe310c2179a60608d.tar.bz2 txr-4a5a29a76b8e5aa139209aabe310c2179a60608d.zip |
* arith.c (comp_trunc, logcomp): logcomp renamed to lognot,
consistent with Common Lisp.
* eval.c (eval_init): logcomp to lognot.
* lib.h (logcomp): Declaration updated.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | arith.c | 12 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | lib.h | 2 |
4 files changed, 17 insertions, 8 deletions
@@ -1,5 +1,14 @@ 2012-09-17 Kaz Kylheku <kaz@kylheku.com> + * arith.c (comp_trunc, logcomp): logcomp renamed to lognot, + consistent with Common Lisp. + + * eval.c (eval_init): logcomp to lognot. + + * lib.h (logcomp): Declaration updated. + +2012-09-17 Kaz Kylheku <kaz@kylheku.com> + * arith.c (highest_significant_bit): New static function. (comp_clamp): Bugfix: avoid shifting left into sign bit. Function renamed to comp_trunc. @@ -1649,16 +1649,16 @@ static val comp_trunc(val a, val bits) } bad: - uw_throwf(error_s, lit("logcomp: operation failed on ~s"), a, nao); + uw_throwf(error_s, lit("lognot: operation failed on ~s"), a, nao); bad2: - uw_throwf(error_s, lit("logcomp: bits value ~s is not a fixnum"), bits, nao); + uw_throwf(error_s, lit("lognot: bits value ~s is not a fixnum"), bits, nao); bad3: - uw_throwf(error_s, lit("logcomp: non-integral operand ~s"), a, nao); + uw_throwf(error_s, lit("lognot: non-integral operand ~s"), a, nao); } -val logcomp(val a, val bits) +val lognot(val a, val bits) { val b; @@ -1674,11 +1674,11 @@ val logcomp(val a, val bits) goto bad; return b; default: - uw_throwf(error_s, lit("logcomp: non-integral operand ~s"), a, nao); + uw_throwf(error_s, lit("lognot: non-integral operand ~s"), a, nao); } bad: - uw_throwf(error_s, lit("logcomp: operation failed on ~s"), a, nao); + uw_throwf(error_s, lit("lognot: operation failed on ~s"), a, nao); } val logtrunc(val a, val bits) @@ -2234,7 +2234,7 @@ void eval_init(void) reg_fun(intern(lit("logand"), user_package), func_n2(logand)); reg_fun(intern(lit("logior"), user_package), func_n2(logior)); reg_fun(intern(lit("logxor"), user_package), func_n2(logxor)); - reg_fun(intern(lit("logcomp"), user_package), func_n2o(logcomp, 1)); + reg_fun(intern(lit("lognot"), user_package), func_n2o(lognot, 1)); reg_fun(intern(lit("logtrunc"), user_package), func_n2(logtrunc)); reg_fun(intern(lit("ash"), user_package), func_n2(ash)); @@ -474,7 +474,7 @@ val expo(val); val logand(val, val); val logior(val, val); val logxor(val, val); -val logcomp(val, val); +val lognot(val, val); val logtrunc(val a, val bits); val ash(val a, val bits); val string_own(wchar_t *str); |