aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c/urweb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r--src/c/urweb.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 7ad58e1d..53344c5e 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -488,6 +488,9 @@ struct uw_context {
char *output_buffer;
size_t output_buffer_size;
+ // For caching.
+ char *recording;
+
int remoteSock;
};
@@ -572,6 +575,8 @@ uw_context uw_init(int id, uw_loggers *lg) {
ctx->output_buffer = malloc(1);
ctx->output_buffer_size = 1;
+ ctx->recording = 0;
+
ctx->remoteSock = -1;
return ctx;
@@ -1686,6 +1691,14 @@ void uw_write(uw_context ctx, const char* s) {
*ctx->page.front = 0;
}
+void uw_recordingStart(uw_context ctx) {
+ ctx->recording = ctx->page.front;
+}
+
+char *uw_recordingRead(uw_context ctx) {
+ return strdup(ctx->recording);
+}
+
char *uw_Basis_attrifyInt(uw_context ctx, uw_Basis_int n) {
char *result;
int len;