renamed some variables
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
hyung-hwan 2023-11-04 13:50:18 +09:00
parent b913ab5403
commit 110cb0b767
2 changed files with 13 additions and 12 deletions

View File

@ -451,7 +451,7 @@ static int feed_loop (hcl_t* hcl, xtn_t* xtn, int cflags, int verbose)
{
/* override the default cnode handler. the default one simply
* compiles the expression node without execution */
if (hcl_beginfeed (hcl, hcl_isstdreadertty(hcl)? on_fed_cnode_in_interactive_mode: HCL_NULL) <= -1)
if (hcl_beginfeed(hcl, hcl_isstdreadertty(hcl)? on_fed_cnode_in_interactive_mode: HCL_NULL) <= -1)
{
hcl_logbfmt (hcl, HCL_LOG_STDERR, "ERROR: cannot begin feed - [%d] %js\n", hcl_geterrnum(hcl), hcl_geterrmsg(hcl));
goto oops;

View File

@ -3200,7 +3200,7 @@ static const hcl_bch_t* get_base_name (const hcl_bch_t* path)
return (last == HCL_NULL)? path: (last + 1);
}
static HCL_INLINE int open_sr_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
static HCL_INLINE int open_sin_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
{
xtn_t* xtn = GET_XTN(hcl);
bb_t* bb = HCL_NULL;
@ -3298,7 +3298,7 @@ oops:
return -1;
}
static HCL_INLINE int close_sr_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
static HCL_INLINE int close_sin_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
{
/*xtn_t* xtn = GET_XTN(hcl);*/
bb_t* bb;
@ -3321,7 +3321,7 @@ static HCL_INLINE int close_sr_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
return 0;
}
static HCL_INLINE int read_sr_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
static HCL_INLINE int read_sin_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
{
/*xtn_t* xtn = GET_XTN(hcl);*/
bb_t* bb;
@ -3371,18 +3371,19 @@ static HCL_INLINE int read_sr_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
return 0;
}
static int read_handler (hcl_t* hcl, hcl_iocmd_t cmd, void* arg)
/* source input stream handler */
static int sin_handler (hcl_t* hcl, hcl_iocmd_t cmd, void* arg)
{
switch (cmd)
{
case HCL_IO_OPEN:
return open_sr_stream(hcl, (hcl_iosrarg_t*)arg);
return open_sin_stream(hcl, (hcl_iosrarg_t*)arg);
case HCL_IO_CLOSE:
return close_sr_stream(hcl, (hcl_iosrarg_t*)arg);
return close_sin_stream(hcl, (hcl_iosrarg_t*)arg);
case HCL_IO_READ:
return read_sr_stream(hcl, (hcl_iosrarg_t*)arg);
return read_sin_stream(hcl, (hcl_iosrarg_t*)arg);
case HCL_IO_FLUSH:
/* no effect on an input stream */
@ -3671,7 +3672,7 @@ int hcl_attachiostdwithbcstr (hcl_t* hcl, const hcl_bch_t* read_file, const hcl_
xtn->scan_path = scan_file;
xtn->print_path = print_file;
n = hcl_attachio(hcl, read_handler, scan_handler, print_handler);
n = hcl_attachio(hcl, sin_handler, scan_handler, print_handler);
xtn->read_path = HCL_NULL;
xtn->scan_path = HCL_NULL;
@ -3693,7 +3694,7 @@ int hcl_attachiostdwithucstr (hcl_t* hcl, const hcl_uch_t* read_file, const hcl_
if (HCL_UNLIKELY(!xtn->read_path)) return -1;
xtn->scan_path = hcl_duputobcstr(hcl, scan_file, HCL_NULL);
if (HCL_UNLIKELY(!xtn->scan_path))
if (HCL_UNLIKELY(!xtn->scan_path))
{
hcl_freemem (hcl, (void*)xtn->read_path);
xtn->read_path = HCL_NULL;
@ -3701,7 +3702,7 @@ int hcl_attachiostdwithucstr (hcl_t* hcl, const hcl_uch_t* read_file, const hcl_
}
xtn->print_path = hcl_duputobcstr(hcl, print_file, HCL_NULL);
if (HCL_UNLIKELY(!xtn->print_path))
if (HCL_UNLIKELY(!xtn->print_path))
{
hcl_freemem (hcl, (void*)xtn->scan_path);
hcl_freemem (hcl, (void*)xtn->read_path);
@ -3710,7 +3711,7 @@ int hcl_attachiostdwithucstr (hcl_t* hcl, const hcl_uch_t* read_file, const hcl_
return -1;
}
n = hcl_attachio(hcl, read_handler, scan_handler, print_handler);
n = hcl_attachio(hcl, sin_handler, scan_handler, print_handler);
hcl_freemem (hcl, (void*)xtn->read_path);
hcl_freemem (hcl, (void*)xtn->scan_path);