Re: Detecting a PIPE in a program
From: CBFalconer (cbfalconer_at_yahoo.com)
Date: 02/03/05
- Next message: CBFalconer: "Re: Detecting a PIPE in a program"
- Previous message: Keith Thompson: "Re: Why doesn't this print "Hi Charles"?"
- In reply to: Richard Bos: "Re: Detecting a PIPE in a program"
- Next in thread: Lawrence Kirby: "Re: Detecting a PIPE in a program"
- Reply: Lawrence Kirby: "Re: Detecting a PIPE in a program"
- Reply: Richard Bos: "Re: Detecting a PIPE in a program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 03 Feb 2005 01:54:13 GMT
Richard Bos wrote:
> CBFalconer <cbfalconer@yahoo.com> wrote:
>
>> /* This is very likely to be non-portable */
>> /* DOES NOT check fp open for reading */
>> /* NULL fp is considered a keyboard here! */
>> static int akeyboard(FILE *fp)
>> {
>> #ifndef __TURBOC__
>> # ifdef __STDC__
>> /* This dirty operation allows gcc -ansi -pedantic */
>> extern int fileno(FILE *fp);
>> extern int isatty(int fn);
>
> Only "very likely" to be non-portable?
Yup, in the sense that it has a finite chance of failing on your
conforming system. Would you rather I claimed it to be portable,
or didn't even mention it?
-- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
- Next message: CBFalconer: "Re: Detecting a PIPE in a program"
- Previous message: Keith Thompson: "Re: Why doesn't this print "Hi Charles"?"
- In reply to: Richard Bos: "Re: Detecting a PIPE in a program"
- Next in thread: Lawrence Kirby: "Re: Detecting a PIPE in a program"
- Reply: Lawrence Kirby: "Re: Detecting a PIPE in a program"
- Reply: Richard Bos: "Re: Detecting a PIPE in a program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|