/* support.h - support routines */

#if !defined(__SUPPORT_H__)
#define	__SUPPORT_H__

#define	ElementCount(a)	(sizeof (a) / sizeof (a)[0])

char * StripFore(char const * const pszToStrip, char const * const pszStripCharacters);
char * StripBack(char       * const pszToStrip, char const * const pszStripCharacters);

#define	StripBoth(pszToStrip, pszStripCharacters)	StripFore(StripBack(pszToStrip, pszStripCharacters), pszStripCharacters)

#if defined(_DEBUG)
void debugout(char const * const fmt, ...);
#define dbgprintf debugout
#else
__inline void debugout(char const * const fmt, ...) { }
#define dbgprintf (1) ? (void)0 : debugout
#endif

#endif