comparison src/stdlib/SDL_string.c @ 1901:f1828a500391

Removed libc dependency on Windows again, to fix building with Visual C++ 2005 Express Edition. Fixed performance problem with testsprite2 on the D3D driver.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 13 Jul 2006 08:13:02 +0000
parents c121d94672cb
children f132024010be
comparison
equal deleted inserted replaced
1900:5c6bdbf3aadf 1901:f1828a500391
325 #endif 325 #endif
326 326
327 #ifndef HAVE_STRLEN 327 #ifndef HAVE_STRLEN
328 size_t 328 size_t
329 SDL_strlen(const char *string) 329 SDL_strlen(const char *string)
330 {
331 size_t len = 0;
332 while (*string++) {
333 ++len;
334 }
335 return len;
336 }
337 #endif
338
339 #ifndef HAVE_WCSLEN
340 size_t
341 SDL_wcslen(const wchar_t *string)
330 { 342 {
331 size_t len = 0; 343 size_t len = 0;
332 while (*string++) { 344 while (*string++) {
333 ++len; 345 ++len;
334 } 346 }