Skip to content

Commit

Permalink
Fix oops in last xchange.c / .h (site update)
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Aug 29, 2024
1 parent 2e2d3bc commit 98fc819
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions include/xchange.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ extern boolean xDebug; ///< Switch to enable debugging (very verbose) o
#define xdprintf if(xDebug) printf ///< Use for generating debug output

// In xutil.c ------------------------------------------------>
boolean xIsVerbose();
void xSetVerbose(boolean value);
int xError(const char *func, int errorCode); // TODO...
const char *xErrorDescription(int code);

Expand Down
6 changes: 3 additions & 3 deletions src/xjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
#define WARNING_PREFIX "WARNING! XJSON "


#define Error(format, ARGS...) fprintf(xerr, ERROR_PREFIX format, ##ARGS)
#define Warning(format, ARGS...) fprintf(xerr, WARNING_PREFIX format, ##ARGS)
#define Error(format, ARGS...) fprintf(xerr ? xerr : stderr, ERROR_PREFIX format, ##ARGS)
#define Warning(format, ARGS...) fprintf(xerr ? xerr : stderr, WARNING_PREFIX format, ##ARGS)
/// \endcond

static XStructure *ParseObject(char **pos, int *lineNumber);
Expand All @@ -63,7 +63,7 @@ static int PrintArray(const char *prefix, char *ptr, XType type, int ndim, const
static int PrintPrimitive(const void *ptr, XType type, char *str);
static int PrintString(const char *src, int maxLength, char *json);

static FILE *xerr = stderr; ///< File / stream, which errors are printed to.
static FILE *xerr; ///< File / stream, which errors are printed to. A NULL will print to stderr

static char *indent = XJSON_INDENT;
static int ilen = sizeof(XJSON_INDENT) - 1;
Expand Down

0 comments on commit 98fc819

Please sign in to comment.