summaryrefslogtreecommitdiffstats
path: root/libass/ass_utils.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-03-07 01:04:41 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-03-07 01:04:41 +0200
commite0172b96e3b6cc6a8b62ee5a52f780941a43de8b (patch)
treef652f6d15740667d5434e526db3fd12a0573aa0f /libass/ass_utils.c
parent0c6f667896620943ee6ae899d6e36c3da5c98c54 (diff)
parent7e253f01715811e0c4f5f5b54317b098f2cd59d9 (diff)
downloadmpv-e0172b96e3b6cc6a8b62ee5a52f780941a43de8b.tar.bz2
mpv-e0172b96e3b6cc6a8b62ee5a52f780941a43de8b.tar.xz
Merge svn changes up to r28862
Diffstat (limited to 'libass/ass_utils.c')
-rw-r--r--libass/ass_utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libass/ass_utils.c b/libass/ass_utils.c
index 25e4d4fe7b..7f728f1bb1 100644
--- a/libass/ass_utils.c
+++ b/libass/ass_utils.c
@@ -96,6 +96,17 @@ int strtocolor(char** q, uint32_t* res)
return result;
}
+// Return a boolean value for a string
+char parse_bool(char* str) {
+ while (*str == ' ' || *str == '\t')
+ str++;
+ if (!strncasecmp(str, "yes", 3))
+ return 1;
+ else if (strtol(str, NULL, 10) > 0)
+ return 1;
+ return 0;
+}
+
#if 0
static void sprint_tag(uint32_t tag, char* dst)
{