Good grief- that was quick :-)

Marco van de Voort wrote:
I'm trying to distinguish between a case where there is no parameter on the command line and where there is piped input. The code below works under Win-32 but under Linux Eof() waits for input:

If I start it under linux by piping an eof (i.e. echo -n |) it works.

I'm sure this is something that's been looked at before- how do I get it to 
work?

For unix one can simply use termio.isatty(input) I think.

Thanks, I'll investigate. I was going to look at that but you've saved me a /lot/ of work identifying the correct function name :-)

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to