From cb3b3831a07d6674a5fa02e3e8a1e4329b58cb34 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 29 Jul 2008 15:25:42 -0400 Subject: Unurlifying a datatype; longjmp-based error signaling mechanism --- include/lacweb.h | 7 +++++++ include/types.h | 3 +++ 2 files changed, 10 insertions(+) (limited to 'include') 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; -- cgit v1.2.3