]> granicus.if.org Git - graphviz/commitdiff
Fix libingraphs to note errors in reading files
authorerg <devnull@localhost>
Tue, 12 Dec 2006 21:06:49 +0000 (21:06 +0000)
committererg <devnull@localhost>
Tue, 12 Dec 2006 21:06:49 +0000 (21:06 +0000)
lib/ingraphs/ingraphs.c

index f67c036ab4da9d39a35185052c4dcdc433774a5e..fa1506fd1ce2c6cf1d3d52864b8ccaae6d427b46 100644 (file)
@@ -52,8 +52,10 @@ static void nextFile(ingraph_state * sp)
                break;
            } else if ((rv = sp->fns->openf(fname)) != 0)
                break;
-           else
+           else {
                fprintf(stderr, "Can't open %s\n", sp->Files[sp->ctr - 1]);
+               sp->errors++;
+           }
        }
     }
     if (rv)
@@ -100,6 +102,7 @@ ingraph_state *newIng(ingraph_state * sp, char **files, ingdisc * disc)
        sp->heap = 0;
     sp->Files = files;
     sp->ctr = 0;
+    sp->errors = 0;
     sp->fp = NULL;
     sp->fns = (ingdisc *) malloc(sizeof(ingdisc));
     if (!sp->fns) {