httpd tests:wip
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/libkc3/buf_parse.c b/libkc3/buf_parse.c
index 923e5ce..9bcd003 100644
--- a/libkc3/buf_parse.c
+++ b/libkc3/buf_parse.c
@@ -433,6 +433,7 @@ sw buf_parse_block (s_buf *buf, s_block *block)
result += r;
if ((r = buf_parse_block_inner(buf, short_form, block)) < 0) {
err_puts("buf_parse_block: buf_parse_block_inner < 0");
+ err_inspect_buf(buf);
assert(! "buf_parse_block: buf_parse_block_inner < 0");
return r;
}
diff --git a/libkc3/io.c b/libkc3/io.c
index ba1cb4d..69a6074 100644
--- a/libkc3/io.c
+++ b/libkc3/io.c
@@ -52,6 +52,8 @@
DEF_ERR_INSPECT(name, type) \
DEF_IO_INSPECT(name, type)
+#define IO_INSPECT_BUF_SIZE 100
+
sw err_flush (void)
{
return buf_flush(&g_kc3_env.err);
@@ -65,7 +67,8 @@ sw err_inspect (const s_tag *x)
sw err_inspect_buf (const s_buf *buf)
{
uw pos;
- pos = (buf->rpos < 40) ? 0 : buf->rpos - 40;
+ pos = (buf->rpos < IO_INSPECT_BUF_SIZE) ? 0 :
+ buf->rpos - IO_INSPECT_BUF_SIZE;
return err_write(buf->ptr.pchar + pos, buf->rpos - pos);
}
@@ -134,7 +137,8 @@ sw io_inspect (const s_tag *x)
sw io_inspect_buf (const s_buf *buf)
{
uw pos;
- pos = (buf->rpos < 40) ? 0 : buf->rpos - 40;
+ pos = (buf->rpos < IO_INSPECT_BUF_SIZE) ? 0 :
+ buf->rpos - IO_INSPECT_BUF_SIZE;
return io_write(buf->ptr.pchar + pos, buf->rpos - pos);
}