Improved argument parsing

This commit is contained in:
Markus Koch 2016-05-18 17:17:16 +02:00
parent fe7a3f7225
commit 171277632c
1 changed files with 2 additions and 2 deletions

4
main.c
View File

@ -118,8 +118,9 @@ int run_ghdl(char *command, ...) {
start = buf;
arrc = 0;
//printf("** BUF: %s\n", buf);
do { // Split into params
if (*ptr == '(') {
if (*ptr == ' ') {
arr[arrc++] = start;
break;
}
@ -144,7 +145,6 @@ int run_ghdl(char *command, ...) {
}
fflush(stdout);
}
printf("\n");
return pclose(proc);
}