Re: [gtk-list] Re: bug in g_print ?
- From: Tomi Ollila <Tomi Ollila tfi net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: bug in g_print ?
- Date: Thu, 16 Jul 1998 10:51:06 +0300 (EET DST)
Thu Jul 16 09:21:00 +0200 1998 Didimo Emilio Grimaldo Tunon <emilio_tunon@nl.compuware.com> wrote:
> > call to g_print.
> >
> > Is this a bug in g_print or in gtk+ ? printfdoes the same.
>
> I wonder, what's the advantage of using g_print() over
> plain, portable printf() ?
g_print() function in glib/gmessages.c
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
void
g_print (const gchar *format, ...)
{
va_list args, args2;
char *buf;
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_print_func)
{
(* glib_print_func) (buf);
}
else
{
fputs (buf, stdout);
}
}
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
Extra feature seems to be possibility to replace default output function.
> D. Emilio Grimaldo Tunon Compuware Europe B.V. (Uniface Lab)
Tomi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]