foxygit / doom Log in
commit 97c82c0a5828f69a1b20e496e2ca71b25ec4b210
Author:     Turo Lamminen <turol@iki.fi>
AuthorDate: Wed Sep 7 14:53:57 2022 +0300
Commit:     Turo Lamminen <turol@iki.fi>
CommitDate: Wed Sep 28 12:35:52 2022 +0300

    deh: Move common deh_section_t extern declarations to deh_defs.h
---
 src/deh_defs.h          | 21 +++++++++++++++++++++
 src/doom/deh_doom.c     | 20 --------------------
 src/heretic/deh_htic.c  | 12 ------------
 src/strife/deh_strife.c | 18 ------------------
 4 files changed, 21 insertions(+), 50 deletions(-)

diff --git a/src/deh_defs.h b/src/deh_defs.h
index 88c1e91f..58b61e7c 100644
--- a/src/deh_defs.h
+++ b/src/deh_defs.h
@@ -58,6 +58,27 @@ struct deh_section_s
 extern deh_section_t *deh_section_types[];
 extern const char *deh_signatures[];

+// deh_ammo.c:
+extern deh_section_t deh_section_ammo;
+// deh_cheat.c:
+extern deh_section_t deh_section_cheat;
+// deh_frame.c:
+extern deh_section_t deh_section_frame;
+// deh_misc.c:
+extern deh_section_t deh_section_misc;
+// deh_ptr.c:
+extern deh_section_t deh_section_pointer;
+// deh_sound.c
+extern deh_section_t deh_section_sound;
+// deh_text.c:
+extern deh_section_t deh_section_text;
+// deh_thing.c:
+extern deh_section_t deh_section_thing;
+// deh_weapon.c:
+extern deh_section_t deh_section_weapon;
+// deh_bexstr.c:
+extern deh_section_t deh_section_bexstr;
+

 #endif /* #ifndef DEH_DEFS_H */

diff --git a/src/doom/deh_doom.c b/src/doom/deh_doom.c
index b13cc03f..b7ff04a7 100644
--- a/src/doom/deh_doom.c
+++ b/src/doom/deh_doom.c
@@ -26,26 +26,6 @@ const char *deh_signatures[] =
     NULL
 };

-// deh_ammo.c:
-extern deh_section_t deh_section_ammo;
-// deh_cheat.c:
-extern deh_section_t deh_section_cheat;
-// deh_frame.c:
-extern deh_section_t deh_section_frame;
-// deh_misc.c:
-extern deh_section_t deh_section_misc;
-// deh_ptr.c:
-extern deh_section_t deh_section_pointer;
-// deh_sound.c
-extern deh_section_t deh_section_sound;
-// deh_text.c:
-extern deh_section_t deh_section_text;
-// deh_thing.c:
-extern deh_section_t deh_section_thing;
-// deh_weapon.c:
-extern deh_section_t deh_section_weapon;
-// deh_bexstr.c:
-extern deh_section_t deh_section_bexstr;

 //
 // List of section types:
diff --git a/src/heretic/deh_htic.c b/src/heretic/deh_htic.c
index c3aca347..0fe638b8 100644
--- a/src/heretic/deh_htic.c
+++ b/src/heretic/deh_htic.c
@@ -41,20 +41,8 @@ static const char *hhe_versions[] =

 deh_hhe_version_t deh_hhe_version = deh_hhe_1_0;

-// deh_ammo.c:
-extern deh_section_t deh_section_ammo;
-// deh_frame.c:
-extern deh_section_t deh_section_frame;
-// deh_ptr.c:
-extern deh_section_t deh_section_pointer;
-// deh_sound.c
-extern deh_section_t deh_section_sound;
 // deh_htext.c:
 extern deh_section_t deh_section_heretic_text;
-// deh_thing.c:
-extern deh_section_t deh_section_thing;
-// deh_weapon.c:
-extern deh_section_t deh_section_weapon;

 //
 // List of section types:
diff --git a/src/strife/deh_strife.c b/src/strife/deh_strife.c
index 231045b1..76cb496c 100644
--- a/src/strife/deh_strife.c
+++ b/src/strife/deh_strife.c
@@ -26,24 +26,6 @@ const char *deh_signatures[] =
     NULL
 };

-// deh_ammo.c:
-extern deh_section_t deh_section_ammo;
-// deh_cheat.c:
-extern deh_section_t deh_section_cheat;
-// deh_frame.c:
-extern deh_section_t deh_section_frame;
-// deh_misc.c:
-extern deh_section_t deh_section_misc;
-// deh_ptr.c:
-extern deh_section_t deh_section_pointer;
-// deh_sound.c
-extern deh_section_t deh_section_sound;
-// deh_text.c:
-extern deh_section_t deh_section_text;
-// deh_thing.c:
-extern deh_section_t deh_section_thing;
-// deh_weapon.c:
-extern deh_section_t deh_section_weapon;

 //
 // List of section types: