fixed many bugs in cli mode reader

This commit is contained in:
2018-08-05 18:46:54 +00:00
parent 0634bf26b3
commit 256472b2ea
2 changed files with 114 additions and 46 deletions

View File

@ -350,7 +350,6 @@ static HCL_INLINE int read_input (hcl_t* hcl, hcl_ioinarg_t* arg)
return 0;
}
static int read_handler (hcl_t* hcl, hcl_iocmd_t cmd, void* arg)
{
switch (cmd)
@ -1888,7 +1887,11 @@ count++;
else if (hcl->errnum == HCL_ESYNERR)
{
print_synerr (hcl);
if (xtn->reader_istty && hcl_getsynerrnum(hcl) != HCL_SYNERR_EOF) continue;
if (xtn->reader_istty && hcl_getsynerrnum(hcl) != HCL_SYNERR_EOF)
{
/* TODO: drain remaining data in the reader including the actual inputstream and buffered data in hcl */
continue;
}
}
else
{