blob: b08c90c3f6220e2cda0275c8351e564d2e1ea384 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
USAGE("[-w | -b | -n]");
int
main(int argc, char *argv[])
{
int black = 0;
ARGBEGIN {
case 'b': black = 1; break;
case 'w': black = 0; break;
case 'n': black = -1; break;
default:
usage();
} ARGEND;
if (argc)
usage();
return convert(black < 0 ? &libcharconv_chess_neutral :
black > 0 ? &libcharconv_chess_black :
&libcharconv_chess_white);
}
|