summaryrefslogtreecommitdiffstats
path: root/libass/ass.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2012-03-11 06:04:59 +0100
committerGrigori Goronzy <greg@blackbox>2012-03-11 06:04:59 +0100
commit2ba300123f7e6e5b9bbc69976ca4017993af694b (patch)
treea5b8b83ee77a63c71595ddf0abec6f1811954f7f /libass/ass.c
parent94b4c0d87182cd0bc84cf49cb793a0ab184df502 (diff)
downloadlibass-2ba300123f7e6e5b9bbc69976ca4017993af694b.tar.bz2
libass-2ba300123f7e6e5b9bbc69976ca4017993af694b.tar.xz
Support \rSTYLENAME syntax
This allows to reset to a certain style, instead of the default style for the current line. For some reason, this was completely missing.
Diffstat (limited to 'libass/ass.c')
-rw-r--r--libass/ass.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/libass/ass.c b/libass/ass.c
index 712c16c..bc05d69 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -191,30 +191,6 @@ static void set_default_style(ASS_Style *style)
style->MarginL = style->MarginR = style->MarginV = 20;
}
-/**
- * \brief find style by name
- * \param track track
- * \param name style name
- * \return index in track->styles
- * Returnes 0 if no styles found => expects at least 1 style.
- * Parsing code always adds "Default" style in the end.
- */
-static int lookup_style(ASS_Track *track, char *name)
-{
- int i;
- if (*name == '*')
- ++name; // FIXME: what does '*' really mean ?
- for (i = track->n_styles - 1; i >= 0; --i) {
- if (strcmp(track->styles[i].Name, name) == 0)
- return i;
- }
- i = track->default_style;
- ass_msg(track->library, MSGL_WARN,
- "[%p]: Warning: no style named '%s' found, using '%s'",
- track, name, track->styles[i].Name);
- return i; // use the first style
-}
-
static uint32_t string2color(ASS_Library *library, char *p)
{
uint32_t tmp;