Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > f146e7e36d48b3215c2553caad25a95c > files > 11

libuninum-2.7-5.fc12.x86_64.rpm

#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"; /* Lao digits 5 7 6 */

int main(int ac, char **av) {
  union ns_rval val;
  unsigned long myint;

  StringToInt(&val,(UTF32 *)str,NS_TYPE_ULONG,NS_ANY);
  if(0 == uninum_err) myint = val.u;
  printf("Myint = %u.\n",myint);
  exit(0);
}