Update main.c

enhanced to WinBoard II protocol compliance