problem with g++, getc and '\n'

Bernd Prager bernd@asterix.gecko.de
Fri Apr 18 09:50:00 GMT 1997


Hi,
following code compiled with g++ do not run correct in win95-bash:

  while ((c=getc(id)) != '\n' && c != EOF)
    if (i<max-1)
      line[i++]=c;
  line[i]='\0';
  if (c==EOF)
    return EOF;
  else
    return i;

getc is not waiting for a keystroke. 
Any suggestions?

Thanks,
Bernd
_____________________________________________________________________
Bernd Prager
GECKO mbH; Wismarsche Str.3, 18057 Rostock; Germany					
http://www.gecko.de

PGP Key fingerprint = 83 54 6A 3B 7A 9D 6C 0E F3 41 CE 99 11 30 B7 D6
public key by mailto:bpr@gecko.de?Subject=SendPGPKey
_____________________________________________________________________
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list