Commit 5c1493a368f47c5ed2b24463720b7ba9cc040ee1

Baptiste 2024-07-31T15:00:52

httpd tests:wip

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);
 }