summaryrefslogtreecommitdiff
path: root/miniperlmain.c
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1994-10-17 23:00:00 +0000
committerLarry Wall <lwall@netlabs.com>1994-10-17 23:00:00 +0000
commita0d0e21ea6ea90a22318550944fe6cb09ae10cda (patch)
treefaca1018149b736b1142f487e44d1ff2de5cc1fa /miniperlmain.c
parent85e6fe838fb25b257a1b363debf8691c0992ef71 (diff)
downloadperl-a0d0e21ea6ea90a22318550944fe6cb09ae10cda.tar.gz
perl 5.000perl-5.000
[editor's note: this commit combines approximate 4 months of furious releases of Andy Dougherty and Larry Wall - see pod/perlhist.pod for details. Andy notes that; Alas neither my "Irwin AccuTrack" nor my DC 600A quarter-inch cartridge backup tapes from that era seem to be readable anymore. I guess 13 years exceeds the shelf life for that backup technology :-(. ]
Diffstat (limited to 'miniperlmain.c')
-rw-r--r--miniperlmain.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/miniperlmain.c b/miniperlmain.c
index 0e1b0f990e..44c3d71874 100644
--- a/miniperlmain.c
+++ b/miniperlmain.c
@@ -1,26 +1,42 @@
+/*
+ * "The Road goes ever on and on, down from the door where it began."
+ */
+
#include "INTERN.h"
#include "perl.h"
+static void xs_init _((void));
+static PerlInterpreter *my_perl;
+
+/* This value may be raised by extensions for testing purposes */
+int perl_destruct_level = 0; /* 0=none, 1=full, 2=full with checks */
+
+int
main(argc, argv, env)
int argc;
char **argv;
char **env;
{
int exitstatus;
- PerlInterpreter *my_perl;
- my_perl = perl_alloc();
- if (!my_perl)
- exit(1);
- perl_construct( my_perl );
+#ifdef VMS
+ getredirection(&argc,&argv);
+#endif
+
+ if (!do_undump) {
+ my_perl = perl_alloc();
+ if (!my_perl)
+ exit(1);
+ perl_construct( my_perl );
+ }
- exitstatus = perl_parse( my_perl, argc, argv, env );
+ exitstatus = perl_parse( my_perl, xs_init, argc, argv, env );
if (exitstatus)
exit( exitstatus );
exitstatus = perl_run( my_perl );
- perl_destruct( my_perl );
+ perl_destruct( my_perl, perl_destruct_level );
perl_free( my_perl );
exit( exitstatus );
@@ -28,9 +44,8 @@ char **env;
/* Register any extra external extensions */
-void
-perl_init_ext()
+static void
+xs_init()
{
- char *file = __FILE__;
/* Do not delete this line--writemain depends on it */
}