Commit | Line | Data |
---|---|---|
a0d0e21e LW |
1 | /* |
2 | * "The Road goes ever on and on, down from the door where it began." | |
3 | */ | |
4 | ||
60e4866f LJ |
5 | #ifdef OEMVS |
6 | #pragma runopts(HEAP(1M,32K,ANYWHERE,KEEP,8K,4K)) | |
7 | #endif | |
8 | ||
4633a7c4 | 9 | |
ecfc5424 | 10 | #include "EXTERN.h" |
2304df62 AD |
11 | #include "perl.h" |
12 | ||
a0d0e21e LW |
13 | static void xs_init _((void)); |
14 | static PerlInterpreter *my_perl; | |
15 | ||
c07a80fd | 16 | int |
dc6439a4 | 17 | #ifdef CAN_PROTOTYPE |
18 | main(int argc, char **argv, char **env) | |
19 | #else | |
2304df62 AD |
20 | main(argc, argv, env) |
21 | int argc; | |
22 | char **argv; | |
23 | char **env; | |
dc6439a4 | 24 | #endif |
2304df62 AD |
25 | { |
26 | int exitstatus; | |
2304df62 | 27 | |
22239a37 NIS |
28 | #ifdef PERL_GLOBAL_STRUCT |
29 | #define PERLVAR(var,type) /**/ | |
30 | #define PERLVARI(var,type,init) Perl_Vars.var = init; | |
3fe35a81 | 31 | #define PERLVARIC(var,type,init) Perl_Vars.var = init; |
22239a37 NIS |
32 | #include "perlvars.h" |
33 | #undef PERLVAR | |
34 | #undef PERLVARI | |
0f3f18a6 | 35 | #undef PERLVARIC |
22239a37 NIS |
36 | #endif |
37 | ||
c07a80fd | 38 | PERL_SYS_INIT(&argc,&argv); |
4633a7c4 | 39 | |
b5dd7652 | 40 | perl_init_i18nl10n(1); |
4633a7c4 | 41 | |
a0d0e21e LW |
42 | if (!do_undump) { |
43 | my_perl = perl_alloc(); | |
44 | if (!my_perl) | |
45 | exit(1); | |
46 | perl_construct( my_perl ); | |
5f05dabc | 47 | perl_destruct_level = 0; |
a0d0e21e | 48 | } |
2304df62 | 49 | |
28e44ed9 | 50 | exitstatus = perl_parse( my_perl, xs_init, argc, argv, (char **) NULL ); |
b5dd7652 | 51 | if (!exitstatus) { |
52 | exitstatus = perl_run( my_perl ); | |
53 | } | |
2304df62 | 54 | |
748a9306 | 55 | perl_destruct( my_perl ); |
2304df62 AD |
56 | perl_free( my_perl ); |
57 | ||
a91be337 | 58 | PERL_SYS_TERM(); |
59 | ||
2304df62 | 60 | exit( exitstatus ); |
4e35701f | 61 | return exitstatus; |
2304df62 AD |
62 | } |
63 | ||
64 | /* Register any extra external extensions */ | |
65 | ||
4633a7c4 LW |
66 | /* Do not delete this line--writemain depends on it */ |
67 | ||
a0d0e21e | 68 | static void |
8ac85365 | 69 | xs_init(void) |
2304df62 | 70 | { |
a91be337 | 71 | dXSUB_SYS; |
2304df62 | 72 | } |