for instance
Code: Select all
setboard wwwwwwwwwwwwwww... (stops at 256th character)
Code: Select all
setbuf(stdout,NULL);
setbuf(stdin,NULL);
Moderators: hgm, Rebel, chrisw
Code: Select all
setboard wwwwwwwwwwwwwww... (stops at 256th character)
Code: Select all
setbuf(stdout,NULL);
setbuf(stdin,NULL);
Unbuffered input: yes. _kbhit() and polling: no. It happens also with my very old engine version Surprise 4.2.8 which has no polling for input during search.Daniel Shawul wrote:Agreed. All seem to work fine under linux with select(). It must be _kbhit() and unbuffered input on dos ?
Code: Select all
#include <stdio.h>
int main(int argc, char * argv[])
{
if (argc == 1) {
setbuf(stdin, 0);
}
char line[65536];
printf("input: ");
fflush(stdout);
(void) fgets(line, sizeof(line), stdin);
return 0;
}