source: trunk/third/perl/miniperlmain.c @ 10724

Revision 10724, 1.1 KB checked in by ghudson, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10723, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * "The Road goes ever on and on, down from the door where it began."
3 */
4
5#ifdef OEMVS
6#pragma runopts(HEAP(1M,32K,ANYWHERE,KEEP,8K,4K))
7#endif
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#include "EXTERN.h"
14#include "perl.h"
15
16#ifdef __cplusplus
17}
18#  define EXTERN_C extern "C"
19#else
20#  define EXTERN_C extern
21#endif
22
23static void xs_init _((void));
24static PerlInterpreter *my_perl;
25
26int
27#ifdef CAN_PROTOTYPE
28main(int argc, char **argv, char **env)
29#else
30main(argc, argv, env)
31int argc;
32char **argv;
33char **env;
34#endif
35{
36    int exitstatus;
37
38    PERL_SYS_INIT(&argc,&argv);
39
40    perl_init_i18nl10n(1);
41
42    if (!do_undump) {
43        my_perl = perl_alloc();
44        if (!my_perl)
45            exit(1);
46        perl_construct( my_perl );
47        perl_destruct_level = 0;
48    }
49
50    exitstatus = perl_parse( my_perl, xs_init, argc, argv, (char **) NULL );
51    if (!exitstatus) {
52        exitstatus = perl_run( my_perl );
53    }
54
55    perl_destruct( my_perl );
56    perl_free( my_perl );
57
58    PERL_SYS_TERM();
59
60    exit( exitstatus );
61}
62
63/* Register any extra external extensions */
64
65/* Do not delete this line--writemain depends on it */
66
67static void
68xs_init()
69{
70  dXSUB_SYS;
71}
Note: See TracBrowser for help on using the repository browser.