diff --git a/qse/include/qse/cut/std.h b/qse/include/qse/cut/std.h index 57dbb5e5..bfde121e 100644 --- a/qse/include/qse/cut/std.h +++ b/qse/include/qse/cut/std.h @@ -37,10 +37,23 @@ extern "C" { #endif /** - * The qse_cut_openstd() function creates a text cutter. + * The qse_cut_openstd() function creates a text cutter with the default + * memory manager and initialized it for other qse_cut_xxxxstd functions. + * @return pointer to a text cutter on success, QSE_NULL on failure. */ qse_cut_t* qse_cut_openstd ( - qse_size_t xtnsize /**< size of extension in bytes */ + qse_size_t xtnsize /**< extension size in bytes */ +); + +/** + * The qse_cut_openstdwithmmgr() function creates a text cutter with a + * user-defined memory manager. It is equivalent to qse_cut_openstd(), + * except that you can specify your own memory manager. + * @return pointer to a text cutter on success, QSE_NULL on failure. + */ +qse_cut_t* qse_cut_openstdwithmmgr ( + qse_mmgr_t* mmgr, /**< memory manager */ + qse_size_t xtnsize /**< extension size in bytes */ ); /** diff --git a/qse/lib/cut/std.c b/qse/lib/cut/std.c index c83b1f94..54873409 100644 --- a/qse/lib/cut/std.c +++ b/qse/lib/cut/std.c @@ -33,6 +33,11 @@ struct xtn_t typedef struct xtn_t xtn_t; qse_cut_t* qse_cut_openstd (qse_size_t xtnsize) +{ + return qse_cut_openstdwithmmgr (QSE_MMGR_GETDFL(), xtnsize); +} + +qse_cut_t* qse_cut_openstdwithmmgr (qse_mmgr_t* mmgr, qse_size_t xtnsize) { qse_cut_t* cut; xtn_t* xtn;