| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | aniruddha1981 AT yahoo DOT co DOT in (Aniruddha) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | weird problem with printf() |
| Date: | 20 Sep 2004 02:55:18 -0700 |
| Organization: | http://groups.google.com |
| Lines: | 43 |
| Message-ID: | <59493f32.0409200155.7ad6ec60@posting.google.com> |
| NNTP-Posting-Host: | 203.126.136.220 |
| X-Trace: | posting.google.com 1095674118 27595 127.0.0.1 (20 Sep 2004 09:55:18 GMT) |
| X-Complaints-To: | groups-abuse AT google DOT com |
| NNTP-Posting-Date: | Mon, 20 Sep 2004 09:55:18 +0000 (UTC) |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
I am having a weird problem
The structure of my program is something like:
...long list of headers ...
int main()
{
...long list of declarations ...
for(;;)
{
if(someCondition)
{
..set some flags...
printf(someMessage);
fflush(stdout);
}
else if(someCondition2)
{
..set some flags...
printf(someMessage2);
fflush(stdout);
}
...
}
return 0;
}
For the initial few runs of the loop(for), the message is displayed by the
printf's, but after some more runs the messages are not being printed, but
the flags are set properly.
I do not know much of assembly to debug under the disassembler view, but
during normal debug under RHIDE, the printf seems to be executing.
I am flushing the output stream after every printf. Is it because of the size
of the translation unit or some problem with insufficient memory?
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |