This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Entering Characters during sleep !
- To: gnu-win32 at cygnus dot com
- Subject: Entering Characters during sleep !
- From: David Avrahamov <davidav at msil dot sps dot mot dot com>
- Date: Tue, 19 May 1998 09:27:27 +0300
- Cc: mandy at msil dot sps dot mot dot com
- Organization: MSIL
Hi everyone,
I have encountered a problem while running a program which do sleep
before prompting for input.
All the input characters that are entered during this time are not
entered into the input buffer so it is as I didn't enter them at all.
I have this small code which illustrates this problem.
This problem doesn't happen neither on UNIX nor on MSVC.
P.S. Instead of doing sleep I entered a big loop and it acted the same.
Any ideas ?
Thanks,
#include <stdio.h>
main()
{
char st1[100];
unsigned long i;
printf("Type something !\n");
for (i=0;i<50000000;i++);
scanf("%s",st1);
printf("You typed: %s\n",st1);
}
--
David Avrahamov
Phone number: 952-2176
Software department
Motorola Semiconductor Israel
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".