"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "utils.h" between
minidlna-1.2.1.tar.gz and minidlna-1.3.0.tar.gz

About: ReadyMedia (formerly known as MiniDLNA) is a simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients.

utils.h  (minidlna-1.2.1):utils.h  (minidlna-1.3.0)
skipping to change at line 56 skipping to change at line 56
va_start(ap, fmt); va_start(ap, fmt);
size = str->size - str->off; size = str->size - str->off;
ret = vsnprintf(str->data + str->off, size, fmt, ap); ret = vsnprintf(str->data + str->off, size, fmt, ap);
str->off += MIN(ret, size); str->off += MIN(ret, size);
va_end(ap); va_end(ap);
return ret; return ret;
} }
static inline void strncpyt(char *dst, const char *src, size_t len) static inline void strncpyt(char *dst, const char *src, size_t len)
{ {
strncpy(dst, src, len); strncpy(dst, src, --len);
dst[len-1] = '\0'; dst[len] = '\0';
} }
static inline int is_reg(const struct dirent *d) static inline int is_reg(const struct dirent *d)
{ {
#if HAVE_STRUCT_DIRENT_D_TYPE #if HAVE_STRUCT_DIRENT_D_TYPE
return (d->d_type == DT_REG); return (d->d_type == DT_REG);
#else #else
return -1; return -1;
#endif #endif
} }
static inline int is_dir(const struct dirent *d) static inline int is_dir(const struct dirent *d)
skipping to change at line 104 skipping to change at line 104
media_types valid_media_types(const char *path); media_types valid_media_types(const char *path);
int is_album_art(const char * name); int is_album_art(const char * name);
int resolve_unknown_type(const char * path, media_types dir_type); int resolve_unknown_type(const char * path, media_types dir_type);
const char *mime_to_ext(const char * mime); const char *mime_to_ext(const char * mime);
/* Others */ /* Others */
int make_dir(char * path, mode_t mode); int make_dir(char * path, mode_t mode);
unsigned int DJBHash(uint8_t *data, int len); unsigned int DJBHash(uint8_t *data, int len);
/* Timeval manipulations */
void timevaladd(struct timeval *t1, const struct timeval *t2);
void timevalsub(struct timeval *t1, const struct timeval *t2);
#define timevalcmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
((tvp)->tv_sec cmp (uvp)->tv_sec))
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)