fix string->number for bases > 16
authorAndy Wingo <wingo@pobox.com>
Mon, 15 Nov 2010 22:43:30 +0000 (23:43 +0100)
committerAndy Wingo <wingo@pobox.com>
Mon, 15 Nov 2010 22:43:30 +0000 (23:43 +0100)
commita6f3af1618bb28b96ac44b77f6a69afe97995516
tree0799acdd14a2a3a4b9b80a2d67350de123028b0c
parent8b755a759eb7d07e82285e925bae02c19e7a3107
fix string->number for bases > 16

* libguile/numbers.c (scm_iuint2str): Add an assertion on the domain of
  the radix. Use the number_chars table to write the string, instead of
  doing strange math. Same effect, though.
  (mem2uinteger, char_decimal_value): Change logic to allow all ascii
  alphabetic chars as decimals, not just a-f. Thanks to Nils Gey for the
  report.

* test-suite/tests/numbers.test ("number->string"): Add some tests.
THANKS
libguile/numbers.c
test-suite/tests/numbers.test