add switch_file_printf to the api

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5239 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-06-01 15:17:30 +00:00
parent 1d36473f28
commit 15dfbbe9f7
2 changed files with 10 additions and 0 deletions

View File

@ -732,6 +732,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_read(switch_file_t * thefile, void *
* be returned. APR_EINTR is never returned.
*/
SWITCH_DECLARE(switch_status_t) switch_file_write(switch_file_t * thefile, const void *buf, switch_size_t *nbytes);
SWITCH_DECLARE(int) switch_file_printf(switch_file_t *thefile, const char *format, ...);
SWITCH_DECLARE(switch_status_t) switch_file_mktemp(switch_file_t **thefile, char *templ, int32_t flags, switch_memory_pool_t *pool);

View File

@ -335,6 +335,15 @@ SWITCH_DECLARE(switch_status_t) switch_file_write(switch_file_t * thefile, const
return apr_file_write(thefile, buf, nbytes);
}
SWITCH_DECLARE(int) switch_file_printf(switch_file_t *thefile, const char *format, ...)
{
va_list ap;
int ret;
ret = apr_file_printf(thefile, format, ap);
va_end(ap);
return ret;
}
SWITCH_DECLARE(switch_status_t) switch_file_mktemp(switch_file_t **thefile, char *templ, int32_t flags, switch_memory_pool_t *pool)
{
return apr_file_mktemp(thefile, templ, flags, pool);