aboutsummaryrefslogtreecommitdiffstats
path: root/srcpos.h
diff options
context:
space:
mode:
Diffstat (limited to 'srcpos.h')
-rw-r--r--srcpos.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/srcpos.h b/srcpos.h
index 2cdfcd82e95e..9ded12a3830a 100644
--- a/srcpos.h
+++ b/srcpos.h
@@ -17,11 +17,12 @@
* USA
*/
-#ifndef _SRCPOS_H_
-#define _SRCPOS_H_
+#ifndef SRCPOS_H
+#define SRCPOS_H
#include <stdio.h>
#include <stdbool.h>
+#include "util.h"
struct srcfile_state {
FILE *f;
@@ -106,13 +107,11 @@ extern void srcpos_update(struct srcpos *pos, const char *text, int len);
extern struct srcpos *srcpos_copy(struct srcpos *pos);
extern char *srcpos_string(struct srcpos *pos);
-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 PRINTF(3, 0) srcpos_verror(struct srcpos *pos, const char *prefix,
+ const char *fmt, va_list va);
+extern void PRINTF(3, 4) srcpos_error(struct srcpos *pos, const char *prefix,
+ const char *fmt, ...);
extern void srcpos_set_line(char *f, int l);
-#endif /* _SRCPOS_H_ */
+#endif /* SRCPOS_H */