Mercurial > urweb
comparison src/c/urweb.c @ 1115:150465f2895c
Database quotas
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 03 Jan 2010 17:13:45 -0500 |
parents | 01b6c7144a44 |
children | 31ef567fa772 |
comparison
equal
deleted
inserted
replaced
1114:01b6c7144a44 | 1115:150465f2895c |
---|---|
468 | 468 |
469 ctx->script_header = ""; | 469 ctx->script_header = ""; |
470 ctx->needs_push = 0; | 470 ctx->needs_push = 0; |
471 ctx->needs_sig = 0; | 471 ctx->needs_sig = 0; |
472 | 472 |
473 ctx->error_message[0] = 0; | |
474 | |
475 ctx->source_count = 0; | 473 ctx->source_count = 0; |
476 | 474 |
477 ctx->n_deltas = ctx->used_deltas = 0; | 475 ctx->n_deltas = ctx->used_deltas = 0; |
478 ctx->deltas = malloc(0); | 476 ctx->deltas = malloc(0); |
479 | 477 |
698 ctx->cleanup_front->func(ctx->cleanup_front->arg); | 696 ctx->cleanup_front->func(ctx->cleanup_front->arg); |
699 } | 697 } |
700 | 698 |
701 char *uw_error_message(uw_context ctx) { | 699 char *uw_error_message(uw_context ctx) { |
702 return ctx->error_message; | 700 return ctx->error_message; |
701 } | |
702 | |
703 void uw_set_error_message(uw_context ctx, const char *msg) { | |
704 strncpy(ctx->error_message, msg, sizeof(ctx->error_message)); | |
705 ctx->error_message[sizeof(ctx->error_message)-1] = 0; | |
703 } | 706 } |
704 | 707 |
705 static input *INP(uw_context ctx) { | 708 static input *INP(uw_context ctx) { |
706 if (ctx->cur_container == NULL) | 709 if (ctx->cur_container == NULL) |
707 return ctx->inputs; | 710 return ctx->inputs; |
3357 | 3360 |
3358 void uw_check_deadline(uw_context ctx) { | 3361 void uw_check_deadline(uw_context ctx) { |
3359 if (uw_time > ctx->deadline) | 3362 if (uw_time > ctx->deadline) |
3360 uw_error(ctx, FATAL, "Maximum running time exceeded"); | 3363 uw_error(ctx, FATAL, "Maximum running time exceeded"); |
3361 } | 3364 } |
3365 | |
3366 size_t uw_database_max = SIZE_MAX; |