… | |
… | |
29 | #include <plugin_common.h> |
29 | #include <plugin_common.h> |
30 | #include <sounds.h> |
30 | #include <sounds.h> |
31 | #include <cstdarg> |
31 | #include <cstdarg> |
32 | #include <sproto.h> |
32 | #include <sproto.h> |
33 | |
33 | |
|
|
34 | #include "loader.h" |
34 | #include "cfperl.h" |
35 | #include "cfperl.h" |
35 | #include "shstr.h" |
36 | #include "shstr.h" |
36 | |
37 | |
37 | #include <unistd.h> |
38 | #include <unistd.h> |
38 | #if _POSIX_MEMLOCK |
39 | #if _POSIX_MEMLOCK |
… | |
… | |
604 | if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl)) |
605 | if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl)) |
605 | { |
606 | { |
606 | printf ("unable to initialize perl-interpreter, aborting.\n"); |
607 | printf ("unable to initialize perl-interpreter, aborting.\n"); |
607 | exit (EXIT_FAILURE); |
608 | exit (EXIT_FAILURE); |
608 | } |
609 | } |
|
|
610 | |
|
|
611 | { |
|
|
612 | dSP; |
|
|
613 | |
|
|
614 | PUSHMARK (SP); |
|
|
615 | PUTBACK; |
|
|
616 | call_pv ("cf::init", G_DISCARD | G_VOID); |
|
|
617 | } |
609 | } |
618 | } |
610 | |
619 | |
611 | void cfperl_main () |
620 | void cfperl_main () |
612 | { |
621 | { |
613 | dSP; |
622 | dSP; |
… | |
… | |
1711 | RETVAL = newSVpv (resist_plus[atnr], 0); |
1720 | RETVAL = newSVpv (resist_plus[atnr], 0); |
1712 | else |
1721 | else |
1713 | XSRETURN_UNDEF; |
1722 | XSRETURN_UNDEF; |
1714 | OUTPUT: RETVAL |
1723 | OUTPUT: RETVAL |
1715 | |
1724 | |
|
|
1725 | bool |
|
|
1726 | load_regions (const char *filename) |
|
|
1727 | CODE: |
|
|
1728 | RETVAL = loader_region ().load (filename); |
|
|
1729 | OUTPUT: RETVAL |
|
|
1730 | |
1716 | MODULE = cf PACKAGE = cf::attachable |
1731 | MODULE = cf PACKAGE = cf::attachable |
1717 | |
1732 | |
1718 | int |
1733 | int |
1719 | valid (SV *obj) |
1734 | valid (SV *obj) |
1720 | CODE: |
1735 | CODE: |