mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Removed annoying workingdir thing
This commit is contained in:
@@ -239,8 +239,8 @@ CmdLine parseCmdLine(int argc, const char* argv[]) {
|
|||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
//total space to reserve - it's actually longer than needed, due to the exe name being removed
|
//total space to reserve
|
||||||
cmd.infileLength = strlen(argv[0]) + strlen(argv[i]) + 1;
|
cmd.infileLength = strlen(argv[i]) + 1;
|
||||||
cmd.infileLength = (cmd.infileLength + 3) & ~3; //BUGFIX: align to word size for malloc()
|
cmd.infileLength = (cmd.infileLength + 3) & ~3; //BUGFIX: align to word size for malloc()
|
||||||
cmd.infile = malloc(cmd.infileLength);
|
cmd.infile = malloc(cmd.infileLength);
|
||||||
|
|
||||||
@@ -249,9 +249,7 @@ CmdLine parseCmdLine(int argc, const char* argv[]) {
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFilePath(cmd.infile, argv[0]);
|
strncpy(cmd.infile, argv[i], strlen(argv[i]));
|
||||||
APPEND(cmd.infile, argv[i]);
|
|
||||||
FLIPSLASH(cmd.infile);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ copy:
|
|||||||
run: $(TEST_SCRIPTFILES:.toy=.toy-run)
|
run: $(TEST_SCRIPTFILES:.toy=.toy-run)
|
||||||
|
|
||||||
%.toy-run: %.toy
|
%.toy-run: %.toy
|
||||||
find -name repl* -type f -exec {} -f ../$< --verbose \;
|
find -name repl* -type f -exec {} -f $< --verbose \;
|
||||||
|
|
||||||
#using gdb
|
#using gdb
|
||||||
gdb: source repl copy run-gdb
|
gdb: source repl copy run-gdb
|
||||||
@@ -49,4 +49,4 @@ gdb: source repl copy run-gdb
|
|||||||
run-gdb: $(TEST_SCRIPTFILES:.toy=.toy-run-gdb)
|
run-gdb: $(TEST_SCRIPTFILES:.toy=.toy-run-gdb)
|
||||||
|
|
||||||
%.toy-run-gdb: %.toy
|
%.toy-run-gdb: %.toy
|
||||||
gdb $(TEST_OUTDIR)/$(TEST_REPLNAME) -ix gdb_init -ex=run --batch --return-child-result --args "out/repl.out" "-f" "../$<" "--verbose"
|
gdb $(TEST_OUTDIR)/$(TEST_REPLNAME) -ix gdb_init -ex=run --batch --return-child-result --args "out/repl.out" "-f" "$<" "--verbose"
|
||||||
Reference in New Issue
Block a user