Mail Archives: djgpp/2002/02/15/03:48:26
Eli Zaretskii wrote:
>
> > From: CBFalconer <cbfalconer AT yahoo DOT com>
> > Newsgroups: comp.os.msdos.djgpp
> > Date: Fri, 15 Feb 2002 03:09:18 GMT
> > >
> > > > I changed the output strings to terminate in \r\n, and now I get
> > > > bright patches of blue on the screen, with no output!
> > >
> > > Does your program call some conio functions to set the screen colors? If
> > > not, you should have see the normal white on black output from cprintf.
> > >
> > > Can you show the fragment which calls cprintf?
> >
> > These are the only locations enabled (with DEBUG1). I took the
> > \r's out again so it doesn't destroy the screen now.
>
> I don't see anything wrong with the code you posted. Does it help to
> put
>
> textbackground (BLACK);
> textcolor (LIGHTGRAY);
>
> before the cprintf?
I have tried some more experiments.
Changing the EOL sequence to \n\r in place of \r\n produces a gray
screen instead of purple! Still no other visible output, and the
program doesn't exit until I hit <return> (for both \r\n and
\n\r).
I then installed a static "static int firstime" in malloc, and
guarded the cprintfs with "if (firstime)" with code to "firstime =
1" on malloc exit. NO CHANGE - it was ignored. I suspect the
first malloc call is made before the global arena is setup.
Removing the \r's resulted in visible output, but without any
returns, and the output from the first sbrk call area still
appeared, so firstime was apparently not zeroed yet!
This is annoying. If other things aren't set up, I am very leery
of calling anything whatsoever at this point. Who knows what is
getting written on.
--
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net)
Available for consulting/temporary embedded and systems.
(Remove "XXXX" from reply address. yahoo works unmodified)
mailto:uce AT ftc DOT gov (for spambots to harvest)
- Raw text -