⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdl_stdinc.h

📁 ffmpeg build for armv4i / windowsCE
💻 H
📖 第 1 页 / 共 2 页
字号:
extern DECLSPEC void * SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);#endif#endif/* We can count on memcpy existing on Mac OS X and being well-tuned. */#if defined(__MACH__) && defined(__APPLE__)#define SDL_memcpy4(dst, src, len) memcpy(dst, src, (len)*4)#elif defined(__GNUC__) && defined(i386)#define SDL_memcpy4(dst, src, len)				\do {								\	int ecx, edi, esi;					\	__asm__ __volatile__ (					\		"cld\n\t"					\		"rep ; movsl"					\		: "=&c" (ecx), "=&D" (edi), "=&S" (esi)		\		: "0" ((unsigned)(len)), "1" (dst), "2" (src)	\		: "memory" );					\} while(0)#endif#ifndef SDL_memcpy4#define SDL_memcpy4(dst, src, len)	SDL_memcpy(dst, src, (len) << 2)#endif#if defined(__GNUC__) && defined(i386)#define SDL_revcpy(dst, src, len)			\do {							\	int u0, u1, u2;					\	char *dstp = (char *)(dst);			\	char *srcp = (char *)(src);			\	int n = (len);					\	if ( n >= 4 ) {					\	__asm__ __volatile__ (				\		"std\n\t"				\		"rep ; movsl\n\t"			\		: "=&c" (u0), "=&D" (u1), "=&S" (u2)	\		: "0" (n >> 2),				\		  "1" (dstp+(n-4)), "2" (srcp+(n-4))	\		: "memory" );				\	}						\	switch (n & 3) {				\		case 3: dstp[2] = srcp[2];		\		case 2: dstp[1] = srcp[1];		\		case 1: dstp[0] = srcp[0];		\			break;				\		default:				\			break;				\	}						\} while(0)#endif#ifndef SDL_revcpyextern DECLSPEC void * SDLCALL SDL_revcpy(void *dst, const void *src, size_t len);#endif#ifdef HAVE_MEMMOVE#define SDL_memmove     memmove#elif defined(HAVE_BCOPY)#define SDL_memmove(d, s, n)	bcopy((s), (d), (n))#else#define SDL_memmove(dst, src, len)			\do {							\	if ( dst < src ) {				\		SDL_memcpy(dst, src, len);		\	} else {					\		SDL_revcpy(dst, src, len);		\	}						\} while(0)#endif#ifdef HAVE_MEMCMP#define SDL_memcmp      memcmp#elseextern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);#endif#ifdef HAVE_STRLEN#define SDL_strlen      strlen#elseextern DECLSPEC size_t SDLCALL SDL_strlen(const char *string);#endif#ifdef HAVE_STRLCPY#define SDL_strlcpy     strlcpy#elseextern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);#endif#ifdef HAVE_STRLCAT#define SDL_strlcat    strlcat#elseextern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);#endif#ifdef HAVE_STRDUP#define SDL_strdup     strdup#elseextern DECLSPEC char * SDLCALL SDL_strdup(const char *string);#endif#ifdef HAVE__STRREV#define SDL_strrev      _strrev#elseextern DECLSPEC char * SDLCALL SDL_strrev(char *string);#endif#ifdef HAVE__STRUPR#define SDL_strupr      _strupr#elseextern DECLSPEC char * SDLCALL SDL_strupr(char *string);#endif#ifdef HAVE__STRLWR#define SDL_strlwr      _strlwr#elseextern DECLSPEC char * SDLCALL SDL_strlwr(char *string);#endif#ifdef HAVE_STRCHR#define SDL_strchr      strchr#elif defined(HAVE_INDEX)#define SDL_strchr      index#elseextern DECLSPEC char * SDLCALL SDL_strchr(const char *string, int c);#endif#ifdef HAVE_STRRCHR#define SDL_strrchr     strrchr#elif defined(HAVE_RINDEX)#define SDL_strrchr     rindex#elseextern DECLSPEC char * SDLCALL SDL_strrchr(const char *string, int c);#endif#ifdef HAVE_STRSTR#define SDL_strstr      strstr#elseextern DECLSPEC char * SDLCALL SDL_strstr(const char *haystack, const char *needle);#endif#ifdef HAVE_ITOA#define SDL_itoa        itoa#else#define SDL_itoa(value, string, radix)	SDL_ltoa((long)value, string, radix)#endif#ifdef HAVE__LTOA#define SDL_ltoa        _ltoa#elseextern DECLSPEC char * SDLCALL SDL_ltoa(long value, char *string, int radix);#endif#ifdef HAVE__UITOA#define SDL_uitoa       _uitoa#else#define SDL_uitoa(value, string, radix)	SDL_ultoa((long)value, string, radix)#endif#ifdef HAVE__ULTOA#define SDL_ultoa       _ultoa#elseextern DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *string, int radix);#endif#ifdef HAVE_STRTOL#define SDL_strtol      strtol#elseextern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, int base);#endif#ifdef HAVE_STRTOUL#define SDL_strtoul      strtoul#elseextern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string, char **endp, int base);#endif#ifdef SDL_HAS_64BIT_TYPE#ifdef HAVE__I64TOA#define SDL_lltoa       _i64toa#elseextern DECLSPEC char* SDLCALL SDL_lltoa(Sint64 value, char *string, int radix);#endif#ifdef HAVE__UI64TOA#define SDL_ulltoa      _ui64toa#elseextern DECLSPEC char* SDLCALL SDL_ulltoa(Uint64 value, char *string, int radix);#endif#ifdef HAVE_STRTOLL#define SDL_strtoll     strtoll#elseextern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int base);#endif#ifdef HAVE_STRTOULL#define SDL_strtoull     strtoull#elseextern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp, int base);#endif#endif /* SDL_HAS_64BIT_TYPE */#ifdef HAVE_STRTOD#define SDL_strtod      strtod#elseextern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp);#endif#ifdef HAVE_ATOI#define SDL_atoi        atoi#else#define SDL_atoi(X)     SDL_strtol(X, NULL, 0)#endif#ifdef HAVE_ATOF#define SDL_atof        atof#else#define SDL_atof(X)     SDL_strtod(X, NULL)#endif#ifdef HAVE_STRCMP#define SDL_strcmp      strcmp#elseextern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);#endif#ifdef HAVE_STRNCMP#define SDL_strncmp     strncmp#elseextern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);#endif#ifdef HAVE_STRCASECMP#define SDL_strcasecmp  strcasecmp#elif defined(HAVE__STRICMP)#define SDL_strcasecmp  _stricmp#elseextern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);#endif#ifdef HAVE_STRNCASECMP#define SDL_strncasecmp strncasecmp#elif defined(HAVE__STRNICMP)#define SDL_strncasecmp _strnicmp#elseextern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen);#endif#ifdef HAVE_SSCANF#define SDL_sscanf      sscanf#elseextern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);#endif#ifdef HAVE_SNPRINTF#define SDL_snprintf    snprintf#elseextern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);#endif#ifdef HAVE_VSNPRINTF#define SDL_vsnprintf   vsnprintf#elseextern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);#endif/* The SDL implementation of iconv() returns these error codes */#define SDL_ICONV_ERROR		(size_t)-1#define SDL_ICONV_E2BIG		(size_t)-2#define SDL_ICONV_EILSEQ	(size_t)-3#define SDL_ICONV_EINVAL	(size_t)-4#ifdef HAVE_ICONV#define SDL_iconv_t     iconv_t#define SDL_iconv_open  iconv_open#define SDL_iconv_close iconv_close#elsetypedef struct _SDL_iconv_t *SDL_iconv_t;extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode);extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);#endifextern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);/* This function converts a string between encodings in one pass, returning a   string that must be freed with SDL_free() or NULL on error.*/extern DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft);#define SDL_iconv_utf8_locale(S)	SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)#define SDL_iconv_utf8_ucs2(S)		(Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)#define SDL_iconv_utf8_ucs4(S)		(Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1)/* Ends C function definitions when using C++ */#ifdef __cplusplus}#endif#include "close_code.h"#endif /* _SDL_stdinc_h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -