testlocale.c

text/plain

Filename: testlocale.c
Type: text/plain
Part: 0
Message: Re: [QUESTIONS] 6.2.1 COPY X FROM stdin; -- broken pipe
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <locale.h>

struct lconv *lc;

int main(int argc, char **argv) {
  if (argc > 1)
    printf( "environment variable is %s\n", getenv(argv[1]));

  printf( "locale set to %s\n", setlocale(LC_MONETARY, "C"));
  lc = localeconv();

  printf("%c %c\n", *lc->decimal_point, *lc->mon_decimal_point);
  exit(0);
}