diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-07-29 15:25:42 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-07-29 15:25:42 -0400 |
commit | cb3b3831a07d6674a5fa02e3e8a1e4329b58cb34 (patch) | |
tree | 7b6064344549091735d28d42ac9fb19073e9760a /include | |
parent | 6855e4766fa8d07e2f3e3cd468de6c58fed0c903 (diff) |
Unurlifying a datatype; longjmp-based error signaling mechanism
Diffstat (limited to 'include')
-rw-r--r-- | include/lacweb.h | 7 | ||||
-rw-r--r-- | include/types.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/lacweb.h b/include/lacweb.h index 09f002fd..13db1f7b 100644 --- a/include/lacweb.h +++ b/include/lacweb.h @@ -9,6 +9,13 @@ extern lw_unit lw_unit_v; lw_context lw_init(size_t page_len, size_t heap_len); void lw_free(lw_context); void lw_reset(lw_context); +void lw_reset_keep_request(lw_context); +void lw_reset_keep_error_message(lw_context); +failure_kind lw_begin(lw_context, char *path); + +void lw_error(lw_context, failure_kind, const char *fmt, ...); +char *lw_error_message(lw_context); + void *lw_malloc(lw_context, size_t); int lw_send(lw_context, int sock); diff --git a/include/types.h b/include/types.h index 81cec229..169952cb 100644 --- a/include/types.h +++ b/include/types.h @@ -12,3 +12,6 @@ typedef struct lw_context *lw_context; typedef lw_Basis_string lw_Basis_xhtml; typedef lw_Basis_string lw_Basis_page; + + +typedef enum { SUCCESS, FATAL, BOUNDED_RETRY, UNLIMITED_RETRY } failure_kind; |