simplified qse_cut_comp() and related functions

This commit is contained in:
2009-12-23 06:56:01 +00:00
parent 200a3f6656
commit aaa1097128
18 changed files with 850 additions and 146 deletions

View File

@ -105,8 +105,6 @@ public:
///
Cut (Mmgr* mmgr): Mmged (mmgr), cut (QSE_NULL), dflerrstr (QSE_NULL)
{
delim.in = QSE_T(' ');
delim.out = delim.in;
}
///
@ -130,12 +128,6 @@ public:
///
void close ();
char_t getInputDelimiter () const { return delim.in; }
void setInputDelimiter (char_t delimc) { delim.in = delimc; }
char_t getOutputDelimiter () const { return delim.out; }
void setOutputDelimiter (char_t delimc) { delim.out = delimc; }
///
/// The compile() function compiles a null-terminated string pointed
/// to by @a sptr.
@ -217,13 +209,6 @@ protected:
/// I/O stream to read data from and write output to.
Stream* iostream;
struct
{
char_t in;
char_t out;
} delim;
private:
static ssize_t xin (
cut_t* s, io_cmd_t cmd, io_arg_t* arg, char_t* buf, size_t len);

View File

@ -254,9 +254,7 @@ void qse_cut_clear (
int qse_cut_comp (
qse_cut_t* cut, /**< text cutter */
const qse_char_t* str, /**< selector pointer */
qse_size_t len, /**< selector length */
qse_char_t din, /**< input field delimiter */
qse_char_t dout /**< output field delimiter */
qse_size_t len /**< selector length */
);
/**

View File

@ -24,7 +24,12 @@
#include <qse/cut/cut.h>
/** @file
* This file defines a simple text cutter.
* This file provides easier-to-use versions of selected API functions
* by implementing default handlers for I/O and memory management.
*
* @example cut01.c
* This example shows how to write a simple text cutter using easy API
* functions.
*/
#ifdef __cplusplus
@ -53,9 +58,7 @@ void* qse_cut_getxtnstd (
*/
int qse_cut_compstd (
qse_cut_t* cut,
const qse_char_t* str,
qse_char_t din,
qse_char_t dout
const qse_char_t* str
);
/**

View File

@ -24,7 +24,8 @@
#include <qse/sed/sed.h>
/** @file
* This file defines a simple stream editor.
* This file provides easier-to-use versions of selected API functions
* by implementing default handlers for I/O and memory management.
*
* @example sed01.c
* This example shows how to write a simple stream editor using easy API