summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Houston <ghouston@arglist.com>2001-07-25 22:37:05 +0000
committerGary Houston <ghouston@arglist.com>2001-07-25 22:37:05 +0000
commit3c3db1289a7f2578c1505c5385d3052649d8f42f (patch)
treeb61887ce7daf592facdb8e9beb467fad70a1ea49
parentdd29a16921104f94170b34b03d9099b7b879e790 (diff)
downloadguile-3c3db1289a7f2578c1505c5385d3052649d8f42f.tar.gz
* numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
docstrings to reflect the n-ary implementation.
-rw-r--r--libguile/ChangeLog5
-rw-r--r--libguile/numbers.c38
2 files changed, 23 insertions, 20 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 91bd46a71..369d1c4e7 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-25 Gary Houston <ghouston@arglist.com>
+
+ * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
+ docstrings to reflect the n-ary implementation.
+
2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
* eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 9b5c6a61f..0fc136cce 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -738,16 +738,14 @@ SCM scm_big_test(SCM_BIGDIG *x, size_t nx, int xsgn, SCM bigy)
#endif
-
SCM_DEFINE1 (scm_logand, "logand", scm_tc7_asubr,
(SCM n1, SCM n2),
- "Return the integer which is the bit-wise AND of the two integer\n"
- "arguments.\n"
- "\n"
- "@lisp\n"
- "(number->string (logand #b1100 #b1010) 2)\n"
- " @result{} \"1000\"\n"
- "@end lisp")
+ "Return the bitwise AND of the integer arguments.\n\n"
+ "@lisp\n"
+ "(logand) @result{} -1\n"
+ "(logand 7) @result{} 7\n"
+ "(logand #b111 #b011 #\b001) @result{} 1\n"
+ "@end lisp")
#define FUNC_NAME s_scm_logand
{
long int nn1;
@@ -828,12 +826,11 @@ SCM_DEFINE1 (scm_logand, "logand", scm_tc7_asubr,
SCM_DEFINE1 (scm_logior, "logior", scm_tc7_asubr,
(SCM n1, SCM n2),
- "Return the integer which is the bit-wise OR of the two integer\n"
- "arguments.\n"
- "\n"
- "@lisp\n"
- "(number->string (logior #b1100 #b1010) 2)\n"
- " @result{} \"1110\"\n"
+ "Return the bitwise OR of the integer arguments.\n\n"
+ "@lisp\n"
+ "(logior) @result{} 0\n"
+ "(logior 7) @result{} 7\n"
+ "(logior #b000 #b001 #b011) @result{} 3\n"
"@end lisp")
#define FUNC_NAME s_scm_logior
{
@@ -914,12 +911,13 @@ SCM_DEFINE1 (scm_logior, "logior", scm_tc7_asubr,
SCM_DEFINE1 (scm_logxor, "logxor", scm_tc7_asubr,
(SCM n1, SCM n2),
- "Return the integer which is the bit-wise XOR of the two integer\n"
- "arguments.\n"
- "\n"
- "@lisp\n"
- "(number->string (logxor #b1100 #b1010) 2)\n"
- " @result{} \"110\"\n"
+ "Return the bitwise XOR of the integer arguments. A bit is\n"
+ "set in the result if it is set in an odd number of arguments.\n"
+ "@lisp\n"
+ "(logxor) @result{} 0\n"
+ "(logxor 7) @result{} 7\n"
+ "(logxor #b000 #b001 #b011) @result{} 2\n"
+ "(logxor #b000 #b001 #b011 #b011) @result{} 1\n"
"@end lisp")
#define FUNC_NAME s_scm_logxor
{