diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2014-01-01 23:27:31 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2014-01-01 23:27:31 +1100 |
commit | 0e2d3992258ff4129a8c0f79b660e92994411684 (patch) | |
tree | b329ba59d42445ded41098816da49f728df93223 /srcpos.h | |
parent | 0c0bf8519aab878acb864d84185bd2395b1e3d5b (diff) | |
download | device-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.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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); |