src/stdlib/SDL_string.c
changeset 1336 3692456e7b0f
parent 1330 450721ad5436
child 1338 604d73db6802
     1.1 --- a/src/stdlib/SDL_string.c	Mon Feb 06 17:28:04 2006 +0000
     1.2 +++ b/src/stdlib/SDL_string.c	Tue Feb 07 06:59:48 2006 +0000
     1.3 @@ -375,7 +375,7 @@
     1.4  #ifndef HAVE_STRRCHR
     1.5  char *SDL_strrchr(const char *string, int c)
     1.6  {
     1.7 -    const char *bufp = string + strlen(string) - 1;
     1.8 +    const char *bufp = string + SDL_strlen(string) - 1;
     1.9      while ( bufp >= string ) {
    1.10          if ( *bufp == c ) {
    1.11              return (char *)bufp;
    1.12 @@ -388,9 +388,9 @@
    1.13  #ifndef HAVE_STRSTR
    1.14  char *SDL_strstr(const char *haystack, const char *needle)
    1.15  {
    1.16 -    size_t length = strlen(needle);
    1.17 +    size_t length = SDL_strlen(needle);
    1.18      while ( *haystack ) {
    1.19 -        if ( strncmp(haystack, needle, length) == 0 ) {
    1.20 +        if ( SDL_strncmp(haystack, needle, length) == 0 ) {
    1.21              return (char *)haystack;
    1.22          }
    1.23      }
    1.24 @@ -429,9 +429,9 @@
    1.25  
    1.26      /* The numbers went into the string backwards. :) */
    1.27      if ( *string == '-' ) {
    1.28 -        _strrev(string+1);
    1.29 +        SDL_strrev(string+1);
    1.30      } else {
    1.31 -        _strrev(string);
    1.32 +        SDL_strrev(string);
    1.33      }
    1.34  
    1.35      return string;
    1.36 @@ -454,7 +454,7 @@
    1.37      *bufp = '\0';
    1.38  
    1.39      /* The numbers went into the string backwards. :) */
    1.40 -    _strrev(string);
    1.41 +    SDL_strrev(string);
    1.42  
    1.43      return string;
    1.44  }
    1.45 @@ -497,9 +497,9 @@
    1.46  
    1.47      /* The numbers went into the string backwards. :) */
    1.48      if ( *string == '-' ) {
    1.49 -        _strrev(string+1);
    1.50 +        SDL_strrev(string+1);
    1.51      } else {
    1.52 -        _strrev(string);
    1.53 +        SDL_strrev(string);
    1.54      }
    1.55  
    1.56      return string;
    1.57 @@ -522,7 +522,7 @@
    1.58      *bufp = '\0';
    1.59  
    1.60      /* The numbers went into the string backwards. :) */
    1.61 -    _strrev(string);
    1.62 +    SDL_strrev(string);
    1.63  
    1.64      return string;
    1.65  }
    1.66 @@ -878,12 +878,12 @@
    1.67      char num[130];
    1.68      size_t size;
    1.69  
    1.70 -    _ltoa(value, num, radix);
    1.71 +    SDL_ltoa(value, num, radix);
    1.72      size = SDL_strlen(num);
    1.73      if ( size > maxlen ) {
    1.74          size = maxlen;
    1.75      }
    1.76 -    strncpy(text, num, size);
    1.77 +    SDL_strncpy(text, num, size);
    1.78  
    1.79      return size;
    1.80  }
    1.81 @@ -892,12 +892,12 @@
    1.82      char num[130];
    1.83      size_t size;
    1.84  
    1.85 -    _ultoa(value, num, radix);
    1.86 +    SDL_ultoa(value, num, radix);
    1.87      size = SDL_strlen(num);
    1.88      if ( size > maxlen ) {
    1.89          size = maxlen;
    1.90      }
    1.91 -    strncpy(text, num, size);
    1.92 +    SDL_strncpy(text, num, size);
    1.93  
    1.94      return size;
    1.95  }
    1.96 @@ -907,12 +907,12 @@
    1.97      char num[130];
    1.98      size_t size;
    1.99  
   1.100 -    _i64toa(value, num, radix);
   1.101 +    SDL_lltoa(value, num, radix);
   1.102      size = SDL_strlen(num);
   1.103      if ( size > maxlen ) {
   1.104          size = maxlen;
   1.105      }
   1.106 -    strncpy(text, num, size);
   1.107 +    SDL_strncpy(text, num, size);
   1.108  
   1.109      return size;
   1.110  }
   1.111 @@ -921,12 +921,12 @@
   1.112      char num[130];
   1.113      size_t size;
   1.114  
   1.115 -    _ui64toa(value, num, radix);
   1.116 +    SDL_ulltoa(value, num, radix);
   1.117      size = SDL_strlen(num);
   1.118      if ( size > maxlen ) {
   1.119          size = maxlen;
   1.120      }
   1.121 -    strncpy(text, num, size);
   1.122 +    SDL_strncpy(text, num, size);
   1.123  
   1.124      return size;
   1.125  }
   1.126 @@ -1076,7 +1076,7 @@
   1.127                                  break;
   1.128                          }
   1.129                          if ( do_lowercase ) {
   1.130 -                            _strlwr(text);
   1.131 +                            SDL_strlwr(text);
   1.132                          }
   1.133                          done = SDL_TRUE;
   1.134                          break;