This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Connecting stdin and stdout to serial port...
On Aug 8, 2000, "Russ.Shaw" <russell@webaxs.net> wrote:
> I'm using gcc for the H8/3048, and am using the standard
> C libraries.
GCC has no standard C libraries. In fact, your question has nothing
to do with GCC. You should ask for help in C programming in
newsgroups or mailing-lists about C programming in general.
> To use scanf(), printf() etc, files need to be defined
> for stdin and stdout. Somehow, these have to be connected
> to the input and output of the rs232 serial port.
> What's the usual way of doing this?
freopen() or dup2()
--
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