diff --git a/include/monst.h b/include/monst.h index 42d24966a..fb10cea7b 100644 --- a/include/monst.h +++ b/include/monst.h @@ -6,6 +6,11 @@ #ifndef MONST_H #define MONST_H +/* start with incomplete types in case these aren't defined yet; + basic pointers to them don't need to know their details */ +struct monst; +struct obj; + #ifndef MEXTRA_H #include "mextra.h" #endif diff --git a/include/obj.h b/include/obj.h index 237f48bc3..52f922887 100644 --- a/include/obj.h +++ b/include/obj.h @@ -9,6 +9,11 @@ /* #define obj obj_nh */ /* uncomment for SCO UNIX, which has a conflicting * typedef for "obj" in */ +/* start with incomplete types in case these aren't defined yet; + basic pointers to them don't need to know their details */ +struct obj; +struct monst; + union vptrs { struct obj *v_nexthere; /* floor location lists */ struct obj *v_ocontainer; /* point back to container */ diff --git a/src/objects.c b/src/objects.c index 8bccf6260..a7ef8d52c 100644 --- a/src/objects.c +++ b/src/objects.c @@ -2,8 +2,6 @@ /* Copyright (c) Mike Threepoint, 1989. */ /* NetHack may be freely redistributed. See license for details. */ -struct monst { struct monst *dummy; }; /* lint: struct obj's union */ - #include "config.h" #include "obj.h"