added qse_getawknilval()

prefixed many public functions with QSE_EXPORT
This commit is contained in:
hyung-hwan 2012-12-01 13:13:13 +00:00
parent 7dd9e67cd8
commit 120992a242
64 changed files with 1138 additions and 841 deletions

View File

@ -31,7 +31,7 @@ QSE_BEGIN_NAMESPACE(QSE)
/** /**
* The Types class defines handy aliases for various QSE types. * The Types class defines handy aliases for various QSE types.
*/ */
class Types class QSE_EXPORT Types
{ {
public: public:
/** boolean data type */ /** boolean data type */

View File

@ -2702,6 +2702,14 @@ QSE_EXPORT void qse_awk_rtx_freemem (
void* ptr /**< memory block pointer */ void* ptr /**< memory block pointer */
); );
/**
* The qse_getawknilval() function returns the pointer to the predefined
* nil value. you can call this without creating a runtime context.
*/
QSE_EXPORT qse_awk_val_t* qse_getawknilval (
void
);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -33,7 +33,7 @@ QSE_BEGIN_NAMESPACE(QSE)
/// a subclass that uses a memory manager. /// a subclass that uses a memory manager.
/// ///
class Mmged: public Types class QSE_EXPORT Mmged: public Types
{ {
public: public:
Mmged (Mmgr* mmgr): mmgr (mmgr) {} Mmged (Mmgr* mmgr): mmgr (mmgr) {}

View File

@ -34,7 +34,7 @@ QSE_BEGIN_NAMESPACE(QSE)
/// write code in more object-oriented fashion. An inheriting class should /// write code in more object-oriented fashion. An inheriting class should
/// implement three pure virtual functions. /// implement three pure virtual functions.
/// ///
class Mmgr: public Types, public qse_mmgr_t class QSE_EXPORT Mmgr: public Types, public qse_mmgr_t
{ {
public: public:
/// defines an alias type to #qse_mmgr_t /// defines an alias type to #qse_mmgr_t

View File

@ -27,12 +27,12 @@
QSE_BEGIN_NAMESPACE(QSE) QSE_BEGIN_NAMESPACE(QSE)
///////////////////////////////// /////////////////////////////////
class StdMmgr: public Mmgr class QSE_EXPORT StdMmgr: public Mmgr
{ {
public: public:
void* allocMem (size_t n); void* allocMem (size_t n);
void* reallocMem (void* ptr, size_t n); void* reallocMem (void* ptr, size_t n);
virtual void freeMem (void* ptr); virtual void freeMem (void* ptr);
public: public:
static StdMmgr DFL; static StdMmgr DFL;

View File

@ -204,7 +204,7 @@ struct qse_dll_node_t
*/ */
struct qse_dll_t struct qse_dll_t
{ {
QSE_DEFINE_COMMON_FIELDS (dll) qse_mmgr_t* mmgr;
qse_dll_node_t gdl; qse_dll_node_t gdl;
qse_size_t size; qse_size_t size;
@ -227,8 +227,6 @@ struct qse_dll_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (dll)
/** /**
* The qse_dll_open() function creates an empty doubly linked list. * The qse_dll_open() function creates an empty doubly linked list.
* If the memory manager mmgr is QSE_NULL, the function gets the default * If the memory manager mmgr is QSE_NULL, the function gets the default
@ -242,7 +240,7 @@ QSE_DEFINE_COMMON_FUNCTIONS (dll)
* the pointer to a newly created doubly linked list on success. * the pointer to a newly created doubly linked list on success.
* QSE_NULL on failure. * QSE_NULL on failure.
*/ */
qse_dll_t* qse_dll_open ( QSE_EXPORT qse_dll_t* qse_dll_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t xtnsize /**< size of extension area in bytes */ qse_size_t xtnsize /**< size of extension area in bytes */
); );
@ -250,14 +248,14 @@ qse_dll_t* qse_dll_open (
/** /**
* The qse_dll_close() function destroys a doubly linked list. * The qse_dll_close() function destroys a doubly linked list.
*/ */
void qse_dll_close ( QSE_EXPORT void qse_dll_close (
qse_dll_t* dll /** doubly linked list */ qse_dll_t* dll /** doubly linked list */
); );
/** /**
* The qse_dll_init() function initializes a statically declared list. * The qse_dll_init() function initializes a statically declared list.
*/ */
int qse_dll_init ( QSE_EXPORT int qse_dll_init (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_mmgr_t* mmgr /**< memory manager */ qse_mmgr_t* mmgr /**< memory manager */
); );
@ -265,14 +263,22 @@ int qse_dll_init (
/** /**
* The qse_dll_fini() function finalizes a statically initialized list. * The qse_dll_fini() function finalizes a statically initialized list.
*/ */
void qse_dll_fini ( QSE_EXPORT void qse_dll_fini (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
QSE_EXPORT qse_mmgr_t* qse_dll_getmmgr (
qse_dll_t* dll
);
QSE_EXPORT void* qse_dll_getxtn (
qse_dll_t* dll
);
/** /**
* The qse_dll_getscale() function gets the scale factor * The qse_dll_getscale() function gets the scale factor
*/ */
int qse_dll_getscale ( QSE_EXPORT int qse_dll_getscale (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
@ -282,7 +288,7 @@ int qse_dll_getscale (
* linked list created with a scale factor of 1. The scale factor should be * linked list created with a scale factor of 1. The scale factor should be
* larger than 0 and less than 256. * larger than 0 and less than 256.
*/ */
void qse_dll_setscale ( QSE_EXPORT void qse_dll_setscale (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
int scale /**< scale factor */ int scale /**< scale factor */
); );
@ -294,7 +300,7 @@ void qse_dll_setscale (
* when the node is freeed. You may set the copier to QSE_NULL to perform * when the node is freeed. You may set the copier to QSE_NULL to perform
* no special operation when the data pointer is rememebered. * no special operation when the data pointer is rememebered.
*/ */
void qse_dll_setcopier ( QSE_EXPORT void qse_dll_setcopier (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_dll_copier_t copier /**< element copier */ qse_dll_copier_t copier /**< element copier */
); );
@ -302,7 +308,7 @@ void qse_dll_setcopier (
/** /**
* The qse_dll_getcopier() function returns the element copier. * The qse_dll_getcopier() function returns the element copier.
*/ */
qse_dll_copier_t qse_dll_getcopier ( QSE_EXPORT qse_dll_copier_t qse_dll_getcopier (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
@ -310,7 +316,7 @@ qse_dll_copier_t qse_dll_getcopier (
* The qse_dll_setfreeer() function changes the element freeer. * The qse_dll_setfreeer() function changes the element freeer.
* The freeer is called when a node containing the element is destroyed. * The freeer is called when a node containing the element is destroyed.
*/ */
void qse_dll_setfreeer ( QSE_EXPORT void qse_dll_setfreeer (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_dll_freeer_t freeer /**< element freeer */ qse_dll_freeer_t freeer /**< element freeer */
); );
@ -318,21 +324,21 @@ void qse_dll_setfreeer (
/** /**
* The qse_dll_getfreeer() function returns the element freeer. * The qse_dll_getfreeer() function returns the element freeer.
*/ */
qse_dll_freeer_t qse_dll_getfreeer ( QSE_EXPORT qse_dll_freeer_t qse_dll_getfreeer (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
/** /**
* The qse_dll_getcomper() function returns the data comparator. * The qse_dll_getcomper() function returns the data comparator.
*/ */
qse_dll_comper_t qse_dll_getcomper ( QSE_EXPORT qse_dll_comper_t qse_dll_getcomper (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
/** /**
* The qse_dll_setcomper() function changes the data comparator * The qse_dll_setcomper() function changes the data comparator
*/ */
void qse_dll_setcomper ( QSE_EXPORT void qse_dll_setcomper (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_dll_comper_t comper /**< comparator */ qse_dll_comper_t comper /**< comparator */
); );
@ -341,7 +347,7 @@ void qse_dll_setcomper (
* The qse_dll_getsize() function returns the number of the data nodes held * The qse_dll_getsize() function returns the number of the data nodes held
* in a doubly linked list. * in a doubly linked list.
*/ */
qse_size_t qse_dll_getsize ( QSE_EXPORT qse_size_t qse_dll_getsize (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
@ -349,7 +355,7 @@ qse_size_t qse_dll_getsize (
* The qse_dll_gethead() function gets the head node. You may use the * The qse_dll_gethead() function gets the head node. You may use the
* #QSE_DLL_HEAD macro instead. * #QSE_DLL_HEAD macro instead.
*/ */
qse_dll_node_t* qse_dll_gethead ( QSE_EXPORT qse_dll_node_t* qse_dll_gethead (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
@ -357,19 +363,19 @@ qse_dll_node_t* qse_dll_gethead (
* The qse_dll_gettail() function gets the head node. You may use the * The qse_dll_gettail() function gets the head node. You may use the
* #QSE_DLL_TAIL macro instead. * #QSE_DLL_TAIL macro instead.
*/ */
qse_dll_node_t* qse_dll_gettail ( QSE_EXPORT qse_dll_node_t* qse_dll_gettail (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
qse_dll_node_t* qse_dll_search ( QSE_EXPORT qse_dll_node_t* qse_dll_search (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_dll_node_t* pos, /**< positional node */ qse_dll_node_t* pos, /**< positional node */
const void* dptr, /**< data pointer */ const void* dptr, /**< data pointer */
qse_size_t dlen /**< data length */ qse_size_t dlen /**< data length */
); );
qse_dll_node_t* qse_dll_rsearch ( QSE_EXPORT qse_dll_node_t* qse_dll_rsearch (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_dll_node_t* pos, /**< positional node */ qse_dll_node_t* pos, /**< positional node */
const void* dptr, /**< data pointer */ const void* dptr, /**< data pointer */
@ -379,14 +385,14 @@ qse_dll_node_t* qse_dll_rsearch (
/** /**
* The qse_dll_insert() function insert an element into a list * The qse_dll_insert() function insert an element into a list
*/ */
qse_dll_node_t* qse_dll_insert ( QSE_EXPORT qse_dll_node_t* qse_dll_insert (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_dll_node_t* pos, /**< node before which a new node is inserted */ qse_dll_node_t* pos, /**< node before which a new node is inserted */
void* dptr, /**< data pointer */ void* dptr, /**< data pointer */
qse_size_t dlen /**< data length */ qse_size_t dlen /**< data length */
); );
void qse_dll_delete ( QSE_EXPORT void qse_dll_delete (
qse_dll_t* dll, qse_dll_t* dll,
qse_dll_node_t* pos qse_dll_node_t* pos
); );
@ -394,39 +400,39 @@ void qse_dll_delete (
/** /**
* The qse_dll_clear() functions deletes all elements of a list * The qse_dll_clear() functions deletes all elements of a list
*/ */
void qse_dll_clear ( QSE_EXPORT void qse_dll_clear (
qse_dll_t* dll /**< doubly linked list */ qse_dll_t* dll /**< doubly linked list */
); );
void qse_dll_walk ( QSE_EXPORT void qse_dll_walk (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_dll_walker_t walker, /**< user-defined walker function */ qse_dll_walker_t walker, /**< user-defined walker function */
void* ctx /**< pointer to user-defined data */ void* ctx /**< pointer to user-defined data */
); );
void qse_dll_rwalk ( QSE_EXPORT void qse_dll_rwalk (
qse_dll_t* dll, /**< doubly linked list */ qse_dll_t* dll, /**< doubly linked list */
qse_dll_walker_t walker, /**< user-defined walker function */ qse_dll_walker_t walker, /**< user-defined walker function */
void* ctx /**< pointer to user-defined data */ void* ctx /**< pointer to user-defined data */
); );
qse_dll_node_t* qse_dll_pushhead ( QSE_EXPORT qse_dll_node_t* qse_dll_pushhead (
qse_dll_t* dll, /* doubly linked list */ qse_dll_t* dll, /* doubly linked list */
void* dptr, void* dptr,
qse_size_t dlen qse_size_t dlen
); );
qse_dll_node_t* qse_dll_pushtail ( QSE_EXPORT qse_dll_node_t* qse_dll_pushtail (
qse_dll_t* dll, /* doubly linked list */ qse_dll_t* dll, /* doubly linked list */
void* dptr, void* dptr,
qse_size_t dlen qse_size_t dlen
); );
void qse_dll_pophead ( QSE_EXPORT void qse_dll_pophead (
qse_dll_t* dll qse_dll_t* dll
); );
void qse_dll_poptail ( QSE_EXPORT void qse_dll_poptail (
qse_dll_t* dll qse_dll_t* dll
); );

View File

@ -192,7 +192,7 @@ struct qse_fma_blk_t
typedef struct qse_fma_t qse_fma_t; typedef struct qse_fma_t qse_fma_t;
struct qse_fma_t struct qse_fma_t
{ {
QSE_DEFINE_COMMON_FIELDS (fma) qse_mmgr_t* mmgr; /**< memory manager */
qse_size_t blksize; /**< block size */ qse_size_t blksize; /**< block size */
qse_size_t maxblks; /**< maximum blocks in a chunk */ qse_size_t maxblks; /**< maximum blocks in a chunk */
@ -207,13 +207,11 @@ struct qse_fma_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (fma)
/** /**
* The qse_fma_open() function creates a memory allocator with an outer * The qse_fma_open() function creates a memory allocator with an outer
* memory manager. * memory manager.
*/ */
qse_fma_t* qse_fma_open ( QSE_EXPORT qse_fma_t* qse_fma_open (
qse_mmgr_t* mmgr, /**< outer memory manager */ qse_mmgr_t* mmgr, /**< outer memory manager */
qse_size_t xtnsize, /**< extension size in bytes */ qse_size_t xtnsize, /**< extension size in bytes */
qse_size_t blksize, /**< fixed block size in bytes */ qse_size_t blksize, /**< fixed block size in bytes */
@ -224,7 +222,7 @@ qse_fma_t* qse_fma_open (
/** /**
* The qse_fma_close() function destroys an memory allocator. * The qse_fma_close() function destroys an memory allocator.
*/ */
void qse_fma_close ( QSE_EXPORT void qse_fma_close (
qse_fma_t* fma /**< memory allocator */ qse_fma_t* fma /**< memory allocator */
); );
@ -232,7 +230,7 @@ void qse_fma_close (
* The qse_fma_init() function initializes an memory allocator statically * The qse_fma_init() function initializes an memory allocator statically
* declared. * declared.
*/ */
int qse_fma_init ( QSE_EXPORT int qse_fma_init (
qse_fma_t* fma, /**< memory allocator */ qse_fma_t* fma, /**< memory allocator */
qse_mmgr_t* mmgr, /**< outer memory manager */ qse_mmgr_t* mmgr, /**< outer memory manager */
qse_size_t blksize, /**< fixed block size in bytes */ qse_size_t blksize, /**< fixed block size in bytes */
@ -243,10 +241,18 @@ int qse_fma_init (
/** /**
* The qse_fma_fini() function finalizes an memory allocator. * The qse_fma_fini() function finalizes an memory allocator.
*/ */
void qse_fma_fini ( QSE_EXPORT void qse_fma_fini (
qse_fma_t* fma /**< memory allocator */ qse_fma_t* fma /**< memory allocator */
); );
QSE_EXPORT qse_mmgr_t* qse_fma_getmmgr (
qse_fma_t* fma
);
QSE_EXPORT void* qse_fma_getxtn (
qse_fma_t* fma
);
/** /**
* The qse_fma_alloc() function allocates a block of the fixed block size * The qse_fma_alloc() function allocates a block of the fixed block size
* specified during initialization regardless of the block size @a size * specified during initialization regardless of the block size @a size
@ -255,12 +261,12 @@ void qse_fma_fini (
* *
* @return block pointer on success, #QSE_NULL on failure * @return block pointer on success, #QSE_NULL on failure
*/ */
void* qse_fma_alloc ( QSE_EXPORT void* qse_fma_alloc (
qse_fma_t* fma, /**< memory allocator */ qse_fma_t* fma, /**< memory allocator */
qse_size_t size /**< block size in bytes*/ qse_size_t size /**< block size in bytes*/
); );
void* qse_fma_calloc ( QSE_EXPORT void* qse_fma_calloc (
qse_fma_t* fma, qse_fma_t* fma,
qse_size_t size qse_size_t size
); );
@ -280,7 +286,7 @@ void* qse_fma_calloc (
* *
* @return block pointer on success, #QSE_NULL on failure * @return block pointer on success, #QSE_NULL on failure
*/ */
void* qse_fma_realloc ( QSE_EXPORT void* qse_fma_realloc (
qse_fma_t* fma, /**< memory allocator */ qse_fma_t* fma, /**< memory allocator */
void* blk, /**< memory block */ void* blk, /**< memory block */
qse_size_t size /**< block size in bytes*/ qse_size_t size /**< block size in bytes*/
@ -289,7 +295,7 @@ void* qse_fma_realloc (
/** /**
* The qse_fma_free() function deallocates a block. * The qse_fma_free() function deallocates a block.
*/ */
void qse_fma_free ( QSE_EXPORT void qse_fma_free (
qse_fma_t* fma, /**< memory allocator */ qse_fma_t* fma, /**< memory allocator */
void* blk /**< memory block to free */ void* blk /**< memory block to free */
); );

View File

@ -171,7 +171,7 @@ extern "C" {
* - number of characters written to the buffer excluding a terminating * - number of characters written to the buffer excluding a terminating
* null in all other cases. * null in all other cases.
*/ */
int qse_fmtintmaxtombs ( QSE_EXPORT int qse_fmtintmaxtombs (
qse_mchar_t* buf, /**< buffer pointer */ qse_mchar_t* buf, /**< buffer pointer */
int bufsize, /**< buffer size */ int bufsize, /**< buffer size */
qse_intmax_t value, /**< integer to format */ qse_intmax_t value, /**< integer to format */
@ -231,7 +231,7 @@ int qse_fmtintmaxtombs (
* - number of characters written to the buffer excluding a terminating * - number of characters written to the buffer excluding a terminating
* null in all other cases. * null in all other cases.
*/ */
int qse_fmtintmaxtowcs ( QSE_EXPORT int qse_fmtintmaxtowcs (
qse_wchar_t* buf, /**< buffer pointer */ qse_wchar_t* buf, /**< buffer pointer */
int bufsize, /**< buffer size */ int bufsize, /**< buffer size */
qse_intmax_t value, /**< integer to format */ qse_intmax_t value, /**< integer to format */
@ -256,7 +256,7 @@ int qse_fmtintmaxtowcs (
* to a multibyte string buffer. It behaves the same as qse_fmtuintmaxtombs() * to a multibyte string buffer. It behaves the same as qse_fmtuintmaxtombs()
* except that it handles an unsigned integer. * except that it handles an unsigned integer.
*/ */
int qse_fmtuintmaxtombs ( QSE_EXPORT int qse_fmtuintmaxtombs (
qse_mchar_t* buf, /**< buffer pointer */ qse_mchar_t* buf, /**< buffer pointer */
int bufsize, /**< buffer size */ int bufsize, /**< buffer size */
qse_uintmax_t value, /**< integer to format */ qse_uintmax_t value, /**< integer to format */
@ -271,7 +271,7 @@ int qse_fmtuintmaxtombs (
* to a wide-character string buffer. It behaves the same as * to a wide-character string buffer. It behaves the same as
* qse_fmtuintmaxtowcs() except that it handles an unsigned integer. * qse_fmtuintmaxtowcs() except that it handles an unsigned integer.
*/ */
int qse_fmtuintmaxtowcs ( QSE_EXPORT int qse_fmtuintmaxtowcs (
qse_wchar_t* buf, /**< buffer pointer */ qse_wchar_t* buf, /**< buffer pointer */
int bufsize, /**< buffer size */ int bufsize, /**< buffer size */
qse_uintmax_t value, /**< integer to format */ qse_uintmax_t value, /**< integer to format */

View File

@ -91,7 +91,7 @@ typedef struct qse_fs_ent_t qse_fs_ent_t;
struct qse_fs_t struct qse_fs_t
{ {
QSE_DEFINE_COMMON_FIELDS (fs) qse_mmgr_t* mmgr;
qse_fs_errnum_t errnum; qse_fs_errnum_t errnum;
qse_fs_ent_t ent; qse_fs_ent_t ent;
qse_char_t* curdir; qse_char_t* curdir;
@ -113,57 +113,63 @@ enum qse_fs_option_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (fs) QSE_EXPORT qse_fs_t* qse_fs_open (
qse_fs_t* qse_fs_open (
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_size_t xtnsize qse_size_t xtnsize
); );
void qse_fs_close ( QSE_EXPORT void qse_fs_close (
qse_fs_t* fs qse_fs_t* fs
); );
int qse_fs_init ( QSE_EXPORT int qse_fs_init (
qse_fs_t* fs, qse_fs_t* fs,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
void qse_fs_fini ( QSE_EXPORT void qse_fs_fini (
qse_fs_t* fs qse_fs_t* fs
); );
qse_fs_errnum_t qse_fs_geterrnum ( QSE_EXPORT qse_mmgr_t* qse_fs_getmmgr (
qse_fs_t* fs qse_fs_t* fs
); );
qse_fs_ent_t* qse_fs_read ( QSE_EXPORT void* qse_fs_getxtn (
qse_fs_t* fs
);
QSE_EXPORT qse_fs_errnum_t qse_fs_geterrnum (
qse_fs_t* fs
);
QSE_EXPORT qse_fs_ent_t* qse_fs_read (
qse_fs_t* fs, qse_fs_t* fs,
int flags int flags
); );
int qse_fs_chdir ( QSE_EXPORT int qse_fs_chdir (
qse_fs_t* fs, qse_fs_t* fs,
const qse_char_t* name const qse_char_t* name
); );
int qse_fs_push ( QSE_EXPORT int qse_fs_push (
qse_fs_t* fs, qse_fs_t* fs,
const qse_char_t* name const qse_char_t* name
); );
int qse_fs_pop ( QSE_EXPORT int qse_fs_pop (
qse_fs_t* fs, qse_fs_t* fs,
const qse_char_t* name const qse_char_t* name
); );
int qse_fs_move ( QSE_EXPORT int qse_fs_move (
qse_fs_t* fs, qse_fs_t* fs,
const qse_char_t* oldpath, const qse_char_t* oldpath,
const qse_char_t* newpath const qse_char_t* newpath
); );
int qse_fs_delete ( QSE_EXPORT int qse_fs_delete (
qse_fs_t* fs, qse_fs_t* fs,
const qse_char_t* path const qse_char_t* path
); );

View File

@ -21,6 +21,8 @@
#ifndef _QSE_CMN_GDL_H_ #ifndef _QSE_CMN_GDL_H_
#define _QSE_CMN_GDL_H_ #define _QSE_CMN_GDL_H_
#include <qse/types.h>
#include <qse/macros.h>
/** @file /** @file
* This file defins a generic double link and provides basic macros to * This file defins a generic double link and provides basic macros to
* manipulate a chain of links. * manipulate a chain of links.
@ -75,13 +77,13 @@ struct qse_gdl_t
extern "C" { extern "C" {
#endif #endif
void qse_gdl_chain ( QSE_EXPORT void qse_gdl_chain (
qse_gdl_t* p, qse_gdl_t* p,
qse_gdl_t* x, qse_gdl_t* x,
qse_gdl_t* n qse_gdl_t* n
); );
void qse_gdl_unchain ( QSE_EXPORT void qse_gdl_unchain (
qse_gdl_t* x qse_gdl_t* x
); );

View File

@ -61,7 +61,7 @@ extern "C" {
* *
* @return -1 on failure, 0 on no match, 1 if matches are found. * @return -1 on failure, 0 on no match, 1 if matches are found.
*/ */
int qse_glob ( QSE_EXPORT int qse_glob (
const qse_char_t* pattern, const qse_char_t* pattern,
qse_glob_cbimpl_t cbimpl, qse_glob_cbimpl_t cbimpl,
void* cbctx, void* cbctx,

View File

@ -237,7 +237,7 @@ typedef enum qse_htb_mancbs_kind_t qse_htb_mancbs_kind_t;
*/ */
struct qse_htb_t struct qse_htb_t
{ {
QSE_DEFINE_COMMON_FIELDS (htb) qse_mmgr_t* mmgr;
const qse_htb_mancbs_t* mancbs; const qse_htb_mancbs_t* mancbs;
@ -299,13 +299,11 @@ struct qse_htb_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (htb)
/** /**
* The qse_gethtbmancbs() functions returns a predefined callback set for * The qse_gethtbmancbs() functions returns a predefined callback set for
* pair manipulation. * pair manipulation.
*/ */
const qse_htb_mancbs_t* qse_gethtbmancbs ( QSE_EXPORT const qse_htb_mancbs_t* qse_gethtbmancbs (
qse_htb_mancbs_kind_t kind qse_htb_mancbs_kind_t kind
); );
@ -321,7 +319,7 @@ const qse_htb_mancbs_t* qse_gethtbmancbs (
* value size. * value size.
* @return #qse_htb_t pointer on success, #QSE_NULL on failure. * @return #qse_htb_t pointer on success, #QSE_NULL on failure.
*/ */
qse_htb_t* qse_htb_open ( QSE_EXPORT qse_htb_t* qse_htb_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t xtnsize, /**< extension size in bytes */ qse_size_t xtnsize, /**< extension size in bytes */
qse_size_t capa, /**< initial capacity */ qse_size_t capa, /**< initial capacity */
@ -334,14 +332,14 @@ qse_htb_t* qse_htb_open (
/** /**
* The qse_htb_close() function destroys a hash table. * The qse_htb_close() function destroys a hash table.
*/ */
void qse_htb_close ( QSE_EXPORT void qse_htb_close (
qse_htb_t* htb /**< hash table */ qse_htb_t* htb /**< hash table */
); );
/** /**
* The qse_htb_init() function initializes a hash table * The qse_htb_init() function initializes a hash table
*/ */
int qse_htb_init ( QSE_EXPORT int qse_htb_init (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t capa, /**< initial capacity */ qse_size_t capa, /**< initial capacity */
@ -353,14 +351,22 @@ int qse_htb_init (
/** /**
* The qse_htb_fini() funtion finalizes a hash table * The qse_htb_fini() funtion finalizes a hash table
*/ */
void qse_htb_fini ( QSE_EXPORT void qse_htb_fini (
qse_htb_t* htb
);
QSE_EXPORT qse_mmgr_t* qse_htb_getmmgr (
qse_htb_t* htb
);
QSE_EXPORT void* qse_htb_getxtn (
qse_htb_t* htb qse_htb_t* htb
); );
/** /**
* The qse_htb_getmancbs() function gets manipulation callback function set. * The qse_htb_getmancbs() function gets manipulation callback function set.
*/ */
const qse_htb_mancbs_t* qse_htb_getmancbs ( QSE_EXPORT const qse_htb_mancbs_t* qse_htb_getmancbs (
const qse_htb_t* htb /**< hash table */ const qse_htb_t* htb /**< hash table */
); );
@ -368,7 +374,7 @@ const qse_htb_mancbs_t* qse_htb_getmancbs (
* The qse_htb_setmancbs() function sets internal manipulation callback * The qse_htb_setmancbs() function sets internal manipulation callback
* functions for data construction, destruction, resizing, hashing, etc. * functions for data construction, destruction, resizing, hashing, etc.
*/ */
void qse_htb_setmancbs ( QSE_EXPORT void qse_htb_setmancbs (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
const qse_htb_mancbs_t* mancbs /**< callback function set */ const qse_htb_mancbs_t* mancbs /**< callback function set */
); );
@ -376,7 +382,7 @@ void qse_htb_setmancbs (
/** /**
* The qse_htb_getsize() function gets the number of pairs in hash table. * The qse_htb_getsize() function gets the number of pairs in hash table.
*/ */
qse_size_t qse_htb_getsize ( QSE_EXPORT qse_size_t qse_htb_getsize (
const qse_htb_t* htb const qse_htb_t* htb
); );
@ -384,7 +390,7 @@ qse_size_t qse_htb_getsize (
* The qse_htb_getcapa() function gets the number of slots allocated * The qse_htb_getcapa() function gets the number of slots allocated
* in a hash bucket. * in a hash bucket.
*/ */
qse_size_t qse_htb_getcapa ( QSE_EXPORT qse_size_t qse_htb_getcapa (
const qse_htb_t* htb /**< hash table */ const qse_htb_t* htb /**< hash table */
); );
@ -395,7 +401,7 @@ qse_size_t qse_htb_getcapa (
* @return pointer to the pair with a maching key, * @return pointer to the pair with a maching key,
* or #QSE_NULL if no match is found. * or #QSE_NULL if no match is found.
*/ */
qse_htb_pair_t* qse_htb_search ( QSE_EXPORT qse_htb_pair_t* qse_htb_search (
const qse_htb_t* htb, /**< hash table */ const qse_htb_t* htb, /**< hash table */
const void* kptr, /**< key pointer */ const void* kptr, /**< key pointer */
qse_size_t klen /**< key length */ qse_size_t klen /**< key length */
@ -409,7 +415,7 @@ qse_htb_pair_t* qse_htb_search (
* @return pointer to the updated or inserted pair on success, * @return pointer to the updated or inserted pair on success,
* #QSE_NULL on failure. * #QSE_NULL on failure.
*/ */
qse_htb_pair_t* qse_htb_upsert ( QSE_EXPORT qse_htb_pair_t* qse_htb_upsert (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -423,7 +429,7 @@ qse_htb_pair_t* qse_htb_upsert (
* the pair containing the key. * the pair containing the key.
* @return pointer to a pair on success, #QSE_NULL on failure. * @return pointer to a pair on success, #QSE_NULL on failure.
*/ */
qse_htb_pair_t* qse_htb_ensert ( QSE_EXPORT qse_htb_pair_t* qse_htb_ensert (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -437,7 +443,7 @@ qse_htb_pair_t* qse_htb_ensert (
* #QSE_NULL without channging the value. * #QSE_NULL without channging the value.
* @return pointer to the pair created on success, #QSE_NULL on failure. * @return pointer to the pair created on success, #QSE_NULL on failure.
*/ */
qse_htb_pair_t* qse_htb_insert ( QSE_EXPORT qse_htb_pair_t* qse_htb_insert (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -450,7 +456,7 @@ qse_htb_pair_t* qse_htb_insert (
* with a matching key. * with a matching key.
* @return pointer to the pair on success, #QSE_NULL on no matching pair * @return pointer to the pair on success, #QSE_NULL on no matching pair
*/ */
qse_htb_pair_t* qse_htb_update ( QSE_EXPORT qse_htb_pair_t* qse_htb_update (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -545,7 +551,7 @@ qse_htb_pair_t* qse_htb_update (
* } * }
* @endcode * @endcode
*/ */
qse_htb_pair_t* qse_htb_cbsert ( QSE_EXPORT qse_htb_pair_t* qse_htb_cbsert (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -557,7 +563,7 @@ qse_htb_pair_t* qse_htb_cbsert (
* The qse_htb_delete() function deletes a pair with a matching key * The qse_htb_delete() function deletes a pair with a matching key
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_htb_delete ( QSE_EXPORT int qse_htb_delete (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
const void* kptr, /**< key pointer */ const void* kptr, /**< key pointer */
qse_size_t klen /**< key length */ qse_size_t klen /**< key length */
@ -566,14 +572,14 @@ int qse_htb_delete (
/** /**
* The qse_htb_clear() function empties a hash table * The qse_htb_clear() function empties a hash table
*/ */
void qse_htb_clear ( QSE_EXPORT void qse_htb_clear (
qse_htb_t* htb /**< hash table */ qse_htb_t* htb /**< hash table */
); );
/** /**
* The qse_htb_walk() function traverses a hash table. * The qse_htb_walk() function traverses a hash table.
*/ */
void qse_htb_walk ( QSE_EXPORT void qse_htb_walk (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
qse_htb_walker_t walker, /**< callback function for each pair */ qse_htb_walker_t walker, /**< callback function for each pair */
void* ctx /**< pointer to user-specific data */ void* ctx /**< pointer to user-specific data */
@ -583,7 +589,7 @@ void qse_htb_walk (
* The qse_htb_getfirstpair() function returns the pointer to the first pair * The qse_htb_getfirstpair() function returns the pointer to the first pair
* in a hash table. * in a hash table.
*/ */
qse_htb_pair_t* qse_htb_getfirstpair ( QSE_EXPORT qse_htb_pair_t* qse_htb_getfirstpair (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
qse_size_t* buckno /**< bucket number */ qse_size_t* buckno /**< bucket number */
); );
@ -592,7 +598,7 @@ qse_htb_pair_t* qse_htb_getfirstpair (
* The qse_htb_getnextpair() function returns the pointer to the next pair * The qse_htb_getnextpair() function returns the pointer to the next pair
* to the current pair @a pair in a hash table. * to the current pair @a pair in a hash table.
*/ */
qse_htb_pair_t* qse_htb_getnextpair ( QSE_EXPORT qse_htb_pair_t* qse_htb_getnextpair (
qse_htb_t* htb, /**< hash table */ qse_htb_t* htb, /**< hash table */
qse_htb_pair_t* pair, /**< current pair */ qse_htb_pair_t* pair, /**< current pair */
qse_size_t* buckno /**< bucket number */ qse_size_t* buckno /**< bucket number */
@ -610,7 +616,7 @@ qse_htb_pair_t* qse_htb_getnextpair (
* - If @a vptr is #QSE_NULL, the value space of the size @a vlen is reserved * - If @a vptr is #QSE_NULL, the value space of the size @a vlen is reserved
* but not propagated with any data. * but not propagated with any data.
*/ */
qse_htb_pair_t* qse_htb_allocpair ( QSE_EXPORT qse_htb_pair_t* qse_htb_allocpair (
qse_htb_t* htb, qse_htb_t* htb,
void* kptr, void* kptr,
qse_size_t klen, qse_size_t klen,
@ -623,7 +629,7 @@ qse_htb_pair_t* qse_htb_allocpair (
* the pair destroyed from the hash table @a htb. Use this function at your * the pair destroyed from the hash table @a htb. Use this function at your
* own risk. * own risk.
*/ */
void qse_htb_freepair ( QSE_EXPORT void qse_htb_freepair (
qse_htb_t* htb, qse_htb_t* htb,
qse_htb_pair_t* pair qse_htb_pair_t* pair
); );
@ -631,7 +637,7 @@ void qse_htb_freepair (
/** /**
* The qse_htb_dflhash() function is a default hash function. * The qse_htb_dflhash() function is a default hash function.
*/ */
qse_size_t qse_htb_dflhash ( QSE_EXPORT qse_size_t qse_htb_dflhash (
const qse_htb_t* htb, const qse_htb_t* htb,
const void* kptr, const void* kptr,
qse_size_t klen qse_size_t klen
@ -640,7 +646,7 @@ qse_size_t qse_htb_dflhash (
/** /**
* The qse_htb_dflcomp() function is default comparator. * The qse_htb_dflcomp() function is default comparator.
*/ */
int qse_htb_dflcomp ( QSE_EXPORT int qse_htb_dflcomp (
const qse_htb_t* htb, const qse_htb_t* htb,
const void* kptr1, const void* kptr1,
qse_size_t klen1, qse_size_t klen1,

View File

@ -29,41 +29,41 @@ extern "C" {
#endif #endif
#if defined(QSE_HAVE_UINT16_T) #if defined(QSE_HAVE_UINT16_T)
qse_uint16_t qse_ntoh16 ( QSE_EXPORT qse_uint16_t qse_ntoh16 (
qse_uint16_t x qse_uint16_t x
); );
qse_uint16_t qse_hton16 ( QSE_EXPORT qse_uint16_t qse_hton16 (
qse_uint16_t x qse_uint16_t x
); );
#endif #endif
#if defined(QSE_HAVE_UINT32_T) #if defined(QSE_HAVE_UINT32_T)
qse_uint32_t qse_ntoh32 ( QSE_EXPORT qse_uint32_t qse_ntoh32 (
qse_uint32_t x qse_uint32_t x
); );
qse_uint32_t qse_hton32 ( QSE_EXPORT qse_uint32_t qse_hton32 (
qse_uint32_t x qse_uint32_t x
); );
#endif #endif
#if defined(QSE_HAVE_UINT64_T) #if defined(QSE_HAVE_UINT64_T)
qse_uint64_t qse_ntoh64 ( QSE_EXPORT qse_uint64_t qse_ntoh64 (
qse_uint64_t x qse_uint64_t x
); );
qse_uint64_t qse_hton64 ( QSE_EXPORT qse_uint64_t qse_hton64 (
qse_uint64_t x qse_uint64_t x
); );
#endif #endif
#if defined(QSE_HAVE_UINT128_T) #if defined(QSE_HAVE_UINT128_T)
qse_uint128_t qse_ntoh128 ( QSE_EXPORT qse_uint128_t qse_ntoh128 (
qse_uint128_t x qse_uint128_t x
); );
qse_uint128_t qse_hton128 ( QSE_EXPORT qse_uint128_t qse_hton128 (
qse_uint128_t x qse_uint128_t x
); );
#endif #endif

View File

@ -43,35 +43,35 @@ struct qse_ip6ad_t
extern "C" { extern "C" {
#endif #endif
int qse_mbstoip4ad ( QSE_EXPORT int qse_mbstoip4ad (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_ip4ad_t* ipad qse_ip4ad_t* ipad
); );
int qse_mbsntoip4ad ( QSE_EXPORT int qse_mbsntoip4ad (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t len, qse_size_t len,
qse_ip4ad_t* ipad qse_ip4ad_t* ipad
); );
int qse_wcstoip4ad ( QSE_EXPORT int qse_wcstoip4ad (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_ip4ad_t* ipad qse_ip4ad_t* ipad
); );
int qse_wcsntoip4ad ( QSE_EXPORT int qse_wcsntoip4ad (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_size_t len, qse_size_t len,
qse_ip4ad_t* ipad qse_ip4ad_t* ipad
); );
qse_size_t qse_ip4adtombs ( QSE_EXPORT qse_size_t qse_ip4adtombs (
const qse_ip4ad_t* ipad, const qse_ip4ad_t* ipad,
qse_mchar_t* mbs, qse_mchar_t* mbs,
qse_size_t len qse_size_t len
); );
qse_size_t qse_ip4adtowcs ( QSE_EXPORT qse_size_t qse_ip4adtowcs (
const qse_ip4ad_t* ipad, const qse_ip4ad_t* ipad,
qse_wchar_t* wcs, qse_wchar_t* wcs,
qse_size_t len qse_size_t len
@ -87,35 +87,35 @@ qse_size_t qse_ip4adtowcs (
# define qse_ip4adtostr(ipad,ptr,len) qse_ip4adtowcs(ipad,ptr,len) # define qse_ip4adtostr(ipad,ptr,len) qse_ip4adtowcs(ipad,ptr,len)
#endif #endif
int qse_mbstoip6ad ( QSE_EXPORT int qse_mbstoip6ad (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_ip6ad_t* ipad qse_ip6ad_t* ipad
); );
int qse_mbsntoip6ad ( QSE_EXPORT int qse_mbsntoip6ad (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t len, qse_size_t len,
qse_ip6ad_t* ipad qse_ip6ad_t* ipad
); );
int qse_wcstoip6ad ( QSE_EXPORT int qse_wcstoip6ad (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_ip6ad_t* ipad qse_ip6ad_t* ipad
); );
int qse_wcsntoip6ad ( QSE_EXPORT int qse_wcsntoip6ad (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_size_t len, qse_size_t len,
qse_ip6ad_t* ipad qse_ip6ad_t* ipad
); );
qse_size_t qse_ip6adtombs ( QSE_EXPORT qse_size_t qse_ip6adtombs (
const qse_ip6ad_t* ipad, const qse_ip6ad_t* ipad,
qse_mchar_t* mbs, qse_mchar_t* mbs,
qse_size_t len qse_size_t len
); );
qse_size_t qse_ip6adtowcs ( QSE_EXPORT qse_size_t qse_ip6adtowcs (
const qse_ip6ad_t* ipad, const qse_ip6ad_t* ipad,
qse_wchar_t* wcs, qse_wchar_t* wcs,
qse_size_t len qse_size_t len
@ -137,7 +137,7 @@ qse_size_t qse_ip6adtowcs (
* between 0 and 32 inclusive. * between 0 and 32 inclusive.
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_prefixtoip4ad ( QSE_EXPORT int qse_prefixtoip4ad (
int prefix, int prefix,
qse_ip4ad_t* ipad qse_ip4ad_t* ipad
); );
@ -148,7 +148,7 @@ int qse_prefixtoip4ad (
* between 0 and 128 inclusive. * between 0 and 128 inclusive.
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_prefixtoip6ad ( QSE_EXPORT int qse_prefixtoip6ad (
int prefix, int prefix,
qse_ip6ad_t* ipad qse_ip6ad_t* ipad
); );

View File

@ -130,8 +130,7 @@ typedef qse_lda_walk_t (*qse_lda_walker_t) (
*/ */
struct qse_lda_t struct qse_lda_t
{ {
QSE_DEFINE_COMMON_FIELDS (lda) qse_mmgr_t* mmgr;
qse_lda_copier_t copier; /* data copier */ qse_lda_copier_t copier; /* data copier */
qse_lda_freeer_t freeer; /* data freeer */ qse_lda_freeer_t freeer; /* data freeer */
qse_lda_comper_t comper; /* data comparator */ qse_lda_comper_t comper; /* data comparator */
@ -155,12 +154,10 @@ struct qse_lda_slot_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (lda)
/** /**
* The qse_lda_open() function creates a linear dynamic array. * The qse_lda_open() function creates a linear dynamic array.
*/ */
qse_lda_t* qse_lda_open ( QSE_EXPORT qse_lda_t* qse_lda_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t ext, /**< extension size in bytes */ qse_size_t ext, /**< extension size in bytes */
qse_size_t capa /**< initial array capacity */ qse_size_t capa /**< initial array capacity */
@ -169,14 +166,14 @@ qse_lda_t* qse_lda_open (
/** /**
* The qse_lda_close() function destroys a linear dynamic array. * The qse_lda_close() function destroys a linear dynamic array.
*/ */
void qse_lda_close ( QSE_EXPORT void qse_lda_close (
qse_lda_t* lda /**< array */ qse_lda_t* lda /**< array */
); );
/** /**
* The qse_lda_init() function initializes a linear dynamic array. * The qse_lda_init() function initializes a linear dynamic array.
*/ */
int qse_lda_init ( QSE_EXPORT int qse_lda_init (
qse_lda_t* lda, qse_lda_t* lda,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_size_t capa qse_size_t capa
@ -185,14 +182,22 @@ int qse_lda_init (
/** /**
* The qse_lda_fini() function finalizes a linear dynamic array. * The qse_lda_fini() function finalizes a linear dynamic array.
*/ */
void qse_lda_fini ( QSE_EXPORT void qse_lda_fini (
qse_lda_t* lda /**< array */ qse_lda_t* lda /**< array */
); );
QSE_EXPORT qse_mmgr_t* qse_lda_getmmgr (
qse_lda_t* lda
);
QSE_EXPORT void* qse_lda_getxtn (
qse_lda_t* lda
);
/** /**
* The qse_lda_getscale() function returns the scale factor * The qse_lda_getscale() function returns the scale factor
*/ */
int qse_lda_getscale ( QSE_EXPORT int qse_lda_getscale (
qse_lda_t* lda /**< array */ qse_lda_t* lda /**< array */
); );
@ -203,12 +208,12 @@ int qse_lda_getscale (
* The scale factor should be larger than 0 and less than 256. * 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. * It is a bad idea to change the scale factor when @a lda is not empty.
*/ */
void qse_lda_setscale ( QSE_EXPORT void qse_lda_setscale (
qse_lda_t* lda /**< array */, qse_lda_t* lda /**< array */,
int scale /**< scale factor */ int scale /**< scale factor */
); );
qse_lda_copier_t qse_lda_getcopier ( QSE_EXPORT qse_lda_copier_t qse_lda_getcopier (
qse_lda_t* lda /* array */ qse_lda_t* lda /* array */
); );
@ -219,7 +224,7 @@ qse_lda_copier_t qse_lda_getcopier (
* #QSE_LDA_COPIER_SIMPLE to perform no special operation when the data * #QSE_LDA_COPIER_SIMPLE to perform no special operation when the data
* pointer is stored. * pointer is stored.
*/ */
void qse_lda_setcopier ( QSE_EXPORT void qse_lda_setcopier (
qse_lda_t* lda /** lda */, qse_lda_t* lda /** lda */,
qse_lda_copier_t copier /** element copier */ qse_lda_copier_t copier /** element copier */
); );
@ -227,7 +232,7 @@ void qse_lda_setcopier (
/** /**
* The qse_lda_getfreeer() function returns a custom element destroyer. * The qse_lda_getfreeer() function returns a custom element destroyer.
*/ */
qse_lda_freeer_t qse_lda_getfreeer ( QSE_EXPORT qse_lda_freeer_t qse_lda_getfreeer (
qse_lda_t* lda /**< lda */ qse_lda_t* lda /**< lda */
); );
@ -235,12 +240,12 @@ qse_lda_freeer_t qse_lda_getfreeer (
* The qse_lda_setfreeer() function specifies how to destroy an element. * The qse_lda_setfreeer() function specifies how to destroy an element.
* The @a freeer is called when a slot containing the element is destroyed. * The @a freeer is called when a slot containing the element is destroyed.
*/ */
void qse_lda_setfreeer ( QSE_EXPORT void qse_lda_setfreeer (
qse_lda_t* lda /**< lda */, qse_lda_t* lda /**< lda */,
qse_lda_freeer_t freeer /**< element freeer */ qse_lda_freeer_t freeer /**< element freeer */
); );
qse_lda_comper_t qse_lda_getcomper ( QSE_EXPORT qse_lda_comper_t qse_lda_getcomper (
qse_lda_t* lda /**< lda */ qse_lda_t* lda /**< lda */
); );
@ -249,71 +254,71 @@ qse_lda_comper_t qse_lda_getcomper (
* for equality test. The comparator @a comper must return 0 if two elements * for equality test. The comparator @a comper must return 0 if two elements
* compared are equal, or a non-zero number otherwise. * compared are equal, or a non-zero number otherwise.
*/ */
void qse_lda_setcomper ( QSE_EXPORT void qse_lda_setcomper (
qse_lda_t* lda /**< lda */, qse_lda_t* lda /**< lda */,
qse_lda_comper_t comper /**< comparator */ qse_lda_comper_t comper /**< comparator */
); );
qse_lda_keeper_t qse_lda_getkeeper ( QSE_EXPORT qse_lda_keeper_t qse_lda_getkeeper (
qse_lda_t* lda qse_lda_t* lda
); );
void qse_lda_setkeeper ( QSE_EXPORT void qse_lda_setkeeper (
qse_lda_t* lda, qse_lda_t* lda,
qse_lda_keeper_t keeper qse_lda_keeper_t keeper
); );
qse_lda_sizer_t qse_lda_getsizer ( QSE_EXPORT qse_lda_sizer_t qse_lda_getsizer (
qse_lda_t* lda qse_lda_t* lda
); );
void qse_lda_setsizer ( QSE_EXPORT void qse_lda_setsizer (
qse_lda_t* lda, qse_lda_t* lda,
qse_lda_sizer_t sizer qse_lda_sizer_t sizer
); );
qse_size_t qse_lda_getsize ( QSE_EXPORT qse_size_t qse_lda_getsize (
qse_lda_t* lda qse_lda_t* lda
); );
qse_size_t qse_lda_getcapa ( QSE_EXPORT qse_size_t qse_lda_getcapa (
qse_lda_t* lda qse_lda_t* lda
); );
qse_lda_t* qse_lda_setcapa ( QSE_EXPORT qse_lda_t* qse_lda_setcapa (
qse_lda_t* lda, qse_lda_t* lda,
qse_size_t capa qse_size_t capa
); );
qse_size_t qse_lda_search ( QSE_EXPORT qse_size_t qse_lda_search (
qse_lda_t* lda, qse_lda_t* lda,
qse_size_t pos, qse_size_t pos,
const void* dptr, const void* dptr,
qse_size_t dlen qse_size_t dlen
); );
qse_size_t qse_lda_rsearch ( QSE_EXPORT qse_size_t qse_lda_rsearch (
qse_lda_t* lda, qse_lda_t* lda,
qse_size_t pos, qse_size_t pos,
const void* dptr, const void* dptr,
qse_size_t dlen qse_size_t dlen
); );
qse_size_t qse_lda_upsert ( QSE_EXPORT qse_size_t qse_lda_upsert (
qse_lda_t* lda, qse_lda_t* lda,
qse_size_t index, qse_size_t index,
void* dptr, void* dptr,
qse_size_t dlen qse_size_t dlen
); );
qse_size_t qse_lda_insert ( QSE_EXPORT qse_size_t qse_lda_insert (
qse_lda_t* lda, qse_lda_t* lda,
qse_size_t index, qse_size_t index,
void* dptr, void* dptr,
qse_size_t dlen qse_size_t dlen
); );
qse_size_t qse_lda_update ( QSE_EXPORT qse_size_t qse_lda_update (
qse_lda_t* lda, qse_lda_t* lda,
qse_size_t pos, qse_size_t pos,
void* dptr, void* dptr,
@ -324,7 +329,7 @@ qse_size_t qse_lda_update (
* The qse_lda_delete() function deletes the as many data as the count * The qse_lda_delete() function deletes the as many data as the count
* from the index. It returns the number of data deleted. * from the index. It returns the number of data deleted.
*/ */
qse_size_t qse_lda_delete ( QSE_EXPORT qse_size_t qse_lda_delete (
qse_lda_t* lda, qse_lda_t* lda,
qse_size_t index, qse_size_t index,
qse_size_t count qse_size_t count
@ -334,13 +339,13 @@ qse_size_t qse_lda_delete (
* The qse_lda_uplete() function deletes data slot without compaction. * The qse_lda_uplete() function deletes data slot without compaction.
* It returns the number of data affected. * It returns the number of data affected.
*/ */
qse_size_t qse_lda_uplete ( QSE_EXPORT qse_size_t qse_lda_uplete (
qse_lda_t* lda, qse_lda_t* lda,
qse_size_t index, qse_size_t index,
qse_size_t count qse_size_t count
); );
void qse_lda_clear ( QSE_EXPORT void qse_lda_clear (
qse_lda_t* lda qse_lda_t* lda
); );
@ -351,7 +356,7 @@ void qse_lda_clear (
* #QSE_LDA_WALK_STOP. * #QSE_LDA_WALK_STOP.
* @return number of calls to the @a walker fucntion made * @return number of calls to the @a walker fucntion made
*/ */
qse_size_t qse_lda_walk ( QSE_EXPORT qse_size_t qse_lda_walk (
qse_lda_t* lda, qse_lda_t* lda,
qse_lda_walker_t walker, qse_lda_walker_t walker,
void* ctx void* ctx
@ -364,7 +369,7 @@ qse_size_t qse_lda_walk (
* #QSE_LDA_WALK_STOP. * #QSE_LDA_WALK_STOP.
* @return number of calls to the @a walker fucntion made * @return number of calls to the @a walker fucntion made
*/ */
qse_size_t qse_lda_rwalk ( QSE_EXPORT qse_size_t qse_lda_rwalk (
qse_lda_t* lda, qse_lda_t* lda,
qse_lda_walker_t walker, qse_lda_walker_t walker,
void* ctx void* ctx
@ -375,7 +380,7 @@ qse_size_t qse_lda_rwalk (
* function to allow stack-like operations over an array. To do so, you should * function to allow stack-like operations over an array. To do so, you should
* not play with other non-stack related functions. * not play with other non-stack related functions.
*/ */
qse_size_t qse_lda_pushstack ( QSE_EXPORT qse_size_t qse_lda_pushstack (
qse_lda_t* lda, qse_lda_t* lda,
void* dptr, void* dptr,
qse_size_t dlen qse_size_t dlen
@ -387,7 +392,7 @@ qse_size_t qse_lda_pushstack (
* not play with other non-stack related functions. * not play with other non-stack related functions.
* @note You must not call this function if @a lda is empty. * @note You must not call this function if @a lda is empty.
*/ */
void qse_lda_popstack ( QSE_EXPORT void qse_lda_popstack (
qse_lda_t* lda qse_lda_t* lda
); );
@ -399,7 +404,7 @@ void qse_lda_popstack (
* @note You must not mess up the array with other non-heap related functions * @note You must not mess up the array with other non-heap related functions
* to keep the heap property. * to keep the heap property.
*/ */
qse_size_t qse_lda_pushheap ( QSE_EXPORT qse_size_t qse_lda_pushheap (
qse_lda_t* lda, qse_lda_t* lda,
void* dptr, void* dptr,
qse_size_t dlen qse_size_t dlen
@ -412,7 +417,7 @@ qse_size_t qse_lda_pushheap (
* @note You must not mess up the array with other non-heap related functions * @note You must not mess up the array with other non-heap related functions
* to keep the heap property. * to keep the heap property.
*/ */
void qse_lda_popheap ( QSE_EXPORT void qse_lda_popheap (
qse_lda_t* lda qse_lda_t* lda
); );

View File

@ -86,7 +86,7 @@ extern "C" {
* The qse_runmain() function helps to invoke a main function independent of * The qse_runmain() function helps to invoke a main function independent of
* the character mode configured for the library. * the character mode configured for the library.
*/ */
int qse_runmain ( QSE_EXPORT int qse_runmain (
int argc, int argc,
qse_achar_t* argv[], qse_achar_t* argv[],
qse_runmain_handler_t handler qse_runmain_handler_t handler
@ -97,7 +97,7 @@ int qse_runmain (
* independent of the character mode configured for the library providing * independent of the character mode configured for the library providing
* the enviroment list. * the enviroment list.
*/ */
int qse_runmainwithenv ( QSE_EXPORT int qse_runmainwithenv (
int argc, int argc,
qse_achar_t* argv[], qse_achar_t* argv[],
qse_achar_t* envp[], qse_achar_t* envp[],

View File

@ -51,7 +51,7 @@ extern "C" {
/** /**
* The qse_findcmgrbyid() function returns a built-in cmgr for a given @a id. * The qse_findcmgrbyid() function returns a built-in cmgr for a given @a id.
*/ */
qse_cmgr_t* qse_findcmgrbyid ( QSE_EXPORT qse_cmgr_t* qse_findcmgrbyid (
qse_cmgr_id_t id qse_cmgr_id_t id
); );
@ -62,26 +62,26 @@ qse_cmgr_t* qse_findcmgrbyid (
* empty string. Calling this function with an empty string is the same * empty string. Calling this function with an empty string is the same
* as calling qse_getdflcmgr(). * as calling qse_getdflcmgr().
*/ */
qse_cmgr_t* qse_findcmgr ( QSE_EXPORT qse_cmgr_t* qse_findcmgr (
const qse_char_t* name const qse_char_t* name
); );
void qse_setcmgrfinder ( QSE_EXPORT void qse_setcmgrfinder (
qse_cmgr_finder_t finder qse_cmgr_finder_t finder
); );
qse_cmgr_finder_t qse_getcmgrfinder ( QSE_EXPORT qse_cmgr_finder_t qse_getcmgrfinder (
void void
); );
/* --------------------------------------------------- */ /* --------------------------------------------------- */
/* DEFAULT GLOBAL CMGR */ /* DEFAULT GLOBAL CMGR */
/* --------------------------------------------------- */ /* --------------------------------------------------- */
qse_cmgr_t* qse_getdflcmgr ( QSE_EXPORT qse_cmgr_t* qse_getdflcmgr (
void void
); );
void qse_setdflcmgr ( QSE_EXPORT void qse_setdflcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
@ -89,7 +89,7 @@ void qse_setdflcmgr (
* The qse_setdflcmgrbyid() function finds a built-in * The qse_setdflcmgrbyid() function finds a built-in
* cmgr for the @a id and sets it as a default cmgr. * cmgr for the @a id and sets it as a default cmgr.
*/ */
void qse_setdflcmgrbyid ( QSE_EXPORT void qse_setdflcmgrbyid (
qse_cmgr_id_t id qse_cmgr_id_t id
); );
@ -97,7 +97,7 @@ void qse_setdflcmgrbyid (
/* STRING CONVERSION USING CMGR */ /* STRING CONVERSION USING CMGR */
/* --------------------------------------------------- */ /* --------------------------------------------------- */
int qse_mbstowcswithcmgr ( QSE_EXPORT int qse_mbstowcswithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_wchar_t* wcs, qse_wchar_t* wcs,
@ -105,7 +105,7 @@ int qse_mbstowcswithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
int qse_mbstowcsallwithcmgr ( QSE_EXPORT int qse_mbstowcsallwithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_wchar_t* wcs, qse_wchar_t* wcs,
@ -113,7 +113,7 @@ int qse_mbstowcsallwithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
int qse_mbsntowcsnwithcmgr ( QSE_EXPORT int qse_mbsntowcsnwithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_wchar_t* wcs, qse_wchar_t* wcs,
@ -121,7 +121,7 @@ int qse_mbsntowcsnwithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
int qse_mbsntowcsnallwithcmgr ( QSE_EXPORT int qse_mbsntowcsnallwithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_wchar_t* wcs, qse_wchar_t* wcs,
@ -129,7 +129,7 @@ int qse_mbsntowcsnallwithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
int qse_mbsntowcsnuptowithcmgr ( QSE_EXPORT int qse_mbsntowcsnuptowithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_wchar_t* wcs, qse_wchar_t* wcs,
@ -138,7 +138,7 @@ int qse_mbsntowcsnuptowithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_wchar_t* qse_mbsntowcsdupwithcmgr ( QSE_EXPORT qse_wchar_t* qse_mbsntowcsdupwithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_size_t* wcslen, qse_size_t* wcslen,
@ -146,7 +146,7 @@ qse_wchar_t* qse_mbsntowcsdupwithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_wchar_t* qse_mbsntowcsalldupwithcmgr ( QSE_EXPORT qse_wchar_t* qse_mbsntowcsalldupwithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_size_t* wcslen, qse_size_t* wcslen,
@ -154,35 +154,35 @@ qse_wchar_t* qse_mbsntowcsalldupwithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_wchar_t* qse_mbstowcsdupwithcmgr ( QSE_EXPORT qse_wchar_t* qse_mbstowcsdupwithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_wchar_t* qse_mbstowcsalldupwithcmgr ( QSE_EXPORT qse_wchar_t* qse_mbstowcsalldupwithcmgr (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_wchar_t* qse_mbsatowcsdupwithcmgr ( QSE_EXPORT qse_wchar_t* qse_mbsatowcsdupwithcmgr (
const qse_mchar_t* mbs[], const qse_mchar_t* mbs[],
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_wchar_t* qse_mbsatowcsalldupwithcmgr ( QSE_EXPORT qse_wchar_t* qse_mbsatowcsalldupwithcmgr (
const qse_mchar_t* mbs[], const qse_mchar_t* mbs[],
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
int qse_wcstombswithcmgr ( QSE_EXPORT int qse_wcstombswithcmgr (
const qse_wchar_t* wcs, /**< [in] wide-character string to convert*/ const qse_wchar_t* wcs, /**< [in] wide-character string to convert*/
qse_size_t* wcslen, /**< [out] number of wide-characters handled */ qse_size_t* wcslen, /**< [out] number of wide-characters handled */
qse_mchar_t* mbs, /**< [out] #QSE_NULL or buffer pointer */ qse_mchar_t* mbs, /**< [out] #QSE_NULL or buffer pointer */
@ -191,7 +191,7 @@ int qse_wcstombswithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
int qse_wcsntombsnwithcmgr ( QSE_EXPORT int qse_wcsntombsnwithcmgr (
const qse_wchar_t* wcs, /**< [in] wide string */ const qse_wchar_t* wcs, /**< [in] wide string */
qse_size_t* wcslen, /**< [in,out] wide string length for in, qse_size_t* wcslen, /**< [in,out] wide string length for in,
number of wide characters handled for out */ number of wide characters handled for out */
@ -201,14 +201,14 @@ int qse_wcsntombsnwithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_mchar_t* qse_wcstombsdupwithcmgr ( QSE_EXPORT qse_mchar_t* qse_wcstombsdupwithcmgr (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_mchar_t* qse_wcsntombsdupwithcmgr ( QSE_EXPORT qse_mchar_t* qse_wcsntombsdupwithcmgr (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_size_t wcslen, qse_size_t wcslen,
qse_size_t* mbslen, qse_size_t* mbslen,
@ -216,7 +216,7 @@ qse_mchar_t* qse_wcsntombsdupwithcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_mchar_t* qse_wcsatombsdupwithcmgr ( QSE_EXPORT qse_mchar_t* qse_wcsatombsdupwithcmgr (
const qse_wchar_t* wcs[], const qse_wchar_t* wcs[],
qse_size_t* mbslen, qse_size_t* mbslen,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
@ -224,7 +224,7 @@ qse_mchar_t* qse_wcsatombsdupwithcmgr (
); );
qse_mchar_t* qse_wcsnatombsdupwithcmgr ( QSE_EXPORT qse_mchar_t* qse_wcsnatombsdupwithcmgr (
const qse_wcstr_t wcs[], const qse_wcstr_t wcs[],
qse_size_t* mbslen, qse_size_t* mbslen,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
@ -256,7 +256,7 @@ qse_mchar_t* qse_wcsnatombsdupwithcmgr (
* -2 if the wide-character string buffer is too small. * -2 if the wide-character string buffer is too small.
* -3 if @a mbs is not a complete sequence. * -3 if @a mbs is not a complete sequence.
*/ */
int qse_mbstowcs ( QSE_EXPORT int qse_mbstowcs (
const qse_mchar_t* mbs, /**< [in] multibyte string to convert */ const qse_mchar_t* mbs, /**< [in] multibyte string to convert */
qse_size_t* mbslen, /**< [out] number of multibyte characters qse_size_t* mbslen, /**< [out] number of multibyte characters
handled */ handled */
@ -265,7 +265,7 @@ int qse_mbstowcs (
number of characters in the buffer for out */ number of characters in the buffer for out */
); );
int qse_mbstowcsall ( QSE_EXPORT int qse_mbstowcsall (
const qse_mchar_t* mbs, /**< [in] multibyte string to convert */ const qse_mchar_t* mbs, /**< [in] multibyte string to convert */
qse_size_t* mbslen, /**< [out] number of multibyte characters qse_size_t* mbslen, /**< [out] number of multibyte characters
handled */ handled */
@ -285,14 +285,14 @@ int qse_mbstowcsall (
* -2 if the wide-character string buffer is too small. * -2 if the wide-character string buffer is too small.
* -3 if @a mbs is not a complete sequence. * -3 if @a mbs is not a complete sequence.
*/ */
int qse_mbsntowcsn ( QSE_EXPORT int qse_mbsntowcsn (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_wchar_t* wcs, qse_wchar_t* wcs,
qse_size_t* wcslen qse_size_t* wcslen
); );
int qse_mbsntowcsnall ( QSE_EXPORT int qse_mbsntowcsnall (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_wchar_t* wcs, qse_wchar_t* wcs,
@ -303,7 +303,7 @@ int qse_mbsntowcsnall (
* The qse_mbsntowcsnupto() function is the same as qse_mbsntowcsn() * The qse_mbsntowcsnupto() function is the same as qse_mbsntowcsn()
* except that it stops once it has processed the @a stopper character. * except that it stops once it has processed the @a stopper character.
*/ */
int qse_mbsntowcsnupto ( QSE_EXPORT int qse_mbsntowcsnupto (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_wchar_t* wcs, qse_wchar_t* wcs,
@ -311,39 +311,39 @@ int qse_mbsntowcsnupto (
qse_wchar_t stopper qse_wchar_t stopper
); );
qse_wchar_t* qse_mbsntowcsdup ( QSE_EXPORT qse_wchar_t* qse_mbsntowcsdup (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
qse_wchar_t* qse_mbsntowcsalldup ( QSE_EXPORT qse_wchar_t* qse_mbsntowcsalldup (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
qse_wchar_t* qse_mbstowcsdup ( QSE_EXPORT qse_wchar_t* qse_mbstowcsdup (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
qse_wchar_t* qse_mbstowcsalldup ( QSE_EXPORT qse_wchar_t* qse_mbstowcsalldup (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
qse_wchar_t* qse_mbsatowcsdup ( QSE_EXPORT qse_wchar_t* qse_mbsatowcsdup (
const qse_mchar_t* mbs[], const qse_mchar_t* mbs[],
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
qse_wchar_t* qse_mbsatowcsalldup ( QSE_EXPORT qse_wchar_t* qse_mbsatowcsalldup (
const qse_mchar_t* mbs[], const qse_mchar_t* mbs[],
qse_size_t* wcslen, qse_size_t* wcslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
@ -378,7 +378,7 @@ qse_wchar_t* qse_mbsatowcsalldup (
* } * }
* @endcode * @endcode
*/ */
int qse_wcstombs ( QSE_EXPORT int qse_wcstombs (
const qse_wchar_t* wcs, /**< [in] wide-character string to convert*/ const qse_wchar_t* wcs, /**< [in] wide-character string to convert*/
qse_size_t* wcslen, /**< [out] number of wide-characters handled */ qse_size_t* wcslen, /**< [out] number of wide-characters handled */
qse_mchar_t* mbs, /**< [out] #QSE_NULL or buffer pointer */ qse_mchar_t* mbs, /**< [out] #QSE_NULL or buffer pointer */
@ -410,7 +410,7 @@ int qse_wcstombs (
* -1 if @a wcs contains an illegal character, * -1 if @a wcs contains an illegal character,
* -2 if the multibyte string buffer is too small. * -2 if the multibyte string buffer is too small.
*/ */
int qse_wcsntombsn ( QSE_EXPORT int qse_wcsntombsn (
const qse_wchar_t* wcs, /**< [in] wide string */ const qse_wchar_t* wcs, /**< [in] wide string */
qse_size_t* wcslen,/**< [in,out] wide string length for in, qse_size_t* wcslen,/**< [in,out] wide string length for in,
number of wide characters handled for out */ number of wide characters handled for out */
@ -419,26 +419,26 @@ int qse_wcsntombsn (
actual size for out */ actual size for out */
); );
qse_mchar_t* qse_wcstombsdup ( QSE_EXPORT qse_mchar_t* qse_wcstombsdup (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
qse_mchar_t* qse_wcsntombsdup ( QSE_EXPORT qse_mchar_t* qse_wcsntombsdup (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_size_t wcslen, qse_size_t wcslen,
qse_size_t* mbslen, qse_size_t* mbslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
qse_mchar_t* qse_wcsatombsdup ( QSE_EXPORT qse_mchar_t* qse_wcsatombsdup (
const qse_wchar_t* wcs[], const qse_wchar_t* wcs[],
qse_size_t* mbslen, qse_size_t* mbslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
qse_mchar_t* qse_wcsnatombsdup ( QSE_EXPORT qse_mchar_t* qse_wcsnatombsdup (
const qse_wcstr_t wcs[], const qse_wcstr_t wcs[],
qse_size_t* mbslen, qse_size_t* mbslen,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr

View File

@ -66,7 +66,7 @@ extern "C" {
* *
* @return destination memory block @a dst. * @return destination memory block @a dst.
*/ */
void* qse_memcpy ( QSE_EXPORT void* qse_memcpy (
void* dst, /**< destination memory block */ void* dst, /**< destination memory block */
const void* src, /**< source memory block */ const void* src, /**< source memory block */
qse_size_t n /**< number of bytes to copy */ qse_size_t n /**< number of bytes to copy */
@ -79,7 +79,7 @@ void* qse_memcpy (
* *
* @return destination memory block @a dst. * @return destination memory block @a dst.
*/ */
void* qse_memmove ( QSE_EXPORT void* qse_memmove (
void* dst, /**< destination memory block */ void* dst, /**< destination memory block */
const void* src, /**< source memory block */ const void* src, /**< source memory block */
qse_size_t n /**< number of bytes to copy */ qse_size_t n /**< number of bytes to copy */
@ -91,7 +91,7 @@ void* qse_memmove (
* *
* @return destination memory block @a dst. * @return destination memory block @a dst.
*/ */
void* qse_memset ( QSE_EXPORT void* qse_memset (
void* dst, /**< destination memory block */ void* dst, /**< destination memory block */
int val, /**< value fill the memory block with */ int val, /**< value fill the memory block with */
qse_size_t n /**< number of bytes to fill */ qse_size_t n /**< number of bytes to fill */
@ -106,7 +106,7 @@ void* qse_memset (
* positive number if the first different byte of s1 is greater than that of s2. * positive number if the first different byte of s1 is greater than that of s2.
* negative number if the first different byte of s1 is less than that of s2. * negative number if the first different byte of s1 is less than that of s2.
*/ */
int qse_memcmp ( QSE_EXPORT int qse_memcmp (
const void* s1, /**< first memory block to compare */ const void* s1, /**< first memory block to compare */
const void* s2, /**< second memory block to compare */ const void* s2, /**< second memory block to compare */
qse_size_t n /**< the number of bytes to compare */ qse_size_t n /**< the number of bytes to compare */
@ -123,7 +123,7 @@ int qse_memcmp (
* pointer to the location in the memory block @a s matching the byte @a val * pointer to the location in the memory block @a s matching the byte @a val
* if a match is found. * if a match is found.
*/ */
void* qse_membyte ( QSE_EXPORT void* qse_membyte (
const void* s, /**< memory block to scan */ const void* s, /**< memory block to scan */
int val, /**< byte to find */ int val, /**< byte to find */
qse_size_t n /**< number of bytes to scan */ qse_size_t n /**< number of bytes to scan */
@ -140,7 +140,7 @@ void* qse_membyte (
* pointer to the location in the memory block s matching the byte val * pointer to the location in the memory block s matching the byte val
* if a match is found. * if a match is found.
*/ */
void* qse_memrbyte ( QSE_EXPORT void* qse_memrbyte (
const void* s, /**< memory block to scan */ const void* s, /**< memory block to scan */
int val, /**< byte to find */ int val, /**< byte to find */
qse_size_t n /**< number of bytes to scan */ qse_size_t n /**< number of bytes to scan */
@ -154,7 +154,7 @@ void* qse_memrbyte (
* #QSE_NULL if no match is found. * #QSE_NULL if no match is found.
* pointer to the start of the matching location if a match is found. * pointer to the start of the matching location if a match is found.
*/ */
void* qse_memmem ( QSE_EXPORT void* qse_memmem (
const void* hs, /**< memory block to scan */ const void* hs, /**< memory block to scan */
qse_size_t hl, /**< number of bytes to scan */ qse_size_t hl, /**< number of bytes to scan */
const void* nd, /**< byte block to find */ const void* nd, /**< byte block to find */
@ -170,7 +170,7 @@ void* qse_memmem (
* #QSE_NULL if no match is found. * #QSE_NULL if no match is found.
* pointer to the start of the matching location if a match is found. * pointer to the start of the matching location if a match is found.
*/ */
void* qse_memrmem ( QSE_EXPORT void* qse_memrmem (
const void* hs, /**< memory block to scan */ const void* hs, /**< memory block to scan */
qse_size_t hl, /**< number of bytes to scan */ qse_size_t hl, /**< number of bytes to scan */
const void* nd, /**< byte block to find */ const void* nd, /**< byte block to find */
@ -180,7 +180,7 @@ void* qse_memrmem (
/** /**
* The qse_getdflmmgr() function returns the default memory manager. * The qse_getdflmmgr() function returns the default memory manager.
*/ */
qse_mmgr_t* qse_getdflmmgr ( QSE_EXPORT qse_mmgr_t* qse_getdflmmgr (
void void
); );
@ -189,7 +189,7 @@ qse_mmgr_t* qse_getdflmmgr (
* If mmgr is #QSE_NULL, the memory manager is set to the builtin * If mmgr is #QSE_NULL, the memory manager is set to the builtin
* default. * default.
*/ */
void qse_setdflmmgr ( QSE_EXPORT void qse_setdflmmgr (
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );

View File

@ -91,7 +91,7 @@ struct qse_skad_t
extern "C" { extern "C" {
#endif #endif
int qse_nwadequal ( QSE_EXPORT int qse_nwadequal (
const qse_nwad_t* x, const qse_nwad_t* x,
const qse_nwad_t* y const qse_nwad_t* y
); );
@ -100,41 +100,41 @@ int qse_nwadequal (
* The qse_clearnwad() function zeros out the address * The qse_clearnwad() function zeros out the address
* for the address @a type. * for the address @a type.
*/ */
void qse_clearnwad ( QSE_EXPORT void qse_clearnwad (
qse_nwad_t* nwad, qse_nwad_t* nwad,
qse_nwad_type_t type qse_nwad_type_t type
); );
int qse_mbstonwad ( QSE_EXPORT int qse_mbstonwad (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_nwad_t* nwad qse_nwad_t* nwad
); );
int qse_mbsntonwad ( QSE_EXPORT int qse_mbsntonwad (
const qse_mchar_t* mbs, const qse_mchar_t* mbs,
qse_size_t len, qse_size_t len,
qse_nwad_t* nwad qse_nwad_t* nwad
); );
int qse_wcstonwad ( QSE_EXPORT int qse_wcstonwad (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_nwad_t* nwad qse_nwad_t* nwad
); );
int qse_wcsntonwad ( QSE_EXPORT int qse_wcsntonwad (
const qse_wchar_t* wcs, const qse_wchar_t* wcs,
qse_size_t len, qse_size_t len,
qse_nwad_t* nwad qse_nwad_t* nwad
); );
qse_size_t qse_nwadtombs ( QSE_EXPORT qse_size_t qse_nwadtombs (
const qse_nwad_t* nwad, const qse_nwad_t* nwad,
qse_mchar_t* mbs, qse_mchar_t* mbs,
qse_size_t len, qse_size_t len,
int flags int flags
); );
qse_size_t qse_nwadtowcs ( QSE_EXPORT qse_size_t qse_nwadtowcs (
const qse_nwad_t* nwad, const qse_nwad_t* nwad,
qse_wchar_t* wcs, qse_wchar_t* wcs,
qse_size_t len, qse_size_t len,
@ -151,17 +151,17 @@ qse_size_t qse_nwadtowcs (
# define qse_nwadtostr(nwad,ptr,len,flags) qse_nwadtowcs(nwad,ptr,len,flags) # define qse_nwadtostr(nwad,ptr,len,flags) qse_nwadtowcs(nwad,ptr,len,flags)
#endif #endif
int qse_skadtonwad ( QSE_EXPORT int qse_skadtonwad (
const qse_skad_t* skad, const qse_skad_t* skad,
qse_nwad_t* nwad qse_nwad_t* nwad
); );
int qse_nwadtoskad ( QSE_EXPORT int qse_nwadtoskad (
const qse_nwad_t* nwad, const qse_nwad_t* nwad,
qse_skad_t* skad qse_skad_t* skad
); );
int qse_skadfamily ( QSE_EXPORT int qse_skadfamily (
const qse_skad_t* skad const qse_skad_t* skad
); );

View File

@ -70,35 +70,35 @@ struct qse_nwifcfg_t
extern "C" { extern "C" {
#endif #endif
int qse_nwifmbstoindex ( QSE_EXPORT int qse_nwifmbstoindex (
const qse_mchar_t* ptr, const qse_mchar_t* ptr,
unsigned int* index unsigned int* index
); );
int qse_nwifwcstoindex ( QSE_EXPORT int qse_nwifwcstoindex (
const qse_wchar_t* ptr, const qse_wchar_t* ptr,
unsigned int* index unsigned int* index
); );
int qse_nwifmbsntoindex ( QSE_EXPORT int qse_nwifmbsntoindex (
const qse_mchar_t* ptr, const qse_mchar_t* ptr,
qse_size_t len, qse_size_t len,
unsigned int* index unsigned int* index
); );
int qse_nwifwcsntoindex ( QSE_EXPORT int qse_nwifwcsntoindex (
const qse_wchar_t* ptr, const qse_wchar_t* ptr,
qse_size_t len, qse_size_t len,
unsigned int* index unsigned int* index
); );
int qse_nwifindextombs ( QSE_EXPORT int qse_nwifindextombs (
unsigned int index, unsigned int index,
qse_mchar_t* buf, qse_mchar_t* buf,
qse_size_t len qse_size_t len
); );
int qse_nwifindextowcs ( QSE_EXPORT int qse_nwifindextowcs (
unsigned int index, unsigned int index,
qse_wchar_t* buf, qse_wchar_t* buf,
qse_size_t len qse_size_t len
@ -114,7 +114,7 @@ int qse_nwifindextowcs (
# define qse_nwifindextostr(index,buf,len) qse_nwifindextowcs(index,buf,len) # define qse_nwifindextostr(index,buf,len) qse_nwifindextowcs(index,buf,len)
#endif #endif
int qse_getnwifcfg ( QSE_EXPORT int qse_getnwifcfg (
qse_nwifcfg_t* cfg qse_nwifcfg_t* cfg
); );

View File

@ -97,7 +97,7 @@ typedef struct qse_nwio_t qse_nwio_t;
*/ */
struct qse_nwio_t struct qse_nwio_t
{ {
QSE_DEFINE_COMMON_FIELDS (nwio) qse_mmgr_t* mmgr;
int flags; int flags;
qse_nwio_errnum_t errnum; qse_nwio_errnum_t errnum;
qse_nwio_tmout_t tmout; qse_nwio_tmout_t tmout;
@ -112,8 +112,6 @@ struct qse_nwio_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (nwio)
/** /**
* The qse_nwio_open() function opens a file. * The qse_nwio_open() function opens a file.
* To open a file, you should set the flags with at least one of * To open a file, you should set the flags with at least one of
@ -122,7 +120,7 @@ QSE_DEFINE_COMMON_FUNCTIONS (nwio)
* If the #QSE_NWIO_HANDLE flag is set, the @a nwad parameter is interpreted * If the #QSE_NWIO_HANDLE flag is set, the @a nwad parameter is interpreted
* as a pointer to qse_nwio_hnd_t. * as a pointer to qse_nwio_hnd_t.
*/ */
qse_nwio_t* qse_nwio_open ( QSE_EXPORT qse_nwio_t* qse_nwio_open (
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_size_t ext, qse_size_t ext,
const qse_nwad_t* nwad, const qse_nwad_t* nwad,
@ -133,14 +131,14 @@ qse_nwio_t* qse_nwio_open (
/** /**
* The qse_nwio_close() function closes a file. * The qse_nwio_close() function closes a file.
*/ */
void qse_nwio_close ( QSE_EXPORT void qse_nwio_close (
qse_nwio_t* nwio qse_nwio_t* nwio
); );
/** /**
* The qse_nwio_close() function opens a file into @a nwio. * The qse_nwio_close() function opens a file into @a nwio.
*/ */
int qse_nwio_init ( QSE_EXPORT int qse_nwio_init (
qse_nwio_t* nwio, qse_nwio_t* nwio,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
const qse_nwad_t* nwad, const qse_nwad_t* nwad,
@ -152,48 +150,56 @@ int qse_nwio_init (
* The qse_nwio_close() function finalizes a file by closing the handle * The qse_nwio_close() function finalizes a file by closing the handle
* stored in @a nwio. * stored in @a nwio.
*/ */
void qse_nwio_fini ( QSE_EXPORT void qse_nwio_fini (
qse_nwio_t* nwio qse_nwio_t* nwio
); );
qse_nwio_errnum_t qse_nwio_geterrnum ( QSE_EXPORT qse_mmgr_t* qse_nwio_getmmgr (
qse_nwio_t* nwio
);
QSE_EXPORT void* qse_nwio_getxtn (
qse_nwio_t* nwio
);
QSE_EXPORT qse_nwio_errnum_t qse_nwio_geterrnum (
const qse_nwio_t* nwio const qse_nwio_t* nwio
); );
/** /**
* The qse_nwio_gethandle() function returns the native file handle. * The qse_nwio_gethandle() function returns the native file handle.
*/ */
qse_nwio_hnd_t qse_nwio_gethandle ( QSE_EXPORT qse_nwio_hnd_t qse_nwio_gethandle (
const qse_nwio_t* nwio const qse_nwio_t* nwio
); );
qse_ubi_t qse_nwio_gethandleasubi ( QSE_EXPORT qse_ubi_t qse_nwio_gethandleasubi (
const qse_nwio_t* nwio const qse_nwio_t* nwio
); );
qse_cmgr_t* qse_nwio_getcmgr ( QSE_EXPORT qse_cmgr_t* qse_nwio_getcmgr (
qse_nwio_t* nwio qse_nwio_t* nwio
); );
void qse_nwio_setcmgr ( QSE_EXPORT void qse_nwio_setcmgr (
qse_nwio_t* nwio, qse_nwio_t* nwio,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_ssize_t qse_nwio_flush ( QSE_EXPORT qse_ssize_t qse_nwio_flush (
qse_nwio_t* nwio qse_nwio_t* nwio
); );
void qse_nwio_purge ( QSE_EXPORT void qse_nwio_purge (
qse_nwio_t* nwio qse_nwio_t* nwio
); );
/** /**
* The qse_nwio_read() function reads data. * The qse_nwio_read() function reads data.
*/ */
qse_ssize_t qse_nwio_read ( QSE_EXPORT qse_ssize_t qse_nwio_read (
qse_nwio_t* nwio, qse_nwio_t* nwio,
void* buf, void* buf,
qse_size_t size qse_size_t size
@ -205,7 +211,7 @@ qse_ssize_t qse_nwio_read (
* the function treats the data parameter as a pointer to a null-terminated * the function treats the data parameter as a pointer to a null-terminated
* string. * string.
*/ */
qse_ssize_t qse_nwio_write ( QSE_EXPORT qse_ssize_t qse_nwio_write (
qse_nwio_t* nwio, qse_nwio_t* nwio,
const void* data, const void* data,
qse_size_t size qse_size_t size

View File

@ -112,7 +112,7 @@ typedef void (*qse_oht_copier_t) (
*/ */
struct qse_oht_t struct qse_oht_t
{ {
QSE_DEFINE_COMMON_FIELDS(oht) qse_mmgr_t* mmgr;
int scale; int scale;
struct struct
@ -144,12 +144,10 @@ typedef qse_oht_walk_t (*qse_oht_walker_t) (
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (oht)
/** /**
* The qse_oht_open() function creates an open-addressed hash table. * The qse_oht_open() function creates an open-addressed hash table.
*/ */
qse_oht_t* qse_oht_open ( QSE_EXPORT qse_oht_t* qse_oht_open (
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_size_t xtnsize, qse_size_t xtnsize,
int scale, int scale,
@ -160,14 +158,14 @@ qse_oht_t* qse_oht_open (
/** /**
* The qse_oht_close() function destroys an open-addressed hash table. * The qse_oht_close() function destroys an open-addressed hash table.
*/ */
void qse_oht_close ( QSE_EXPORT void qse_oht_close (
qse_oht_t* oht /**< open-addressed hash table */ qse_oht_t* oht /**< open-addressed hash table */
); );
/** /**
* The qse_oht_open() function initializes an open-addressed hash table. * The qse_oht_open() function initializes an open-addressed hash table.
*/ */
int qse_oht_init ( QSE_EXPORT int qse_oht_init (
qse_oht_t* oht, qse_oht_t* oht,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
int scale, int scale,
@ -178,21 +176,29 @@ int qse_oht_init (
/** /**
* The qse_oht_close() function finalizes an open-addressed hash table. * The qse_oht_close() function finalizes an open-addressed hash table.
*/ */
void qse_oht_fini ( QSE_EXPORT void qse_oht_fini (
qse_oht_t* oht /**< open-addressed hash table */ qse_oht_t* oht /**< open-addressed hash table */
); );
QSE_EXPORT qse_mmgr_t* qse_oht_getmmgr (
qse_oht_t* oht
);
QSE_EXPORT void* qse_oht_getxtn (
qse_oht_t* oht
);
/** /**
* The qse_oht_getcomper() function returns the data hasher. * The qse_oht_getcomper() function returns the data hasher.
*/ */
qse_oht_hasher_t qse_oht_gethasher ( QSE_EXPORT qse_oht_hasher_t qse_oht_gethasher (
qse_oht_t* oht /**< open-addressed hash table */ qse_oht_t* oht /**< open-addressed hash table */
); );
/** /**
* The qse_oht_setcomper() function changes the data hasher * The qse_oht_setcomper() function changes the data hasher
*/ */
void qse_oht_sethasher ( QSE_EXPORT void qse_oht_sethasher (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
qse_oht_hasher_t hasher /**< hasher */ qse_oht_hasher_t hasher /**< hasher */
); );
@ -200,14 +206,14 @@ void qse_oht_sethasher (
/** /**
* The qse_oht_getcomper() function returns the data comparator. * The qse_oht_getcomper() function returns the data comparator.
*/ */
qse_oht_comper_t qse_oht_getcomper ( QSE_EXPORT qse_oht_comper_t qse_oht_getcomper (
qse_oht_t* oht /**< open-addressed hash table */ qse_oht_t* oht /**< open-addressed hash table */
); );
/** /**
* The qse_oht_setcomper() function changes the data comparator * The qse_oht_setcomper() function changes the data comparator
*/ */
void qse_oht_setcomper ( QSE_EXPORT void qse_oht_setcomper (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
qse_oht_comper_t comper /**< comparator */ qse_oht_comper_t comper /**< comparator */
); );
@ -215,14 +221,14 @@ void qse_oht_setcomper (
/** /**
* The qse_oht_getcomper() function returns the data copier. * The qse_oht_getcomper() function returns the data copier.
*/ */
qse_oht_copier_t qse_oht_getcopier ( QSE_EXPORT qse_oht_copier_t qse_oht_getcopier (
qse_oht_t* oht /**< open-addressed hash table */ qse_oht_t* oht /**< open-addressed hash table */
); );
/** /**
* The qse_oht_setcomper() function changes the data copier. * The qse_oht_setcomper() function changes the data copier.
*/ */
void qse_oht_setcopier ( QSE_EXPORT void qse_oht_setcopier (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
qse_oht_copier_t copier /**< copier */ qse_oht_copier_t copier /**< copier */
); );
@ -234,7 +240,7 @@ void qse_oht_setcopier (
* @return slot index if a match if found, * @return slot index if a match if found,
* #QSE_OHT_NIL if no match is found. * #QSE_OHT_NIL if no match is found.
*/ */
qse_size_t qse_oht_search ( QSE_EXPORT qse_size_t qse_oht_search (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
void* data /**< data pointer */ void* data /**< data pointer */
); );
@ -245,7 +251,7 @@ qse_size_t qse_oht_search (
* @return slot index where the new datum is inserted on success, * @return slot index where the new datum is inserted on success,
* #QSE_OHT_NIL on failure. * #QSE_OHT_NIL on failure.
*/ */
qse_size_t qse_oht_insert ( QSE_EXPORT qse_size_t qse_oht_insert (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
const void* data /**< data pointer */ const void* data /**< data pointer */
); );
@ -255,7 +261,7 @@ qse_size_t qse_oht_insert (
* datum or updates an exsting datum if finds a matching datum. * datum or updates an exsting datum if finds a matching datum.
* @return slot index where the datum is inserted or updated. * @return slot index where the datum is inserted or updated.
*/ */
qse_size_t qse_oht_upsert ( QSE_EXPORT qse_size_t qse_oht_upsert (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
const void* data /**< data pointer */ const void* data /**< data pointer */
); );
@ -266,7 +272,7 @@ qse_size_t qse_oht_upsert (
* @return slot index where an existing datum is updated on success, * @return slot index where an existing datum is updated on success,
* #QSE_OHT_NIL on failure. * #QSE_OHT_NIL on failure.
*/ */
qse_size_t qse_oht_update ( QSE_EXPORT qse_size_t qse_oht_update (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
const void* data /**< data pointer */ const void* data /**< data pointer */
); );
@ -277,7 +283,7 @@ qse_size_t qse_oht_update (
* @return slot index where an existing datum is deleted on success, * @return slot index where an existing datum is deleted on success,
* #QSE_OHT_NIL on failure. * #QSE_OHT_NIL on failure.
*/ */
qse_size_t qse_oht_delete ( QSE_EXPORT qse_size_t qse_oht_delete (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
const void* data /**< data pointer */ const void* data /**< data pointer */
); );
@ -285,7 +291,7 @@ qse_size_t qse_oht_delete (
/** /**
* The qse_oht_clear() functions deletes all data items. * The qse_oht_clear() functions deletes all data items.
*/ */
void qse_oht_clear ( QSE_EXPORT void qse_oht_clear (
qse_oht_t* oht /**< open-addressed hash table */ qse_oht_t* oht /**< open-addressed hash table */
); );
@ -293,7 +299,7 @@ void qse_oht_clear (
* The qse_oht_walk() function executes the callback function @a walker for * The qse_oht_walk() function executes the callback function @a walker for
* each valid data item. * each valid data item.
*/ */
void qse_oht_walk ( QSE_EXPORT void qse_oht_walk (
qse_oht_t* oht, /**< open-addressed hash table */ qse_oht_t* oht, /**< open-addressed hash table */
qse_oht_walker_t walker, /**< callback function */ qse_oht_walker_t walker, /**< callback function */
void* ctx /**< context */ void* ctx /**< context */

View File

@ -78,7 +78,7 @@ extern "C" {
* *
* @return an option character on success, QSE_CHAR_EOF on no more options. * @return an option character on success, QSE_CHAR_EOF on no more options.
*/ */
qse_cint_t qse_getopt ( QSE_EXPORT qse_cint_t qse_getopt (
int argc, /* argument count */ int argc, /* argument count */
qse_char_t* const* argv, /* argument array */ qse_char_t* const* argv, /* argument array */
qse_opt_t* opt /* option configuration */ qse_opt_t* opt /* option configuration */

View File

@ -68,7 +68,7 @@ extern "C" {
* The qse_mbsbasename() function returns the pointer to the file name * The qse_mbsbasename() function returns the pointer to the file name
* segment in a multibyte path name. * segment in a multibyte path name.
*/ */
const qse_mchar_t* qse_mbsbasename ( QSE_EXPORT const qse_mchar_t* qse_mbsbasename (
const qse_mchar_t* path const qse_mchar_t* path
); );
@ -76,7 +76,7 @@ const qse_mchar_t* qse_mbsbasename (
* The qse_wcsbasename() function returns the pointer to the file name * The qse_wcsbasename() function returns the pointer to the file name
* segment in a wide-character path name. * segment in a wide-character path name.
*/ */
const qse_wchar_t* qse_wcsbasename ( QSE_EXPORT const qse_wchar_t* qse_wcsbasename (
const qse_wchar_t* path const qse_wchar_t* path
); );
@ -87,7 +87,7 @@ const qse_wchar_t* qse_wcsbasename (
* letter followed by a colon. * letter followed by a colon.
* @return 1 if absolute, 0 if not. * @return 1 if absolute, 0 if not.
*/ */
int qse_ismbsabspath ( QSE_EXPORT int qse_ismbsabspath (
const qse_mchar_t* path const qse_mchar_t* path
); );
@ -95,7 +95,7 @@ int qse_ismbsabspath (
* The qse_ismbsdrivepath() function determines if a path name begins with * The qse_ismbsdrivepath() function determines if a path name begins with
* a drive letter followed by a colon like A:. * a drive letter followed by a colon like A:.
*/ */
int qse_ismbsdrivepath ( QSE_EXPORT int qse_ismbsdrivepath (
const qse_mchar_t* path const qse_mchar_t* path
); );
@ -103,7 +103,7 @@ int qse_ismbsdrivepath (
* The qse_ismbsdrivecurpath() function determines if a path name is in the form * The qse_ismbsdrivecurpath() function determines if a path name is in the form
* of a drive letter followed by a colon like A:, without any trailing path. * of a drive letter followed by a colon like A:, without any trailing path.
*/ */
int qse_ismbsdrivecurpath ( QSE_EXPORT int qse_ismbsdrivecurpath (
const qse_mchar_t* path const qse_mchar_t* path
); );
@ -140,7 +140,7 @@ int qse_ismbsdrivecurpath (
* @return number of characters in the resulting canonical path excluding * @return number of characters in the resulting canonical path excluding
* the terminating null. * the terminating null.
*/ */
qse_size_t qse_canonmbspath ( QSE_EXPORT qse_size_t qse_canonmbspath (
const qse_mchar_t* path, const qse_mchar_t* path,
qse_mchar_t* canon, qse_mchar_t* canon,
int flags int flags
@ -153,7 +153,7 @@ qse_size_t qse_canonmbspath (
* letter followed by a colon. * letter followed by a colon.
* @return 1 if absolute, 0 if not. * @return 1 if absolute, 0 if not.
*/ */
int qse_iswcsabspath ( QSE_EXPORT int qse_iswcsabspath (
const qse_wchar_t* path const qse_wchar_t* path
); );
@ -161,7 +161,7 @@ int qse_iswcsabspath (
* The qse_iswcsdrivepath() function determines if a path name begins with * The qse_iswcsdrivepath() function determines if a path name begins with
* a drive letter followed by a colon like A:. * a drive letter followed by a colon like A:.
*/ */
int qse_iswcsdrivepath ( QSE_EXPORT int qse_iswcsdrivepath (
const qse_wchar_t* path const qse_wchar_t* path
); );
@ -169,7 +169,7 @@ int qse_iswcsdrivepath (
* The qse_iswcsdrivecurpath() function determines if a path name is in the form * The qse_iswcsdrivecurpath() function determines if a path name is in the form
* of a drive letter followed by a colon like A:, without any trailing path. * of a drive letter followed by a colon like A:, without any trailing path.
*/ */
int qse_iswcsdrivecurpath ( QSE_EXPORT int qse_iswcsdrivecurpath (
const qse_wchar_t* path const qse_wchar_t* path
); );
@ -206,7 +206,7 @@ int qse_iswcsdrivecurpath (
* @return number of characters in the resulting canonical path excluding * @return number of characters in the resulting canonical path excluding
* the terminating null. * the terminating null.
*/ */
qse_size_t qse_canonwcspath ( QSE_EXPORT qse_size_t qse_canonwcspath (
const qse_wchar_t* path, const qse_wchar_t* path,
qse_wchar_t* canon, qse_wchar_t* canon,
int flags int flags

View File

@ -175,7 +175,7 @@ struct qse_pio_pin_t
*/ */
struct qse_pio_t struct qse_pio_t
{ {
QSE_DEFINE_COMMON_FIELDS(pio) qse_mmgr_t* mmgr;
int flags; /**< options */ int flags; /**< options */
qse_pio_errnum_t errnum; /**< error number */ qse_pio_errnum_t errnum; /**< error number */
qse_pio_pid_t child; /**< handle to a child process */ qse_pio_pid_t child; /**< handle to a child process */
@ -193,8 +193,6 @@ struct qse_pio_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (pio)
/** /**
* The qse_pio_open() function executes a command @a cmd and establishes * The qse_pio_open() function executes a command @a cmd and establishes
* pipes to it. #QSE_PIO_SHELL causes the function to execute @a cmd via * pipes to it. #QSE_PIO_SHELL causes the function to execute @a cmd via
@ -207,7 +205,7 @@ QSE_DEFINE_COMMON_FUNCTIONS (pio)
* character type is #qse_mchar_t. * character type is #qse_mchar_t.
* @return #qse_pio_t object on success, #QSE_NULL on failure * @return #qse_pio_t object on success, #QSE_NULL on failure
*/ */
qse_pio_t* qse_pio_open ( QSE_EXPORT qse_pio_t* qse_pio_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t ext, /**< extension size */ qse_size_t ext, /**< extension size */
const qse_char_t* cmd, /**< command to execute */ const qse_char_t* cmd, /**< command to execute */
@ -220,7 +218,7 @@ qse_pio_t* qse_pio_open (
* The qse_pio_close() function closes pipes to a child process and waits for * The qse_pio_close() function closes pipes to a child process and waits for
* the child process to exit. * the child process to exit.
*/ */
void qse_pio_close ( QSE_EXPORT void qse_pio_close (
qse_pio_t* pio /**< pio object */ qse_pio_t* pio /**< pio object */
); );
@ -230,7 +228,7 @@ void qse_pio_close (
* function. * function.
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_pio_init ( QSE_EXPORT int qse_pio_init (
qse_pio_t* pio, /**< pio object */ qse_pio_t* pio, /**< pio object */
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
const qse_char_t* cmd, /**< command to execute */ const qse_char_t* cmd, /**< command to execute */
@ -243,16 +241,24 @@ int qse_pio_init (
* The qse_pio_fini() function performs the same task as qse_pio_close() * The qse_pio_fini() function performs the same task as qse_pio_close()
* except that it does not destroy a #qse_pio_t structure pointed to by @a pio. * except that it does not destroy a #qse_pio_t structure pointed to by @a pio.
*/ */
void qse_pio_fini ( QSE_EXPORT void qse_pio_fini (
qse_pio_t* pio /**< pio object */ qse_pio_t* pio /**< pio object */
); );
QSE_EXPORT qse_mmgr_t* qse_pio_getmmgr (
qse_pio_t* pio
);
QSE_EXPORT void* qse_pio_getxtn (
qse_pio_t* pio
);
/** /**
* The qse_pio_geterrnum() function returns the number of the last error * The qse_pio_geterrnum() function returns the number of the last error
* occurred. * occurred.
* @return error number * @return error number
*/ */
qse_pio_errnum_t qse_pio_geterrnum ( QSE_EXPORT qse_pio_errnum_t qse_pio_geterrnum (
const qse_pio_t* pio /**< pio object */ const qse_pio_t* pio /**< pio object */
); );
@ -260,7 +266,7 @@ qse_pio_errnum_t qse_pio_geterrnum (
* The qse_pio_getcmgr() function returns the current character manager. * The qse_pio_getcmgr() function returns the current character manager.
* It returns #QSE_NULL is @a pio is not opened with #QSE_PIO_TEXT. * It returns #QSE_NULL is @a pio is not opened with #QSE_PIO_TEXT.
*/ */
qse_cmgr_t* qse_pio_getcmgr ( QSE_EXPORT qse_cmgr_t* qse_pio_getcmgr (
qse_pio_t* pio, qse_pio_t* pio,
qse_pio_hid_t hid qse_pio_hid_t hid
); );
@ -269,7 +275,7 @@ qse_cmgr_t* qse_pio_getcmgr (
* The qse_pio_setcmgr() function changes the character manager to @a cmgr. * The qse_pio_setcmgr() function changes the character manager to @a cmgr.
* The character manager is used only if @a pio is opened with #QSE_PIO_TEXT. * The character manager is used only if @a pio is opened with #QSE_PIO_TEXT.
*/ */
void qse_pio_setcmgr ( QSE_EXPORT void qse_pio_setcmgr (
qse_pio_t* pio, qse_pio_t* pio,
qse_pio_hid_t hid, qse_pio_hid_t hid,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
@ -279,7 +285,7 @@ void qse_pio_setcmgr (
* The qse_pio_gethandle() function gets a pipe handle. * The qse_pio_gethandle() function gets a pipe handle.
* @return pipe handle * @return pipe handle
*/ */
qse_pio_hnd_t qse_pio_gethandle ( QSE_EXPORT qse_pio_hnd_t qse_pio_gethandle (
const qse_pio_t* pio, /**< pio object */ const qse_pio_t* pio, /**< pio object */
qse_pio_hid_t hid /**< handle ID */ qse_pio_hid_t hid /**< handle ID */
); );
@ -289,7 +295,7 @@ qse_pio_hnd_t qse_pio_gethandle (
* in the #qse_ubi_t type. * in the #qse_ubi_t type.
* @return pipe handle * @return pipe handle
*/ */
qse_ubi_t qse_pio_gethandleasubi ( QSE_EXPORT qse_ubi_t qse_pio_gethandleasubi (
const qse_pio_t* pio, /**< pio object */ const qse_pio_t* pio, /**< pio object */
qse_pio_hid_t hid /**< handle ID */ qse_pio_hid_t hid /**< handle ID */
); );
@ -298,7 +304,7 @@ qse_ubi_t qse_pio_gethandleasubi (
* The qse_pio_getchild() function gets a process handle. * The qse_pio_getchild() function gets a process handle.
* @return process handle * @return process handle
*/ */
qse_pio_pid_t qse_pio_getchild ( QSE_EXPORT qse_pio_pid_t qse_pio_getchild (
const qse_pio_t* pio /**< pio object */ const qse_pio_t* pio /**< pio object */
); );
@ -307,7 +313,7 @@ qse_pio_pid_t qse_pio_getchild (
* and stores them to the buffer pointed to by @a buf. * and stores them to the buffer pointed to by @a buf.
* @return -1 on failure, 0 on EOF, data length read on success * @return -1 on failure, 0 on EOF, data length read on success
*/ */
qse_ssize_t qse_pio_read ( QSE_EXPORT qse_ssize_t qse_pio_read (
qse_pio_t* pio, /**< pio object */ qse_pio_t* pio, /**< pio object */
qse_pio_hid_t hid, /**< handle ID */ qse_pio_hid_t hid, /**< handle ID */
void* buf, /**< buffer to fill */ void* buf, /**< buffer to fill */
@ -321,7 +327,7 @@ qse_ssize_t qse_pio_read (
* the @a data parameter as a pointer to a null-terminated string. * the @a data parameter as a pointer to a null-terminated string.
* @return -1 on failure, data length written on success * @return -1 on failure, data length written on success
*/ */
qse_ssize_t qse_pio_write ( QSE_EXPORT qse_ssize_t qse_pio_write (
qse_pio_t* pio, /**< pio object */ qse_pio_t* pio, /**< pio object */
qse_pio_hid_t hid, /**< handle ID */ qse_pio_hid_t hid, /**< handle ID */
const void* data, /**< data to write */ const void* data, /**< data to write */
@ -332,7 +338,7 @@ qse_ssize_t qse_pio_write (
* The qse_pio_flush() flushes buffered data if #QSE_PIO_TEXT has been * The qse_pio_flush() flushes buffered data if #QSE_PIO_TEXT has been
* specified to qse_pio_open() and qse_pio_init(). * specified to qse_pio_open() and qse_pio_init().
*/ */
qse_ssize_t qse_pio_flush ( QSE_EXPORT qse_ssize_t qse_pio_flush (
qse_pio_t* pio, /**< pio object */ qse_pio_t* pio, /**< pio object */
qse_pio_hid_t hid /**< handle ID */ qse_pio_hid_t hid /**< handle ID */
); );
@ -341,7 +347,7 @@ qse_ssize_t qse_pio_flush (
* The qse_pio_purge() drops unflushed input and output data in the * The qse_pio_purge() drops unflushed input and output data in the
* buffer. * buffer.
*/ */
void qse_pio_purge ( QSE_EXPORT void qse_pio_purge (
qse_pio_t* pio, /**< pio object */ qse_pio_t* pio, /**< pio object */
qse_pio_hid_t hid /**< handle ID */ qse_pio_hid_t hid /**< handle ID */
); );
@ -349,7 +355,7 @@ void qse_pio_purge (
/** /**
* The qse_pio_end() function closes a pipe to a child process * The qse_pio_end() function closes a pipe to a child process
*/ */
void qse_pio_end ( QSE_EXPORT void qse_pio_end (
qse_pio_t* pio, /**< pio object */ qse_pio_t* pio, /**< pio object */
qse_pio_hid_t hid /**< handle ID */ qse_pio_hid_t hid /**< handle ID */
); );
@ -367,7 +373,7 @@ void qse_pio_end (
* a number between 0 and 255 inclusive if the child process ends normally, * a number between 0 and 255 inclusive if the child process ends normally,
* 256 + signal number if the child process is terminated by a signal. * 256 + signal number if the child process is terminated by a signal.
*/ */
int qse_pio_wait ( QSE_EXPORT int qse_pio_wait (
qse_pio_t* pio /**< pio object */ qse_pio_t* pio /**< pio object */
); );
@ -378,7 +384,7 @@ int qse_pio_wait (
* there is a new process with the same process handle. * there is a new process with the same process handle.
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_pio_kill ( QSE_EXPORT int qse_pio_kill (
qse_pio_t* pio /**< pio object */ qse_pio_t* pio /**< pio object */
); );

View File

@ -56,7 +56,7 @@ typedef struct qse_pma_t qse_pma_t;
struct qse_pma_t struct qse_pma_t
{ {
QSE_DEFINE_COMMON_FIELDS (pma) qse_mmgr_t* mmgr;
qse_pma_blk_t* blocks; qse_pma_blk_t* blocks;
qse_pma_blk_t* current; qse_pma_blk_t* current;
@ -70,12 +70,10 @@ struct qse_pma_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (pma)
/** /**
* The qse_pma_open() function creates a pool-based memory allocator. * The qse_pma_open() function creates a pool-based memory allocator.
*/ */
qse_pma_t* qse_pma_open ( QSE_EXPORT qse_pma_t* qse_pma_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t xtnsize /**< extension size in bytes */ qse_size_t xtnsize /**< extension size in bytes */
); );
@ -83,24 +81,32 @@ qse_pma_t* qse_pma_open (
/** /**
* The qse_pma_close() function destroys a pool-based memory allocator. * The qse_pma_close() function destroys a pool-based memory allocator.
*/ */
void qse_pma_close ( QSE_EXPORT void qse_pma_close (
qse_pma_t* pma /**< memory allocator */ qse_pma_t* pma /**< memory allocator */
); );
int qse_pma_init ( QSE_EXPORT int qse_pma_init (
qse_pma_t* pma, /**< memory allocator */ qse_pma_t* pma, /**< memory allocator */
qse_mmgr_t* mmgr /**< memory manager */ qse_mmgr_t* mmgr /**< memory manager */
); );
void qse_pma_fini ( QSE_EXPORT void qse_pma_fini (
qse_pma_t* pma /**< memory allocator */ qse_pma_t* pma /**< memory allocator */
); );
QSE_EXPORT qse_mmgr_t* qse_pma_getmmgr (
qse_pma_t* pma
);
QSE_EXPORT void* qse_pma_getxtn (
qse_pma_t* pma
);
/** /**
* The qse_pma_clear() function frees all the allocated memory blocks * The qse_pma_clear() function frees all the allocated memory blocks
* by freeing the entire memory pool. * by freeing the entire memory pool.
*/ */
void qse_pma_clear ( QSE_EXPORT void qse_pma_clear (
qse_pma_t* pma /**< memory allocator */ qse_pma_t* pma /**< memory allocator */
); );
@ -108,7 +114,7 @@ void qse_pma_clear (
* The qse_pma_alloc() function allocates a memory block of the @a size bytes. * The qse_pma_alloc() function allocates a memory block of the @a size bytes.
* @return pointer to a allocated block on success, #QSE_NULL on failure. * @return pointer to a allocated block on success, #QSE_NULL on failure.
*/ */
void* qse_pma_alloc ( QSE_EXPORT void* qse_pma_alloc (
qse_pma_t* pma, /**< memory allocator */ qse_pma_t* pma, /**< memory allocator */
qse_size_t size /**< block size */ qse_size_t size /**< block size */
); );
@ -118,7 +124,7 @@ void* qse_pma_alloc (
* and initializes the whole block with 0. * and initializes the whole block with 0.
* @return pointer to a allocated block on success, #QSE_NULL on failure. * @return pointer to a allocated block on success, #QSE_NULL on failure.
*/ */
void* qse_pma_calloc ( QSE_EXPORT void* qse_pma_calloc (
qse_pma_t* pma, /**< memory allocator */ qse_pma_t* pma, /**< memory allocator */
qse_size_t size /**< block size */ qse_size_t size /**< block size */
); );
@ -127,7 +133,7 @@ void* qse_pma_calloc (
* The qse_pma_free() function is provided for completeness, and doesn't * The qse_pma_free() function is provided for completeness, and doesn't
* resize an individual block @a blk. * resize an individual block @a blk.
*/ */
void* qse_pma_realloc ( QSE_EXPORT void* qse_pma_realloc (
qse_pma_t* pma, /**< memory allocator */ qse_pma_t* pma, /**< memory allocator */
void* blk, /**< memory block */ void* blk, /**< memory block */
qse_size_t size /**< new size in bytes */ qse_size_t size /**< new size in bytes */
@ -137,7 +143,7 @@ void* qse_pma_realloc (
* The qse_pma_free() function is provided for completeness, and doesn't * The qse_pma_free() function is provided for completeness, and doesn't
* free an individual block @a blk. * free an individual block @a blk.
*/ */
void qse_pma_free ( QSE_EXPORT void qse_pma_free (
qse_pma_t* pma, /**< memory allocator */ qse_pma_t* pma, /**< memory allocator */
void* blk /**< memory block */ void* blk /**< memory block */
); );

View File

@ -220,7 +220,7 @@ typedef enum qse_rbt_mancbs_kind_t qse_rbt_mancbs_kind_t;
*/ */
struct qse_rbt_t struct qse_rbt_t
{ {
QSE_DEFINE_COMMON_FIELDS (rbt) qse_mmgr_t* mmgr;
const qse_rbt_mancbs_t* mancbs; const qse_rbt_mancbs_t* mancbs;
@ -270,13 +270,11 @@ struct qse_rbt_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (rbt)
/** /**
* The qse_getrbtmancbs() functions returns a predefined callback set for * The qse_getrbtmancbs() functions returns a predefined callback set for
* pair manipulation. * pair manipulation.
*/ */
const qse_rbt_mancbs_t* qse_getrbtmancbs ( QSE_EXPORT const qse_rbt_mancbs_t* qse_getrbtmancbs (
qse_rbt_mancbs_kind_t kind qse_rbt_mancbs_kind_t kind
); );
@ -284,7 +282,7 @@ const qse_rbt_mancbs_t* qse_getrbtmancbs (
* The qse_rbt_open() function creates a red-black tree. * The qse_rbt_open() function creates a red-black tree.
* @return qse_rbt_t pointer on success, QSE_NULL on failure. * @return qse_rbt_t pointer on success, QSE_NULL on failure.
*/ */
qse_rbt_t* qse_rbt_open ( QSE_EXPORT qse_rbt_t* qse_rbt_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t xtnsize, /**< extension size in bytes */ qse_size_t xtnsize, /**< extension size in bytes */
int kscale, /**< key scale */ int kscale, /**< key scale */
@ -294,14 +292,14 @@ qse_rbt_t* qse_rbt_open (
/** /**
* The qse_rbt_close() function destroys a red-black tree. * The qse_rbt_close() function destroys a red-black tree.
*/ */
void qse_rbt_close ( QSE_EXPORT void qse_rbt_close (
qse_rbt_t* rbt /**< red-black tree */ qse_rbt_t* rbt /**< red-black tree */
); );
/** /**
* The qse_rbt_init() function initializes a red-black tree * The qse_rbt_init() function initializes a red-black tree
*/ */
int qse_rbt_init ( QSE_EXPORT int qse_rbt_init (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
int kscale, /**< key scale */ int kscale, /**< key scale */
@ -311,14 +309,22 @@ int qse_rbt_init (
/** /**
* The qse_rbt_fini() funtion finalizes a red-black tree * The qse_rbt_fini() funtion finalizes a red-black tree
*/ */
void qse_rbt_fini ( QSE_EXPORT void qse_rbt_fini (
qse_rbt_t* rbt /**< red-black tree */ qse_rbt_t* rbt /**< red-black tree */
); );
QSE_EXPORT qse_mmgr_t* qse_rbt_getmmgr (
qse_rbt_t* rbt
);
QSE_EXPORT void* qse_rbt_getxtn (
qse_rbt_t* rbt
);
/** /**
* The qse_rbt_getmancbs() function gets manipulation callback function set. * The qse_rbt_getmancbs() function gets manipulation callback function set.
*/ */
const qse_rbt_mancbs_t* qse_rbt_getmancbs ( QSE_EXPORT const qse_rbt_mancbs_t* qse_rbt_getmancbs (
const qse_rbt_t* rbt /**< red-black tree */ const qse_rbt_t* rbt /**< red-black tree */
); );
@ -326,7 +332,7 @@ const qse_rbt_mancbs_t* qse_rbt_getmancbs (
* The qse_rbt_setmancbs() function sets internal manipulation callback * The qse_rbt_setmancbs() function sets internal manipulation callback
* functions for data construction, destruction, comparison, etc. * functions for data construction, destruction, comparison, etc.
*/ */
void qse_rbt_setmancbs ( QSE_EXPORT void qse_rbt_setmancbs (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
const qse_rbt_mancbs_t* mancbs /**< callback function set */ const qse_rbt_mancbs_t* mancbs /**< callback function set */
); );
@ -334,7 +340,7 @@ void qse_rbt_setmancbs (
/** /**
* The qse_rbt_getsize() function gets the number of pairs in red-black tree. * The qse_rbt_getsize() function gets the number of pairs in red-black tree.
*/ */
qse_size_t qse_rbt_getsize ( QSE_EXPORT qse_size_t qse_rbt_getsize (
const qse_rbt_t* rbt /**< red-black tree */ const qse_rbt_t* rbt /**< red-black tree */
); );
@ -345,7 +351,7 @@ qse_size_t qse_rbt_getsize (
* @return pointer to the pair with a maching key, * @return pointer to the pair with a maching key,
* or QSE_NULL if no match is found. * or QSE_NULL if no match is found.
*/ */
qse_rbt_pair_t* qse_rbt_search ( QSE_EXPORT qse_rbt_pair_t* qse_rbt_search (
const qse_rbt_t* rbt, /**< red-black tree */ const qse_rbt_t* rbt, /**< red-black tree */
const void* kptr, /**< key pointer */ const void* kptr, /**< key pointer */
qse_size_t klen /**< the size of the key */ qse_size_t klen /**< the size of the key */
@ -359,7 +365,7 @@ qse_rbt_pair_t* qse_rbt_search (
* @return a pointer to the updated or inserted pair on success, * @return a pointer to the updated or inserted pair on success,
* QSE_NULL on failure. * QSE_NULL on failure.
*/ */
qse_rbt_pair_t* qse_rbt_upsert ( QSE_EXPORT qse_rbt_pair_t* qse_rbt_upsert (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -373,7 +379,7 @@ qse_rbt_pair_t* qse_rbt_upsert (
* the pair containing the key. * the pair containing the key.
* @return pointer to a pair on success, QSE_NULL on failure. * @return pointer to a pair on success, QSE_NULL on failure.
*/ */
qse_rbt_pair_t* qse_rbt_ensert ( QSE_EXPORT qse_rbt_pair_t* qse_rbt_ensert (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -387,7 +393,7 @@ qse_rbt_pair_t* qse_rbt_ensert (
* QSE_NULL without channging the value. * QSE_NULL without channging the value.
* @return pointer to the pair created on success, QSE_NULL on failure. * @return pointer to the pair created on success, QSE_NULL on failure.
*/ */
qse_rbt_pair_t* qse_rbt_insert ( QSE_EXPORT qse_rbt_pair_t* qse_rbt_insert (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -400,7 +406,7 @@ qse_rbt_pair_t* qse_rbt_insert (
* with a matching key. * with a matching key.
* @return pointer to the pair on success, QSE_NULL on no matching pair * @return pointer to the pair on success, QSE_NULL on no matching pair
*/ */
qse_rbt_pair_t* qse_rbt_update ( QSE_EXPORT qse_rbt_pair_t* qse_rbt_update (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -495,7 +501,7 @@ qse_rbt_pair_t* qse_rbt_update (
* } * }
* @endcode * @endcode
*/ */
qse_rbt_pair_t* qse_rbt_cbsert ( QSE_EXPORT qse_rbt_pair_t* qse_rbt_cbsert (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
void* kptr, /**< key pointer */ void* kptr, /**< key pointer */
qse_size_t klen, /**< key length */ qse_size_t klen, /**< key length */
@ -507,7 +513,7 @@ qse_rbt_pair_t* qse_rbt_cbsert (
* The qse_rbt_delete() function deletes a pair with a matching key * The qse_rbt_delete() function deletes a pair with a matching key
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_rbt_delete ( QSE_EXPORT int qse_rbt_delete (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
const void* kptr, /**< key pointer */ const void* kptr, /**< key pointer */
qse_size_t klen /**< key size */ qse_size_t klen /**< key size */
@ -516,7 +522,7 @@ int qse_rbt_delete (
/** /**
* The qse_rbt_clear() function empties a red-black tree. * The qse_rbt_clear() function empties a red-black tree.
*/ */
void qse_rbt_clear ( QSE_EXPORT void qse_rbt_clear (
qse_rbt_t* rbt /**< red-black tree */ qse_rbt_t* rbt /**< red-black tree */
); );
@ -524,7 +530,7 @@ void qse_rbt_clear (
* The qse_rbt_walk() function traverses a red-black tree in preorder * The qse_rbt_walk() function traverses a red-black tree in preorder
* from the leftmost child. * from the leftmost child.
*/ */
void qse_rbt_walk ( QSE_EXPORT void qse_rbt_walk (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
qse_rbt_walker_t walker, /**< callback function for each pair */ qse_rbt_walker_t walker, /**< callback function for each pair */
void* ctx /**< pointer to user-specific data */ void* ctx /**< pointer to user-specific data */
@ -534,7 +540,7 @@ void qse_rbt_walk (
* The qse_rbt_walk() function traverses a red-black tree in preorder * The qse_rbt_walk() function traverses a red-black tree in preorder
* from the rightmost child. * from the rightmost child.
*/ */
void qse_rbt_rwalk ( QSE_EXPORT void qse_rbt_rwalk (
qse_rbt_t* rbt, /**< red-black tree */ qse_rbt_t* rbt, /**< red-black tree */
qse_rbt_walker_t walker, /**< callback function for each pair */ qse_rbt_walker_t walker, /**< callback function for each pair */
void* ctx /**< pointer to user-specific data */ void* ctx /**< pointer to user-specific data */
@ -552,7 +558,7 @@ void qse_rbt_rwalk (
* - If @a vptr is #QSE_NULL, the value space of the size @a vlen is reserved * - If @a vptr is #QSE_NULL, the value space of the size @a vlen is reserved
* but not propagated with any data. * but not propagated with any data.
*/ */
qse_rbt_pair_t* qse_rbt_allocpair ( QSE_EXPORT qse_rbt_pair_t* qse_rbt_allocpair (
qse_rbt_t* rbt, qse_rbt_t* rbt,
void* kptr, void* kptr,
qse_size_t klen, qse_size_t klen,
@ -565,7 +571,7 @@ qse_rbt_pair_t* qse_rbt_allocpair (
* the pair destroyed from the red-black tree @a rbt. Use this function at your * the pair destroyed from the red-black tree @a rbt. Use this function at your
* own risk. * own risk.
*/ */
void qse_rbt_freepair ( QSE_EXPORT void qse_rbt_freepair (
qse_rbt_t* rbt, qse_rbt_t* rbt,
qse_rbt_pair_t* pair qse_rbt_pair_t* pair
); );
@ -573,7 +579,7 @@ void qse_rbt_freepair (
/** /**
* The qse_rbt_dflcomp() function defines the default key comparator. * The qse_rbt_dflcomp() function defines the default key comparator.
*/ */
int qse_rbt_dflcomp ( QSE_EXPORT int qse_rbt_dflcomp (
const qse_rbt_t* rbt, const qse_rbt_t* rbt,
const void* kptr1, const void* kptr1,
qse_size_t klen1, qse_size_t klen1,

View File

@ -193,7 +193,7 @@ enum qse_rex_cset_code_t
typedef struct qse_rex_t qse_rex_t; typedef struct qse_rex_t qse_rex_t;
struct qse_rex_t struct qse_rex_t
{ {
QSE_DEFINE_COMMON_FIELDS (rex) qse_mmgr_t* mmgr;
qse_rex_errnum_t errnum; qse_rex_errnum_t errnum;
int option; int option;
qse_rex_node_t* code; qse_rex_node_t* code;
@ -203,19 +203,17 @@ struct qse_rex_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (rex) QSE_EXPORT qse_rex_t* qse_rex_open (
qse_rex_t* qse_rex_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t xtn, /**< extension size */ qse_size_t xtn, /**< extension size */
qse_rex_node_t* code /**< compiled regular expression code */ qse_rex_node_t* code /**< compiled regular expression code */
); );
void qse_rex_close ( QSE_EXPORT void qse_rex_close (
qse_rex_t* rex qse_rex_t* rex
); );
int qse_rex_init ( QSE_EXPORT int qse_rex_init (
qse_rex_t* rex, qse_rex_t* rex,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_rex_node_t* code qse_rex_node_t* code
@ -225,7 +223,15 @@ int qse_rex_init (
* The qse_rex_fini() function finalizes a statically initialized * The qse_rex_fini() function finalizes a statically initialized
* regular expression object @a rex. * regular expression object @a rex.
*/ */
void qse_rex_fini ( QSE_EXPORT void qse_rex_fini (
qse_rex_t* rex
);
QSE_EXPORT qse_mmgr_t* qse_rex_getmmgr (
qse_rex_t* rex
);
QSE_EXPORT void* qse_rex_getxtn (
qse_rex_t* rex qse_rex_t* rex
); );
@ -235,40 +241,40 @@ void qse_rex_fini (
* when @a rex is closed or finalized. * when @a rex is closed or finalized.
* @return start node of a compiled regular expression * @return start node of a compiled regular expression
*/ */
qse_rex_node_t* qse_rex_yield ( QSE_EXPORT qse_rex_node_t* qse_rex_yield (
qse_rex_t* rex /**< regular expression processor */ qse_rex_t* rex /**< regular expression processor */
); );
/** /**
* The qse_rex_getoption() function returns the current options. * The qse_rex_getoption() function returns the current options.
*/ */
int qse_rex_getoption ( QSE_EXPORT int qse_rex_getoption (
const qse_rex_t* rex /**< regular expression processor */ const qse_rex_t* rex /**< regular expression processor */
); );
/** /**
* The qse_rex_setoption() function overrides the current options with options. * The qse_rex_setoption() function overrides the current options with options.
*/ */
void qse_rex_setoption ( QSE_EXPORT void qse_rex_setoption (
qse_rex_t* rex, /**< regular expression processor */ qse_rex_t* rex, /**< regular expression processor */
int opts /**< 0 or number XORed of ::qse_rex_option_t enumerators */ int opts /**< 0 or number XORed of ::qse_rex_option_t enumerators */
); );
qse_rex_errnum_t qse_rex_geterrnum ( QSE_EXPORT qse_rex_errnum_t qse_rex_geterrnum (
const qse_rex_t* rex const qse_rex_t* rex
); );
const qse_char_t* qse_rex_geterrmsg ( QSE_EXPORT const qse_char_t* qse_rex_geterrmsg (
const qse_rex_t* rex const qse_rex_t* rex
); );
qse_rex_node_t* qse_rex_comp ( QSE_EXPORT qse_rex_node_t* qse_rex_comp (
qse_rex_t* rex, qse_rex_t* rex,
const qse_char_t* ptn, const qse_char_t* ptn,
qse_size_t len qse_size_t len
); );
int qse_rex_exec ( QSE_EXPORT int qse_rex_exec (
qse_rex_t* rex, qse_rex_t* rex,
const qse_cstr_t* str, const qse_cstr_t* str,
const qse_cstr_t* substr, const qse_cstr_t* substr,
@ -276,7 +282,7 @@ int qse_rex_exec (
); );
void* qse_buildrex ( QSE_EXPORT void* qse_buildrex (
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_size_t depth, qse_size_t depth,
int option, int option,
@ -285,7 +291,7 @@ void* qse_buildrex (
qse_rex_errnum_t* errnum qse_rex_errnum_t* errnum
); );
int qse_matchrex ( QSE_EXPORT int qse_matchrex (
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_size_t depth, qse_size_t depth,
void* code, void* code,
@ -296,7 +302,7 @@ int qse_matchrex (
qse_rex_errnum_t* errnum qse_rex_errnum_t* errnum
); );
void qse_freerex ( QSE_EXPORT void qse_freerex (
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
void* code void* code
); );

View File

@ -95,7 +95,7 @@ typedef struct qse_sio_t qse_sio_t;
struct qse_sio_t struct qse_sio_t
{ {
QSE_DEFINE_COMMON_FIELDS (sio) qse_mmgr_t* mmgr;
qse_sio_errnum_t errnum; qse_sio_errnum_t errnum;
qse_fio_t file; qse_fio_t file;
@ -124,14 +124,14 @@ extern "C" {
/** /**
* The qse_sio_open() fucntion creates a stream object. * The qse_sio_open() fucntion creates a stream object.
*/ */
qse_sio_t* qse_sio_open ( QSE_EXPORT qse_sio_t* qse_sio_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t xtnsize, /**< extension size in bytes */ qse_size_t xtnsize, /**< extension size in bytes */
const qse_char_t* file, /**< file name */ const qse_char_t* file, /**< file name */
int flags /**< number OR'ed of #qse_sio_flag_t */ int flags /**< number OR'ed of #qse_sio_flag_t */
); );
qse_sio_t* qse_sio_openstd ( QSE_EXPORT qse_sio_t* qse_sio_openstd (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t xtnsize, /**< extension size in bytes */ qse_size_t xtnsize, /**< extension size in bytes */
qse_sio_std_t std, /**< standard I/O identifier */ qse_sio_std_t std, /**< standard I/O identifier */
@ -141,74 +141,82 @@ qse_sio_t* qse_sio_openstd (
/** /**
* The qse_sio_close() function destroys a stream object. * The qse_sio_close() function destroys a stream object.
*/ */
void qse_sio_close ( QSE_EXPORT void qse_sio_close (
qse_sio_t* sio /**< stream */ qse_sio_t* sio /**< stream */
); );
int qse_sio_init ( QSE_EXPORT int qse_sio_init (
qse_sio_t* sio, qse_sio_t* sio,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
const qse_char_t* file, const qse_char_t* file,
int flags int flags
); );
int qse_sio_initstd ( QSE_EXPORT int qse_sio_initstd (
qse_sio_t* sio, qse_sio_t* sio,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_sio_std_t std, qse_sio_std_t std,
int flags int flags
); );
void qse_sio_fini ( QSE_EXPORT void qse_sio_fini (
qse_sio_t* sio qse_sio_t* sio
); );
qse_sio_errnum_t qse_sio_geterrnum ( QSE_EXPORT qse_mmgr_t* qse_sio_getmmgr (
qse_sio_t* sio
);
QSE_EXPORT void* qse_sio_getxtn (
qse_sio_t* sio
);
QSE_EXPORT qse_sio_errnum_t qse_sio_geterrnum (
const qse_sio_t* sio const qse_sio_t* sio
); );
qse_cmgr_t* qse_sio_getcmgr ( QSE_EXPORT qse_cmgr_t* qse_sio_getcmgr (
qse_sio_t* sio qse_sio_t* sio
); );
void qse_sio_setcmgr ( QSE_EXPORT void qse_sio_setcmgr (
qse_sio_t* sio, qse_sio_t* sio,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
qse_sio_hnd_t qse_sio_gethandle ( QSE_EXPORT qse_sio_hnd_t qse_sio_gethandle (
const qse_sio_t* sio const qse_sio_t* sio
); );
qse_ubi_t qse_sio_gethandleasubi ( QSE_EXPORT qse_ubi_t qse_sio_gethandleasubi (
const qse_sio_t* sio const qse_sio_t* sio
); );
qse_ssize_t qse_sio_flush ( QSE_EXPORT qse_ssize_t qse_sio_flush (
qse_sio_t* sio qse_sio_t* sio
); );
void qse_sio_purge ( QSE_EXPORT void qse_sio_purge (
qse_sio_t* sio qse_sio_t* sio
); );
qse_ssize_t qse_sio_getmc ( QSE_EXPORT qse_ssize_t qse_sio_getmc (
qse_sio_t* sio, qse_sio_t* sio,
qse_mchar_t* c qse_mchar_t* c
); );
qse_ssize_t qse_sio_getwc ( QSE_EXPORT qse_ssize_t qse_sio_getwc (
qse_sio_t* sio, qse_sio_t* sio,
qse_wchar_t* c qse_wchar_t* c
); );
qse_ssize_t qse_sio_getmbs ( QSE_EXPORT qse_ssize_t qse_sio_getmbs (
qse_sio_t* sio, qse_sio_t* sio,
qse_mchar_t* buf, qse_mchar_t* buf,
qse_size_t size qse_size_t size
); );
qse_ssize_t qse_sio_getmbsn ( QSE_EXPORT qse_ssize_t qse_sio_getmbsn (
qse_sio_t* sio, qse_sio_t* sio,
qse_mchar_t* buf, qse_mchar_t* buf,
qse_size_t size qse_size_t size
@ -219,7 +227,7 @@ qse_ssize_t qse_sio_getmbsn (
* from the stream @a sio into the buffer @a buf. If a new line or EOF * from the stream @a sio into the buffer @a buf. If a new line or EOF
* is encountered, it stops reading from the stream. It null-terminates * is encountered, it stops reading from the stream. It null-terminates
* the buffer if @a size is greater than 0. */ * the buffer if @a size is greater than 0. */
qse_ssize_t qse_sio_getwcs ( QSE_EXPORT qse_ssize_t qse_sio_getwcs (
qse_sio_t* sio, qse_sio_t* sio,
qse_wchar_t* buf, qse_wchar_t* buf,
qse_size_t size qse_size_t size
@ -230,7 +238,7 @@ qse_ssize_t qse_sio_getwcs (
* from the stream @a sio into the buffer @a buf. If a new line or EOF * from the stream @a sio into the buffer @a buf. If a new line or EOF
* is encountered, it stops reading from the stream. * is encountered, it stops reading from the stream.
*/ */
qse_ssize_t qse_sio_getwcsn ( QSE_EXPORT qse_ssize_t qse_sio_getwcsn (
qse_sio_t* sio, qse_sio_t* sio,
qse_wchar_t* buf, qse_wchar_t* buf,
qse_size_t size qse_size_t size
@ -246,34 +254,34 @@ qse_ssize_t qse_sio_getwcsn (
# define qse_sio_getstrn(sio,buf,size) qse_sio_getwcsn(sio,buf,size) # define qse_sio_getstrn(sio,buf,size) qse_sio_getwcsn(sio,buf,size)
#endif #endif
qse_ssize_t qse_sio_putmb ( QSE_EXPORT qse_ssize_t qse_sio_putmb (
qse_sio_t* sio, qse_sio_t* sio,
qse_mchar_t c qse_mchar_t c
); );
qse_ssize_t qse_sio_putwc ( QSE_EXPORT qse_ssize_t qse_sio_putwc (
qse_sio_t* sio, qse_sio_t* sio,
qse_wchar_t c qse_wchar_t c
); );
qse_ssize_t qse_sio_putmbs ( QSE_EXPORT qse_ssize_t qse_sio_putmbs (
qse_sio_t* sio, qse_sio_t* sio,
const qse_mchar_t* str const qse_mchar_t* str
); );
qse_ssize_t qse_sio_putwcs ( QSE_EXPORT qse_ssize_t qse_sio_putwcs (
qse_sio_t* sio, qse_sio_t* sio,
const qse_wchar_t* str const qse_wchar_t* str
); );
qse_ssize_t qse_sio_putmbsn ( QSE_EXPORT qse_ssize_t qse_sio_putmbsn (
qse_sio_t* sio, qse_sio_t* sio,
const qse_mchar_t* str, const qse_mchar_t* str,
qse_size_t size qse_size_t size
); );
qse_ssize_t qse_sio_putwcsn ( QSE_EXPORT qse_ssize_t qse_sio_putwcsn (
qse_sio_t* sio, qse_sio_t* sio,
const qse_wchar_t* str, const qse_wchar_t* str,
qse_size_t size qse_size_t size
@ -294,7 +302,7 @@ qse_ssize_t qse_sio_putwcsn (
* Note that it may not return the desired postion due to buffering. * Note that it may not return the desired postion due to buffering.
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_sio_getpos ( QSE_EXPORT int qse_sio_getpos (
qse_sio_t* sio, /**< stream */ qse_sio_t* sio, /**< stream */
qse_sio_pos_t* pos /**< position */ qse_sio_pos_t* pos /**< position */
); );
@ -303,7 +311,7 @@ int qse_sio_getpos (
* The qse_sio_setpos() changes the current position in a stream. * The qse_sio_setpos() changes the current position in a stream.
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_sio_setpos ( QSE_EXPORT int qse_sio_setpos (
qse_sio_t* sio, /**< stream */ qse_sio_t* sio, /**< stream */
qse_sio_pos_t pos /**< position */ qse_sio_pos_t pos /**< position */
); );

View File

@ -105,7 +105,7 @@ typedef qse_sll_walk_t (*qse_sll_walker_t) (
*/ */
struct qse_sll_t struct qse_sll_t
{ {
QSE_DEFINE_COMMON_FIELDS (sll) qse_mmgr_t* mmgr;
qse_sll_copier_t copier; /**< data copier */ qse_sll_copier_t copier; /**< data copier */
qse_sll_freeer_t freeer; /**< data freeer */ qse_sll_freeer_t freeer; /**< data freeer */
@ -154,8 +154,6 @@ struct qse_sll_node_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (sll)
/** /**
* The qse_sll_open() function creates an empty singly linked list. * The qse_sll_open() function creates an empty singly linked list.
* If the memory manager mmgr is QSE_NULL, the function gets the default * If the memory manager mmgr is QSE_NULL, the function gets the default
@ -173,7 +171,7 @@ QSE_DEFINE_COMMON_FUNCTIONS (sll)
* QSE_NULL and @a mmgr is QSE_NULL. In the release build, it returns QSE_NULL * QSE_NULL and @a mmgr is QSE_NULL. In the release build, it returns QSE_NULL
* in such case. * in such case.
*/ */
qse_sll_t* qse_sll_open ( QSE_EXPORT qse_sll_t* qse_sll_open (
qse_mmgr_t* mmgr, /* memory manager */ qse_mmgr_t* mmgr, /* memory manager */
qse_size_t ext /* size of extension area in bytes */ qse_size_t ext /* size of extension area in bytes */
); );
@ -182,7 +180,7 @@ qse_sll_t* qse_sll_open (
* The qse_sll_close() function destroys a singly linked list freeing up * The qse_sll_close() function destroys a singly linked list freeing up
* the memory. * the memory.
*/ */
void qse_sll_close ( QSE_EXPORT void qse_sll_close (
qse_sll_t* sll /**< singly linked list */ qse_sll_t* sll /**< singly linked list */
); );
@ -196,7 +194,7 @@ void qse_sll_close (
* The qse_sll_init() function returns the first parameter on success and * The qse_sll_init() function returns the first parameter on success and
* QSE_NULL on failure. * QSE_NULL on failure.
*/ */
int qse_sll_init ( QSE_EXPORT int qse_sll_init (
qse_sll_t* sll, /* singly linked list */ qse_sll_t* sll, /* singly linked list */
qse_mmgr_t* mmgr /* memory manager */ qse_mmgr_t* mmgr /* memory manager */
); );
@ -204,14 +202,22 @@ int qse_sll_init (
/** /**
* The qse_sll_fini() function finalizes a statically initialized list. * The qse_sll_fini() function finalizes a statically initialized list.
*/ */
void qse_sll_fini ( QSE_EXPORT void qse_sll_fini (
qse_sll_t* sll /**< singly linked list */ qse_sll_t* sll /**< singly linked list */
); );
QSE_EXPORT qse_mmgr_t* qse_sll_getmmgr (
qse_sll_t* sll
);
QSE_EXPORT void* qse_sll_getxtn (
qse_sll_t* sll
);
/** /**
* The qse_sll_getscale() function gets the scale factor * The qse_sll_getscale() function gets the scale factor
*/ */
int qse_sll_getscale ( QSE_EXPORT int qse_sll_getscale (
qse_sll_t* sll /**< singly linked list */ qse_sll_t* sll /**< singly linked list */
); );
@ -221,7 +227,7 @@ int qse_sll_getscale (
* linked list created with a scale factor of 1. The scale factor should be * linked list created with a scale factor of 1. The scale factor should be
* larger than 0 and less than 256. * larger than 0 and less than 256.
*/ */
void qse_sll_setscale ( QSE_EXPORT void qse_sll_setscale (
qse_sll_t* sll, /**< singly linked list */ qse_sll_t* sll, /**< singly linked list */
int scale /**< scale factor */ int scale /**< scale factor */
); );
@ -229,7 +235,7 @@ void qse_sll_setscale (
/** /**
* The qse_sll_getfreeer() function gets the data copier. * The qse_sll_getfreeer() function gets the data copier.
*/ */
qse_sll_copier_t qse_sll_getcopier ( QSE_EXPORT qse_sll_copier_t qse_sll_getcopier (
qse_sll_t* sll /* singly linked list */ qse_sll_t* sll /* singly linked list */
); );
@ -240,7 +246,7 @@ qse_sll_copier_t qse_sll_getcopier (
* when the node is freeed. You may set the copier to QSE_NULL to perform * when the node is freeed. You may set the copier to QSE_NULL to perform
* no special operation when the data pointer is rememebered. * no special operation when the data pointer is rememebered.
*/ */
void qse_sll_setcopier ( QSE_EXPORT void qse_sll_setcopier (
qse_sll_t* sll, /**< singly linked list */ qse_sll_t* sll, /**< singly linked list */
qse_sll_copier_t copier /**< data copier */ qse_sll_copier_t copier /**< data copier */
); );
@ -248,7 +254,7 @@ void qse_sll_setcopier (
/** /**
* The qse_sll_getfreeer() function returns the element freeer. * The qse_sll_getfreeer() function returns the element freeer.
*/ */
qse_sll_freeer_t qse_sll_getfreeer ( QSE_EXPORT qse_sll_freeer_t qse_sll_getfreeer (
qse_sll_t* sll /**< singly linked list */ qse_sll_t* sll /**< singly linked list */
); );
@ -256,7 +262,7 @@ qse_sll_freeer_t qse_sll_getfreeer (
* The qse_sll_setfreeer() function changes the element freeer. * The qse_sll_setfreeer() function changes the element freeer.
* The freeer is called when a node containing the element is destroyed. * The freeer is called when a node containing the element is destroyed.
*/ */
void qse_sll_setfreeer ( QSE_EXPORT void qse_sll_setfreeer (
qse_sll_t* sll, /**< singly linked list */ qse_sll_t* sll, /**< singly linked list */
qse_sll_freeer_t freeer /**< data freeer */ qse_sll_freeer_t freeer /**< data freeer */
); );
@ -264,14 +270,14 @@ void qse_sll_setfreeer (
/** /**
* The qse_sll_getcomper() function returns the data comparator. * The qse_sll_getcomper() function returns the data comparator.
*/ */
qse_sll_comper_t qse_sll_getcomper ( QSE_EXPORT qse_sll_comper_t qse_sll_getcomper (
qse_sll_t* sll /**< singly linked list */ qse_sll_t* sll /**< singly linked list */
); );
/** /**
* The qse_sll_setcomper() function changes the data comparator * The qse_sll_setcomper() function changes the data comparator
*/ */
void qse_sll_setcomper ( QSE_EXPORT void qse_sll_setcomper (
qse_sll_t* sll, /**< singly linked list */ qse_sll_t* sll, /**< singly linked list */
qse_sll_comper_t comper /**< comparator */ qse_sll_comper_t comper /**< comparator */
); );
@ -280,7 +286,7 @@ void qse_sll_setcomper (
* The qse_sll_getsize() function returns the number of the data nodes held * The qse_sll_getsize() function returns the number of the data nodes held
* in a singly linked list. * in a singly linked list.
*/ */
qse_size_t qse_sll_getsize ( QSE_EXPORT qse_size_t qse_sll_getsize (
qse_sll_t* sll /** singly linked list */ qse_sll_t* sll /** singly linked list */
); );
@ -288,7 +294,7 @@ qse_size_t qse_sll_getsize (
* The qse_sll_gethead() function gets the head node. You may use the * The qse_sll_gethead() function gets the head node. You may use the
* #QSE_SLL_HEAD macro instead. * #QSE_SLL_HEAD macro instead.
*/ */
qse_sll_node_t* qse_sll_gethead ( QSE_EXPORT qse_sll_node_t* qse_sll_gethead (
qse_sll_t* sll /**< a singly linked list */ qse_sll_t* sll /**< a singly linked list */
); );
@ -296,7 +302,7 @@ qse_sll_node_t* qse_sll_gethead (
* The qse_sll_gettail() function gets the head node. You may use the * The qse_sll_gettail() function gets the head node. You may use the
* #QSE_SLL_TAIL macro instead. * #QSE_SLL_TAIL macro instead.
*/ */
qse_sll_node_t* qse_sll_gettail ( QSE_EXPORT qse_sll_node_t* qse_sll_gettail (
qse_sll_t* sll /**< singly linked list */ qse_sll_t* sll /**< singly linked list */
); );
@ -311,7 +317,7 @@ qse_sll_node_t* qse_sll_gettail (
* *
* @return pointer to the node found. QSE_NULL if no match is found * @return pointer to the node found. QSE_NULL if no match is found
*/ */
qse_sll_node_t* qse_sll_search ( QSE_EXPORT qse_sll_node_t* qse_sll_search (
qse_sll_t* sll, /**< singly linked list */ qse_sll_t* sll, /**< singly linked list */
qse_sll_node_t* pos, /**< positional node */ qse_sll_node_t* pos, /**< positional node */
const void* dptr, /**< data pointer */ const void* dptr, /**< data pointer */
@ -326,7 +332,7 @@ qse_sll_node_t* qse_sll_search (
* into a random position. * into a random position.
* @return pointer to a new node on success, QSE_NULL on failure * @return pointer to a new node on success, QSE_NULL on failure
*/ */
qse_sll_node_t* qse_sll_insert ( QSE_EXPORT qse_sll_node_t* qse_sll_insert (
qse_sll_t* sll, /**< singly linked list */ qse_sll_t* sll, /**< singly linked list */
qse_sll_node_t* pos, /**< node before which a new node is inserted */ qse_sll_node_t* pos, /**< node before which a new node is inserted */
void* dptr, /**< the pointer to the data */ void* dptr, /**< the pointer to the data */
@ -336,7 +342,7 @@ qse_sll_node_t* qse_sll_insert (
/** /**
* The qse_sll_delete() function deletes a node. * The qse_sll_delete() function deletes a node.
*/ */
void qse_sll_delete ( QSE_EXPORT void qse_sll_delete (
qse_sll_t* sll, /**< singly linked list */ qse_sll_t* sll, /**< singly linked list */
qse_sll_node_t* pos /**< node to delete */ qse_sll_node_t* pos /**< node to delete */
); );
@ -345,7 +351,7 @@ void qse_sll_delete (
* The qse_sll_clear() function empties a singly linked list by deletinng * The qse_sll_clear() function empties a singly linked list by deletinng
* all the nodes. * all the nodes.
*/ */
void qse_sll_clear ( QSE_EXPORT void qse_sll_clear (
qse_sll_t* sll /**< singly linked list */ qse_sll_t* sll /**< singly linked list */
); );
@ -360,29 +366,29 @@ void qse_sll_clear (
* user-defined data passed as the third parameter in a call to the * user-defined data passed as the third parameter in a call to the
* qse_sll_walk() function. * qse_sll_walk() function.
*/ */
void qse_sll_walk ( QSE_EXPORT void qse_sll_walk (
qse_sll_t* sll, /**< singly linked list */ qse_sll_t* sll, /**< singly linked list */
qse_sll_walker_t walker, /**< user-defined walker function */ qse_sll_walker_t walker, /**< user-defined walker function */
void* ctx /**< the pointer to user-defined data */ void* ctx /**< the pointer to user-defined data */
); );
qse_sll_node_t* qse_sll_pushhead ( QSE_EXPORT qse_sll_node_t* qse_sll_pushhead (
qse_sll_t* sll /**< singly linked list */, qse_sll_t* sll /**< singly linked list */,
void* dptr, void* dptr,
qse_size_t dlen qse_size_t dlen
); );
qse_sll_node_t* qse_sll_pushtail ( QSE_EXPORT qse_sll_node_t* qse_sll_pushtail (
qse_sll_t* sll /**< singly linked list */, qse_sll_t* sll /**< singly linked list */,
void* dptr, void* dptr,
qse_size_t dlen qse_size_t dlen
); );
void qse_sll_pophead ( QSE_EXPORT void qse_sll_pophead (
qse_sll_t* sll qse_sll_t* sll
); );
void qse_sll_poptail ( QSE_EXPORT void qse_sll_poptail (
qse_sll_t* sll qse_sll_t* sll
); );

View File

@ -53,20 +53,20 @@ struct qse_mbstate_t
extern "C" { extern "C" {
#endif #endif
qse_size_t qse_slmbrlen ( QSE_EXPORT qse_size_t qse_slmbrlen (
const qse_mchar_t* mb, const qse_mchar_t* mb,
qse_size_t mblen, qse_size_t mblen,
qse_mbstate_t* state qse_mbstate_t* state
); );
qse_size_t qse_slmbrtoslwc ( QSE_EXPORT qse_size_t qse_slmbrtoslwc (
const qse_mchar_t* mb, const qse_mchar_t* mb,
qse_size_t mblen, qse_size_t mblen,
qse_wchar_t* wc, qse_wchar_t* wc,
qse_mbstate_t* state qse_mbstate_t* state
); );
qse_size_t qse_slwcrtoslmb ( QSE_EXPORT qse_size_t qse_slwcrtoslmb (
qse_wchar_t wc, qse_wchar_t wc,
qse_mchar_t* mb, qse_mchar_t* mb,
qse_size_t mblen, qse_size_t mblen,
@ -81,7 +81,7 @@ qse_size_t qse_slwcrtoslmb (
* @note This function can not handle conversion producing non-initial * @note This function can not handle conversion producing non-initial
* states. For each call, it assumes initial state. * states. For each call, it assumes initial state.
*/ */
qse_size_t qse_slmbtoslwc ( QSE_EXPORT qse_size_t qse_slmbtoslwc (
const qse_mchar_t* mb, const qse_mchar_t* mb,
qse_size_t mblen, qse_size_t mblen,
qse_wchar_t* wc qse_wchar_t* wc
@ -95,7 +95,7 @@ qse_size_t qse_slmbtoslwc (
* @note This function can not handle conversion producing non-initial * @note This function can not handle conversion producing non-initial
* states. For each call, it assumes initial state. * states. For each call, it assumes initial state.
*/ */
qse_size_t qse_slwctoslmb ( QSE_EXPORT qse_size_t qse_slwctoslmb (
qse_wchar_t wc, qse_wchar_t wc,
qse_mchar_t* mb, qse_mchar_t* mb,
qse_size_t mblen qse_size_t mblen
@ -111,7 +111,7 @@ qse_size_t qse_slwctoslmb (
* @note This function can not handle conversion producing non-initial * @note This function can not handle conversion producing non-initial
* states. For each call, it assumes initial state. * states. For each call, it assumes initial state.
*/ */
qse_size_t qse_slmblen ( QSE_EXPORT qse_size_t qse_slmblen (
const qse_mchar_t* mb, const qse_mchar_t* mb,
qse_size_t mblen qse_size_t mblen
); );
@ -120,7 +120,7 @@ qse_size_t qse_slmblen (
* The qse_slmblenmax() function returns the value of MB_CUR_MAX. * The qse_slmblenmax() function returns the value of MB_CUR_MAX.
* Note that QSE_MBLEN_MAX defines MB_LEN_MAX. * Note that QSE_MBLEN_MAX defines MB_LEN_MAX.
*/ */
qse_size_t qse_slmblenmax ( QSE_EXPORT qse_size_t qse_slmblenmax (
void void
); );

View File

@ -67,28 +67,35 @@ typedef int (*qse_getdelim_t) (const qse_char_t* ptr,qse_size_t len,void* arg);
extern "C" { extern "C" {
#endif #endif
int qse_vsprintf ( QSE_EXPORT int qse_vsprintf (
qse_char_t* buf, qse_char_t* buf,
qse_size_t size, qse_size_t size,
const qse_char_t* fmt, const qse_char_t* fmt,
va_list ap va_list ap
); );
int qse_sprintf ( QSE_EXPORT int qse_sprintf (
qse_char_t* buf, qse_char_t* buf,
qse_size_t size, qse_size_t size,
const qse_char_t* fmt, const qse_char_t* fmt,
... ...
); );
int qse_vfprintf (QSE_FILE *stream, const qse_char_t* fmt, va_list ap); QSE_EXPORT int qse_vfprintf (
int qse_vprintf (const qse_char_t* fmt, va_list ap); QSE_FILE *stream, const qse_char_t* fmt, va_list ap);
int qse_fprintf (QSE_FILE* file, const qse_char_t* fmt, ...); QSE_EXPORT int qse_vprintf (
int qse_printf (const qse_char_t* fmt, ...); const qse_char_t* fmt, va_list ap);
QSE_EXPORT int qse_fprintf (
QSE_FILE* file, const qse_char_t* fmt, ...);
QSE_EXPORT int qse_printf (
const qse_char_t* fmt, ...);
int qse_dprintf (const qse_char_t* fmt, ...); QSE_EXPORT int qse_dprintf (
QSE_FILE* qse_fopen (const qse_char_t* path, const qse_char_t* mode); const qse_char_t* fmt, ...);
QSE_FILE* qse_popen (const qse_char_t* cmd, const qse_char_t* mode); QSE_EXPORT QSE_FILE* qse_fopen (
const qse_char_t* path, const qse_char_t* mode);
QSE_EXPORT QSE_FILE* qse_popen (
const qse_char_t* cmd, const qse_char_t* mode);
/** /**
* The qse_getline() function read a line from a file pointer @a fp * The qse_getline() function read a line from a file pointer @a fp
@ -96,7 +103,7 @@ QSE_FILE* qse_popen (const qse_char_t* cmd, const qse_char_t* mode);
* *
* @return -2 on error, -1 on eof, length of data read on success * @return -2 on error, -1 on eof, length of data read on success
*/ */
qse_ssize_t qse_getline (qse_char_t **buf, qse_size_t *n, QSE_FILE *fp); QSE_EXPORT qse_ssize_t qse_getline (qse_char_t **buf, qse_size_t *n, QSE_FILE *fp);
/** /**
* The qse_getdelim() function reads characters from a file pointer @a fp * The qse_getdelim() function reads characters from a file pointer @a fp
@ -105,7 +112,7 @@ qse_ssize_t qse_getline (qse_char_t **buf, qse_size_t *n, QSE_FILE *fp);
* @return -3 on line breaker error, -2 on error, -1 on eof, * @return -3 on line breaker error, -2 on error, -1 on eof,
* length of data read on success * length of data read on success
*/ */
qse_ssize_t qse_getdelim ( QSE_EXPORT qse_ssize_t qse_getdelim (
qse_char_t **buf, qse_size_t *n, qse_char_t **buf, qse_size_t *n,
qse_getdelim_t fn, void* fnarg, QSE_FILE *fp); qse_getdelim_t fn, void* fnarg, QSE_FILE *fp);

File diff suppressed because it is too large Load Diff

View File

@ -37,36 +37,36 @@ typedef qse_task_slice_t* (*qse_task_fnc_t) (
extern "C" { extern "C" {
#endif #endif
qse_task_t* qse_task_open ( QSE_EXPORT qse_task_t* qse_task_open (
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_size_t xtnsize qse_size_t xtnsize
); );
void qse_task_close ( QSE_EXPORT void qse_task_close (
qse_task_t* task qse_task_t* task
); );
qse_mmgr_t* qse_task_getmmgr ( QSE_EXPORT qse_mmgr_t* qse_task_getmmgr (
qse_task_t* task qse_task_t* task
); );
void* qse_task_getxtn ( QSE_EXPORT void* qse_task_getxtn (
qse_task_t* task qse_task_t* task
); );
qse_task_slice_t* qse_task_create ( QSE_EXPORT qse_task_slice_t* qse_task_create (
qse_task_t* task, qse_task_t* task,
qse_task_fnc_t fnc, qse_task_fnc_t fnc,
void* ctx, void* ctx,
qse_size_t stksize qse_size_t stksize
); );
int qse_task_boot ( QSE_EXPORT int qse_task_boot (
qse_task_t* task, qse_task_t* task,
qse_task_slice_t* to qse_task_slice_t* to
); );
void qse_task_schedule ( QSE_EXPORT void qse_task_schedule (
qse_task_t* task, qse_task_t* task,
qse_task_slice_t* from, qse_task_slice_t* from,
qse_task_slice_t* to qse_task_slice_t* to

View File

@ -112,14 +112,14 @@ extern "C" {
/** /**
* The qse_gettime() function gets the current time. * The qse_gettime() function gets the current time.
*/ */
int qse_gettime ( QSE_EXPORT int qse_gettime (
qse_ntime_t* nt qse_ntime_t* nt
); );
/** /**
* The qse_settime() function sets the current time. * The qse_settime() function sets the current time.
*/ */
int qse_settime ( QSE_EXPORT int qse_settime (
const qse_ntime_t* nt const qse_ntime_t* nt
); );
@ -127,7 +127,7 @@ int qse_settime (
/** /**
* The qse_gmtime() function converts numeric time to broken-down time. * The qse_gmtime() function converts numeric time to broken-down time.
*/ */
int qse_gmtime ( QSE_EXPORT int qse_gmtime (
const qse_ntime_t* nt, const qse_ntime_t* nt,
qse_btime_t* bt qse_btime_t* bt
); );
@ -135,7 +135,7 @@ int qse_gmtime (
/** /**
* The qse_localtime() converts numeric time to broken-down time * The qse_localtime() converts numeric time to broken-down time
*/ */
int qse_localtime ( QSE_EXPORT int qse_localtime (
const qse_ntime_t* nt, const qse_ntime_t* nt,
qse_btime_t* bt qse_btime_t* bt
); );
@ -145,7 +145,7 @@ int qse_localtime (
* inverse of qse_gmtime(). It is useful if the broken-down time is in UTC * inverse of qse_gmtime(). It is useful if the broken-down time is in UTC
* and the local environment is not. * and the local environment is not.
*/ */
int qse_timegm ( QSE_EXPORT int qse_timegm (
const qse_btime_t* bt, const qse_btime_t* bt,
qse_ntime_t* nt qse_ntime_t* nt
); );
@ -154,7 +154,7 @@ int qse_timegm (
* The qse_timelocal() converts broken-down time to numeric time. It is the * The qse_timelocal() converts broken-down time to numeric time. It is the
* inverse of qse_localtime(); * inverse of qse_localtime();
*/ */
int qse_timelocal ( QSE_EXPORT int qse_timelocal (
const qse_btime_t* bt, const qse_btime_t* bt,
qse_ntime_t* nt qse_ntime_t* nt
); );

View File

@ -109,7 +109,7 @@ typedef struct qse_tio_io_t qse_tio_io_t;
*/ */
struct qse_tio_t struct qse_tio_t
{ {
QSE_DEFINE_COMMON_FIELDS (tio) qse_mmgr_t* mmgr;
qse_tio_errnum_t errnum; qse_tio_errnum_t errnum;
int flags; int flags;
qse_cmgr_t* cmgr; qse_cmgr_t* cmgr;
@ -128,12 +128,10 @@ struct qse_tio_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (tio)
/** /**
* The qse_tio_open() function creates an text stream processoor. * The qse_tio_open() function creates an text stream processoor.
*/ */
qse_tio_t* qse_tio_open ( QSE_EXPORT qse_tio_t* qse_tio_open (
qse_mmgr_t* mmgr, /**< memory manager */ qse_mmgr_t* mmgr, /**< memory manager */
qse_size_t xtnsize, /**< extension size in bytes */ qse_size_t xtnsize, /**< extension size in bytes */
int flags /**< ORed of qse_tio_flag_t enumerators */ int flags /**< ORed of qse_tio_flag_t enumerators */
@ -142,7 +140,7 @@ qse_tio_t* qse_tio_open (
/** /**
* The qse_tio_close() function destroys an text stream processor. * The qse_tio_close() function destroys an text stream processor.
*/ */
int qse_tio_close ( QSE_EXPORT int qse_tio_close (
qse_tio_t* tio qse_tio_t* tio
); );
@ -150,7 +148,7 @@ int qse_tio_close (
* The qse_tio_init() function initialize a statically declared * The qse_tio_init() function initialize a statically declared
* text stream processor. * text stream processor.
*/ */
int qse_tio_init ( QSE_EXPORT int qse_tio_init (
qse_tio_t* tio, qse_tio_t* tio,
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
int flags int flags
@ -159,14 +157,22 @@ int qse_tio_init (
/** /**
* The qse_tio_fini() function finalizes a text stream processor * The qse_tio_fini() function finalizes a text stream processor
*/ */
int qse_tio_fini ( QSE_EXPORT int qse_tio_fini (
qse_tio_t* tio
);
QSE_EXPORT qse_mmgr_t* qse_tio_getmmgr (
qse_tio_t* tio
);
QSE_EXPORT void* qse_tio_getxtn (
qse_tio_t* tio qse_tio_t* tio
); );
/** /**
* The qse_tio_geterrnum() function returns the current error code. * The qse_tio_geterrnum() function returns the current error code.
*/ */
qse_tio_errnum_t qse_tio_geterrnum ( QSE_EXPORT qse_tio_errnum_t qse_tio_geterrnum (
const qse_tio_t* tio const qse_tio_t* tio
); );
@ -174,7 +180,7 @@ qse_tio_errnum_t qse_tio_geterrnum (
* The qse_tio_geterrnum() function changes the current error code. * The qse_tio_geterrnum() function changes the current error code.
* typically from within the I/O handler attached. * typically from within the I/O handler attached.
*/ */
void qse_tio_seterrnum ( QSE_EXPORT void qse_tio_seterrnum (
qse_tio_t* tio, qse_tio_t* tio,
qse_tio_errnum_t errnum qse_tio_errnum_t errnum
); );
@ -182,14 +188,14 @@ void qse_tio_seterrnum (
/** /**
* The qse_tio_getcmgr() function returns the character manager. * The qse_tio_getcmgr() function returns the character manager.
*/ */
qse_cmgr_t* qse_tio_getcmgr ( QSE_EXPORT qse_cmgr_t* qse_tio_getcmgr (
qse_tio_t* tio qse_tio_t* tio
); );
/** /**
* The qse_tio_setcmgr() function changes the character manager. * The qse_tio_setcmgr() function changes the character manager.
*/ */
void qse_tio_setcmgr ( QSE_EXPORT void qse_tio_setcmgr (
qse_tio_t* tio, qse_tio_t* tio,
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
@ -198,7 +204,7 @@ void qse_tio_setcmgr (
* The qse_tio_attachin() function attachs an input handler . * The qse_tio_attachin() function attachs an input handler .
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_tio_attachin ( QSE_EXPORT int qse_tio_attachin (
qse_tio_t* tio, qse_tio_t* tio,
qse_tio_io_impl_t input, qse_tio_io_impl_t input,
qse_mchar_t* bufptr, qse_mchar_t* bufptr,
@ -209,7 +215,7 @@ int qse_tio_attachin (
* The qse_tio_detachin() function detaches an input handler . * The qse_tio_detachin() function detaches an input handler .
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_tio_detachin ( QSE_EXPORT int qse_tio_detachin (
qse_tio_t* tio qse_tio_t* tio
); );
@ -217,7 +223,7 @@ int qse_tio_detachin (
* The qse_tio_attachout() function attaches an output handler. * The qse_tio_attachout() function attaches an output handler.
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_tio_attachout ( QSE_EXPORT int qse_tio_attachout (
qse_tio_t* tio, qse_tio_t* tio,
qse_tio_io_impl_t output, qse_tio_io_impl_t output,
qse_mchar_t* bufptr, qse_mchar_t* bufptr,
@ -228,7 +234,7 @@ int qse_tio_attachout (
* The qse_tio_detachout() function detaches an output handler . * The qse_tio_detachout() function detaches an output handler .
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int qse_tio_detachout ( QSE_EXPORT int qse_tio_detachout (
qse_tio_t* tio qse_tio_t* tio
); );
@ -236,24 +242,24 @@ int qse_tio_detachout (
* The qse_tio_flush() function flushes the output buffer. It returns the * The qse_tio_flush() function flushes the output buffer. It returns the
* number of bytes written on success, -1 on failure. * number of bytes written on success, -1 on failure.
*/ */
qse_ssize_t qse_tio_flush ( QSE_EXPORT qse_ssize_t qse_tio_flush (
qse_tio_t* tio qse_tio_t* tio
); );
/** /**
* The qse_tio_purge() function empties input and output buffers. * The qse_tio_purge() function empties input and output buffers.
*/ */
void qse_tio_purge ( QSE_EXPORT void qse_tio_purge (
qse_tio_t* tio qse_tio_t* tio
); );
qse_ssize_t qse_tio_readmbs ( QSE_EXPORT qse_ssize_t qse_tio_readmbs (
qse_tio_t* tio, qse_tio_t* tio,
qse_mchar_t* buf, qse_mchar_t* buf,
qse_size_t size qse_size_t size
); );
qse_ssize_t qse_tio_readwcs ( QSE_EXPORT qse_ssize_t qse_tio_readwcs (
qse_tio_t* tio, qse_tio_t* tio,
qse_wchar_t* buf, qse_wchar_t* buf,
qse_size_t size qse_size_t size
@ -276,7 +282,7 @@ qse_ssize_t qse_tio_readwcs (
* write more than QSE_TYPE_MAX(qse_ssize_t) characters. * write more than QSE_TYPE_MAX(qse_ssize_t) characters.
* @return number of characters written on success, -1 on failure. * @return number of characters written on success, -1 on failure.
*/ */
qse_ssize_t qse_tio_writembs ( QSE_EXPORT qse_ssize_t qse_tio_writembs (
qse_tio_t* tio, qse_tio_t* tio,
const qse_mchar_t* str, const qse_mchar_t* str,
qse_size_t size qse_size_t size
@ -289,7 +295,7 @@ qse_ssize_t qse_tio_writembs (
* more than QSE_TYPE_MAX(qse_ssize_t) characters. * more than QSE_TYPE_MAX(qse_ssize_t) characters.
* @return number of characters written on success, -1 on failure. * @return number of characters written on success, -1 on failure.
*/ */
qse_ssize_t qse_tio_writewcs ( QSE_EXPORT qse_ssize_t qse_tio_writewcs (
qse_tio_t* tio, qse_tio_t* tio,
const qse_wchar_t* str, const qse_wchar_t* str,
qse_size_t size qse_size_t size

View File

@ -51,7 +51,7 @@ typedef enum qse_tre_errnum_t qse_tre_errnum_t;
typedef struct qse_tre_t qse_tre_t; typedef struct qse_tre_t qse_tre_t;
struct qse_tre_t struct qse_tre_t
{ {
QSE_DEFINE_COMMON_FIELDS (tre) qse_mmgr_t* mmgr;
qse_tre_errnum_t errnum; qse_tre_errnum_t errnum;
qse_size_t re_nsub; /* Number of parenthesized subexpressions. */ qse_size_t re_nsub; /* Number of parenthesized subexpressions. */
@ -107,35 +107,41 @@ struct qse_tre_strsrc_t
extern "C" { extern "C" {
#endif #endif
QSE_DEFINE_COMMON_FUNCTIONS (tre) QSE_EXPORT qse_tre_t* qse_tre_open (
qse_tre_t* qse_tre_open (
qse_mmgr_t* mmgr, qse_mmgr_t* mmgr,
qse_size_t xtnsize qse_size_t xtnsize
); );
void qse_tre_close ( QSE_EXPORT void qse_tre_close (
qse_tre_t* tre qse_tre_t* tre
); );
int qse_tre_init ( QSE_EXPORT int qse_tre_init (
qse_tre_t* tre, qse_tre_t* tre,
qse_mmgr_t* mmgr qse_mmgr_t* mmgr
); );
void qse_tre_fini ( QSE_EXPORT void qse_tre_fini (
qse_tre_t* tre qse_tre_t* tre
); );
qse_tre_errnum_t qse_tre_geterrnum ( QSE_EXPORT qse_mmgr_t* qse_tre_getmmgr (
qse_tre_t* tre qse_tre_t* tre
); );
const qse_char_t* qse_tre_geterrmsg ( QSE_EXPORT void* qse_tre_getxtn (
qse_tre_t* tre qse_tre_t* tre
); );
int qse_tre_compx ( QSE_EXPORT qse_tre_errnum_t qse_tre_geterrnum (
qse_tre_t* tre
);
QSE_EXPORT const qse_char_t* qse_tre_geterrmsg (
qse_tre_t* tre
);
QSE_EXPORT int qse_tre_compx (
qse_tre_t* tre, qse_tre_t* tre,
const qse_char_t* regex, const qse_char_t* regex,
qse_size_t n, qse_size_t n,
@ -143,14 +149,14 @@ int qse_tre_compx (
int cflags int cflags
); );
int qse_tre_comp ( QSE_EXPORT int qse_tre_comp (
qse_tre_t* tre, qse_tre_t* tre,
const qse_char_t* regex, const qse_char_t* regex,
unsigned int* nsubmat, unsigned int* nsubmat,
int cflags int cflags
); );
int qse_tre_execx ( QSE_EXPORT int qse_tre_execx (
qse_tre_t* tre, qse_tre_t* tre,
const qse_char_t* str, const qse_char_t* str,
qse_size_t len, qse_size_t len,
@ -159,7 +165,7 @@ int qse_tre_execx (
int eflags int eflags
); );
int qse_tre_exec ( QSE_EXPORT int qse_tre_exec (
qse_tre_t* tre, qse_tre_t* tre,
const qse_char_t* str, const qse_char_t* str,
qse_tre_match_t* pmatch, qse_tre_match_t* pmatch,

View File

@ -70,13 +70,13 @@ enum qse_wcstouri_flag_t
extern "C" { extern "C" {
#endif #endif
int qse_mbstouri ( QSE_EXPORT int qse_mbstouri (
const qse_mchar_t* str, const qse_mchar_t* str,
qse_uri_t* uri, qse_uri_t* uri,
int flags int flags
); );
int qse_wcstouri ( QSE_EXPORT int qse_wcstouri (
const qse_wchar_t* str, const qse_wchar_t* str,
qse_uri_t* uri, qse_uri_t* uri,
int flags int flags

View File

@ -294,7 +294,7 @@
# ifdef __cplusplus # ifdef __cplusplus
extern "C" { extern "C" {
# endif # endif
void qse_assert_failed ( QSE_EXPORT void qse_assert_failed (
const qse_char_t* expr, const qse_char_t* desc, const qse_char_t* expr, const qse_char_t* desc,
const qse_char_t* file, qse_size_t line); const qse_char_t* file, qse_size_t line);
# ifdef __cplusplus # ifdef __cplusplus
@ -314,28 +314,6 @@
# define QSE_END_NAMESPACE2(y,x) }} # define QSE_END_NAMESPACE2(y,x) }}
#endif #endif
/**
* The QSE_DEFINE_COMMON_FIELDS() macro defines common object fields.
*/
#define QSE_DEFINE_COMMON_FIELDS(name) \
qse_mmgr_t* mmgr;
/**
* The QSE_DEFINE_COMMON_FUNCTIONS() macro defines common object functions.
* - @code void qse_xxx_setmmgr (qse_xxx_t* xxx, qse_mmgr_t* mmgr); @endcode
* The qse_xxx_setmmgr() function change the memory manager of a relevant
* object. Take extreme care if you want to use this function.
* - @code qse_mmgr_t* qse_xxx_getmmgr (qse_xxx_t* xxx); @endcode
* The qse_xxx_getmmgr() function returns the memory manager of a relevant
* object.
* - @code void qse_xxx_getxtn (qse_xxx_t* xxx); @endcode
* The qse_xxx_getxtn() function returns the pointer to an extension area
* of a relevant object created with an extension size greater than 0.
*/
#define QSE_DEFINE_COMMON_FUNCTIONS(name) \
qse_mmgr_t* qse_##name##_getmmgr (qse_##name##_t* name); \
void* qse_##name##_getxtn (qse_##name##_t* name);
/** /**
* The QSE_XTN() macro is a convenience macro to retrieve the pointer to * The QSE_XTN() macro is a convenience macro to retrieve the pointer to
* extension space located at the end of an object. The type of the object * extension space located at the end of an object. The type of the object
@ -343,18 +321,4 @@ void* qse_##name##_getxtn (qse_##name##_t* name);
*/ */
#define QSE_XTN(obj) ((void*)(obj + 1)) #define QSE_XTN(obj) ((void*)(obj + 1))
/**
* The QSE_IMPLEMENT_COMMON_FUNCTIONS() implement common functions for
* an object.
*/
#define QSE_IMPLEMENT_COMMON_FUNCTIONS(name) \
qse_mmgr_t* qse_##name##_getmmgr (qse_##name##_t* name) \
{ \
return (name)->mmgr; \
} \
void* qse_##name##_getxtn (qse_##name##_t* name) \
{ \
return QSE_XTN(name); \
}
#endif #endif

View File

@ -280,19 +280,19 @@ void Awk::Value::operator delete[] (void* ptr)
qse_awk_rtx_freemem ((*(Run**)p)->rtx, p); qse_awk_rtx_freemem ((*(Run**)p)->rtx, p);
} }
Awk::Value::Value (): run (QSE_NULL), val (qse_awk_val_nil) Awk::Value::Value (): run (QSE_NULL), val (qse_getawknilval())
{ {
cached.str.ptr = QSE_NULL; cached.str.ptr = QSE_NULL;
cached.str.len = 0; cached.str.len = 0;
} }
Awk::Value::Value (Run& run): run (&run), val (qse_awk_val_nil) Awk::Value::Value (Run& run): run (&run), val (qse_getawknilval())
{ {
cached.str.ptr = QSE_NULL; cached.str.ptr = QSE_NULL;
cached.str.len = 0; cached.str.len = 0;
} }
Awk::Value::Value (Run* run): run (run), val (qse_awk_val_nil) Awk::Value::Value (Run* run): run (run), val (qse_getawknilval())
{ {
cached.str.ptr = QSE_NULL; cached.str.ptr = QSE_NULL;
cached.str.len = 0; cached.str.len = 0;
@ -355,7 +355,7 @@ void Awk::Value::clear ()
} }
run = QSE_NULL; run = QSE_NULL;
val = qse_awk_val_nil; val = qse_getawknilval();
} }
} }

View File

@ -22,6 +22,6 @@ if ENABLE_CXX
lib_LTLIBRARIES += libqseawkxx.la lib_LTLIBRARIES += libqseawkxx.la
libqseawkxx_la_SOURCES = Awk.cpp StdAwk.cpp libqseawkxx_la_SOURCES = Awk.cpp StdAwk.cpp
libqseawkxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined libqseawkxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqseawkxx_la_LIBADD = -lqseawk -lqsecmn $(LIBM) $(LIBLTDL) libqseawkxx_la_LIBADD = -lqseawk -lqsecmnxx -lqsecmn $(LIBM) $(LIBLTDL)
endif endif

View File

@ -310,7 +310,7 @@ libqseawk_la_LDFLAGS = -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqseawk_la_LIBADD = -lqsecmn $(LIBM) $(LIBLTDL) libqseawk_la_LIBADD = -lqsecmn $(LIBM) $(LIBLTDL)
@ENABLE_CXX_TRUE@libqseawkxx_la_SOURCES = Awk.cpp StdAwk.cpp @ENABLE_CXX_TRUE@libqseawkxx_la_SOURCES = Awk.cpp StdAwk.cpp
@ENABLE_CXX_TRUE@libqseawkxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined @ENABLE_CXX_TRUE@libqseawkxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
@ENABLE_CXX_TRUE@libqseawkxx_la_LIBADD = -lqseawk -lqsecmn $(LIBM) $(LIBLTDL) @ENABLE_CXX_TRUE@libqseawkxx_la_LIBADD = -lqseawk -lqsecmnxx -lqsecmn $(LIBM) $(LIBLTDL)
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:

View File

@ -63,6 +63,11 @@ qse_awk_val_t* qse_awk_val_negone = (qse_awk_val_t*)&awk_int[0];
qse_awk_val_t* qse_awk_val_zero = (qse_awk_val_t*)&awk_int[1]; qse_awk_val_t* qse_awk_val_zero = (qse_awk_val_t*)&awk_int[1];
qse_awk_val_t* qse_awk_val_one = (qse_awk_val_t*)&awk_int[2]; qse_awk_val_t* qse_awk_val_one = (qse_awk_val_t*)&awk_int[2];
qse_awk_val_t* qse_getawknilval (void)
{
return (qse_awk_val_t*)&awk_nil;
}
int qse_awk_rtx_isnilval (qse_awk_rtx_t* rtx, qse_awk_val_t* val) int qse_awk_rtx_isnilval (qse_awk_rtx_t* rtx, qse_awk_val_t* val)
{ {
return val->type == QSE_AWK_VAL_NIL; return val->type == QSE_AWK_VAL_NIL;

View File

@ -21,8 +21,6 @@
#include <qse/cmn/dll.h> #include <qse/cmn/dll.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (dll)
#define TOB(dll,len) ((len)*(dll)->scale) #define TOB(dll,len) ((len)*(dll)->scale)
#define DPTR(node) QSE_DLL_DPTR(node) #define DPTR(node) QSE_DLL_DPTR(node)
#define DLEN(node) QSE_DLL_DLEN(node) #define DLEN(node) QSE_DLL_DLEN(node)
@ -90,6 +88,16 @@ void qse_dll_fini (qse_dll_t* dll)
qse_dll_clear (dll); qse_dll_clear (dll);
} }
qse_mmgr_t* qse_dll_getmmgr (qse_dll_t* dll)
{
return dll->mmgr;
}
void* qse_dll_getxtn (qse_dll_t* dll)
{
return QSE_XTN (dll);
}
int qse_dll_getscale (qse_dll_t* dll) int qse_dll_getscale (qse_dll_t* dll)
{ {
return dll->scale; return dll->scale;

View File

@ -21,8 +21,6 @@
#include <qse/cmn/fma.h> #include <qse/cmn/fma.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (fma)
qse_fma_t* qse_fma_open ( qse_fma_t* qse_fma_open (
qse_mmgr_t* mmgr, qse_size_t xtnsize, qse_mmgr_t* mmgr, qse_size_t xtnsize,
qse_size_t blksize, qse_size_t maxblks, qse_size_t maxcnks) qse_size_t blksize, qse_size_t maxblks, qse_size_t maxcnks)
@ -77,6 +75,16 @@ void qse_fma_fini (qse_fma_t* fma)
} }
} }
qse_mmgr_t* qse_fma_getmmgr (qse_fma_t* fma)
{
return fma->mmgr;
}
void* qse_fma_getxtn (qse_fma_t* fma)
{
return QSE_XTN (fma);
}
static QSE_INLINE qse_fma_cnk_t* add_chunk (qse_fma_t* fma) static QSE_INLINE qse_fma_cnk_t* add_chunk (qse_fma_t* fma)
{ {
qse_fma_cnk_t* cnk; qse_fma_cnk_t* cnk;
@ -131,7 +139,7 @@ void* qse_fma_alloc (qse_fma_t* fma, qse_size_t size)
void* qse_fma_calloc (qse_fma_t* fma, qse_size_t size) void* qse_fma_calloc (qse_fma_t* fma, qse_size_t size)
{ {
void* ptr = qse_fma_alloc (fma, size); void* ptr = qse_fma_alloc (fma, size);
if (size) QSE_MEMSET (ptr, 0, size); if (ptr) QSE_MEMSET (ptr, 0, size);
return ptr; return ptr;
} }

View File

@ -52,8 +52,6 @@ struct info_t
#endif #endif
}; };
QSE_IMPLEMENT_COMMON_FUNCTIONS (fs)
qse_fs_t* qse_fs_open (qse_mmgr_t* mmgr, qse_size_t xtnsize) qse_fs_t* qse_fs_open (qse_mmgr_t* mmgr, qse_size_t xtnsize)
{ {
qse_fs_t* fs; qse_fs_t* fs;
@ -132,6 +130,16 @@ void qse_fs_fini (qse_fs_t* fs)
} }
} }
qse_mmgr_t* qse_fs_getmmgr (qse_fs_t* fs)
{
return fs->mmgr;
}
void* qse_fs_getxtn (qse_fs_t* fs)
{
return QSE_XTN (fs);
}
static QSE_INLINE info_t* get_info (qse_fs_t* fs) static QSE_INLINE info_t* get_info (qse_fs_t* fs)
{ {
info_t* info; info_t* info;

View File

@ -21,7 +21,6 @@
#include <qse/cmn/htb.h> #include <qse/cmn/htb.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (htb)
#define htb_t qse_htb_t #define htb_t qse_htb_t
#define pair_t qse_htb_pair_t #define pair_t qse_htb_pair_t
@ -329,6 +328,16 @@ void qse_htb_fini (htb_t* htb)
QSE_MMGR_FREE (htb->mmgr, htb->bucket); QSE_MMGR_FREE (htb->mmgr, htb->bucket);
} }
qse_mmgr_t* qse_htb_getmmgr (qse_htb_t* htb)
{
return htb->mmgr;
}
void* qse_htb_getxtn (qse_htb_t* htb)
{
return QSE_XTN (htb);
}
const mancbs_t* qse_htb_getmancbs (const htb_t* htb) const mancbs_t* qse_htb_getmancbs (const htb_t* htb)
{ {
return htb->mancbs; return htb->mancbs;

View File

@ -21,8 +21,6 @@
#include <qse/cmn/lda.h> #include <qse/cmn/lda.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (lda)
#define lda_t qse_lda_t #define lda_t qse_lda_t
#define slot_t qse_lda_slot_t #define slot_t qse_lda_slot_t
#define copier_t qse_lda_copier_t #define copier_t qse_lda_copier_t
@ -143,6 +141,16 @@ void qse_lda_fini (lda_t* lda)
} }
} }
qse_mmgr_t* qse_lda_getmmgr (qse_lda_t* lda)
{
return lda->mmgr;
}
void* qse_lda_getxtn (qse_lda_t* lda)
{
return QSE_XTN (lda);
}
int qse_lda_getscale (lda_t* lda) int qse_lda_getscale (lda_t* lda)
{ {
return lda->scale; return lda->scale;

View File

@ -43,11 +43,11 @@
# include <sys/time.h> # include <sys/time.h>
#endif #endif
QSE_IMPLEMENT_COMMON_FUNCTIONS (nwio)
enum enum
{ {
STATUS_UDP_CONNECT = (1 << 0) STATUS_UDP_CONNECT = (1 << 0),
STATUS_TMOUT_R_PRESET = (1 << 1),
STATUS_TMOUT_W_PRESET = (1 << 2)
}; };
static qse_ssize_t socket_output ( static qse_ssize_t socket_output (
@ -250,17 +250,17 @@ static int wait_for_data (qse_nwio_t* nwio, const qse_ntime_t* tmout, int what)
return -1; return -1;
#else #else
fd_set fds[2]; fd_set fds[2];
struct timeval tv; struct timeval tv;
FD_ZERO (&fds[0]);
FD_ZERO (&fds[1]);
FD_SET (nwio->handle, &fds[what]);
tv.tv_sec = tmout->sec; tv.tv_sec = tmout->sec;
tv.tv_usec = QSE_NSEC_TO_USEC (tmout->nsec); tv.tv_usec = QSE_NSEC_TO_USEC (tmout->nsec);
FD_ZERO (&fds[0]);
FD_ZERO (&fds[1]);
FD_SET (nwio->handle, &fds[what]);
xret = select (nwio->handle + 1, &fds[0], &fds[1], QSE_NULL, &tv); xret = select (nwio->handle + 1, &fds[0], &fds[1], QSE_NULL, &tv);
if (xret <= -1) if (xret <= -1)
{ {
@ -302,6 +302,54 @@ void qse_nwio_close (qse_nwio_t* nwio)
QSE_MMGR_FREE (nwio->mmgr, nwio); QSE_MMGR_FREE (nwio->mmgr, nwio);
} }
static int preset_tmout (qse_nwio_t* nwio)
{
#if defined(SO_RCVTIMEO) && defined(SO_SNDTIMEO)
#if defined(_WIN32)
DWORD tv;
#else
struct timeval tv;
#endif
if (TMOUT_ENABLED(nwio->tmout.r))
{
#if defined(_WIN32)
tv = QSE_SEC_TO_MSEC(nwio->tmout.r.sec) + QSE_NSEC_TO_MSEC (nwio->tmout.r.nsec);
#else
tv.tv_sec = nwio->tmout.r.sec;
tv.tv_usec = QSE_NSEC_TO_USEC (nwio->tmout.r.nsec);
#endif
if (setsockopt (nwio->handle, SOL_SOCKET, SO_RCVTIMEO, (void*)&tv, QSE_SIZEOF(tv)) <= -1)
{
return -1; /* tried to set but failed */
}
nwio->status |= STATUS_TMOUT_R_PRESET;
}
if (TMOUT_ENABLED(nwio->tmout.w))
{
#if defined(_WIN32)
tv = QSE_SEC_TO_MSEC(nwio->tmout.w.sec) + QSE_NSEC_TO_MSEC (nwio->tmout.w.nsec);
#else
tv.tv_sec = nwio->tmout.w.sec;
tv.tv_usec = QSE_NSEC_TO_USEC (nwio->tmout.w.nsec);
#endif
if (setsockopt (nwio->handle, SOL_SOCKET, SO_SNDTIMEO, (void*)&tv, QSE_SIZEOF(tv)) <= -1)
{
return -1; /* tried to set but failed */
}
nwio->status |= STATUS_TMOUT_W_PRESET;
}
return 1; /* set successfully - don't need a multiplexer */
#endif
return 0; /* no measn to set it */
}
int qse_nwio_init ( int qse_nwio_init (
qse_nwio_t* nwio, qse_mmgr_t* mmgr, const qse_nwad_t* nwad, qse_nwio_t* nwio, qse_mmgr_t* mmgr, const qse_nwad_t* nwad,
int flags, const qse_nwio_tmout_t* tmout) int flags, const qse_nwio_tmout_t* tmout)
@ -730,6 +778,7 @@ int qse_nwio_init (
} }
} }
preset_tmout (nwio);
return 0; return 0;
oops: oops:
@ -775,6 +824,16 @@ void qse_nwio_fini (qse_nwio_t* nwio)
#endif #endif
} }
qse_mmgr_t* qse_nwio_getmmgr (qse_nwio_t* nwio)
{
return nwio->mmgr;
}
void* qse_nwio_getxtn (qse_nwio_t* nwio)
{
return QSE_XTN (nwio);
}
qse_nwio_errnum_t qse_nwio_geterrnum (const qse_nwio_t* nwio) qse_nwio_errnum_t qse_nwio_geterrnum (const qse_nwio_t* nwio)
{ {
return nwio->errnum; return nwio->errnum;
@ -881,7 +940,8 @@ static qse_ssize_t nwio_read (qse_nwio_t* nwio, void* buf, qse_size_t size)
} }
else else
{ {
if (TMOUT_ENABLED(nwio->tmout.r) && if (!(nwio->status & STATUS_TMOUT_R_PRESET) &&
TMOUT_ENABLED(nwio->tmout.r) &&
wait_for_data (nwio, &nwio->tmout.r, 0) <= -1) return -1; wait_for_data (nwio, &nwio->tmout.r, 0) <= -1) return -1;
count = recv (nwio->handle, buf, size, 0); count = recv (nwio->handle, buf, size, 0);
@ -925,7 +985,8 @@ static qse_ssize_t nwio_read (qse_nwio_t* nwio, void* buf, qse_size_t size)
} }
else else
{ {
if (TMOUT_ENABLED(nwio->tmout.r) && if (!(nwio->status & STATUS_TMOUT_R_PRESET) &&
TMOUT_ENABLED(nwio->tmout.r) &&
wait_for_data (nwio, &nwio->tmout.r, 0) <= -1) return -1; wait_for_data (nwio, &nwio->tmout.r, 0) <= -1) return -1;
n = recv (nwio->handle, buf, size, 0); n = recv (nwio->handle, buf, size, 0);
@ -994,7 +1055,8 @@ reread:
} }
else else
{ {
if (TMOUT_ENABLED(nwio->tmout.r) && if (!(nwio->status & STATUS_TMOUT_R_PRESET) &&
TMOUT_ENABLED(nwio->tmout.r) &&
wait_for_data (nwio, &nwio->tmout.r, 0) <= -1) return -1; wait_for_data (nwio, &nwio->tmout.r, 0) <= -1) return -1;
n = recv (nwio->handle, buf, size, 0); n = recv (nwio->handle, buf, size, 0);
@ -1051,7 +1113,8 @@ static qse_ssize_t nwio_write (qse_nwio_t* nwio, const void* data, qse_size_t si
if (size > (QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(int))) if (size > (QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(int)))
size = QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(int); size = QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(int);
if (TMOUT_ENABLED(nwio->tmout.w) && if (!(nwio->status & STATUS_TMOUT_W_PRESET) &&
TMOUT_ENABLED(nwio->tmout.w) &&
wait_for_data (nwio, &nwio->tmout.w, 1) <= -1) return -1; wait_for_data (nwio, &nwio->tmout.w, 1) <= -1) return -1;
count = send (nwio->handle, data, size, 0); count = send (nwio->handle, data, size, 0);
@ -1063,7 +1126,8 @@ static qse_ssize_t nwio_write (qse_nwio_t* nwio, const void* data, qse_size_t si
if (size > (QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(int))) if (size > (QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(int)))
size = QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(int); size = QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(int);
if (TMOUT_ENABLED(nwio->tmout.w) && if (!(nwio->status & STATUS_TMOUT_W_PRESET) &&
TMOUT_ENABLED(nwio->tmout.w) &&
wait_for_data (nwio, &nwio->tmout.w, 1) <= -1) return -1; wait_for_data (nwio, &nwio->tmout.w, 1) <= -1) return -1;
n = send (nwio->handle, data, size, 0); n = send (nwio->handle, data, size, 0);
@ -1081,7 +1145,8 @@ static qse_ssize_t nwio_write (qse_nwio_t* nwio, const void* data, qse_size_t si
size = QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(size_t); size = QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(size_t);
rewrite: rewrite:
if (TMOUT_ENABLED(nwio->tmout.w) && if (!(nwio->status & STATUS_TMOUT_W_PRESET) &&
TMOUT_ENABLED(nwio->tmout.w) &&
wait_for_data (nwio, &nwio->tmout.w, 1) <= -1) return -1; wait_for_data (nwio, &nwio->tmout.w, 1) <= -1) return -1;
n = send (nwio->handle, data, size, 0); n = send (nwio->handle, data, size, 0);

View File

@ -4,8 +4,6 @@
#define DATA_PTR(oht,index) \ #define DATA_PTR(oht,index) \
((void*)(((qse_byte_t*)(oht)->data) + ((index) * (oht)->scale))) ((void*)(((qse_byte_t*)(oht)->data) + ((index) * (oht)->scale)))
QSE_IMPLEMENT_COMMON_FUNCTIONS (oht)
static QSE_INLINE_ALWAYS qse_size_t default_hasher ( static QSE_INLINE_ALWAYS qse_size_t default_hasher (
qse_oht_t* oht, const void* data) qse_oht_t* oht, const void* data)
{ {
@ -110,6 +108,16 @@ void qse_oht_fini (qse_oht_t* oht)
oht->size = 0; oht->size = 0;
} }
qse_mmgr_t* qse_oht_getmmgr (qse_oht_t* oht)
{
return oht->mmgr;
}
void* qse_oht_getxtn (qse_oht_t* oht)
{
return QSE_XTN (oht);
}
qse_oht_hasher_t qse_oht_gethasher (qse_oht_t* oht) qse_oht_hasher_t qse_oht_gethasher (qse_oht_t* oht)
{ {
return oht->hasher? oht->hasher: default_hasher; return oht->hasher? oht->hasher: default_hasher;

View File

@ -40,8 +40,6 @@
# endif # endif
#endif #endif
QSE_IMPLEMENT_COMMON_FUNCTIONS (pio)
static qse_ssize_t pio_input ( static qse_ssize_t pio_input (
qse_tio_t* tio, qse_tio_cmd_t cmd, void* buf, qse_size_t size); qse_tio_t* tio, qse_tio_cmd_t cmd, void* buf, qse_size_t size);
static qse_ssize_t pio_output ( static qse_ssize_t pio_output (
@ -191,18 +189,23 @@ static qse_pio_errnum_t tio_errnum_to_pio_errnum (qse_tio_t* tio)
} }
qse_pio_t* qse_pio_open ( qse_pio_t* qse_pio_open (
qse_mmgr_t* mmgr, qse_size_t ext, qse_mmgr_t* mmgr, qse_size_t xtnsize,
const qse_char_t* cmd, qse_env_t* env, int flags) const qse_char_t* cmd, qse_env_t* env, int flags)
{ {
qse_pio_t* pio; qse_pio_t* pio;
pio = QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_pio_t) + ext); pio = QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_pio_t) + xtnsize);
if (pio == QSE_NULL) return QSE_NULL; if (pio)
if (qse_pio_init (pio, mmgr, cmd, env, flags) <= -1)
{ {
QSE_MMGR_FREE (mmgr, pio); if (qse_pio_init (pio, mmgr, cmd, env, flags) <= -1)
return QSE_NULL; {
QSE_MMGR_FREE (mmgr, pio);
pio = QSE_NULL;
}
else
{
QSE_MEMSET (pio + 1, 0, xtnsize);
}
} }
return pio; return pio;
@ -1965,6 +1968,16 @@ void qse_pio_fini (qse_pio_t* pio)
qse_pio_wait (pio); qse_pio_wait (pio);
} }
qse_mmgr_t* qse_pio_getmmgr (qse_pio_t* pio)
{
return pio->mmgr;
}
void* qse_pio_getxtn (qse_pio_t* pio)
{
return QSE_XTN (pio);
}
qse_pio_errnum_t qse_pio_geterrnum (const qse_pio_t* pio) qse_pio_errnum_t qse_pio_geterrnum (const qse_pio_t* pio)
{ {
return pio->errnum; return pio->errnum;

View File

@ -47,8 +47,6 @@
(QSE_SIZEOF(type) - (((qse_uintptr_t)ptr) % QSE_SIZEOF(type))) : 0) (QSE_SIZEOF(type) - (((qse_uintptr_t)ptr) % QSE_SIZEOF(type))) : 0)
QSE_IMPLEMENT_COMMON_FUNCTIONS (pma)
qse_pma_t* qse_pma_open (qse_mmgr_t* mmgr, qse_size_t xtnsize) qse_pma_t* qse_pma_open (qse_mmgr_t* mmgr, qse_size_t xtnsize)
{ {
qse_pma_t* pma; qse_pma_t* pma;
@ -85,6 +83,16 @@ void qse_pma_fini (qse_pma_t* pma)
qse_pma_clear (pma); qse_pma_clear (pma);
} }
qse_mmgr_t* qse_pma_getmmgr (qse_pma_t* pma)
{
return pma->mmgr;
}
void* qse_pma_getxtn (qse_pma_t* pma)
{
return QSE_XTN (pma);
}
void qse_pma_clear (qse_pma_t* pma) void qse_pma_clear (qse_pma_t* pma)
{ {
qse_mmgr_t* mmgr = pma->mmgr; qse_mmgr_t* mmgr = pma->mmgr;
@ -152,7 +160,7 @@ void* qse_pma_alloc (qse_pma_t* pma, qse_size_t size)
void* qse_pma_calloc (qse_pma_t* pma, qse_size_t size) void* qse_pma_calloc (qse_pma_t* pma, qse_size_t size)
{ {
void* ptr = qse_pma_alloc (pma, size); void* ptr = qse_pma_alloc (pma, size);
if (size) QSE_MEMSET (ptr, 0, size); if (ptr) QSE_MEMSET (ptr, 0, size);
return ptr; return ptr;
} }

View File

@ -21,8 +21,6 @@
#include <qse/cmn/rbt.h> #include <qse/cmn/rbt.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (rbt)
#define rbt_t qse_rbt_t #define rbt_t qse_rbt_t
#define pair_t qse_rbt_pair_t #define pair_t qse_rbt_pair_t
#define id_t qse_rbt_id_t #define id_t qse_rbt_id_t
@ -249,6 +247,16 @@ void qse_rbt_fini (rbt_t* rbt)
qse_rbt_clear (rbt); qse_rbt_clear (rbt);
} }
qse_mmgr_t* qse_rbt_getmmgr (qse_rbt_t* rbt)
{
return rbt->mmgr;
}
void* qse_rbt_getxtn (qse_rbt_t* rbt)
{
return QSE_XTN (rbt);
}
const mancbs_t* qse_rbt_getmancbs (const rbt_t* rbt) const mancbs_t* qse_rbt_getmancbs (const rbt_t* rbt)
{ {
return rbt->mancbs; return rbt->mancbs;

View File

@ -116,8 +116,6 @@ struct cand_t
const qse_char_t* mptr; const qse_char_t* mptr;
}; };
QSE_IMPLEMENT_COMMON_FUNCTIONS (rex)
int qse_rex_init (qse_rex_t* rex, qse_mmgr_t* mmgr, qse_rex_node_t* code) int qse_rex_init (qse_rex_t* rex, qse_mmgr_t* mmgr, qse_rex_node_t* code)
{ {
QSE_MEMSET (rex, 0, QSE_SIZEOF(*rex)); QSE_MEMSET (rex, 0, QSE_SIZEOF(*rex));
@ -193,6 +191,16 @@ void qse_rex_close (qse_rex_t* rex)
QSE_MMGR_FREE (rex->mmgr, rex); QSE_MMGR_FREE (rex->mmgr, rex);
} }
qse_mmgr_t* qse_rex_getmmgr (qse_rex_t* rex)
{
return rex->mmgr;
}
void* qse_rex_getxtn (qse_rex_t* rex)
{
return QSE_XTN (rex);
}
qse_rex_node_t* qse_rex_yield (qse_rex_t* rex) qse_rex_node_t* qse_rex_yield (qse_rex_t* rex)
{ {
qse_rex_node_t* code = rex->code; qse_rex_node_t* code = rex->code;

View File

@ -226,6 +226,16 @@ void qse_sio_fini (qse_sio_t* sio)
qse_fio_fini (&sio->file); qse_fio_fini (&sio->file);
} }
qse_mmgr_t* qse_sio_getmmgr (qse_sio_t* sio)
{
return sio->mmgr;
}
void* qse_sio_getxtn (qse_sio_t* sio)
{
return QSE_XTN (sio);
}
qse_sio_errnum_t qse_sio_geterrnum (const qse_sio_t* sio) qse_sio_errnum_t qse_sio_geterrnum (const qse_sio_t* sio)
{ {
return sio->errnum; return sio->errnum;

View File

@ -21,8 +21,6 @@
#include <qse/cmn/sll.h> #include <qse/cmn/sll.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (sll)
#define sll_t qse_sll_t #define sll_t qse_sll_t
#define node_t qse_sll_node_t #define node_t qse_sll_node_t
#define copier_t qse_sll_copier_t #define copier_t qse_sll_copier_t
@ -141,6 +139,16 @@ void qse_sll_fini (sll_t* sll)
qse_sll_clear (sll); qse_sll_clear (sll);
} }
qse_mmgr_t* qse_sll_getmmgr (qse_sll_t* sll)
{
return sll->mmgr;
}
void* qse_sll_getxtn (qse_sll_t* sll)
{
return QSE_XTN (sll);
}
int qse_sll_getscale (sll_t* sll) int qse_sll_getscale (sll_t* sll)
{ {
return sll->scale; return sll->scale;

View File

@ -21,21 +21,23 @@
#include <qse/cmn/str.h> #include <qse/cmn/str.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (mbs) qse_mbs_t* qse_mbs_open (qse_mmgr_t* mmgr, qse_size_t xtnsize, qse_size_t capa)
qse_mbs_t* qse_mbs_open (qse_mmgr_t* mmgr, qse_size_t ext, qse_size_t capa)
{ {
qse_mbs_t* str; qse_mbs_t* str;
str = (qse_mbs_t*) QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_mbs_t) + ext); str = (qse_mbs_t*) QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_mbs_t) + xtnsize);
if (str == QSE_NULL) return QSE_NULL; if (str)
if (qse_mbs_init (str, mmgr, capa) <= -1)
{ {
QSE_MMGR_FREE (mmgr, str); if (qse_mbs_init (str, mmgr, capa) <= -1)
return QSE_NULL; {
QSE_MMGR_FREE (mmgr, str);
str = QSE_NULL;
}
else
{
QSE_MEMSET (str + 1, 0, xtnsize);
}
} }
return str; return str;
} }
@ -72,6 +74,16 @@ void qse_mbs_fini (qse_mbs_t* str)
if (str->val.ptr != QSE_NULL) QSE_MMGR_FREE (str->mmgr, str->val.ptr); if (str->val.ptr != QSE_NULL) QSE_MMGR_FREE (str->mmgr, str->val.ptr);
} }
qse_mmgr_t* qse_mbs_getmmgr (qse_mbs_t* mbs)
{
return mbs->mmgr;
}
void* qse_mbs_getxtn (qse_mbs_t* mbs)
{
return QSE_XTN (mbs);
}
int qse_mbs_yield (qse_mbs_t* str, qse_mxstr_t* buf, qse_size_t newcapa) int qse_mbs_yield (qse_mbs_t* str, qse_mxstr_t* buf, qse_size_t newcapa)
{ {
qse_mchar_t* tmp; qse_mchar_t* tmp;

View File

@ -21,21 +21,23 @@
#include <qse/cmn/str.h> #include <qse/cmn/str.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (wcs) qse_wcs_t* qse_wcs_open (qse_mmgr_t* mmgr, qse_size_t xtnsize, qse_size_t capa)
qse_wcs_t* qse_wcs_open (qse_mmgr_t* mmgr, qse_size_t ext, qse_size_t capa)
{ {
qse_wcs_t* str; qse_wcs_t* str;
str = (qse_wcs_t*) QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_wcs_t) + ext); str = (qse_wcs_t*) QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_wcs_t) + xtnsize);
if (str == QSE_NULL) return QSE_NULL; if (str)
if (qse_wcs_init (str, mmgr, capa) <= -1)
{ {
QSE_MMGR_FREE (mmgr, str); if (qse_wcs_init (str, mmgr, capa) <= -1)
return QSE_NULL; {
QSE_MMGR_FREE (mmgr, str);
str = QSE_NULL;
}
else
{
QSE_MEMSET (str + 1, 0, xtnsize);
}
} }
return str; return str;
} }
@ -72,6 +74,16 @@ void qse_wcs_fini (qse_wcs_t* str)
if (str->val.ptr != QSE_NULL) QSE_MMGR_FREE (str->mmgr, str->val.ptr); if (str->val.ptr != QSE_NULL) QSE_MMGR_FREE (str->mmgr, str->val.ptr);
} }
qse_mmgr_t* qse_wcs_getmmgr (qse_wcs_t* wcs)
{
return wcs->mmgr;
}
void* qse_wcs_getxtn (qse_wcs_t* wcs)
{
return QSE_XTN (wcs);
}
int qse_wcs_yield (qse_wcs_t* str, qse_wxstr_t* buf, qse_size_t newcapa) int qse_wcs_yield (qse_wcs_t* str, qse_wxstr_t* buf, qse_size_t newcapa)
{ {
qse_wchar_t* tmp; qse_wchar_t* tmp;

View File

@ -22,8 +22,6 @@
#include <qse/cmn/mbwc.h> #include <qse/cmn/mbwc.h>
#include "mem.h" #include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (tio)
#define STATUS_OUTPUT_DYNBUF (1 << 0) #define STATUS_OUTPUT_DYNBUF (1 << 0)
#define STATUS_INPUT_DYNBUF (1 << 1) #define STATUS_INPUT_DYNBUF (1 << 1)
#define STATUS_INPUT_ILLSEQ (1 << 2) #define STATUS_INPUT_ILLSEQ (1 << 2)
@ -92,6 +90,16 @@ int qse_tio_fini (qse_tio_t* tio)
return ret; return ret;
} }
qse_mmgr_t* qse_tio_getmmgr (qse_tio_t* tio)
{
return tio->mmgr;
}
void* qse_tio_getxtn (qse_tio_t* tio)
{
return QSE_XTN (tio);
}
qse_tio_errnum_t qse_tio_geterrnum (const qse_tio_t* tio) qse_tio_errnum_t qse_tio_geterrnum (const qse_tio_t* tio)
{ {
return tio->errnum; return tio->errnum;

View File

@ -22,8 +22,6 @@
#include "tre-compile.h" #include "tre-compile.h"
#include <qse/cmn/str.h> #include <qse/cmn/str.h>
QSE_IMPLEMENT_COMMON_FUNCTIONS (tre)
qse_tre_t* qse_tre_open (qse_mmgr_t* mmgr, qse_size_t xtnsize) qse_tre_t* qse_tre_open (qse_mmgr_t* mmgr, qse_size_t xtnsize)
{ {
qse_tre_t* tre; qse_tre_t* tre;
@ -64,6 +62,16 @@ void qse_tre_fini (qse_tre_t* tre)
} }
} }
qse_mmgr_t* qse_tre_getmmgr (qse_tre_t* tre)
{
return tre->mmgr;
}
void* qse_tre_getxtn (qse_tre_t* tre)
{
return QSE_XTN (tre);
}
int qse_tre_compx ( int qse_tre_compx (
qse_tre_t* tre, const qse_char_t* regex, qse_size_t n, qse_tre_t* tre, const qse_char_t* regex, qse_size_t n,
unsigned int* nsubmat, int cflags) unsigned int* nsubmat, int cflags)

View File

@ -525,7 +525,7 @@ static void* _realloc_merge (qse_xma_t* xma, void* b, qse_size_t size)
void* qse_xma_calloc (qse_xma_t* xma, qse_size_t size) void* qse_xma_calloc (qse_xma_t* xma, qse_size_t size)
{ {
void* ptr = qse_xma_alloc (xma, size); void* ptr = qse_xma_alloc (xma, size);
if (size) QSE_MEMSET (ptr, 0, size); if (ptr) QSE_MEMSET (ptr, 0, size);
return ptr; return ptr;
} }

View File

@ -14,6 +14,6 @@ if ENABLE_CXX
lib_LTLIBRARIES += libqsesedxx.la lib_LTLIBRARIES += libqsesedxx.la
libqsesedxx_la_SOURCES = Sed.cpp StdSed.cpp libqsesedxx_la_SOURCES = Sed.cpp StdSed.cpp
libqsesedxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined libqsesedxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqsesedxx_la_LIBADD = -lqsesed -lqsecmn libqsesedxx_la_LIBADD = -lqsesed -lqsecmnxx -lqsecmn
endif endif

View File

@ -304,7 +304,7 @@ libqsesed_la_LDFLAGS = -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqsesed_la_LIBADD = -lqsecmn libqsesed_la_LIBADD = -lqsecmn
@ENABLE_CXX_TRUE@libqsesedxx_la_SOURCES = Sed.cpp StdSed.cpp @ENABLE_CXX_TRUE@libqsesedxx_la_SOURCES = Sed.cpp StdSed.cpp
@ENABLE_CXX_TRUE@libqsesedxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined @ENABLE_CXX_TRUE@libqsesedxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
@ENABLE_CXX_TRUE@libqsesedxx_la_LIBADD = -lqsesed -lqsecmn @ENABLE_CXX_TRUE@libqsesedxx_la_LIBADD = -lqsesed -lqsecmnxx -lqsecmn
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:

View File

@ -88,7 +88,7 @@ struct qse_stx_charobj_t
struct qse_stx_t struct qse_stx_t
{ {
QSE_DEFINE_COMMON_FIELDS (stx) qse_mmgr_t* mmgr;
/** error information */ /** error information */
struct struct