Ignore:
Timestamp:
Aug 25, 2008, 7:32:06 PM (13 years ago)
Author:
charles
Message:

upgrade to shttpd 1.42

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/third-party/shttpd/string.c

    r5822 r6644  
    1212
    1313void
    14 my_strlcpy(register char *dst, register const char *src, size_t n)
     14_shttpd_strlcpy(register char *dst, register const char *src, size_t n)
    1515{
    1616        for (; *src != '\0' && n > 1; n--)
     
    2020
    2121int
    22 my_strncasecmp(const char *str1, const char *str2, size_t len)
     22_shttpd_strncasecmp(const char *str1, const char *str2, size_t len)
    2323{
    2424        register const unsigned char    *s1 = (unsigned char *) str1,
     
    3434
    3535char *
    36 my_strndup(const char *ptr, size_t len)
     36_shttpd_strndup(const char *ptr, size_t len)
    3737{
    3838        char    *p;
    3939
    4040        if ((p = malloc(len + 1)) != NULL)
    41                 my_strlcpy(p, ptr, len + 1);
     41                _shttpd_strlcpy(p, ptr, len + 1);
    4242
    4343        return (p);
     
    4646
    4747char *
    48 my_strdup(const char *str)
     48_shttpd_strdup(const char *str)
    4949{
    50         return (my_strndup(str, strlen(str)));
     50        return (_shttpd_strndup(str, strlen(str)));
    5151}
    5252
     
    5858 */
    5959int
    60 my_snprintf(char *buf, size_t buflen, const char *fmt, ...)
     60_shttpd_snprintf(char *buf, size_t buflen, const char *fmt, ...)
    6161{
    6262        va_list         ap;
     
    8181 */
    8282int
    83 match_extension(const char *path, const char *ext_list)
     83_shttpd_match_extension(const char *path, const char *ext_list)
    8484{
    8585        size_t          len, path_len;
     
    8989        FOR_EACH_WORD_IN_LIST(ext_list, len)
    9090                if (len < path_len && path[path_len - len - 1] == '.' &&
    91                     !my_strncasecmp(path + path_len - len, ext_list, len))
     91                    !_shttpd_strncasecmp(path + path_len - len, ext_list, len))
    9292                        return (TRUE);
    9393
Note: See TracChangeset for help on using the changeset viewer.