Troubles with the stdin in own Windows compiles

Discussion of chess software programming and technical issues.

Moderator: Ras

OliverBr
Posts: 846
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Troubles with the stdin in own Windows compiles

Post by OliverBr »

Maybe someone knows of this issue:

When you open the Windows executable on CMD and then enter “uci” (3-character), the answer won’t show until the next command.
"uci " with space works fine, also "go", "stop", "ponder", "quit" as they have all "even" chars.
This issue has been reported/verified by others on their Windows PC.

I don’t think the problem lies in the code, because the linux/macosx executables work fine.
My own Windows compilations show this strange behaviour.
The problem does not appear with Jim Ablett's Windows compiles.

Code: Select all

	char line[8192];
	while(fgets(line, sizeof(line), stdin)) {
OliThink GitHub: https://github.com/olithink
Nice arcticle about OlIThink: https://www.chessengeria.eu/post/olithink-oldie-goldie
Chess Engine OliThink Homepage: http://brausch.org/home/chess