diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-28 21:30:43 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-28 21:30:43 -0700 |
| commit | 1a8095c6d774e3448f6afa1aeec2bc79c5bb545e (patch) | |
| tree | 31e6a146c9384321dd949f4e51b6e315a08f087a /file_loader.h | |
| parent | 90b8db84a48ca9ea1311abd202a546a4f697f4e6 (diff) | |
Starting to add better error messages
Diffstat (limited to 'file_loader.h')
| -rw-r--r-- | file_loader.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/file_loader.h b/file_loader.h index 1634f15..cda8dc3 100644 --- a/file_loader.h +++ b/file_loader.h @@ -14,6 +14,7 @@ typedef struct { } file_t; file_t *load_file(const char *filename); +file_t *spoof_file(const char *filename, char *text); __attribute__((nonnull)) void destroy_file(file_t **f); __attribute__((pure, nonnull)) @@ -22,6 +23,7 @@ __attribute__((pure, nonnull)) size_t get_char_number(file_t *f, const char *p); __attribute__((pure, nonnull)) const char *get_line(file_t *f, size_t line_number); -void fprint_line(FILE *dest, file_t *f, const char *start, const char *end, const char *msg); +__attribute__((format (printf, 5, 6))) +void fprint_line(FILE *dest, file_t *f, const char *start, const char *end, const char *fmt, ...); #endif |
