include/SDL_stdinc.h
changeset 9306 817656bd36ec
parent 9262 b3df9db209b0
child 9376 0495816fec54
equal deleted inserted replaced
9305:0c66e0df64f6 9306:817656bd36ec
   377 }
   377 }
   378 
   378 
   379 
   379 
   380 extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
   380 extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
   381 
   381 
   382 SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
       
   383 {
       
   384     return SDL_memcpy(dst, src, dwords * 4);
       
   385 }
       
   386 
       
   387 extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
   382 extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
   388 extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
   383 extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
   389 
   384 
   390 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
   385 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
   391 extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
   386 extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
   478                                                size_t inbytesleft);
   473                                                size_t inbytesleft);
   479 #define SDL_iconv_utf8_locale(S)    SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
   474 #define SDL_iconv_utf8_locale(S)    SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
   480 #define SDL_iconv_utf8_ucs2(S)      (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
   475 #define SDL_iconv_utf8_ucs2(S)      (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
   481 #define SDL_iconv_utf8_ucs4(S)      (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
   476 #define SDL_iconv_utf8_ucs4(S)      (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
   482 
   477 
       
   478 /* force builds using Clang's static analysis tools to use literal C runtime
       
   479    here, since there are possibly tests that are ineffective otherwise. */
       
   480 #if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
       
   481 #define SDL_malloc malloc
       
   482 #define SDL_calloc calloc
       
   483 #define SDL_realloc realloc
       
   484 #define SDL_free free
       
   485 #define SDL_memset memset
       
   486 #define SDL_memcpy memcpy
       
   487 #define SDL_memmove memmove
       
   488 #define SDL_memcmp memcmp
       
   489 #define SDL_strlen strlen
       
   490 #define SDL_strlcpy strlcpy
       
   491 #define SDL_strlcat strlcat
       
   492 #define SDL_strdup strdup
       
   493 #define SDL_strchr strchr
       
   494 #define SDL_strrchr strrchr
       
   495 #define SDL_strstr strstr
       
   496 #define SDL_strcmp strcmp
       
   497 #define SDL_strncmp strncmp
       
   498 #define SDL_strcasecmp strcasecmp
       
   499 #define SDL_strncasecmp strncasecmp
       
   500 #define SDL_sscanf sscanf
       
   501 #define SDL_vsscanf vsscanf
       
   502 #define SDL_snprintf snprintf
       
   503 #define SDL_vsnprintf vsnprintf
       
   504 #endif
       
   505 
       
   506 SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
       
   507 {
       
   508     return SDL_memcpy(dst, src, dwords * 4);
       
   509 }
       
   510 
   483 /* Ends C function definitions when using C++ */
   511 /* Ends C function definitions when using C++ */
   484 #ifdef __cplusplus
   512 #ifdef __cplusplus
   485 }
   513 }
   486 #endif
   514 #endif
   487 #include "close_code.h"
   515 #include "close_code.h"