DB_File OS/2 changes subsumed into new version of DB_File
[p5sagit/p5-mst-13.2.git] / miniperlmain.c
CommitLineData
a0d0e21e 1/*
2 * "The Road goes ever on and on, down from the door where it began."
3 */
4
4633a7c4 5#ifdef __cplusplus
6extern "C" {
7#endif
8
ecfc5424 9#include "EXTERN.h"
2304df62 10#include "perl.h"
11
4633a7c4 12#ifdef __cplusplus
13}
14# define EXTERN_C extern "C"
15#else
16# define EXTERN_C extern
17#endif
18
a0d0e21e 19static void xs_init _((void));
20static PerlInterpreter *my_perl;
21
c07a80fd 22int
dc6439a4 23#ifdef CAN_PROTOTYPE
24main(int argc, char **argv, char **env)
25#else
2304df62 26main(argc, argv, env)
27int argc;
28char **argv;
29char **env;
dc6439a4 30#endif
2304df62 31{
32 int exitstatus;
2304df62 33
c07a80fd 34 PERL_SYS_INIT(&argc,&argv);
4633a7c4 35
b5dd7652 36 perl_init_i18nl10n(1);
4633a7c4 37
a0d0e21e 38 if (!do_undump) {
39 my_perl = perl_alloc();
40 if (!my_perl)
41 exit(1);
42 perl_construct( my_perl );
43 }
2304df62 44
28e44ed9 45 exitstatus = perl_parse( my_perl, xs_init, argc, argv, (char **) NULL );
b5dd7652 46 if (!exitstatus) {
47 exitstatus = perl_run( my_perl );
48 }
2304df62 49
748a9306 50 perl_destruct( my_perl );
2304df62 51 perl_free( my_perl );
52
a91be337 53 PERL_SYS_TERM();
54
2304df62 55 exit( exitstatus );
56}
57
58/* Register any extra external extensions */
59
4633a7c4 60/* Do not delete this line--writemain depends on it */
61
a0d0e21e 62static void
63xs_init()
2304df62 64{
a91be337 65 dXSUB_SYS;
2304df62 66}