enhanced nwio
This commit is contained in:
@ -538,10 +538,11 @@ typedef enum qse_awk_rio_rwcmode_t qse_awk_rio_rwcmode_t;
|
||||
*/
|
||||
struct qse_awk_rio_arg_t
|
||||
{
|
||||
qse_awk_rio_mode_t mode; /**< opening mode */
|
||||
qse_char_t* name; /**< name of I/O object */
|
||||
qse_awk_rio_rwcmode_t rwcmode; /**< closing mode for rwpipe */
|
||||
void* handle; /**< I/O handle set by a handler */
|
||||
qse_awk_rio_mode_t mode; /**< opening mode */
|
||||
qse_char_t* name; /**< name of I/O object */
|
||||
qse_awk_rio_rwcmode_t rwcmode; /**< closing mode for rwpipe */
|
||||
void* handle; /**< I/O handle set by a handler */
|
||||
void* handle2; /**< secondary I/O handle set by a handler */
|
||||
|
||||
/*-- from here down, internal use only --*/
|
||||
int type;
|
||||
|
@ -253,9 +253,6 @@ qse_ssize_t qse_fio_read (
|
||||
|
||||
/**
|
||||
* The qse_fio_write() function writes data.
|
||||
* If QSE_FIO_TEXT is used and the size parameter is (qse_size_t)-1,
|
||||
* the function treats the data parameter as a pointer to a null-terminated
|
||||
* string.
|
||||
*/
|
||||
qse_ssize_t qse_fio_write (
|
||||
qse_fio_t* fio,
|
||||
|
@ -37,14 +37,14 @@ enum qse_nwio_flag_t
|
||||
QSE_NWIO_NOAUTOFLUSH = (1 << 2),
|
||||
|
||||
/* normal open flags */
|
||||
QSE_NWIO_READ = (1 << 8),
|
||||
QSE_NWIO_WRITE = (1 << 9),
|
||||
QSE_NWIO_PASSIVE = (1 << 8),
|
||||
QSE_NWIO_TCP = (1 << 9),
|
||||
QSE_NWIO_UDP = (1 << 10),
|
||||
|
||||
/** do not reread if read has been interrupted */
|
||||
QSE_NWIO_READNORETRY = (1 << 10),
|
||||
QSE_NWIO_READNORETRY = (1 << 14),
|
||||
/** do not rewrite if write has been interrupted */
|
||||
QSE_NWIO_WRITENORETRY = (1 << 11),
|
||||
QSE_NWIO_LISTEN = (1 << 12)
|
||||
QSE_NWIO_WRITENORETRY = (1 << 15),
|
||||
};
|
||||
|
||||
enum qse_nwio_errnum_t
|
||||
@ -89,6 +89,7 @@ struct qse_nwio_t
|
||||
qse_nwio_errnum_t errnum;
|
||||
qse_nwio_hnd_t handle;
|
||||
qse_tio_t* tio;
|
||||
int status;
|
||||
};
|
||||
|
||||
#define QSE_NWIO_HANDLE(nwio) ((nwio)->handle)
|
||||
|
@ -303,7 +303,8 @@ qse_pio_pid_t qse_pio_getchild (
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_pio_read() fucntion reads data.
|
||||
* The qse_pio_read() fucntion reads at most @a size bytes/characters
|
||||
* and stores them to the buffer pointed to by @a buf.
|
||||
* @return -1 on failure, 0 on EOF, data length read on success
|
||||
*/
|
||||
qse_ssize_t qse_pio_read (
|
||||
@ -314,9 +315,10 @@ qse_ssize_t qse_pio_read (
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_pio_write() function writes data.
|
||||
* If @a size is zero, qse_pio_write() closes the the writing
|
||||
* stream causing the child process reach the end of the stream.
|
||||
* The qse_pio_write() function writes up @a size bytes/characters
|
||||
* from the buffer pointed to by @a data. If #QSE_PIO_TEXT is used
|
||||
* and the @a size parameter is (qse_size_t)-1, the function treats
|
||||
* the @a data parameter as a pointer to a null-terminated string.
|
||||
* @return -1 on failure, data length written on success
|
||||
*/
|
||||
qse_ssize_t qse_pio_write (
|
||||
|
@ -36,7 +36,6 @@ enum qse_sio_flag_t
|
||||
* qse_fio_flag_t enumerators. you can use values between
|
||||
* (1<<0) and (1<<7) inclusive reserved in qse_fio_flag_t.
|
||||
* the range is represented by QSE_FIO_RESERVED. */
|
||||
QSE_SIO_URI = (1 << 0),
|
||||
QSE_SIO_IGNOREMBWCERR = (1 << 1),
|
||||
QSE_SIO_NOAUTOFLUSH = (1 << 2),
|
||||
|
||||
|
Reference in New Issue
Block a user