1
0
mirror of https://github.com/cclassic/model-ghdl synced 2024-11-24 08:45:05 +01:00

Improved argument parsing

This commit is contained in:
Markus Koch 2016-05-18 17:17:16 +02:00
parent fe7a3f7225
commit 171277632c

4
main.c
View File

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