-/* $NetBSD: gomoku.h,v 1.2 1996/12/28 18:57:01 tls Exp $
-*/
+/* $NetBSD: gomoku.h,v 1.10 2004/01/27 20:30:29 jsm Exp $ */
+
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*/
#include <sys/types.h>
+#include <sys/endian.h>
+#include <stdio.h>
/* board dimensions */
#define BSZ 19
u_char o_frameindex; /* intersection frame index */
};
-extern char *letters;
+extern const char *letters;
extern char fmtbuf[];
-extern char pdir[];
+extern const char pdir[];
-extern int dd[4];
+extern const int dd[4];
extern struct spotstr board[BAREA]; /* info for board */
extern struct combostr frames[FAREA]; /* storage for single frames */
extern struct combostr *sortframes[2]; /* sorted, non-empty frames */
extern int movenum;
extern int debug;
-extern char *copy();
-extern char *stoc();
-extern char *tail();
-
#define ASSERT(x)
+
+void bdinit(struct spotstr *);
+void init_overlap(void);
+int getline(char *, int);
+void ask(const char *);
+void dislog(const char *);
+void bdump(FILE *);
+void bdisp(void);
+void bdisp_init(void);
+void cursfini(void);
+void cursinit(void);
+void bdwho(int);
+void panic(const char *) __attribute__((__noreturn__));
+void glog(const char *);
+void dlog(const char *);
+void quit(void) __attribute__((__noreturn__));
+void quitsig(int) __attribute__((__noreturn__));
+void whatsup(int);
+int readinput(FILE *);
+const char *stoc(int);
+int lton(int);
+int ctos(const char *);
+void update_overlap(struct spotstr *);
+int makemove(int, int);
+int list_eq(struct combostr **, struct combostr **, int);
+void clearcombo(struct combostr *, int);
+void makeempty(struct combostr *);
+void appendcombo(struct combostr *, int);
+void updatecombo(struct combostr *, int);
+void markcombo(struct combostr *);
+void printcombo(struct combostr *, char *);
+void makecombo(struct combostr *, struct spotstr *, int, int);
+void makecombo2(struct combostr *, struct spotstr *, int, int);
+int sortcombo(struct combostr **, struct combostr **, struct combostr *);
+int checkframes(struct combostr *, struct combostr *, struct spotstr *,
+ int, struct ovlp_info *);
+void addframes(int);
+void scanframes(int);
+int better(const struct spotstr *, const struct spotstr *, int);
+int pickmove(int);