Mercurial > hg > dmlib
changeset 1133:2af228303727
#ifdef out code that is not needed or used if JSS_LIGHT is defined.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 04 Mar 2015 07:16:06 +0200 |
parents | d4512925b4f9 |
children | d0898867ec4c |
files | minijss/jss.c minijss/jss.h |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/minijss/jss.c Wed Mar 04 07:00:27 2015 +0200 +++ b/minijss/jss.c Wed Mar 04 07:16:06 2015 +0200 @@ -13,9 +13,9 @@ BOOL jssWarningIsFatal, jssErrorIsFatal; #ifndef JSS_LIGHT + void (*jssError) (int code, const char *filename, int linen, const char *fmt, ...); void (*jssWarning) (int code, const char *filename, int linen, const char *fmt, ...); -#endif void jssDefaultPrint(int code, const char *filename, int linen, const char *fmt) @@ -51,16 +51,18 @@ va_end(ap); } +#endif + /* System initialization */ int jssInit(void) { // Error handling +#ifndef JSS_LIGHT jssWarningIsFatal = FALSE; jssErrorIsFatal = TRUE; -#ifndef JSS_LIGHT jssError = jssDefaultError; jssWarning = jssDefaultWarning; #endif
--- a/minijss/jss.h Wed Mar 04 07:00:27 2015 +0200 +++ b/minijss/jss.h Wed Mar 04 07:16:06 2015 +0200 @@ -71,10 +71,10 @@ /* Error handling routines and related variables */ +#ifndef JSS_LIGHT extern BOOL jssWarningIsFatal, // if TRUE, warnings are considered fatal -> function returns jssErrorIsFatal; // if FALSE, error is considered non-fatal. this may cause strange problems. -#ifndef JSS_LIGHT extern void (*jssError)(int code, const char *filename, int linen, const char *fmt, ...); extern void (*jssWarning)(int code, const char *filename, int linen, const char *fmt, ...); #endif