langinfo.c 353 B

12345678910111213141516171819202122
  1. /*
  2. * If the system doesn't have an nl_langinfo procedure, we provide our
  3. * own dummy version.
  4. */
  5. #include "sysdep.h"
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. char *
  9. nl_langinfo(nl_item item)
  10. {
  11. if (item == CODESET)
  12. return "ASCII";
  13. else
  14. {
  15. fprintf(stderr, "unknown nl_item argument to nl_langinfo: %d", item);
  16. exit(-1);
  17. }
  18. }