cleaned up a bit
This commit is contained in:
parent
7fc4262d01
commit
db9e0f5248
@ -1132,7 +1132,7 @@ int main (int argc, char* argv[])
|
|||||||
|
|
||||||
if (hcl_attachio(hcl, read_handler, print_handler) <= -1)
|
if (hcl_attachio(hcl, read_handler, print_handler) <= -1)
|
||||||
{
|
{
|
||||||
hcl_logbfmt (hcl, HCL_LOG_STDERR, "ERROR: cannot attach input stream - [%d] %js\n", hcl_geterrnum(hcl), hcl_geterrmsg(hcl));
|
hcl_logbfmt (hcl, HCL_LOG_STDERR, "ERROR: cannot attach IO streams - [%d] %js\n", hcl_geterrnum(hcl), hcl_geterrmsg(hcl));
|
||||||
goto oops;
|
goto oops;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1256,7 +1256,7 @@ count++;
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* print the result in the interactive mode regardless 'verbose' */
|
/* print the result in the interactive mode regardless 'verbose' */
|
||||||
hcl_logbfmt (hcl, HCL_LOG_STDOUT, "%O\n", retv);
|
hcl_logbfmt (hcl, HCL_LOG_STDOUT, "%O\n", retv); /* TODO: show this go to the output handler?? */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* print the value of ERRSTR.
|
* print the value of ERRSTR.
|
||||||
|
@ -2990,14 +2990,14 @@ if (hcl->active_function->dbgi != hcl->_nil)
|
|||||||
{
|
{
|
||||||
hcl_dbgl_t* dbgl;
|
hcl_dbgl_t* dbgl;
|
||||||
hcl_ooi_t ip;
|
hcl_ooi_t ip;
|
||||||
static hcl_ooch_t dash[] = { '*', '\0' };
|
static hcl_ooch_t dash[] = { '-', '\0' };
|
||||||
|
|
||||||
HCL_ASSERT (hcl, HCL_IS_BYTEARRAY(hcl, hcl->active_function->dbgi));
|
HCL_ASSERT (hcl, HCL_IS_BYTEARRAY(hcl, hcl->active_function->dbgi));
|
||||||
dbgl = (hcl_dbgl_t*)HCL_OBJ_GET_BYTE_SLOT(hcl->active_function->dbgi);
|
dbgl = (hcl_dbgl_t*)HCL_OBJ_GET_BYTE_SLOT(hcl->active_function->dbgi);
|
||||||
ip = hcl->ip - 1;
|
ip = hcl->ip - 1;
|
||||||
if (bcode == HCL_CODE_CALL_X) ip -= HCL_CODE_LONG_PARAM_SIZE;
|
if (bcode == HCL_CODE_CALL_X) ip -= HCL_CODE_LONG_PARAM_SIZE;
|
||||||
|
|
||||||
hcl_seterrbfmt (hcl, HCL_ECALL, "cannot call %O [%js:%zu]",
|
hcl_seterrbfmt (hcl, HCL_ECALL, "cannot call %O (%js %zu)",
|
||||||
rcv, (dbgl[ip].fname? dbgl[ip].fname: dash), dbgl[ip].sline);
|
rcv, (dbgl[ip].fname? dbgl[ip].fname: dash), dbgl[ip].sline);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2185,7 +2185,7 @@ int hcl_attachio (hcl_t* hcl, hcl_ioimpl_t reader, hcl_ioimpl_t printer)
|
|||||||
if (!cbp) return -1;
|
if (!cbp) return -1;
|
||||||
|
|
||||||
hcl->c = (hcl_compiler_t*)hcl_callocmem(hcl, HCL_SIZEOF(*hcl->c));
|
hcl->c = (hcl_compiler_t*)hcl_callocmem(hcl, HCL_SIZEOF(*hcl->c));
|
||||||
if (!hcl->c)
|
if (HCL_UNLIKELY(!hcl->c))
|
||||||
{
|
{
|
||||||
hcl_deregcb (hcl, cbp);
|
hcl_deregcb (hcl, cbp);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user