From b4ab3d89805f4dfd5df9a9711fb41f09000a55e6 Mon Sep 17 00:00:00 2001 From: Oleg Oshmyan Date: Fri, 23 Oct 2015 02:20:19 +0300 Subject: fontselect: don't trim font names This matches the behavior of GDI and hence VSFilter. Note that \fn arguments are trimmed during parsing. However, none of the names inside fonts should be trimmed, and @-prefixed fonts should keep whitespace following the @, both of which this commit addresses. Remove strdup_trimmed because it is no longer used. Also remove the declaration of a function that was deleted a few months ago. --- libass/ass_utils.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'libass/ass_utils.c') diff --git a/libass/ass_utils.c b/libass/ass_utils.c index ab1ea02..bcaeec1 100644 --- a/libass/ass_utils.c +++ b/libass/ass_utils.c @@ -334,28 +334,6 @@ void ass_msg(ASS_Library *priv, int lvl, const char *fmt, ...) va_end(va); } -/** - * Return a string with spaces trimmed at start and end. - * \param str input string - * \return output string, can be released with free() - */ -char *strdup_trimmed(const char *str) -{ - int left = 0; - int right = strlen(str) - 1; - char *out = NULL; - - while (ass_isspace(str[left])) left++; - while (right > left && ass_isspace(str[right])) right--; - - out = calloc(1, right-left+2); - - if (out) - memcpy(out, str + left, right-left+1); - - return out; -} - unsigned ass_utf8_get_char(char **str) { uint8_t *strp = (uint8_t *) * str; -- cgit v1.2.3