added HCL_IO_READ_BYTES
Some checks failed
continuous-integration/drone/push Build is failing

added hcl_htonoow/hcl_ntohoow and the like
This commit is contained in:
2023-12-16 00:31:50 +09:00
parent b926b1a658
commit 2243a1357d
5 changed files with 88 additions and 13 deletions

View File

@ -1199,6 +1199,7 @@ enum hcl_io_cmd_t
HCL_IO_OPEN,
HCL_IO_CLOSE,
HCL_IO_READ,
HCL_IO_READ_BYTES,
HCL_IO_WRITE,
HCL_IO_WRITE_BYTES,
HCL_IO_FLUSH
@ -1284,10 +1285,14 @@ struct hcl_io_udiarg_t
/**
* [OUT] place data here for #HCL_IO_READ
*/
hcl_ooch_t buf[2048]; /* TODO: resize this if necessary */
union {
hcl_ooch_t c[2048]; /* TODO: resize this if necessary */
hcl_uint8_t b[2048 * HCL_SIZEOF(hcl_ooch_t)]; /* TODO: resize this if necessary */
} buf;
/**
* [OUT] place the number of characters read here for #HCL_IO_READ
* [OUT] place the number of characters read here for
* #HCL_IO_READ or #HCL_IO_READ_BYTES
*/
hcl_oow_t xlen;
};
@ -1318,7 +1323,7 @@ struct hcl_io_udoarg_t
/**
* [OUT] place the number of characters/bytes written here for
* HCL_IO_WRITE or HCL_IO_WRITE_BYTES
* #HCL_IO_WRITE or #HCL_IO_WRITE_BYTES
*/
hcl_oow_t xlen;
};