projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Re: What sort of Makefile.PL should h2xs write?
[p5sagit/p5-mst-13.2.git]
/
ext
/
I18N
/
Langinfo
/
Langinfo.xs
1
#include "EXTERN.h"
2
#include "perl.h"
3
#include "XSUB.h"
4
5
#ifdef I_LANGINFO
6
# include <langinfo.h>
7
#endif
8
9
#include "constants.c"
10
11
MODULE = I18N::Langinfo PACKAGE = I18N::Langinfo
12
13
PROTOTYPES: ENABLE
14
15
INCLUDE: constants.xs
16
17
SV*
18
langinfo(code)
19
int code
20
CODE:
21
#ifdef HAS_NL_LANGINFO
22
char *s = nl_langinfo(code);
23
RETVAL = newSVpvn(s, strlen(s));
24
#else
25
croak("nl_langinfo() not implemented on this architecture");
26
#endif
27
OUTPUT:
28
RETVAL