I report some trivial bugs and send patches.===================================================================
— SDL_audiocvt.c (revision 2915)
+++ SDL_audiocvt.c (working copy)
@@ -140,14 +140,14 @@
const Sint64 added =
(((Sint64) (Sint32) SDL_SwapBE32(src[0])) +
((Sint64) (Sint32) SDL_SwapBE32(src[1])));
-
*(dst++) = SDL_SwapBE32((Uint32) ((Sint32) (added
1)));
-
*(dst++) = SDL_SwapBE32((Uint32) ((Sint32) (added /
2)));
}
} else {
for (i = cvt->len_cvt / 8; i; --i, src += 2) {
const Sint64 added =
(((Sint64) (Sint32) SDL_SwapLE32(src[0])) +
((Sint64) (Sint32) SDL_SwapLE32(src[1])));
-
*(dst++) = SDL_SwapLE32((Uint32) ((Sint32) (added
1)));
-
*(dst++) = SDL_SwapLE32((Uint32) ((Sint32) (added /
2)));
}
}
}
My environment is win2000 and VC8 Express Edition.
I don’t know why,
but the compiler reports a link error,
“unresolved external symbol __allshr referenced in function ???”.
===================================================================
— SDL_audio.c (revision 2915)
+++ SDL_audio.c (working copy)
@@ -342,11 +342,10 @@
return (0);
}
static SDL_AudioFormat
SDL_ParseAudioFormat(const char *string)
{
-#define CHECK_FMT_STRING(x) if (strcmp(string, #x) == 0) return AUDIO_##x
+#define CHECK_FMT_STRING(x) if (SDL_strcmp(string, #x) == 0) return
AUDIO_##x
CHECK_FMT_STRING(U8);
CHECK_FMT_STRING(S8);
CHECK_FMT_STRING(U16LSB);
This is also storange to me,
but it fails in the link of strcmp.
===================================================================
— SDL_video.c (revision 2916)
+++ SDL_video.c (working copy)
@@ -1785,7 +1785,7 @@
if (!renderer->SetTextureColorMod) {
return -1;
}
- if (r < 255 | g < 255 | b < 255) {
- if (r < 255 || g < 255 || b < 255) {
texture->modMode |= SDL_TEXTUREMODULATE_COLOR;
} else {
texture->modMode &= ~SDL_TEXTUREMODULATE_COLOR;
===================================================================
— SDL_stdinc.h (revision 2915)
+++ SDL_stdinc.h (working copy)
@@ -223,10 +223,10 @@
endif
#endif
#ifdef HAVE_ALLOCA
-#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)count)
+#define SDL_stack_alloc(type, count) (type)alloca(sizeof(type)(count))
#define SDL_stack_free(data)
#else
-#define SDL_stack_alloc(type, count)
(type)SDL_malloc(sizeof(type)count)
+#define SDL_stack_alloc(type, count)
(type)SDL_malloc(sizeof(type)*(count))
#define SDL_stack_free(data) SDL_free(data)
#endif