* The Regents of the University of California. All rights reserved.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)stoc.c 8.1 (Berkeley) %G%";
char *letters
= "<ABCDEFGHJKLMNOPQRST>";
static struct mvstr mv
[] = {
* Turn the spot number form of a move into the character form.
for (i
= 0; mv
[i
].m_code
>= 0; i
++)
sprintf(buf
, "%c%d", letters
[s
% BSZ1
], s
/ BSZ1
);
* Turn the character form of a move into the spot number form.
for (i
= 0; mv
[i
].m_code
>= 0; i
++)
if (strcmp(mp
, mv
[i
].m_text
) == 0)
return(PT(lton(mp
[0]), i
));
* Turn a letter into a number.
for (i
= 1; i
<= BSZ
&& letters
[i
] != c
; i
++)