summaryrefslogtreecommitdiff
path: root/srcpos.h
diff options
context:
space:
mode:
authorJohn Bonesio <bones@secretlab.ca>2010-10-20 14:44:58 -0700
committerGrant Likely <grant.likely@secretlab.ca>2010-10-20 22:36:53 -0600
commitc0fa2e6d4e59e62f2e9f23db1a2d94532fa4ae98 (patch)
tree9e465279a18f3a05bc314a0d20db3b3605a17556 /srcpos.h
parent8773e12fa9f5109172a779aa2a83b4464e5273cc (diff)
downloaddtc-c0fa2e6d4e59e62f2e9f23db1a2d94532fa4ae98.tar.gz
Create new and use new print_error that uses printf style formatting.
yyerror is meant to be called by the parser internal code, and it's interface is limited. Instead create and call a new error message routine that allows formatted strings to be used. yyerror uses the new routine so error formatting remains consistent. Signed-of-by: John Bonesio <bones@secretlab.ca> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'srcpos.h')
-rw-r--r--srcpos.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/srcpos.h b/srcpos.h
index 985f847..bd7966e 100644
--- a/srcpos.h
+++ b/srcpos.h
@@ -76,6 +76,8 @@ 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, char const *, va_list va)
+ __attribute__((format(printf, 2, 0)));
extern void srcpos_error(struct srcpos *pos, char const *, ...)
__attribute__((format(printf, 2, 3)));
extern void srcpos_warn(struct srcpos *pos, char const *, ...)