📄 xos_generals.h.svn-base
字号:
}
return 0;
}
static INLINE int xOS_General_strncmp(const char *a, const char *b, uint32 length)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strncmp(a, b, length);
}
return 0;
}
static INLINE int xOS_General_stricmp(const char *a, const char *b)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->stricmp(a, b);
}
return 0;
}
static INLINE int xOS_General_strnicmp(const char *a, const char *b, uint32 length)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strnicmp(a, b, length);
}
return 0;
}
static INLINE char *xOS_General_strstr(const char *haystack, const char *needle)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strstr(haystack, needle);
}
return 0;
}
static INLINE int xOS_General_memcmp(const void *a, const void *b, uint32 length)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->memcmp(a, b, length);
}
return 0;
}
static INLINE void xOS_General_memchr(const void *src, int c, uint32 length)
{
if (GETGENERALS(g_pxOSList))
{
GETGENERALS(g_pxOSList)->memchr(src, c, length);
}
}
static INLINE void xOS_General_memcpy(void *dst, const void *src, uint32 len)
{
if (GETGENERALS(g_pxOSList))
{
GETGENERALS(g_pxOSList)->memcpy(dst, src, len);
}
}
static INLINE void *xOS_General_revcpy(void *dst, const void *src, uint32 len)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->revcpy(dst, src, len);
}
return 0;
}
static INLINE void xOS_General_strexpand(const byte *pSrc, int nCount, wchar *pDest,int nSize)
{
if (GETGENERALS(g_pxOSList))
{
GETGENERALS(g_pxOSList)->strexpand(pSrc, nCount, pDest, nSize);
}
}
static INLINE char *xOS_General_stristr(const char *cpszHaystack, const char *cpszNeedle)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->stristr(cpszHaystack, cpszNeedle);
}
return 0;
}
static INLINE char *xOS_General_memstr(const char *cpHaystack, const char *cpszNeedle, uint32 nHaystackLen)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->memstr(cpHaystack, cpszNeedle, nHaystackLen);
}
return 0;
}
static INLINE int xOS_General_wstrncmp(const wchar *s1, const wchar *s2, uint32 nLen)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->wstrncmp(s1, s2, nLen);
}
return 0;
}
static INLINE char *xOS_General_strdup(const char *psz)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strdup(psz);
}
return 0;
}
static INLINE boolean xOS_General_strbegins(const char *cpszPrefix, const char *psz)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strbegins(cpszPrefix, psz);
}
return 0;
}
static INLINE boolean xOS_General_strends(const char *cpszSuffic, const char *psz)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strends(cpszSuffic, psz);
}
return 0;
}
static INLINE char *xOS_General_strchrend(const char *pszSrc, char c)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strchrend(pszSrc, c);
}
return 0;
}
static INLINE char *xOS_General_strchrsend(const char *pszSrc, const char *pszChars)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strchrsend(pszSrc, pszChars);
}
return 0;
}
static INLINE char *xOS_General_memrchr(const char *pcSrch, int c, uint32 nLen)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->memrchr(pcSrch, c, nLen);
}
return 0;
}
static INLINE char *xOS_General_memchrend(const char *pcSrch, int c, uint32 nLen)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->memchrend(pcSrch, c, nLen);
}
return 0;
}
static INLINE char *xOS_General_memrchrbegin(const char *pcSrch, int c, uint32 nLen)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->memrchrbegin(pcSrch, c, nLen);
}
return 0;
}
static INLINE char *xOS_General_strlower(char *psz)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strlower(psz);
}
return 0;
}
static INLINE char *xOS_General_strupper(char *psz)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strupper(psz);
}
return 0;
}
static INLINE int xOS_General_wstricmp(const wchar * p1, const wchar * p2)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->wstricmp(p1, p2);
}
return 0;
}
static INLINE int xOS_General_wstrnicmp(const wchar * p1, const wchar * p2, uint32 length)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->wstrnicmp(p1, p2, length);
}
return 0;
}
static INLINE boolean xOS_General_inet_aton(const char *pc, uint32 *pulAddr)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->inet_aton(pc, pulAddr);
}
return 0;
}
static INLINE void xOS_General_inet_ntoa(uint32 ulAddr, char *pc, uint32 nLen)
{
if (GETGENERALS(g_pxOSList))
{
GETGENERALS(g_pxOSList)->inet_ntoa(ulAddr, pc, nLen);
}
}
static INLINE uint32 xOS_General_swapl(uint32 ul)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->swapl(ul);
}
return 0;
}
static INLINE uint16 xOS_General_swaps(uint16 ul)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->swaps(ul);
}
return 0;
}
// Heap/File query functions.
static INLINE int xOS_General_vsprintf(char *pszDest, const char *pszFormat, int *arg)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->vsprintf(pszDest, pszFormat, arg);
}
return 0;
}
static INLINE int32 xOS_General_vsnprintf(char *buf, uint32 f, const char *format, int* list)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->vsnprintf(buf, f, format, list);
}
return 0;
}
static INLINE int32 xOS_General_snprintf(char *buf, uint32 f, const char *format, ...)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->snprintf(buf, f, format);
}
return 0;
}
// Added for 2.0
static INLINE uint32 xOS_General_DateTimeToSeconds(xOSDateTime* pDate)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->DateTimeToSeconds(pDate);
}
return 0;
}
static INLINE uint32 xOS_General_strlcpy(char * dst, const char * src, uint32 nSize)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strlcpy(dst, src, nSize);
}
return 0;
}
static INLINE uint32 xOS_General_strlcat(char * dst, const char * src, uint32 nSize)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->strlcat(dst, src, nSize);
}
return 0;
}
static INLINE uint32 xOS_General_wstrlcpy(wchar * dst, const wchar * src, uint32 nSize)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->wstrlcpy(dst, src, nSize);
}
return 0;
}
static INLINE uint32 xOS_General_wstrlcat(wchar * dst, const wchar * src, uint32 nSize)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->wstrlcat(dst, src, nSize);
}
return 0;
}
static INLINE void *xOS_General_setstaticptr(int nSPId, void *pNew)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->setstaticptr(nSPId, pNew);
}
return 0;
}
// Utility functions for IPV6.
static INLINE int xOS_General_inet_pton(int af, const char *src, void *dst)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->inet_pton(af, src, dst);
}
return 0;
}
static INLINE const char *xOS_General_inet_ntop(int af, const void *src, char *dst, uint32 size)
{
if (GETGENERALS(g_pxOSList))
{
return GETGENERALS(g_pxOSList)->inet_ntop(af, src, dst, size);
}
return 0;
}
#ifdef __cplusplus
}
#endif
#endif //_xOS_Generals_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -