diff options
author | John Bonesio <bones@secretlab.ca> | 2010-10-20 14:44:58 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-10-20 22:36:53 -0600 |
commit | c0fa2e6d4e59e62f2e9f23db1a2d94532fa4ae98 (patch) | |
tree | 9e465279a18f3a05bc314a0d20db3b3605a17556 /srcpos.h | |
parent | 8773e12fa9f5109172a779aa2a83b4464e5273cc (diff) | |
download | dtc-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 *, ...) |