Imported from ../bash-2.04.tar.gz.
This commit is contained in:
parent
b72432fdcc
commit
bb70624e96
387 changed files with 28522 additions and 9334 deletions
24
examples/loadables/perl/iperl.c
Normal file
24
examples/loadables/perl/iperl.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include <EXTERN.h> /* from the Perl distribution */
|
||||
#include <perl.h> /* from the Perl distribution */
|
||||
|
||||
extern void xs_init _((void));
|
||||
|
||||
static PerlInterpreter *iperl; /*** The Perl interpreter ***/
|
||||
|
||||
int
|
||||
perl_main(int argc, char **argv, char **env)
|
||||
{
|
||||
int r;
|
||||
|
||||
iperl = perl_alloc();
|
||||
perl_construct(iperl);
|
||||
perl_parse(iperl, xs_init, argc, argv, (char **)NULL);
|
||||
r = perl_run(iperl);
|
||||
|
||||
PerlIO_flush(PerlIO_stdout());
|
||||
PerlIO_flush(PerlIO_stderr());
|
||||
|
||||
perl_destruct(iperl);
|
||||
perl_free(iperl);
|
||||
return (r);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue