//	Zinc Application Framework - Z_UTILS.HPP
//	COPYRIGHT (C) 1990-1999.  All Rights Reserved.
//	Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#if !defined(Z_UTILS_HPP)
#define Z_UTILS_HPP
#include <z_env.hpp>

ZAF_EXPORT int WildStrcmp(const ZafIChar *str, const ZafIChar *pattern);

inline int ZafAbs(int value) { return ((value < 0) ? -value : value); }
inline int ZafMax(int arg1, int arg2) { return ((arg1 > arg2) ? arg1 : arg2); }
inline int ZafMin(int arg1, int arg2) { return ((arg1 < arg2) ? arg1 : arg2); }

ZAF_EXPORT ZafIChar *ZafCrNlToCr(ZafIChar *src, ZafIChar *dst = ZAF_NULLP(ZafIChar));
ZAF_EXPORT ZafIChar *ZafCrNlToNl(ZafIChar *src, ZafIChar *dst = ZAF_NULLP(ZafIChar));
ZAF_EXPORT ZafIChar *ZafCrToCrNl(ZafIChar *src, ZafIChar *dst = ZAF_NULLP(ZafIChar));
ZAF_EXPORT ZafIChar *ZafNlToCrNl(ZafIChar *src, ZafIChar *dst = ZAF_NULLP(ZafIChar));

#	if defined(ZAF_UNICODE)
ZAF_EXPORT char *ZafCrNlToCr(char *src, char *dst = ZAF_NULLP(char));
ZAF_EXPORT char *ZafCrNlToNl(char *src, char *dst = ZAF_NULLP(char));
ZAF_EXPORT char *ZafCrToCrNl(char *src, char *dst = ZAF_NULLP(char));
ZAF_EXPORT char *ZafNlToCrNl(char *src, char *dst = ZAF_NULLP(char));
#	endif

#endif // Z_UTILS_HPP

