diff options
author | lloyd <[email protected]> | 2006-06-19 09:20:23 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-06-19 09:20:23 +0000 |
commit | 69ca3d65b82ab041e8df85ca3f4e63e669557607 (patch) | |
tree | 23005899d23998ada689d4babd2bfccb4d520dbe /src/big_code.cpp | |
parent | 6413b5d29a781a231d2f331e4191b68fb88a27d9 (diff) |
Remove the to_lower function; turns out that both uses of it
within the library were to perform case-insensitive matching, so
simply implement that instead.
Place all of the character set handling functions into a Charset
namespace (and update all callers).
Remove the iso2local/local2iso/iso2utf/utf2iso functions, replaced
by the new charset transcoder stuff.
Initialize the transcoder stored in the global library state
upon initialization.
Diffstat (limited to 'src/big_code.cpp')
-rw-r--r-- | src/big_code.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/big_code.cpp b/src/big_code.cpp index 235665f7f..1a9502ee8 100644 --- a/src/big_code.cpp +++ b/src/big_code.cpp @@ -30,7 +30,7 @@ void BigInt::encode(byte output[], const BigInt& n, Base base) const u32bit output_size = n.encoded_size(Octal); for(u32bit j = 0; j != output_size; ++j) { - output[output_size - 1 - j] = digit2char(copy % 8); + output[output_size - 1 - j] = Charset::digit2char(copy % 8); copy /= 8; } } @@ -43,7 +43,8 @@ void BigInt::encode(byte output[], const BigInt& n, Base base) for(u32bit j = 0; j != output_size; ++j) { divide(copy, 10, copy, remainder); - output[output_size - 1 - j] = digit2char(remainder.word_at(0)); + output[output_size - 1 - j] = + Charset::digit2char(remainder.word_at(0)); if(copy.is_zero()) break; } @@ -123,7 +124,7 @@ BigInt BigInt::decode(const byte buf[], u32bit length, Base base) const u32bit RADIX = ((base == Decimal) ? 10 : 8); for(u32bit j = 0; j != length; ++j) { - byte x = char2digit(buf[j]); + byte x = Charset::char2digit(buf[j]); if(x >= RADIX) { if(RADIX == 10) |