diff src/c/urweb.c @ 2046:ced78ef1c82f

New .urp directive: file
author Adam Chlipala <adam@chlipala.net>
date Thu, 31 Jul 2014 09:56:41 -0400
parents 1d36654c2d21
children 4ad46302f659
line wrap: on
line diff
--- a/src/c/urweb.c	Mon Jul 28 20:18:43 2014 -0400
+++ b/src/c/urweb.c	Thu Jul 31 09:56:41 2014 -0400
@@ -3861,6 +3861,11 @@
   longjmp(ctx->jmp_buf, RETURN_INDIRECTLY);
 }
 
+void uw_replace_page(uw_context ctx, const char *data, size_t size) {
+  uw_buffer_reset(&ctx->page);
+  ctx_uw_buffer_append(ctx, "page", &ctx->page, data, size);
+}
+
 __attribute__((noreturn)) void uw_return_blob_from_page(uw_context ctx, uw_Basis_string mimeType) {
   cleanup *cl;
   int len;