summaryrefslogtreecommitdiff
path: root/miniperlmain.c
diff options
context:
space:
mode:
authorLarry Wall <lwall@scalpel.netlabs.com>1995-11-21 10:01:00 +1200
committerLarry <lwall@scalpel.netlabs.com>1995-11-21 10:01:00 +1200
commit4633a7c4bad06b471d9310620b7fe8ddd158cccd (patch)
tree37ebeb26a64f123784fd8fac6243b124767243b0 /miniperlmain.c
parent8e07c86ebc651fe92eb7e3b25f801f57cfb8dd6f (diff)
downloadperl-4633a7c4bad06b471d9310620b7fe8ddd158cccd.tar.gz
5.002 beta 1
If you're adventurous, have a look at ftp://ftp.sems.com/pub/outgoing/perl5.0/perl5.002beta1.tar.gz Many thanks to Andy for doing the integration. Obviously, if you consult the bugs database, you'll note there are still plenty of buglets that need fixing, and several enhancements that I've intended to put in still haven't made it in (Hi, Tim and Ilya). But I think it'll be pretty stable. And you can start to fiddle around with prototypes (which are, of course, still totally undocumented). Packrats, don't worry too much about readvertising this widely. Nowadays we're on a T1 here, so our bandwidth is okay. Have the appropriate amount of jollity. Larry
Diffstat (limited to 'miniperlmain.c')
-rw-r--r--miniperlmain.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/miniperlmain.c b/miniperlmain.c
index ba74c4d4f9..2c1e0b62c8 100644
--- a/miniperlmain.c
+++ b/miniperlmain.c
@@ -2,24 +2,53 @@
* "The Road goes ever on and on, down from the door where it began."
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "EXTERN.h"
#include "perl.h"
+#ifdef __cplusplus
+}
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
static void xs_init _((void));
static PerlInterpreter *my_perl;
int
+#ifndef CAN_PROTOTYPE
main(argc, argv, env)
int argc;
char **argv;
char **env;
+#else /* def(CAN_PROTOTYPE) */
+main(int argc, char **argv, char **env)
+#endif /* def(CAN_PROTOTYPE) */
{
int exitstatus;
+#ifdef OS2
+ _response(&argc, &argv);
+ _wildcard(&argc, &argv);
+#endif
+
#ifdef VMS
getredirection(&argc,&argv);
#endif
+#if defined(HAS_SETLOCALE) && defined(LC_CTYPE)
+ if (setlocale(LC_CTYPE, "") == NULL) {
+ fprintf(stderr,
+ "setlocale(LC_CTYPE, \"\") failed (LC_CTYPE = \"%s\").\n",
+ getenv("LC_CTYPE"));
+ exit(1);
+ }
+#endif
+
if (!do_undump) {
my_perl = perl_alloc();
if (!my_perl)
@@ -27,7 +56,7 @@ char **env;
perl_construct( my_perl );
}
- exitstatus = perl_parse( my_perl, xs_init, argc, argv, env );
+ exitstatus = perl_parse( my_perl, xs_init, argc, argv, NULL );
if (exitstatus)
exit( exitstatus );
@@ -41,8 +70,9 @@ char **env;
/* Register any extra external extensions */
+/* Do not delete this line--writemain depends on it */
+
static void
xs_init()
{
- /* Do not delete this line--writemain depends on it */
}