mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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>
This commit is contained in:
parent
0c0bf8519a
commit
0e2d399225
3 changed files with 13 additions and 11 deletions
10
srcpos.h
10
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue