1N/A#include "EXTERN.h"
1N/A#include "perl.h"
1N/A#include "XSUB.h"
1N/A
1N/A#ifdef I_LANGINFO
1N/A# define __USE_GNU 1 /* Enables YESSTR, otherwise only __YESSTR. */
1N/A# include <langinfo.h>
1N/A#endif
1N/A
1N/A#include "const-c.inc"
1N/A
1N/AMODULE = I18N::Langinfo PACKAGE = I18N::Langinfo
1N/A
1N/APROTOTYPES: ENABLE
1N/A
1N/AINCLUDE: const-xs.inc
1N/A
1N/ASV*
1N/Alanginfo(code)
1N/A int code
1N/A CODE:
1N/A#ifdef HAS_NL_LANGINFO
1N/A {
1N/A char *s;
1N/A
1N/A if ((s = nl_langinfo(code)))
1N/A RETVAL = newSVpvn(s, strlen(s));
1N/A else
1N/A RETVAL = &PL_sv_undef;
1N/A }
1N/A#else
1N/A croak("nl_langinfo() not implemented on this architecture");
1N/A#endif
1N/A OUTPUT:
1N/A RETVAL