gvg@svn.reactos.com wrote:
Implement adding new sections/lines/fields and writing the resulting file Added: trunk/reactos/lib/inflib/infhostglue.c
*Added: trunk/reactos/lib/inflib/infhostglue.c* --- trunk/reactos/lib/inflib/infhostglue.c 2005-11-25 21:29:16 UTC (rev 19571) +++ trunk/reactos/lib/inflib/infhostglue.c 2005-11-25 21:37:23 UTC (rev 19572) @@ -0,0 +1,24 @@ +/*
- PROJECT: .inf file parser
- LICENSE: GPL - See COPYING in the top level directory
- COPYRIGHT: Copyright 2005 Ge van Geldorp gvg@reactos.org
- */
+/* INCLUDES *****************************************************************/
+#include "inflib.h"
+#define NDEBUG +#include <debug.h>
+void +DbgPrint(const char *Fmt, ...) +{
- va_list Args;
- va_start(Args, Fmt);
- vfprintf(stderr, Fmt, Args);
- va_end(Args);
+}
+/* EOF */
It is a little bit dirty to implement a well known function in a different way.
- Hartmut
From: Hartmut Birr
gvg@svn.reactos.com wrote: +void +DbgPrint(const char *Fmt, ...) +{
- va_list Args;
- va_start(Args, Fmt);
- vfprintf(stderr, Fmt, Args);
- va_end(Args);
+}
It is a little bit dirty to implement a well known function in a different
way.
I'm open to ideas. I added this function in the host version to be able to use the DPRINT/DPRINT1 macros we all know and love. But the debug output has to be sent somewhere, so there needs to be an underlying DbgPrint() function. Please note that this "special" DbgPrint() is only used in the host version, i.e. when running build tools. There simply isn't (for example) a native Linux DbgPrint(), so we need to provide one ourselves. When linking to inflib from ReactOS components, the normal DbgPrint() is used.
GvG
Ge van Geldorp wrote:
From: Hartmut Birr
gvg@svn.reactos.com wrote: +void +DbgPrint(const char *Fmt, ...) +{
- va_list Args;
- va_start(Args, Fmt);
- vfprintf(stderr, Fmt, Args);
- va_end(Args);
+}
It is a little bit dirty to implement a well known function in a different
way.
I'm open to ideas. I added this function in the host version to be able to use the DPRINT/DPRINT1 macros we all know and love. But the debug output has to be sent somewhere, so there needs to be an underlying DbgPrint() function. Please note that this "special" DbgPrint() is only used in the host version, i.e. when running build tools. There simply isn't (for example) a native Linux DbgPrint(), so we need to provide one ourselves. When linking to inflib from ReactOS components, the normal DbgPrint() is used.
GvG
I've compile problems, because DbgPrint is defined in many headers as:
unsigned long __cdecl DbgPrint(char* Fmt, ...);
- Hartmut
From: Hartmut Birr
gvg@svn.reactos.com wrote: +void +DbgPrint(const char *Fmt, ...)
I've compile problems, because DbgPrint is defined in many headers as:
unsigned long __cdecl DbgPrint(char* Fmt, ...);
Ah, ok, I misunderstood, you mean I got the function signature wrong. Will fix it.
GvG