Mercurial > urweb
diff include/urweb.h @ 1369:1a78ca089bd0
Expose buffer type for other C libraries; replace minusSeconds with addSeconds
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 26 Dec 2010 15:52:56 -0500 |
parents | b02cb9da5686 |
children | 44a12a321150 |
line wrap: on
line diff
--- a/include/urweb.h Sun Dec 26 11:13:37 2010 -0500 +++ b/include/urweb.h Sun Dec 26 15:52:56 2010 -0500 @@ -236,7 +236,7 @@ __attribute__((noreturn)) void uw_redirect(uw_context, uw_Basis_string url); uw_Basis_time uw_Basis_now(uw_context); -uw_Basis_time uw_Basis_minusSeconds(uw_context, uw_Basis_time, uw_Basis_int); +uw_Basis_time uw_Basis_addSeconds(uw_context, uw_Basis_time, uw_Basis_int); extern const uw_Basis_time uw_Basis_minTime; void uw_register_transactional(uw_context, void *data, uw_callback commit, uw_callback rollback, uw_callback_with_retry free); @@ -309,4 +309,12 @@ uw_Basis_bool uw_Basis_lt_time(uw_context, uw_Basis_time, uw_Basis_time); uw_Basis_bool uw_Basis_le_time(uw_context, uw_Basis_time, uw_Basis_time); +void uw_buffer_init(size_t max, uw_buffer *, size_t initial); +void uw_buffer_free(uw_buffer *); +void uw_buffer_reset(uw_buffer *); +int uw_buffer_check(uw_buffer *, size_t extra); +size_t uw_buffer_used(uw_buffer *); +size_t uw_buffer_avail(uw_buffer *); +int uw_buffer_append(uw_buffer *, const char *, size_t); + #endif