| www.delorie.com/archives/browse.cgi | search |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Help! Check for input! |
| Date: | Sun, 3 Oct 1999 13:08:59 +0200 |
| Organization: | NetVision Israel |
| Lines: | 17 |
| Message-ID: | <Pine.SUN.3.91.991003130747.16939G-100000@is> |
| References: | <7t57t1$4ije$1 AT reader3 DOT wxs DOT nl> |
| NNTP-Posting-Host: | is.elta.co.il |
| Mime-Version: | 1.0 |
| X-Trace: | news.netvision.net.il 938948865 23564 199.203.121.2 (3 Oct 1999 11:07:45 GMT) |
| X-Complaints-To: | abuse AT netvision DOT net DOT il |
| NNTP-Posting-Date: | 3 Oct 1999 11:07:45 GMT |
| X-Sender: | eliz AT is |
| In-Reply-To: | <7t57t1$4ije$1@reader3.wxs.nl> |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
On Sat, 2 Oct 1999, Bas Hamstra wrote:
> Sorry if I am too impatience.
Yes, you are. Please allow a couple of days before posting again,
since news propagation delays are sometimes significant.
> How can I check if there is input when my stdin is redirected?
What exactly do you mean by ``if there is input''?
If you need to know whether the file to which stdin is redirected
(even a pipe is a file in a DOS program) is empty or not, then you can
use library function `filelength', like this:
int any_data_in_pipe = filelength (fileno (stdin)) > 0;
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |