- Bugfix: the single attack output adaptions from revision 1447 had

broken some of the xml output.
This commit is contained in:
ccremers 2005-12-30 12:03:19 +00:00
parent ebf50b5252
commit 4a363aa33c
3 changed files with 22 additions and 5 deletions

View File

@ -309,6 +309,16 @@ symbol_fix_keylevels (void)
}
}
//! Get output stream pointer
FILE *
getOutputStream (void)
{
if (globalError == 0)
return (FILE *) globalStream;
else
return stderr;
}
//! Print out according to globalError
/**
* Input is comparable to printf, only depends on globalError. This should be
@ -326,9 +336,13 @@ eprintf (char *fmt, ...)
va_list args;
va_start (args, fmt);
if (globalError == 0)
vfprintf ((FILE *) globalStream, fmt, args);
else
vfprintf (stderr, fmt, args);
vfprintf (getOutputStream (), fmt, args);
va_end (args);
}
// Variable list variant
void
veprintf (const char *fmt, va_list args)
{
vfprintf (getOutputStream (), fmt, args);
}

View File

@ -1,6 +1,8 @@
#ifndef SYMBOLS
#define SYMBOLS
#include <stdarg.h>
//! Size of symbol hashtable.
/** Optimistically large. Should be a prime, says theory.
*/
@ -47,6 +49,7 @@ void symbol_fix_keylevels (void);
Symbol symbolNextFree (Symbol prefixsymbol);
void eprintf (char *fmt, ...);
void veprintf (const char *fmt, va_list args);
extern int globalError;
extern char *globalStream;

View File

@ -86,7 +86,7 @@ xmlPrint (char *fmt, ...)
xmlIndentPrint ();
va_start (args, fmt);
eprintf (fmt, args);
veprintf (fmt, args);
va_end (args);
eprintf ("\n");
}