Mercurial > libavutil.hg
diff avstring.h @ 1027:7d79d41d152e libavutil
Move av_get_token() from libavfilter to libavutil.
author | stefano |
---|---|
date | Mon, 27 Sep 2010 16:23:43 +0000 |
parents | c66e06fb1b36 |
children |
line wrap: on
line diff
--- a/avstring.h Mon Sep 27 10:34:03 2010 +0000 +++ b/avstring.h Mon Sep 27 16:23:43 2010 +0000 @@ -114,4 +114,20 @@ */ char *av_d2str(double d); +/** + * Unescape the given string until a non escaped terminating char, + * and return the token corresponding to the unescaped string. + * + * The normal \ and ' escaping is supported. Leading and trailing + * whitespaces are removed, unless they are escaped with '\' or are + * enclosed between ''. + * + * @param buf the buffer to parse, buf will be updated to point to the + * terminating char + * @param term a 0-terminated list of terminating chars + * @return the malloced unescaped string, which must be av_freed by + * the user, NULL in case of allocation failure + */ +char *av_get_token(const char **buf, const char *term); + #endif /* AVUTIL_AVSTRING_H */