SEN forced the electrons to say:
> Try flushing all buffers....
> main(){ fflush(stdprn);fflush(stdin);fflush(stdout); }
Aaah... Don't post wrong code here...
Script started on Sun Jul 2 08:34:17 2000
binand@jediland[~] cat test.c
main(){ fflush(stdprn);fflush(stdin);fflush(stdout); }
binand@jediland[~] gcc -Wall test.c
test.c:1: warning: return-type defaults to `int'
test.c: In function `main':
test.c:1: warning: implicit declaration of function `fflush'
test.c:1: `stdprn' undeclared (first use in this function)
test.c:1: (Each undeclared identifier is reported only once
test.c:1: for each function it appears in.)
test.c:1: `stdin' undeclared (first use in this function)
test.c:1: `stdout' undeclared (first use in this function)
test.c:1: warning: control reaches end of non-void function
binand@jediland[~] ls -l a.out
ls: a.out: No such file or directory
binand@jediland[~] exit
Script done on Sun Jul 2 08:34:59 2000
Even if you #include <stdio.h>, the stdprn error does not go away. There
is no stdprn in Linux (or Unix or POSIX or ANSI or anything else, except
I think in Borland/Turbo C)
Also, fflush() should be used on only output streams, not on input
streams like stdin. The results of doing otherwise are undefined.
In any case, fflush(NULL) will also flush all open output streams.
The remaining errors are evident from gcc's o/p.
Binand
--
The prompt for all occasions:
export PS1="F:\$(pwd | tr '/[a-z]' '\134\134[A-Z]')> "
--------------- Binand Raj S. ([EMAIL PROTECTED])
-----------------------------------------------------------------------
The LIH mailing list archives are available at:
http://lists.linux-india.org/cgi-bin/wilma/linux-india-help