-/* $NetBSD: extern.h,v 1.23 2000/09/24 09:44:28 jsm Exp $ */
+/* $NetBSD: extern.h,v 1.26 2000/09/25 14:08:08 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
/* Flags for objects. */
#define OBJ_PLURAL 1
+#define OBJ_AN 2
struct room {
const char *name;
extern const int objcumber[NUMOFOBJECTS];
extern const int objflags[NUMOFOBJECTS];
#define is_plural_object(n) (objflags[(n)] & OBJ_PLURAL)
+/*
+ * These macros yield words to use with objects (followed but not preceded
+ * by spaces, or with no spaces if the expansion is the empty string).
+ */
+#define A_OR_AN(n) (objflags[(n)] & OBJ_AN ? "an " : "a ")
+#define A_OR_AN_OR_THE(n) (is_plural_object((n)) ? "the " : A_OR_AN((n)))
+#define A_OR_AN_OR_BLANK(n) (is_plural_object((n)) ? "" : A_OR_AN((n)))
+#define IS_OR_ARE(n) (is_plural_object((n)) ? "are " : "is ")
/* current input line */
#define WORDLEN 15
int value, article;
struct wlist *next;
};
-#define HASHSIZE 256
-#define HASHMUL 81
-#define HASHMASK (HASHSIZE - 1)
-extern struct wlist *hashtab[HASHSIZE];
extern struct wlist wlist[];
struct objs {
char *getcom __P((char *, int, const char *, const char *));
char *getword __P((char *, char *, int));
int give __P((void));
-int hash __P((const char *));
void initialize __P((const char *));
-void install __P((struct wlist *));
int jump __P((void));
void kiss __P((void));
int land __P((void));
int launch __P((void));
void light __P((void));
void live __P((void)) __attribute__((__noreturn__));
-struct wlist *lookup __P((const char *));
void love __P((void));
int moveplayer __P((int, int));
void murder __P((void));