Back to index

glibc  2.9
Defines | Functions
tst-wcstof.c File Reference
#include <wchar.h>
#include <stdio.h>
#include <string.h>
#include <wctype.h>

Go to the source code of this file.

Defines

#define _GNU_SOURCE   1

Functions

int main (void)

Define Documentation

#define _GNU_SOURCE   1

Definition at line 1 of file tst-wcstof.c.


Function Documentation

int main ( void  )

Definition at line 8 of file tst-wcstof.c.

{
  int result = 0;
  char buf[100];
  wchar_t tmp[3];
  tmp[0] = '8';
  tmp[1] = '1';
  tmp[2] = 0;

  snprintf (buf, 100, "%S = %f", tmp, wcstof (tmp, NULL));
  printf ("\"%s\" -> %s\n", buf,
         strcmp (buf, "81 = 81.000000") == 0 ? "okay" : "buggy");
  result |= strcmp (buf, "81 = 81.000000") != 0;

  return result;
}

Here is the call graph for this function: