Mercurial > mplayer.hg
diff m_option.h @ 32428:92b92a78ca2a
Make the parse_timestring public, with a slightly extended API.
As a consequence, "2 hours" is no longer recognized as a valid timestamp
meaning "2 seconds".
author | cigaes |
---|---|
date | Mon, 18 Oct 2010 20:56:52 +0000 |
parents | e8b0797970b6 |
children | 08a90b0e44e1 |
line wrap: on
line diff
--- a/m_option.h Mon Oct 18 20:44:04 2010 +0000 +++ b/m_option.h Mon Oct 18 20:56:52 2010 +0000 @@ -528,4 +528,15 @@ /*@}*/ +/** + * Parse a string as a timestamp. + * + * @param[in] str the string to parse. + * @param[out] time parsed time. + * @param[in] endchar return an error of the next character after the + * timestamp is neither nul nor endchar. + * @return Number of chars in the timestamp. + */ +int parse_timestring(const char *str, double *time, char endchar); + #endif /* MPLAYER_M_OPTION_H */