diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-05-10 20:48:30 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-05-10 20:48:30 +0200 |
commit | f3cb9b11b75869919ee5878e742a60488c761799 (patch) | |
tree | 284298bd1a40267e71d2340806231ba74375ee64 | |
parent | 5dd35d3687c630a3da86c8e90dc635e7b56c528f (diff) | |
download | perl-starter-f3cb9b11b75869919ee5878e742a60488c761799.tar.gz |
fix line-ending confusion
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | icon.rc | 2 | ||||
-rw-r--r-- | starter.c | 36 |
3 files changed, 28 insertions, 28 deletions
@@ -5,21 +5,21 @@ PERL := perl PERL_CCOPTS := $(shell $(PERL) -MExtUtils::Embed -e ccopts) #PERL_LDOPTS := $(shell $(PERL) -MExtUtils::Embed -e ldopts) PERL_LDOPTS := -L/c/strawberry/perl/lib/CORE -lperl510 -
-CFLAGS := $(PERL_CCOPTS) -std=gnu99
-CPPFLAGS :=
-LDFLAGS := $(PERL_LDOPTS) -Wl,--subsystem,windows
-
-all : kephra.exe
+ +CFLAGS := $(PERL_CCOPTS) -std=gnu99 +CPPFLAGS := +LDFLAGS := $(PERL_LDOPTS) -Wl,--subsystem,windows + +all : kephra.exe starter_xsi.c: $(PERL) -MExtUtils::Embed -e xsinit -- -o $@ icon.o : icon.rc kephra_proton.ico $(RC) $< $@ -
-kephra.exe : starter.o starter_xsi.o icon.o
- $(CC) -o $@ $^ $(LDFLAGS)
+ +kephra.exe : starter.o starter_xsi.o icon.o + $(CC) -o $@ $^ $(LDFLAGS) clean: rm -f *.o starter_xsi.c kephra.exe @@ -1 +1 @@ -DEFAULT ICON "kephra_proton.ico"
+DEFAULT ICON "kephra_proton.ico" @@ -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(); +} |