Mercurial > urweb
comparison src/c/urweb.c @ 1389:9a721f0722d3
Some more string parsing functions; naughtyDebug
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 11 Jan 2011 18:04:52 -0500 |
parents | 3913cbfd72e9 |
children | 65fbb250b875 |
comparison
equal
deleted
inserted
replaced
1388:3913cbfd72e9 | 1389:9a721f0722d3 |
---|---|
1174 b->front = new_heap + (b->front - b->start); | 1174 b->front = new_heap + (b->front - b->start); |
1175 b->back = new_heap + next; | 1175 b->back = new_heap + next; |
1176 | 1176 |
1177 if (new_heap != b->start) { | 1177 if (new_heap != b->start) { |
1178 b->start = new_heap; | 1178 b->start = new_heap; |
1179 uw_error(ctx, UNLIMITED_RETRY, "Couldn't allocate new %s contiguously", desc); | 1179 uw_error(ctx, UNLIMITED_RETRY, "Couldn't allocate new %s contiguously; increasing size to %llu", desc, (unsigned long long)next); |
1180 } | 1180 } |
1181 | 1181 |
1182 b->start = new_heap; | 1182 b->start = new_heap; |
1183 } | 1183 } |
1184 } | 1184 } |
3600 uw_error(ctx, FATAL, "Maximum running time exceeded"); | 3600 uw_error(ctx, FATAL, "Maximum running time exceeded"); |
3601 } | 3601 } |
3602 | 3602 |
3603 size_t uw_database_max = SIZE_MAX; | 3603 size_t uw_database_max = SIZE_MAX; |
3604 | 3604 |
3605 uw_Basis_int uw_Basis_naughtyDebug(uw_context ctx, uw_Basis_string s) { | |
3606 fprintf(stderr, "%s\n", s); | |
3607 return 0; | |
3608 } | |
3609 | |
3605 uw_Basis_unit uw_Basis_debug(uw_context ctx, uw_Basis_string s) { | 3610 uw_Basis_unit uw_Basis_debug(uw_context ctx, uw_Basis_string s) { |
3606 if (ctx->log_debug) | 3611 if (ctx->log_debug) |
3607 ctx->log_debug(ctx->logger_data, "%s\n", s); | 3612 ctx->log_debug(ctx->logger_data, "%s\n", s); |
3608 else | 3613 else |
3609 fprintf(stderr, "%s\n", s); | 3614 fprintf(stderr, "%s\n", s); |