summaryrefslogtreecommitdiffstats
path: root/libass/ass.c
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2014-05-17 22:39:33 +0100
committerOleg Oshmyan <chortos@inbox.lv>2014-06-06 15:08:16 +0100
commit722fc526e33df96994bd38f4ae7853d20d2e2544 (patch)
tree10d9900b4417da5b09fc8c9f12d21e9fb842dfc7 /libass/ass.c
parent03c66c1dfd283f955d43b63e20ffa5a2f4dce9a8 (diff)
downloadlibass-722fc526e33df96994bd38f4ae7853d20d2e2544.tar.bz2
libass-722fc526e33df96994bd38f4ae7853d20d2e2544.tar.xz
Move (r)skip_spaces to ass_utils
Diffstat (limited to 'libass/ass.c')
-rw-r--r--libass/ass.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/libass/ass.c b/libass/ass.c
index 3817134..2389740 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -153,22 +153,6 @@ void ass_free_style(ASS_Track *track, int sid)
// ==============================================================================================
-static void skip_spaces(char **str)
-{
- char *p = *str;
- while ((*p == ' ') || (*p == '\t'))
- ++p;
- *str = p;
-}
-
-static void rskip_spaces(char **str, char *limit)
-{
- char *p = *str;
- while ((p >= limit) && ((*p == ' ') || (*p == '\t')))
- --p;
- *str = p;
-}
-
/**
* \brief Set up default style
* \param style style to edit to defaults
@@ -297,12 +281,7 @@ static char *next_token(char **str)
*p = '\0';
*str = p + 1; // ',' found, str will point to the next char (beginning of the next token)
}
- --p; // end of current token
- rskip_spaces(&p, start);
- if (p < start)
- p = start; // empty token
- else
- ++p; // the first space character, or '\0'
+ rskip_spaces(&p, start); // end of current token: the first space character, or '\0'
*p = '\0';
return start;
}