From 4662d58b01e5493a39697027285bc22deb2f143c Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 15 Feb 2006 00:24:24 +0000 Subject: 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 --- include/asterisk/strings.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') 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 * @@ -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 { -- cgit v1.2.3