FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_matches(const FLAC__StreamMetadata_VorbisComment_Entry *entry, const char *field_name, unsigned field_name_length) { const FLAC__byte *eq = (FLAC__byte*)memchr(entry->entry, '=', entry->length); #if defined _MSC_VER || defined __MINGW32__ #define FLAC__STRNCASECMP strnicmp #else #define FLAC__STRNCASECMP strncasecmp #endif return (0 != eq && (unsigned)(eq-entry->entry) == field_name_length && 0 == FLAC__STRNCASECMP(field_name, (const char *)entry->entry, field_name_length)); #undef FLAC__STRNCASECMP }
static int local__vcentry_matches(const char *field_name, const FLAC__StreamMetadata_VorbisComment_Entry *entry) { #if defined _MSC_VER || defined __MINGW32__ #define FLAC__STRNCASECMP strnicmp #else #define FLAC__STRNCASECMP strncasecmp #endif const FLAC__byte *eq = memchr(entry->entry, '=', entry->length); const unsigned field_name_length = strlen(field_name); return (0 != eq && (unsigned)(eq-entry->entry) == field_name_length && 0 == FLAC__STRNCASECMP(field_name, entry->entry, field_name_length)); }