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 | 15 | static PerlInterpreter *my_perl; |
cea2e8a9 | 16 | static struct perl_thread *thr; /* XXXXXX testing */ |
a0d0e21e | 17 | |
61ae2fbf JH |
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 AD |
26 | { |
27 | int exitstatus; | |
2304df62 | 28 | |
22239a37 NIS |
29 | #ifdef PERL_GLOBAL_STRUCT |
30 | #define PERLVAR(var,type) /**/ | |
51371543 | 31 | #define PERLVARA(var,type) /**/ |
533c011a NIS |
32 | #define PERLVARI(var,type,init) PL_Vars.var = init; |
33 | #define PERLVARIC(var,type,init) PL_Vars.var = init; | |
22239a37 NIS |
34 | #include "perlvars.h" |
35 | #undef PERLVAR | |
51371543 | 36 | #undef PERLVARA |
22239a37 | 37 | #undef PERLVARI |
0f3f18a6 | 38 | #undef PERLVARIC |
22239a37 NIS |
39 | #endif |
40 | ||
c07a80fd | 41 | PERL_SYS_INIT(&argc,&argv); |
4633a7c4 | 42 | |
3280af22 | 43 | if (!PL_do_undump) { |
a0d0e21e LW |
44 | my_perl = perl_alloc(); |
45 | if (!my_perl) | |
46 | exit(1); | |
47 | perl_construct( my_perl ); | |
3280af22 | 48 | PL_perl_destruct_level = 0; |
a0d0e21e | 49 | } |
2304df62 | 50 | |
28e44ed9 | 51 | exitstatus = perl_parse( my_perl, xs_init, argc, argv, (char **) NULL ); |
b5dd7652 | 52 | if (!exitstatus) { |
53 | exitstatus = perl_run( my_perl ); | |
54 | } | |
2304df62 | 55 | |
748a9306 | 56 | perl_destruct( my_perl ); |
2304df62 AD |
57 | perl_free( my_perl ); |
58 | ||
a91be337 | 59 | PERL_SYS_TERM(); |
60 | ||
2304df62 | 61 | exit( exitstatus ); |
4e35701f | 62 | return exitstatus; |
2304df62 AD |
63 | } |
64 | ||
65 | /* Register any extra external extensions */ | |
66 | ||
4633a7c4 LW |
67 | /* Do not delete this line--writemain depends on it */ |
68 | ||
a0d0e21e | 69 | static void |
864dbfa3 | 70 | xs_init(pTHX) |
2304df62 | 71 | { |
a91be337 | 72 | dXSUB_SYS; |
2304df62 | 73 | } |