summaryrefslogtreecommitdiff
path: root/parse/use.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-23 02:16:55 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-23 02:26:01 -0800
commita563b40a6af1ee03729918c8a15b48e06bcdeec2 (patch)
treeab910a44e600c12e9039dc982113529830f98413 /parse/use.c
parentcf4e7fe3b953d06ea771eefce06c94e3cfec842b (diff)
downloadmc-a563b40a6af1ee03729918c8a15b48e06bcdeec2.tar.gz
Improve error message if we fail to open a usefile.
Diffstat (limited to 'parse/use.c')
-rw-r--r--parse/use.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/parse/use.c b/parse/use.c
index 2221ea6..e7f86cf 100644
--- a/parse/use.c
+++ b/parse/use.c
@@ -1016,10 +1016,14 @@ void readuse(Node *use, Stab *st, Vis vis)
free(t);
break;
}
+ free(p);
}
}
- if (!fd)
- fatal(use, "Could not open %s", use->use.name);
+ if (!fd) {
+ fatal(use, "could not open usefile %s in", use->use.name);
+ for (i = 0; i < nincpaths; i++)
+ printf("\t%s\n", incpaths[i]);
+ }
if (!loaduse(p, fd, st, vis))
die("Could not load usefile %s from %s", use->use.name, p);