Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-11-02 23:17:25 +0400
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-11-03 22:25:26 +0400
commit96949dafcca87f65902bd77a0bc56007d9cead70 (patch)
treee394623e56efc86b70d3e7fbdefc2555457b3aa3 /libavutil/avstring.h
parent475fb67d0b391ad1e8e3e8e3d65d7e6892e17e7a (diff)
Replace all strcasecmp/strncasecmp usages.
All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavutil/avstring.h')
-rw-r--r--libavutil/avstring.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/avstring.h b/libavutil/avstring.h
index 0b2205a9be..3fb3fbaf04 100644
--- a/libavutil/avstring.h
+++ b/libavutil/avstring.h
@@ -165,4 +165,16 @@ char *av_get_token(const char **buf, const char *term);
*/
char *av_strtok(char *s, const char *delim, char **saveptr);
+/**
+ * Locale independent case-insensitive compare.
+ * Note: This means only ASCII-range characters are case-insensitive
+ */
+int av_strcasecmp(const char *a, const char *b);
+
+/**
+ * Locale independent case-insensitive compare.
+ * Note: This means only ASCII-range characters are case-insensitive
+ */
+int av_strncasecmp(const char *a, const char *b, size_t n);
+
#endif /* AVUTIL_AVSTRING_H */