-/* $NetBSD: stoc.c,v 1.2 1996/12/28 18:57:05 tls Exp $
-*/
+/* $NetBSD: stoc.c,v 1.4 1997/10/10 13:36:07 lukem Exp $ */
+
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)stoc.c 8.1 (Berkeley) 7/24/94";
#else
-static char rcsid[] = "$NetBSD: stoc.c,v 1.2 1996/12/28 18:57:05 tls Exp $";
+__RCSID("$NetBSD: stoc.c,v 1.4 1997/10/10 13:36:07 lukem Exp $");
#endif
#endif /* not lint */
-#include "gomoku.h"
#include <ctype.h>
+#include <stdlib.h>
+#include "gomoku.h"
char *letters = "<ABCDEFGHJKLMNOPQRST>";
char *m_text;
};
static struct mvstr mv[] = {
- RESIGN, "resign",
- RESIGN, "quit",
- SAVE, "save",
- -1, 0
+ { RESIGN, "resign" },
+ { RESIGN, "quit" },
+ { SAVE, "save" },
+ { -1, 0 }
};
/*
int s;
{
static char buf[32];
- register int i;
+ int i;
for (i = 0; mv[i].m_code >= 0; i++)
if (s == mv[i].m_code)
/*
* Turn the character form of a move into the spot number form.
*/
+int
ctos(mp)
char *mp;
{
- register int i;
+ int i;
for (i = 0; mv[i].m_code >= 0; i++)
if (strcmp(mp, mv[i].m_text) == 0)
/*
* Turn a letter into a number.
*/
+int
lton(c)
int c;
{
- register int i;
+ int i;
if (islower(c))
c = toupper(c);