forked from github/server
fix gcc build, forward-declare structs in the header.
MSVC allows structs to be declared in a function signature, gcc wants to know about them earlier.
This commit is contained in:
parent
1af315ebf2
commit
27f94783bc
|
@ -23,6 +23,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct potion_type;
|
||||
struct unit;
|
||||
struct region;
|
||||
struct item_type;
|
||||
struct order;
|
||||
|
||||
enum {
|
||||
/* Stufe 1 */
|
||||
P_FAST,
|
||||
|
|
|
@ -14,10 +14,12 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct lua_State;
|
||||
struct selection;
|
||||
struct state;
|
||||
struct region;
|
||||
struct terrain_type;
|
||||
|
||||
int gmmain(int argc, char *argv[]);
|
||||
int curses_readline(struct lua_State *L, char *buffer, size_t size,
|
||||
|
|
|
@ -25,6 +25,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct attrib;
|
||||
struct attrib_type;
|
||||
struct faction;
|
||||
struct region;
|
||||
struct storage;
|
||||
struct unit;
|
||||
|
||||
extern int nextborder;
|
||||
|
||||
typedef struct connection {
|
||||
|
|
|
@ -25,6 +25,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
extern "C" {
|
||||
#endif
|
||||
struct spell;
|
||||
struct item;
|
||||
struct unit;
|
||||
|
||||
typedef struct itemdata {
|
||||
const struct item_type *itype;
|
||||
|
|
|
@ -33,6 +33,8 @@ extern "C" {
|
|||
struct resource_type;
|
||||
struct locale;
|
||||
struct troop;
|
||||
struct item;
|
||||
struct order;
|
||||
|
||||
typedef struct item {
|
||||
struct item *next;
|
||||
|
|
|
@ -22,6 +22,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct region;
|
||||
struct plane;
|
||||
struct storage;
|
||||
|
||||
#define PFL_NOCOORDS 1 /* not in use */
|
||||
#define PFL_NORECRUITS 2
|
||||
#define PFL_NOALLIANCES 4
|
||||
|
|
|
@ -22,6 +22,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct unit;
|
||||
struct resource_type;
|
||||
struct region;
|
||||
|
||||
/* bitfield values for get/use/change operations */
|
||||
#define GET_SLACK 0x01
|
||||
#define GET_RESERVE 0x02
|
||||
|
|
|
@ -22,6 +22,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct attrib;
|
||||
struct item;
|
||||
struct storage;
|
||||
struct spell;
|
||||
struct spellbook;
|
||||
struct unit;
|
||||
|
||||
typedef struct gamedata {
|
||||
struct storage *store;
|
||||
int version;
|
||||
|
|
|
@ -23,6 +23,13 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
struct castorder;
|
||||
struct unit;
|
||||
struct region;
|
||||
struct spell;
|
||||
struct spell_component;
|
||||
struct quicklist;
|
||||
struct attrib_type;
|
||||
|
||||
typedef int (*spell_f)(struct castorder * co);
|
||||
typedef void(*fumble_f)(const struct castorder * co);
|
||||
|
||||
|
|
11
src/laws.h
11
src/laws.h
|
@ -22,7 +22,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int writepasswd(void);
|
||||
struct unit;
|
||||
struct region;
|
||||
struct building;
|
||||
struct faction;
|
||||
struct order;
|
||||
struct attrib_type;
|
||||
|
||||
int writepasswd(void);
|
||||
void demographics(void);
|
||||
void update_guards(void);
|
||||
void update_subscriptions(void);
|
||||
|
@ -32,7 +39,7 @@ extern "C" {
|
|||
bool renamed_building(const struct building * b);
|
||||
int rename_building(struct unit * u, struct order * ord, struct building * b, const char *name);
|
||||
void get_food(struct region * r);
|
||||
extern int can_contact(const struct region *r, const struct unit *u, const struct unit *u2);
|
||||
int can_contact(const struct region *r, const struct unit *u, const struct unit *u2);
|
||||
|
||||
/* eressea-specific. put somewhere else, please. */
|
||||
void processorders(void);
|
||||
|
|
|
@ -26,6 +26,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
struct unit;
|
||||
struct region;
|
||||
struct region_list;
|
||||
struct ship;
|
||||
struct building_type;
|
||||
|
||||
|
|
|
@ -22,10 +22,14 @@ extern "C" {
|
|||
|
||||
struct locale;
|
||||
struct message;
|
||||
extern struct message *cinfo_ship(const void *obj, objtype_t typ,
|
||||
struct ship;
|
||||
struct unit;
|
||||
struct curse;
|
||||
|
||||
struct message *cinfo_ship(const void *obj, objtype_t typ,
|
||||
const struct curse *c, int self);
|
||||
extern void register_shipcurse(void);
|
||||
extern struct curse *shipcurse_flyingship(struct ship *sh, struct unit *mage,
|
||||
void register_shipcurse(void);
|
||||
struct curse *shipcurse_flyingship(struct ship *sh, struct unit *mage,
|
||||
float power, int duration);
|
||||
int levitate_ship(struct ship *sh, struct unit *mage, float power,
|
||||
int duration);
|
||||
|
|
Loading…
Reference in New Issue