comparison src/stdlib/SDL_string.c @ 1358:c71e05b4dc2e

More header massaging... works great on Windows. ;-)
author Sam Lantinga <slouken@libsdl.org>
date Fri, 10 Feb 2006 06:48:43 +0000
parents 22f39393668a
children c0a74f199ecf
comparison
equal deleted inserted replaced
1357:e18467d67cfd 1358:c71e05b4dc2e
351 #ifndef HAVE__STRUPR 351 #ifndef HAVE__STRUPR
352 char *SDL_strupr(char *string) 352 char *SDL_strupr(char *string)
353 { 353 {
354 char *bufp = string; 354 char *bufp = string;
355 while ( *bufp ) { 355 while ( *bufp ) {
356 *bufp = toupper(*bufp); 356 *bufp = SDL_toupper(*bufp);
357 ++bufp; 357 ++bufp;
358 } 358 }
359 return string; 359 return string;
360 } 360 }
361 #endif 361 #endif
363 #ifndef HAVE__STRLWR 363 #ifndef HAVE__STRLWR
364 char *SDL_strlwr(char *string) 364 char *SDL_strlwr(char *string)
365 { 365 {
366 char *bufp = string; 366 char *bufp = string;
367 while ( *bufp ) { 367 while ( *bufp ) {
368 *bufp = tolower(*bufp); 368 *bufp = SDL_tolower(*bufp);
369 ++bufp; 369 ++bufp;
370 } 370 }
371 return string; 371 return string;
372 } 372 }
373 #endif 373 #endif
607 int SDL_strcasecmp(const char *str1, const char *str2) 607 int SDL_strcasecmp(const char *str1, const char *str2)
608 { 608 {
609 char a = 0; 609 char a = 0;
610 char b = 0; 610 char b = 0;
611 while (*str1 && *str2) { 611 while (*str1 && *str2) {
612 a = tolower(*str1); 612 a = SDL_tolower(*str1);
613 b = tolower(*str2); 613 b = SDL_tolower(*str2);
614 if ( a != b ) 614 if ( a != b )
615 break; 615 break;
616 ++str1; 616 ++str1;
617 ++str2; 617 ++str2;
618 } 618 }
711 int index = 0; 711 int index = 0;
712 if ( text[index] == '-' ) { 712 if ( text[index] == '-' ) {
713 ++index; 713 ++index;
714 } 714 }
715 if ( text[index] == '0' ) { 715 if ( text[index] == '0' ) {
716 if ( tolower(text[index+1]) == 'x' ) { 716 if ( SDL_tolower(text[index+1]) == 'x' ) {
717 radix = 16; 717 radix = 16;
718 } else { 718 } else {
719 radix = 8; 719 radix = 8;
720 } 720 }
721 } 721 }