Added support for GHDL warnings

This commit is contained in:
Makise Kurisu 2016-05-08 15:15:18 +02:00
parent ea2dffbb6d
commit 7189e18c19
1 changed files with 5 additions and 1 deletions

6
main.c
View File

@ -97,6 +97,7 @@ int run_ghdl(char *command, ...) {
}
// ../blink/src/top.vhd:32:19: no declaration for "counter_i2"
// ../blink/src/abc.vhd:12:14:warning: package "mypack" does not require a body
// v
// ** Error: /tmp/filename.vhd(32): (vcom-1136) Unknown identifier "counter_i2".
@ -106,7 +107,7 @@ int run_ghdl(char *command, ...) {
arrc = 0;
do { // Search for EOL
if (arrc < 4 && (*ptr == ':' || *ptr == '\0')) {
if (arrc < 5 && (*ptr == ':' || *ptr == '\0')) {
*ptr++ = 0;
arr[arrc++] = start;
start = ptr;
@ -116,6 +117,9 @@ int run_ghdl(char *command, ...) {
if (arrc == 4) {
printf("** Error: %s(%s): (ghdl) %s", arr[0], arr[1], arr[3]);
}
else if (arrc = 5) {
printf("** Warning: %s(%s): (ghdl) %s", arr[0], arr[1], arr[4]);
}
else {
printf("** ghdl: %s", buf);
}