In case anyone is interested, I have finished wrapping the library I
have been asking questions about and the Tcl API seems to work. The
library is libuninum. It converts Unicode strings representing integers
in nearly all known number systems (Chinese, Arabic, Armenian,
Gurmukhi, Old Persian, Klingon..) to their Western (Indo-Arabic)
decimal equivalents. (The underlying C library offers a choice of
strings, unsigned long integers, and GNU MP mpz_t objects as return
types.) You can specify the number system expected, but it will
successfully autodetect the number system in almost all cases. Its home
page is:
http://billposer.org/Software/libuninum.html, or on Freshmeat
at:
http://freshmeat.net/projects/libuninum. Now you can all tell me
how I've screwed up the Tcl interface. :)