1 /* ======== SourceMM ========
2 * Copyright (C) 2004-2005 Metamod:Source Development Team
3 * No warranties of any kind
7 * Author(s): David "BAILOPAN" Anderson
8 * ============================
11 #ifndef _INCLUDE_UTIL_H
12 #define _INCLUDE_UTIL_H
15 * @brief Utility functons
19 const char *UTIL_GetExtension(const char *file);
20 void UTIL_TrimLeft(char *buffer);
21 void UTIL_TrimRight(char *buffer);
23 #define META_INTERFACE_MACRO(type, final) \
25 void *mret=NULL, *d; \
26 META_RES mres, high=MRES_IGNORED; \
27 g_SmmAPI.SetLastMetaReturn(MRES_IGNORED); \
28 for (i=g_PluginMngr._begin(); i!=g_PluginMngr._end(); i++) \
30 if ( (*i) && (*i)->fac_list. type ) \
32 d = ((*i)->fac_list. type)(name, ret); \
33 mres = g_SmmAPI.GetLastMetaReturn(); \
36 if (mres >= MRES_OVERRIDE) \
40 if (high == MRES_OVERRIDE) \
44 } else if (high == MRES_SUPERCEDE) { \
47 return (final)(name, ret); \
50 #endif //_INCLUDE_UTIL_H