aboutsummaryrefslogtreecommitdiffhomepage
path: root/starter.c
diff options
context:
space:
mode:
Diffstat (limited to 'starter.c')
-rw-r--r--starter.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/starter.c b/starter.c
index ed6f160..a3cf752 100644
--- a/starter.c
+++ b/starter.c
@@ -4,8 +4,8 @@
#include <stdio.h>
#include <errno.h>
-#include <EXTERN.h>
-#include <perl.h>
+#include <EXTERN.h>
+#include <perl.h>
/* perl_parse prefix-parameters */
static const char *prefix[] = {
@@ -14,17 +14,17 @@ static const char *prefix[] = {
/* in starter_xsi.c */
EXTERN_C void xs_init(pTHX);
-
-static PerlInterpreter *my_perl;
-
-int
-main(int argc, char **argv, char **env)
+
+static PerlInterpreter *my_perl;
+
+int
+main(int argc, char **argv, char **env)
{
int cParams = (sizeof(prefix)/sizeof(*prefix))-1 + argc-1;
const char **params, **para;
char *path, *p;
-
+
PERL_SYS_INIT3(&argc, &argv, &env);
/* fix working directory */
@@ -57,20 +57,20 @@ main(int argc, char **argv, char **env)
/* copy kephra.exe parameters */
for (int c = argc - 1; c; c--)
*para++ = *++argv;
-
- my_perl = perl_alloc();
+
+ my_perl = perl_alloc();
perl_construct(my_perl);
-
- PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
- perl_parse(my_perl, xs_init, cParams, (char **)params, NULL);
- perl_run(my_perl);
+ PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
+
+ perl_parse(my_perl, xs_init, cParams, (char **)params, NULL);
+ perl_run(my_perl);
- perl_destruct(my_perl);
+ perl_destruct(my_perl);
perl_free(my_perl);
free(params);
-leave:
- PERL_SYS_TERM();
-}
+leave:
+ PERL_SYS_TERM();
+}