diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-03-07 16:55:41 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-03-07 16:55:41 +0100 |
commit | d54b6220dc44bb31f1c53ce56ecaadf9f818e2cf (patch) | |
tree | ffec342a03502bccc1e61d192ae3d17b3e5323e9 | |
parent | 3b5446d7c303099094f84a32df29d2d9dc2049d0 (diff) |
Split birth.cc "C" declarations to separate header file
-rw-r--r-- | src/birth.cc | 1 | ||||
-rw-r--r-- | src/birth.h | 14 | ||||
-rw-r--r-- | src/dungeon.cc | 1 | ||||
-rw-r--r-- | src/externs.h | 3 | ||||
-rw-r--r-- | src/main.c | 1 |
5 files changed, 17 insertions, 3 deletions
diff --git a/src/birth.cc b/src/birth.cc index 6de84478..3127cb28 100644 --- a/src/birth.cc +++ b/src/birth.cc @@ -6,6 +6,7 @@ * included in all such copies. */ #include "birth.hpp" +#include "birth.h" #include "angband.h" #include "corrupt.hpp" diff --git a/src/birth.h b/src/birth.h new file mode 100644 index 00000000..41620bfa --- /dev/null +++ b/src/birth.h @@ -0,0 +1,14 @@ +#pragma once + +#include "h-basic.h" + +// C linkage required for these functions since main-* code uses them. +#ifdef __cplusplus +extern "C" { +#endif + +extern bool_ no_begin_screen; + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/src/dungeon.cc b/src/dungeon.cc index 799761aa..ff113372 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -11,6 +11,7 @@ #include "angband.h" #include "birth.hpp" +#include "birth.h" #include "cave.hpp" #include "cmd1.hpp" #include "cmd2.hpp" diff --git a/src/externs.h b/src/externs.h index 23294e51..6b36625a 100644 --- a/src/externs.h +++ b/src/externs.h @@ -460,9 +460,6 @@ extern timer_type *gl_timers; extern const char *get_version_string(); extern tval_desc2 tvals[]; -/* birth.c */ -extern bool_ no_begin_screen; - /* * Hack -- conditional (or "bizarre") externs */ @@ -9,6 +9,7 @@ */ #include "angband.h" +#include "birth.h" #include "dungeon.h" #include "files.h" #include "init2.h" |