summaryrefslogtreecommitdiff
path: root/src/c/urweb.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-01-03 17:13:45 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-01-03 17:13:45 -0500
commit67085821cfd1d5524b386dee083f877b74e93f2e (patch)
treec64216bacfaaad2793c146651100f3c289e5daf9 /src/c/urweb.c
parent60dfbfbc250c197357d84771bdc5aaaa812c573e (diff)
Database quotas
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r--src/c/urweb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 27831011..79207abc 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -470,8 +470,6 @@ uw_context uw_init() {
ctx->needs_push = 0;
ctx->needs_sig = 0;
- ctx->error_message[0] = 0;
-
ctx->source_count = 0;
ctx->n_deltas = ctx->used_deltas = 0;
@@ -702,6 +700,11 @@ char *uw_error_message(uw_context ctx) {
return ctx->error_message;
}
+void uw_set_error_message(uw_context ctx, const char *msg) {
+ strncpy(ctx->error_message, msg, sizeof(ctx->error_message));
+ ctx->error_message[sizeof(ctx->error_message)-1] = 0;
+}
+
static input *INP(uw_context ctx) {
if (ctx->cur_container == NULL)
return ctx->inputs;
@@ -3359,3 +3362,5 @@ void uw_check_deadline(uw_context ctx) {
if (uw_time > ctx->deadline)
uw_error(ctx, FATAL, "Maximum running time exceeded");
}
+
+size_t uw_database_max = SIZE_MAX;