Commit | Line | Data |
a0d0e21e |
1 | /* |
2 | * "The Road goes ever on and on, down from the door where it began." |
3 | */ |
4 | |
60e4866f |
5 | #ifdef OEMVS |
6 | #pragma runopts(HEAP(1M,32K,ANYWHERE,KEEP,8K,4K)) |
7 | #endif |
8 | |
4633a7c4 |
9 | |
ecfc5424 |
10 | #include "EXTERN.h" |
864dbfa3 |
11 | #define PERL_IN_MINIPERLMAIN_C |
2304df62 |
12 | #include "perl.h" |
13 | |
864dbfa3 |
14 | static void xs_init (pTHX); |
a0d0e21e |
15 | static PerlInterpreter *my_perl; |
16 | |
61ae2fbf |
17 | #if defined (__MINT__) || defined (atarist) |
18 | /* The Atari operating system doesn't have a dynamic stack. The |
19 | stack size is determined from this value. */ |
20 | long _stksize = 64 * 1024; |
21 | #endif |
22 | |
c07a80fd |
23 | int |
dc6439a4 |
24 | main(int argc, char **argv, char **env) |
2304df62 |
25 | { |
26 | int exitstatus; |
2304df62 |
27 | |
22239a37 |
28 | #ifdef PERL_GLOBAL_STRUCT |
29 | #define PERLVAR(var,type) /**/ |
533c011a |
30 | #define PERLVARI(var,type,init) PL_Vars.var = init; |
31 | #define PERLVARIC(var,type,init) PL_Vars.var = init; |
22239a37 |
32 | #include "perlvars.h" |
33 | #undef PERLVAR |
34 | #undef PERLVARI |
0f3f18a6 |
35 | #undef PERLVARIC |
22239a37 |
36 | #endif |
37 | |
c07a80fd |
38 | PERL_SYS_INIT(&argc,&argv); |
4633a7c4 |
39 | |
864dbfa3 |
40 | init_i18nl10n(1); |
4633a7c4 |
41 | |
3280af22 |
42 | if (!PL_do_undump) { |
a0d0e21e |
43 | my_perl = perl_alloc(); |
44 | if (!my_perl) |
45 | exit(1); |
46 | perl_construct( my_perl ); |
3280af22 |
47 | PL_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 |
56 | perl_free( my_perl ); |
57 | |
a91be337 |
58 | PERL_SYS_TERM(); |
59 | |
2304df62 |
60 | exit( exitstatus ); |
4e35701f |
61 | return exitstatus; |
2304df62 |
62 | } |
63 | |
64 | /* Register any extra external extensions */ |
65 | |
4633a7c4 |
66 | /* Do not delete this line--writemain depends on it */ |
67 | |
a0d0e21e |
68 | static void |
864dbfa3 |
69 | xs_init(pTHX) |
2304df62 |
70 | { |
a91be337 |
71 | dXSUB_SYS; |
2304df62 |
72 | } |