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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1256,7 +1256,7 @@ count++;
|
||||
else
|
||||
{
|
||||
/* 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.
|
||||
|
@ -2990,14 +2990,14 @@ if (hcl->active_function->dbgi != hcl->_nil)
|
||||
{
|
||||
hcl_dbgl_t* dbgl;
|
||||
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));
|
||||
dbgl = (hcl_dbgl_t*)HCL_OBJ_GET_BYTE_SLOT(hcl->active_function->dbgi);
|
||||
ip = hcl->ip - 1;
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
@ -2185,7 +2185,7 @@ int hcl_attachio (hcl_t* hcl, hcl_ioimpl_t reader, hcl_ioimpl_t printer)
|
||||
if (!cbp) return -1;
|
||||
|
||||
hcl->c = (hcl_compiler_t*)hcl_callocmem(hcl, HCL_SIZEOF(*hcl->c));
|
||||
if (!hcl->c)
|
||||
if (HCL_UNLIKELY(!hcl->c))
|
||||
{
|
||||
hcl_deregcb (hcl, cbp);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user