This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest.xs OUTPUT (was: perl@17206)
[perl5.git] / ext / XS / APItest / APItest.xs
CommitLineData
3e61d65a
JH
1#include "EXTERN.h"
2#include "perl.h"
3#include "XSUB.h"
4
5MODULE = XS::APItest PACKAGE = XS::APItest
6
7PROTOTYPES: DISABLE
8
9void
10print_double(val)
11 double val
12 CODE:
13 printf("%5.3f\n",val);
14
15int
16have_long_double()
17 CODE:
18#ifdef HAS_LONG_DOUBLE
19 RETVAL = 1;
20#else
21 RETVAL = 0;
22#endif
cabb36f0
CN
23 OUTPUT:
24 RETVAL
3e61d65a
JH
25
26void
27print_long_double()
28 CODE:
29#ifdef HAS_LONG_DOUBLE
fc0bf671 30# if defined(PERL_PRIfldbl) && (LONG_DOUBLESIZE > DOUBLESIZE)
3e61d65a
JH
31 long double val = 7.0;
32 printf("%5.3" PERL_PRIfldbl "\n",val);
33# else
34 double val = 7.0;
35 printf("%5.3f\n",val);
36# endif
37#endif
38
39void
3e61d65a
JH
40print_int(val)
41 int val
42 CODE:
43 printf("%d\n",val);
44
45void
46print_long(val)
47 long val
48 CODE:
49 printf("%ld\n",val);
50
51void
52print_float(val)
53 float val
54 CODE:
55 printf("%5.3f\n",val);