touched up sed

This commit is contained in:
2009-09-08 07:34:49 +00:00
parent f9d4ccc50a
commit faf8d996db
11 changed files with 189 additions and 72 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: Sed.hpp 269 2009-08-26 03:03:51Z hyunghwan.chung $
* $Id: Sed.hpp 280 2009-09-07 13:34:49Z hyunghwan.chung $
*
Copyright 2006-2009 Chung, Hyung-Hwan.
@ -399,8 +399,10 @@ protected:
errstr_t dflerrstr;
private:
static ssize_t xin (sed_t* s, io_cmd_t cmd, io_arg_t* arg);
static ssize_t xout (sed_t* s, io_cmd_t cmd, io_arg_t* arg);
static ssize_t xin (
sed_t* s, io_cmd_t cmd, io_arg_t* arg, char_t* buf, size_t len);
static ssize_t xout (
sed_t* s, io_cmd_t cmd, io_arg_t* arg, char_t* dat, size_t len);
static const char_t* xerrstr (sed_t* s, errnum_t num);
private:

View File

@ -1,5 +1,5 @@
/*
* $Id: sed.h 277 2009-09-02 12:55:55Z hyunghwan.chung $
* $Id: sed.h 280 2009-09-07 13:34:49Z hyunghwan.chung $
*
Copyright 2006-2009 Chung, Hyung-Hwan.
@ -170,23 +170,6 @@ struct qse_sed_io_arg_t
{
void* handle; /**< IO handle */
const qse_char_t* path; /**< file path. QSE_NULL for a console */
union
{
/** read buffer */
struct
{
qse_char_t* buf; /**< buffer pointer */
qse_size_t len; /**< buffer size */
} r;
/** data to write */
struct
{
const qse_char_t* data; /**< data pointer */
qse_size_t len; /**< data length */
} w;
} u;
};
typedef struct qse_sed_io_arg_t qse_sed_io_arg_t;
@ -197,7 +180,9 @@ typedef struct qse_sed_io_arg_t qse_sed_io_arg_t;
typedef qse_ssize_t (*qse_sed_io_fun_t) (
qse_sed_t* sed,
qse_sed_io_cmd_t cmd,
qse_sed_io_arg_t* arg
qse_sed_io_arg_t* arg,
qse_char_t* data,
qse_size_t count
);
/**