/**
* Locale-independent conversion of ASCII isdigit.
*/
-int av_isdigit(int c);
+static inline av_const int av_isdigit(int c)
+{
+ return c >= '0' && c <= '9';
+}
/**
* Locale-independent conversion of ASCII isgraph.
*/
-int av_isgraph(int c);
+static inline av_const int av_isgraph(int c)
+{
+ return c > 32 && c < 127;
+}
/**
* Locale-independent conversion of ASCII isspace.
*/
-int av_isspace(int c);
+static inline av_const int av_isspace(int c)
+{
+ return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' ||
+ c == '\v';
+}
/**
* Locale-independent conversion of ASCII characters to uppercase.
*/
-static inline int av_toupper(int c)
+static inline av_const int av_toupper(int c)
{
if (c >= 'a' && c <= 'z')
c ^= 0x20;
/**
* Locale-independent conversion of ASCII characters to lowercase.
*/
-static inline int av_tolower(int c)
+static inline av_const int av_tolower(int c)
{
if (c >= 'A' && c <= 'Z')
c ^= 0x20;
/**
* Locale-independent conversion of ASCII isxdigit.
*/
-int av_isxdigit(int c);
+static inline av_const int av_isxdigit(int c)
+{
+ c = av_tolower(c);
+ return av_isdigit(c) || (c >= 'a' && c <= 'f');
+}
/*
* Locale-independent case-insensitive compare.
*/
const char *av_dirname(char *path);
+
+/**
+ * Match instances of a name in a comma-separated list of names.
+ * @param name Name to look for.
+ * @param names List of names.
+ * @return 1 on match, 0 otherwise.
+ */
+int av_match_name(const char *name, const char *names);
+
/**
* @}
*/