summaryrefslogtreecommitdiff
path: root/srcpos.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2014-01-01 23:27:31 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2014-01-01 23:27:31 +1100
commit0e2d3992258ff4129a8c0f79b660e92994411684 (patch)
treeb329ba59d42445ded41098816da49f728df93223 /srcpos.h
parent0c0bf8519aab878acb864d84185bd2395b1e3d5b (diff)
downloaddevice-tree-compiler-0e2d3992258ff4129a8c0f79b660e92994411684.tar.gz
Make srcpos_{v,}error() more widely useful
Allow them to take a prefix argument giving the general type of error, which will be useful in future. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'srcpos.h')
-rw-r--r--srcpos.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/srcpos.h b/srcpos.h
index 46ea08a..f81827b 100644
--- a/srcpos.h
+++ b/srcpos.h
@@ -107,10 +107,12 @@ extern struct srcpos *srcpos_copy(struct srcpos *pos);
extern char *srcpos_string(struct srcpos *pos);
extern void srcpos_dump(struct srcpos *pos);
-extern void srcpos_verror(struct srcpos *pos, const char *, va_list va)
- __attribute__((format(printf, 2, 0)));
-extern void srcpos_error(struct srcpos *pos, const char *, ...)
- __attribute__((format(printf, 2, 3)));
+extern void srcpos_verror(struct srcpos *pos, const char *prefix,
+ const char *fmt, va_list va)
+ __attribute__((format(printf, 3, 0)));
+extern void srcpos_error(struct srcpos *pos, const char *prefix,
+ const char *fmt, ...)
+ __attribute__((format(printf, 3, 4)));
extern void srcpos_set_line(char *f, int l);