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; |
cea2e8a9 |
16 | static struct perl_thread *thr; /* XXXXXX testing */ |
a0d0e21e |
17 | |
61ae2fbf |
18 | #if defined (__MINT__) || defined (atarist) |
19 | /* The Atari operating system doesn't have a dynamic stack. The |
20 | stack size is determined from this value. */ |
21 | long _stksize = 64 * 1024; |
22 | #endif |
23 | |
c07a80fd |
24 | int |
dc6439a4 |
25 | main(int argc, char **argv, char **env) |
2304df62 |
26 | { |
27 | int exitstatus; |
2304df62 |
28 | |
22239a37 |
29 | #ifdef PERL_GLOBAL_STRUCT |
30 | #define PERLVAR(var,type) /**/ |
533c011a |
31 | #define PERLVARI(var,type,init) PL_Vars.var = init; |
32 | #define PERLVARIC(var,type,init) PL_Vars.var = init; |
22239a37 |
33 | #include "perlvars.h" |
34 | #undef PERLVAR |
35 | #undef PERLVARI |
0f3f18a6 |
36 | #undef PERLVARIC |
22239a37 |
37 | #endif |
38 | |
c07a80fd |
39 | PERL_SYS_INIT(&argc,&argv); |
4633a7c4 |
40 | |
3280af22 |
41 | if (!PL_do_undump) { |
a0d0e21e |
42 | my_perl = perl_alloc(); |
43 | if (!my_perl) |
44 | exit(1); |
45 | perl_construct( my_perl ); |
3280af22 |
46 | PL_perl_destruct_level = 0; |
a0d0e21e |
47 | } |
2304df62 |
48 | |
28e44ed9 |
49 | exitstatus = perl_parse( my_perl, xs_init, argc, argv, (char **) NULL ); |
b5dd7652 |
50 | if (!exitstatus) { |
51 | exitstatus = perl_run( my_perl ); |
52 | } |
2304df62 |
53 | |
748a9306 |
54 | perl_destruct( my_perl ); |
2304df62 |
55 | perl_free( my_perl ); |
56 | |
a91be337 |
57 | PERL_SYS_TERM(); |
58 | |
2304df62 |
59 | exit( exitstatus ); |
4e35701f |
60 | return exitstatus; |
2304df62 |
61 | } |
62 | |
63 | /* Register any extra external extensions */ |
64 | |
4633a7c4 |
65 | /* Do not delete this line--writemain depends on it */ |
66 | |
a0d0e21e |
67 | static void |
864dbfa3 |
68 | xs_init(pTHX) |
2304df62 |
69 | { |
a91be337 |
70 | dXSUB_SYS; |
2304df62 |
71 | } |