1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
#include <gmp.h>
#include <uninum/unicode.h>
#include <uninum/nsdefs.h>
#include <uninum/uninum.h>
/*
* If the library headers are not installed but you have them in the current
* directory, change <uninum/nsdefs.h> and <uninum/uninum.h> to "nsdefs.h" and "uninum.h".
*/
wchar_t *str=L"\x0ED5\x0ED7\x0ED6";
int main(int ac, char **av) {
union ns_rval val;
unsigned long myint;
StringToInt(&val,str,NS_TYPE_ULONG,NS_ANY);
if(0 == uninum_err) myint = val.u;
printf("Myint = %u.\n",myint);
exit(0);
}
|