diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2006-02-15 00:24:24 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2006-02-15 00:24:24 +0000 |
commit | 4662d58b01e5493a39697027285bc22deb2f143c (patch) | |
tree | 6572dc8ac1336a5e0c0859186138a5313e88bd85 /include/asterisk/strings.h | |
parent | 124b00c4a4b971d8f4e34c3bbd73c992ad84d20c (diff) |
add API function for parsing strings to time_t (issue #6320, with mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/strings.h')
-rw-r--r-- | include/asterisk/strings.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h index 5399c32da..a48520ad6 100644 --- a/include/asterisk/strings.h +++ b/include/asterisk/strings.h @@ -1,7 +1,7 @@ /* * Asterisk -- An open source telephony toolkit. * - * Copyright (C) 1999 - 2005, Digium, Inc. + * Copyright (C) 1999 - 2006, Digium, Inc. * * Mark Spencer <markster@digium.com> * @@ -223,6 +223,15 @@ int ast_false(const char *val); */ void ast_join(char *s, size_t len, char * const w[]); +/* + \brief Parse a time (integer) string. + \param src String to parse + \param dst Destination + \param _default Value to use if the string does not contain a valid time + \return zero on success, non-zero on failure +*/ +int ast_get_time_t(const char *src, time_t *dst, time_t _default); + /* The realloca lets us ast_restrdupa(), but you can't mix any other ast_strdup calls! */ struct ast_realloca { |