- Bugfix: the single attack output adaptions from revision 1447 had
broken some of the xml output.
This commit is contained in:
parent
ebf50b5252
commit
4a363aa33c
22
src/symbol.c
22
src/symbol.c
@ -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
|
//! Print out according to globalError
|
||||||
/**
|
/**
|
||||||
* Input is comparable to printf, only depends on globalError. This should be
|
* Input is comparable to printf, only depends on globalError. This should be
|
||||||
@ -326,9 +336,13 @@ eprintf (char *fmt, ...)
|
|||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
if (globalError == 0)
|
vfprintf (getOutputStream (), fmt, args);
|
||||||
vfprintf ((FILE *) globalStream, fmt, args);
|
|
||||||
else
|
|
||||||
vfprintf (stderr, fmt, args);
|
|
||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Variable list variant
|
||||||
|
void
|
||||||
|
veprintf (const char *fmt, va_list args)
|
||||||
|
{
|
||||||
|
vfprintf (getOutputStream (), fmt, args);
|
||||||
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef SYMBOLS
|
#ifndef SYMBOLS
|
||||||
#define SYMBOLS
|
#define SYMBOLS
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
//! Size of symbol hashtable.
|
//! Size of symbol hashtable.
|
||||||
/** Optimistically large. Should be a prime, says theory.
|
/** Optimistically large. Should be a prime, says theory.
|
||||||
*/
|
*/
|
||||||
@ -47,6 +49,7 @@ void symbol_fix_keylevels (void);
|
|||||||
Symbol symbolNextFree (Symbol prefixsymbol);
|
Symbol symbolNextFree (Symbol prefixsymbol);
|
||||||
|
|
||||||
void eprintf (char *fmt, ...);
|
void eprintf (char *fmt, ...);
|
||||||
|
void veprintf (const char *fmt, va_list args);
|
||||||
|
|
||||||
extern int globalError;
|
extern int globalError;
|
||||||
extern char *globalStream;
|
extern char *globalStream;
|
||||||
|
@ -86,7 +86,7 @@ xmlPrint (char *fmt, ...)
|
|||||||
|
|
||||||
xmlIndentPrint ();
|
xmlIndentPrint ();
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
eprintf (fmt, args);
|
veprintf (fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
eprintf ("\n");
|
eprintf ("\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user