public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: Nauman Akbar <b99094@cs.lums.edu.pk>
Cc: gcc-help@gcc.gnu.org
Subject: Re: help needed with redirecting stdin
Date: Sat, 29 Sep 2001 07:50:00 -0000	[thread overview]
Message-ID: <orofnukqc0.fsf@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.21.0109291706010.7185-100000@cs.lums.edu.pk>

On Sep 29, 2001, Nauman Akbar <b99094@cs.lums.edu.pk> wrote:

> I am running gcc on Linux and Solaris. At command prompt I am redirecting
> an input file to my binary, which is attached to stdin. I am using
> gets() to read from stdin. After I am finished reading the file, I want
> gets() to continue reading from console input.

freopen("/dev/tty", "r", stdin);

But this is not GCC-specific at all.  Next time you have a generic
programming question, please ask in comp.lang.c or some other C
programming forum.  This mailing list is for help installing GCC, or
using features specific to GCC.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

      reply	other threads:[~2001-09-29  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-29  5:27 Nauman Akbar
2001-09-29  7:50 ` Alexandre Oliva [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=orofnukqc0.fsf@localhost.localdomain \
    --to=aoliva@redhat.com \
    --cc=b99094@cs.lums.edu.pk \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).