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" |
864dbfa3 | 11 | #define PERL_IN_MINIPERLMAIN_C |
2304df62 AD |
12 | #include "perl.h" |
13 | ||
864dbfa3 | 14 | static void xs_init (pTHX); |
a0d0e21e LW |
15 | static PerlInterpreter *my_perl; |
16 | ||
61ae2fbf JH |
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 AD |
25 | { |
26 | int exitstatus; | |
2304df62 | 27 | |
22239a37 NIS |
28 | #ifdef PERL_GLOBAL_STRUCT |
29 | #define PERLVAR(var,type) /**/ | |
51371543 | 30 | #define PERLVARA(var,type) /**/ |
533c011a NIS |
31 | #define PERLVARI(var,type,init) PL_Vars.var = init; |
32 | #define PERLVARIC(var,type,init) PL_Vars.var = init; | |
22239a37 NIS |
33 | #include "perlvars.h" |
34 | #undef PERLVAR | |
51371543 | 35 | #undef PERLVARA |
22239a37 | 36 | #undef PERLVARI |
0f3f18a6 | 37 | #undef PERLVARIC |
22239a37 NIS |
38 | #endif |
39 | ||
ed344e4f | 40 | PERL_SYS_INIT3(&argc,&argv,&env); |
4633a7c4 | 41 | |
3280af22 | 42 | if (!PL_do_undump) { |
a0d0e21e LW |
43 | my_perl = perl_alloc(); |
44 | if (!my_perl) | |
45 | exit(1); | |
642f9deb | 46 | perl_construct(my_perl); |
3280af22 | 47 | PL_perl_destruct_level = 0; |
a0d0e21e | 48 | } |
2304df62 | 49 | |
642f9deb | 50 | exitstatus = perl_parse(my_perl, xs_init, argc, argv, (char **)NULL); |
b5dd7652 | 51 | if (!exitstatus) { |
642f9deb | 52 | exitstatus = perl_run(my_perl); |
b5dd7652 | 53 | } |
2304df62 | 54 | |
642f9deb GS |
55 | perl_destruct(my_perl); |
56 | perl_free(my_perl); | |
2304df62 | 57 | |
a91be337 | 58 | PERL_SYS_TERM(); |
59 | ||
642f9deb | 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 |
864dbfa3 | 69 | xs_init(pTHX) |
2304df62 | 70 | { |
642f9deb | 71 | dXSUB_SYS; |
2304df62 | 72 | } |