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

@ -3200,7 +3200,7 @@ static const hcl_bch_t* get_base_name (const hcl_bch_t* path)
return (last == HCL_NULL)? path: (last + 1); 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); xtn_t* xtn = GET_XTN(hcl);
bb_t* bb = HCL_NULL; bb_t* bb = HCL_NULL;
@ -3298,7 +3298,7 @@ oops:
return -1; 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);*/ /*xtn_t* xtn = GET_XTN(hcl);*/
bb_t* bb; bb_t* bb;
@ -3321,7 +3321,7 @@ static HCL_INLINE int close_sr_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
return 0; 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);*/ /*xtn_t* xtn = GET_XTN(hcl);*/
bb_t* bb; bb_t* bb;
@ -3371,18 +3371,19 @@ static HCL_INLINE int read_sr_stream (hcl_t* hcl, hcl_iosrarg_t* arg)
return 0; 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) switch (cmd)
{ {
case HCL_IO_OPEN: 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: 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: 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: case HCL_IO_FLUSH:
/* no effect on an input stream */ /* 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->scan_path = scan_file;
xtn->print_path = print_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->read_path = HCL_NULL;
xtn->scan_path = HCL_NULL; xtn->scan_path = HCL_NULL;
@ -3710,7 +3711,7 @@ int hcl_attachiostdwithucstr (hcl_t* hcl, const hcl_uch_t* read_file, const hcl_
return -1; 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->read_path);
hcl_freemem (hcl, (void*)xtn->scan_path); hcl_freemem (hcl, (void*)xtn->scan_path);