mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
testPsyc: +debug msg
This commit is contained in:
parent
4ab26edcc1
commit
79167f2563
1 changed files with 2 additions and 0 deletions
|
@ -190,6 +190,8 @@ int test_input (int i, char *recvbuf, size_t nbytes) {
|
||||||
contbytes = psyc_getParseRemainingLength(&parsers[i]);
|
contbytes = psyc_getParseRemainingLength(&parsers[i]);
|
||||||
|
|
||||||
if (contbytes > 0) { // copy end of parsebuf before start of recvbuf
|
if (contbytes > 0) { // copy end of parsebuf before start of recvbuf
|
||||||
|
if (verbose >= 3)
|
||||||
|
printf("# remaining = [%.*s]\n", (int)contbytes, psyc_getParseRemainingBuffer(&parsers[i]));
|
||||||
assert(contbytes <= CONT_BUF_SIZE); // make sure it's still in the buffer
|
assert(contbytes <= CONT_BUF_SIZE); // make sure it's still in the buffer
|
||||||
memmove(recvbuf - contbytes, psyc_getParseRemainingBuffer(&parsers[i]), contbytes);
|
memmove(recvbuf - contbytes, psyc_getParseRemainingBuffer(&parsers[i]), contbytes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue