touched up code
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: awk.h 307 2009-11-25 13:32:20Z hyunghwan.chung $
|
||||
* $Id: awk.h 311 2009-12-09 11:35:54Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -791,14 +791,12 @@ enum qse_awk_errnum_t
|
||||
QSE_AWK_EREXRPAREN, /**< a right parenthesis is expected */
|
||||
QSE_AWK_EREXRBRACK, /**< a right bracket is expected */
|
||||
QSE_AWK_EREXRBRACE, /**< a right brace is expected */
|
||||
QSE_AWK_EREXUNBALPAREN,/**< unbalanced parenthesis */
|
||||
QSE_AWK_EREXINVALBRACE,/**< invalid brace */
|
||||
QSE_AWK_EREXCOLON, /**< a colon is expected */
|
||||
QSE_AWK_EREXCRANGE, /**< invalid character range */
|
||||
QSE_AWK_EREXCCLASS, /**< invalid character class */
|
||||
QSE_AWK_EREXBOUND, /**< invalid occurrence bound */
|
||||
QSE_AWK_EREXSPCAWP, /**< special character at wrong position */
|
||||
QSE_AWK_EREXPREEND, /**< premature end of regular expression */
|
||||
QSE_AWK_EREXGARBAGE, /**< garbage after pattern */
|
||||
|
||||
/* the number of error numbers, internal use only */
|
||||
QSE_AWK_NUMERRNUM
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: lda.h 287 2009-09-15 10:01:02Z hyunghwan.chung $
|
||||
* $Id: lda.h 311 2009-12-09 11:35:54Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -87,7 +87,7 @@ typedef enum qse_lda_walk_t qse_lda_walk_t;
|
||||
* SYNOPSIS
|
||||
*/
|
||||
typedef void* (*qse_lda_copier_t) (
|
||||
qse_lda_t* lda /* a lda */,
|
||||
qse_lda_t* lda /* lda */,
|
||||
void* dptr /* the pointer to data to copy */,
|
||||
qse_size_t dlen /* the length of data to copy */
|
||||
);
|
||||
@ -99,7 +99,7 @@ typedef void* (*qse_lda_copier_t) (
|
||||
* SYNOPSIS
|
||||
*/
|
||||
typedef void (*qse_lda_freeer_t) (
|
||||
qse_lda_t* lda /* a lda */,
|
||||
qse_lda_t* lda /* lda */,
|
||||
void* dptr /* the pointer to data to free */,
|
||||
qse_size_t dlen /* the length of data to free */
|
||||
);
|
||||
@ -141,7 +141,7 @@ typedef int (*qse_lda_comper_t) (
|
||||
* SYNOPSIS
|
||||
*/
|
||||
typedef void (*qse_lda_keeper_t) (
|
||||
qse_lda_t* lda /* a lda */,
|
||||
qse_lda_t* lda /* lda */,
|
||||
void* vptr /* the pointer to a value */,
|
||||
qse_size_t vlen /* the length of a value */
|
||||
);
|
||||
@ -259,72 +259,63 @@ void qse_lda_fini (
|
||||
/******/
|
||||
|
||||
int qse_lda_getscale (
|
||||
qse_lda_t* lda /* a lda */
|
||||
qse_lda_t* lda /* lda */
|
||||
);
|
||||
|
||||
/****f* Common/qse_lda_setscale
|
||||
* NAME
|
||||
* qse_lda_setscale - set the scale factor
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The qse_lda_setscale() function sets the scale factor of the length
|
||||
* of a key and a value. A scale factor determines the actual length of
|
||||
* a key and a value in bytes. A lda is created with a scale factor of 1.
|
||||
* The scale factor should be larger than 0 and less than 256.
|
||||
*
|
||||
* NOTES
|
||||
* It is a bad idea to change the scale factor when a lda is not empty.
|
||||
*
|
||||
* SYNOPSIS
|
||||
/**
|
||||
* The qse_lda_setscale() function sets the scale factor of the length
|
||||
* of a key and a value. A scale factor determines the actual length of
|
||||
* a key and a value in bytes. A lda is created with a scale factor of 1.
|
||||
* The scale factor should be larger than 0 and less than 256.
|
||||
* It is a bad idea to change the scale factor when @a lda is not empty.
|
||||
*/
|
||||
void qse_lda_setscale (
|
||||
qse_lda_t* lda /* a lda */,
|
||||
qse_lda_t* lda /* lda */,
|
||||
int scale /* a scale factor */
|
||||
);
|
||||
/******/
|
||||
|
||||
qse_lda_copier_t qse_lda_getcopier (
|
||||
qse_lda_t* lda /* a lda */
|
||||
qse_lda_t* lda /* lda */
|
||||
);
|
||||
|
||||
/****f* Common/qse_lda_setcopier
|
||||
* NAME
|
||||
* qse_lda_setcopier - specify how to clone an element
|
||||
*
|
||||
* DESCRIPTION
|
||||
* A special copier QSE_LDA_COPIER_INLINE is provided. This copier enables
|
||||
* you to copy the data inline to the internal node. No freeer is invoked
|
||||
* when the node is freeed.
|
||||
*
|
||||
* You may set the copier to QSE_NULL to perform no special operation
|
||||
* when the data pointer is rememebered.
|
||||
*
|
||||
* SYNOPSIS
|
||||
/**
|
||||
* The qse_lda_setcopier() specifies how to clone an element. The special
|
||||
* copier #QSE_LDA_COPIER_INLINE copies the data inline to the internal node.
|
||||
* No freeer is invoked when the node is freeed. You may set the copier to
|
||||
* #QSE_LDA_COPIER_SIMPLE to perform no special operation when the data
|
||||
* pointer is stored.
|
||||
*/
|
||||
void qse_lda_setcopier (
|
||||
qse_lda_t* lda /* a lda */,
|
||||
qse_lda_copier_t copier /* an element copier */
|
||||
qse_lda_t* lda /** lda */,
|
||||
qse_lda_copier_t copier /** element copier */
|
||||
);
|
||||
/******/
|
||||
|
||||
qse_lda_freeer_t qse_lda_getfreeer (
|
||||
qse_lda_t* lda /* a lda */
|
||||
qse_lda_t* lda /**< lda */
|
||||
);
|
||||
|
||||
/****f* Common/qse_lda_setfreeer
|
||||
* NAME
|
||||
* qse_lda_setfreeer - specify how to destroy an element
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The freeer is called when a node containing the element is destroyed.
|
||||
*
|
||||
* SYNOPSIS
|
||||
/**
|
||||
* The qse_lda_setfreeer() function specifies how to destroy an element.
|
||||
* The @a freeer is called when a node containing the element is destroyed.
|
||||
*/
|
||||
void qse_lda_setfreeer (
|
||||
qse_lda_t* lda /* a lda */,
|
||||
qse_lda_freeer_t freeer /* an element freeer */
|
||||
qse_lda_t* lda /**< lda */,
|
||||
qse_lda_freeer_t freeer /**< element freeer */
|
||||
);
|
||||
|
||||
qse_lda_comper_t qse_lda_getcomper (
|
||||
qse_lda_t* lda /**< lda */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_lda_setcomper() function specifies how to compare two elements
|
||||
* for equality test. The comparator @a comper must return 0 if two elements
|
||||
* compared are equal, or a non-zero number otherwise.
|
||||
*/
|
||||
void qse_lda_setcomper (
|
||||
qse_lda_t* lda /**< lda */,
|
||||
qse_lda_comper_t comper /**< comparator */
|
||||
);
|
||||
/******/
|
||||
|
||||
qse_lda_keeper_t qse_lda_getkeeper (
|
||||
qse_lda_t* lda
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: rex.h 310 2009-12-08 13:15:00Z hyunghwan.chung $
|
||||
* $Id: rex.h 311 2009-12-09 11:35:54Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -66,12 +66,14 @@
|
||||
|
||||
enum qse_rex_option_t
|
||||
{
|
||||
QSE_REX_BUILD_NOBOUND = (1 << 0),
|
||||
QSE_REX_BUILD_NOBOUND = (1 << 1),
|
||||
QSE_REX_MATCH_IGNORECASE = (1 << 8),
|
||||
|
||||
/**< do not allow a special character at normal character position */
|
||||
QSE_REX_STRICT = (1 << 0),
|
||||
|
||||
/**< do not support the {n,m} style occurrence specifier */
|
||||
QSE_REX_NOBOUND = (1 << 0),
|
||||
QSE_REX_NOBOUND = (1 << 1),
|
||||
|
||||
#if 0
|
||||
QSE_REX_ESQ_HEX = (1 << 1), /* \xhh and \uhhhh */
|
||||
@ -92,14 +94,12 @@ enum qse_rex_errnum_t
|
||||
QSE_REX_ERPAREN, /**< right parenthesis expected */
|
||||
QSE_REX_ERBRACK, /**< right bracket expected */
|
||||
QSE_REX_ERBRACE, /**< right brace expected */
|
||||
QSE_REX_EUNBALPAREN, /**< unbalanced parenthesis */
|
||||
QSE_REX_EINVALBRACE, /**< invalid brace */
|
||||
QSE_REX_ECOLON, /**< colon expected */
|
||||
QSE_REX_ECRANGE, /**< invalid character range */
|
||||
QSE_REX_ECCLASS, /**< invalid character class */
|
||||
QSE_REX_EBOUND, /**< invalid occurrence bound */
|
||||
QSE_REX_EPREEND, /**< premature expression end */
|
||||
QSE_REX_EGARBAGE /**< garbage after expression */
|
||||
QSE_REX_ESPCAWP, /**< special character at wrong position */
|
||||
QSE_REX_EPREEND /**< premature expression end */
|
||||
};
|
||||
typedef enum qse_rex_errnum_t qse_rex_errnum_t;
|
||||
|
||||
|
Reference in New Issue
Block a user