mirror of
https://github.com/cclassic/model-ghdl
synced 2024-11-29 09:13:28 +01:00
Improved argument parsing
This commit is contained in:
parent
fe7a3f7225
commit
171277632c
4
main.c
4
main.c
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user