This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: putchar + printf combined
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: Banit Agrawal <banit at cse dot iitkgp dot ernet dot in>
- Cc: newlib at sources dot redhat dot com
- Date: Fri, 06 Sep 2002 19:02:51 -0400
- Subject: Re: putchar + printf combined
- Organization: Red Hat Inc.
- References: <LDEKKBKFBEIOILIGJMFBEEIMCEAA.banit@cse.iitkgp.ernet.in>
Banit Agrawal wrote:
>
> Hello,
>
> I am getting some problems with printf + putchar combination
> present in the same program. Is the same buffer(stdio) is used
> properly in both the cases?
>
> If we do not give any printf statement in the program containing
> getchar() and putchar() function, it works fine.
>
> Independently both calls works fine.
>
> Any pointers in this direction will be helpful.
>
> Thanks & Regards,
> Banit Agrawal
Banit,
The two functions should interoperate without problem. Can you isolate a testcase
exhibiting the behavior? It may be possible that memory corruption is occurring.
-- Jeff J.