Re: [AD] sys_directx_trace_handler |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] sys_directx_trace_handler
- From: guilt <karthikkumar@xxxxxxxxxx>
- Date: Thu, 28 Apr 2005 12:38:16 +0530
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=kTZEn+CsDWn3NSLN6oZYIj7vEfOQ1UpcgQHUZ5xdqiChntkHPw/lpk0sV5q8+Z+vNJ4UyBXJ1QL0eowAQTk77B16C3hA/pD9v1F3BDn9pJHuDxSF1rTU+qhYmDSxdszy6+E6IDar8zsqKXla7F/OnXk6wUys8qCSn5hiQEfsnfc=
in wsystem.c i'm seeing this:
/* thread_safe_trace:
* Outputs internal trace message.
*/
void thread_safe_trace(
char *msg,...)
{
char buf[256];
va_list ap;
/* todo, some day: use vsnprintf (C99) */
va_start(ap, msg);
vsprintf(buf, msg, ap);
va_end(ap);
OutputDebugString(buf); /* thread safe */
}
:)
could help ...
On 4/28/05, Daniel Schlyder <daniel@xxxxxxxxxx> wrote:
Elias Pschernig:
> It says:
> "If the application has no debugger, the system debugger displays the
> string. If the application has no debugger and the system debugger is not
> active, OutputDebugString does nothing."
If I run a program under GDB (MinGW, Windows CLI), I get output of
OutputDebugString(), so I guess sys_directx_trace_handler() makes sense
then? We've also got the _TRACE() macro for that, so I'm a bit confused
here.
> The docs for al_trace:
> "Outputs a debugging trace message, using a printf() format string given
> in ASCII. If you have installed a custom trace handler it uses that, or if
> the environment variable ALLEGRO_TRACE is set it writes into the file
> specified by the environment, otherwise it writes the message to
> "allegro.log" in the current directory. You will usually want to use the
> TRACE() macro instead of calling this function directly."
Note that _TRACE() and TRACE() behave differently.
--
Daniel Schlyder
http://bitblaze.com/
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to
SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers
--
Karthik
http://guilt.bafsoft.net