From 521ce563809d2c63830b76fc0fec75fa3c2cc8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=ADle=20Ekaterin=20Liszka?= Date: Mon, 27 Nov 2023 16:39:00 -0800 Subject: [PATCH] src/*.h: add mollyguards --- src/font.h | 4 ++++ src/script.h | 11 +++++++++-- src/util.h | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/font.h b/src/font.h index a7e77e6..5a9a990 100644 --- a/src/font.h +++ b/src/font.h @@ -1,3 +1,5 @@ +#ifndef _SMEARGLE_FONT_H +#define _SMEARGLE_FONT_H typedef struct map_t { const char *glyph; @@ -20,3 +22,5 @@ font_t font_create(char *name, char *filename); void font_destroy(font_t font); unsigned int map_create(toml_table_t *table, map_t **map); void map_destroy(map_t *map); + +#endif \ No newline at end of file diff --git a/src/script.h b/src/script.h index 8c56876..337f3aa 100644 --- a/src/script.h +++ b/src/script.h @@ -1,9 +1,14 @@ +#ifndef _SMEARGLE_SCRIPT_H +#define _SMEARGLE_SCRIPT_H + #include +#include "font.h" + typedef struct { char *filename; - font_t *font; + font_t font; char *format; unsigned int min_tiles_per_line; unsigned int max_tiles_per_line; @@ -13,4 +18,6 @@ typedef struct { char *dedupe_filename; char *tilemap_filename; bool little_endian; -} script_t; \ No newline at end of file +} script_t; + +#endif diff --git a/src/util.h b/src/util.h index 729df3a..7b7345d 100644 --- a/src/util.h +++ b/src/util.h @@ -1,3 +1,5 @@ +#ifndef _SMEARGLE_UTIL_H +#define _SMEARGLE_UTIL_H #include #include @@ -9,3 +11,4 @@ static void error(const char *msg, const char *msg1) { exit(1); } +#endif