Mail Archives: djgpp/2000/04/26/12:05:45
On Wed, 26 Apr 2000 09:56:47 +0200, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
wrote:
>Damian Yerrick wrote:
>>
>> On Tue, 25 Apr 2000 11:25:19 +0200 (IST), Eli Zaretskii
>> <eliz AT is DOT elta DOT co DOT il> wrote:
>>
>> >There's nothing wrong with printf debugging
>>
>> Unless the printf() family function itself crashes the program. This
>> happens to me all the time when porting Allegro programs from DJGPP to
>> Windows, as DirectX is somewhat finicky about when the screen can be
>> drawn on.
>
>This simply means that you need to use another function, not the literal
>printf, but the principles remain the same. For example, when debugging code
>that cannot stand a DOS call, I use cprintf or cputs instead of printf.
That's what I meant when I said "printf() family function." In
Allegro, I would normally use textprintf(), but any drawing to the
screen under Windows involves calls to DirectX. To put it another
way, what if DOS required video memory to be "acquired" before it
could be drawn on, and it put a mutex lock on all input until the
program "released" the video memory?
--
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html
This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses. http://www.mcafee.com/
- Raw text -