Back to index

glibc  2.9
Functions | Variables
tst-fopenloc.c File Reference
#include <errno.h>
#include <locale.h>
#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>

Go to the source code of this file.


int main (void)


static const char inputfile [] = "../iconvdata/testdata/ISO-8859-1"

Function Documentation

int main ( void  )

Definition at line 34 of file tst-fopenloc.c.

  FILE *fp;

  mtrace ();

  setlocale (LC_ALL, "de_DE.UTF-8");

  fp = fopen (inputfile, "r,ccs=ISO-8859-1");
  if (fp == NULL)
      printf ("cannot open \"%s\": %s\n", inputfile, strerror (errno));
      exit (1);

  while (! feof_unlocked (fp))
      wchar_t buf[200];

      if (fgetws_unlocked (buf, sizeof (buf) / sizeof (buf[0]), fp) == NULL)

      fputws (buf, stdout);

  fclose (fp);

  return 0;

Here is the call graph for this function:

Variable Documentation

const char inputfile[] = "../iconvdata/testdata/ISO-8859-1" [static]

Definition at line 30 of file tst-fopenloc.c.