Functions for reading mpz_t from wide character string

John Scott jscott at posteo.net
Wed Oct 14 02:00:14 UTC 2020


Hi,

It doesn't appear that GMP has a function to read from a wide string and for 
my use case a function like gmp_swscanf would be appreciated. Even if I were 
to convert to a multibyte string I'm not sure whether gmp_sscanf can handle 
that, for example on platforms where __STDC_MB_MIGHT_NEQ_WC__ may be defined.

In fact I can't find a bignum library that has such a function, so maybe I'm 
going about this wrong. I don't have any code with substance to share, but I'm 
working on writing a calculator in C and writing the lexing and parsing bits. 
I think working with wide characters are my best choice for ignoring locales' 
decimal separators, character classification, etc., but corrections and 
suggestions would be appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://gmplib.org/list-archives/gmp-discuss/attachments/20201013/2a831eba/attachment.bin>


More information about the gmp-discuss mailing list