struct object { char name[MAXNAME]; unsigned int attrs; struct object *contents; /* contents (if container) */ struct object *lnext; /* next in list of contained objects */ /* (i.e. in this object's container) */ }; #define CONTAINER 0x0001 #define CLOSABLE 0x0002 #define OPEN 0x0004 #define HEAVY 0x0008 #define BROKEN 0x0010 #define TOOL 0x0020 #define SOFT 0x0040 #define SHARP 0x0080 #define LOCK 0x0100 #define KEY 0x0200 #define LOCKED 0x0400 #define TRANSPARENT 0x0800 #define IMMOBILE 0x1000 #define Iscontainer(o) ((o)->attrs & CONTAINER) #define Isopen(o) ((o)->attrs & OPEN)