added qse_mbs_t/qse_wcs_t and related functions

This commit is contained in:
hyung-hwan 2011-04-26 08:53:50 +00:00
parent 65588fad45
commit 32be9131c7
9 changed files with 998 additions and 315 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: str.h 441 2011-04-22 14:28:43Z hyunghwan.chung $
* $Id: str.h 442 2011-04-25 14:53:50Z hyunghwan.chung $
*
Copyright 2006-2011 Chung, Hyung-Hwan.
This file is part of QSE.
@ -32,26 +32,66 @@
*
*/
#define QSE_STR_LEN(s) ((const qse_size_t)(s)->len) /**< string length */
#define QSE_STR_PTR(s) ((qse_char_t* const)(s)->ptr) /**< string/buffer pointer */
#define QSE_STR_CAPA(s) ((qse_size_t)(s)->capa) /**< buffer capacity */
#define QSE_STR_CHAR(s,idx) ((s)->ptr[idx]) /**< character at given position */
#define QSE_MBS_LEN(s) ((s)->len) /**< string length */
#define QSE_MBS_PTR(s) ((s)->ptr) /**< string buffer pointer */
#define QSE_MBS_CAPA(s) ((s)->capa) /**< string buffer capacity */
#define QSE_MBS_CHAR(s,idx) ((s)->ptr[idx]) /**< character at given position */
typedef struct qse_str_t qse_str_t;
#define QSE_WCS_LEN(s) ((s)->len) /**< string buffer length */
#define QSE_WCS_PTR(s) ((s)->ptr) /**< string buffer pointer */
#define QSE_WCS_CAPA(s) ((s)->capa) /**< string buffer capacity */
#define QSE_WCS_CHAR(s,idx) ((s)->ptr[idx]) /**< character at given position */
typedef qse_size_t (*qse_str_sizer_t) (
qse_str_t* data,
typedef struct qse_mbs_t qse_mbs_t;
typedef struct qse_wcs_t qse_wcs_t;
typedef qse_size_t (*qse_mbs_sizer_t) (
qse_mbs_t* data,
qse_size_t hint
);
typedef qse_size_t (*qse_wcs_sizer_t) (
qse_wcs_t* data,
qse_size_t hint
);
#ifdef QSE_CHAR_IS_MCHAR
# define QSE_STR_LEN(s) QSE_MBS_LEN(s)
# define QSE_STR_PTR(s) QSE_MBS_PTR(s)
# define QSE_STR_CAPA(s) QSE_MBS_CAPA(s)
# define QSE_STR_CHAR(s,idx) QSE_MBS_CHAR(s,idx)
# define qse_str_t qse_mbs_t
# define qse_str_sizer_t qse_mbs_sizer_t
#else
# define QSE_STR_LEN(s) QSE_WCS_LEN(s)
# define QSE_STR_PTR(s) QSE_WCS_PTR(s)
# define QSE_STR_CAPA(s) QSE_WCS_CAPA(s)
# define QSE_STR_CHAR(s,idx) QSE_WCS_CHAR(s,idx)
# define qse_str_t qse_wcs_t
# define qse_str_sizer_t qse_wcs_sizer_t
#endif
/**
* The qse_str_t type defines a dynamically resizable string.
* The qse_mbs_t type defines a dynamically resizable multi-byte string.
*/
struct qse_str_t
struct qse_mbs_t
{
QSE_DEFINE_COMMON_FIELDS (str)
qse_str_sizer_t sizer; /**< buffer resizer function */
qse_char_t* ptr; /**< buffer/string pointer */
QSE_DEFINE_COMMON_FIELDS (mbs)
qse_mbs_sizer_t sizer; /**< buffer resizer function */
qse_mchar_t* ptr; /**< buffer/string pointer */
qse_size_t len; /**< string length */
qse_size_t capa; /**< buffer capacity */
};
/**
* The qse_wcs_t type defines a dynamically resizable wide-character string.
*/
struct qse_wcs_t
{
QSE_DEFINE_COMMON_FIELDS (wcs)
qse_wcs_sizer_t sizer; /**< buffer resizer function */
qse_wchar_t* ptr; /**< buffer/string pointer */
qse_size_t len; /**< string length */
qse_size_t capa; /**< buffer capacity */
};
@ -2066,170 +2106,387 @@ int qse_wcstombs_strict (
qse_size_t mbslen
);
QSE_DEFINE_COMMON_FUNCTIONS (str)
QSE_DEFINE_COMMON_FUNCTIONS (mbs)
qse_str_t* qse_str_open (
qse_mbs_t* qse_mbs_open (
qse_mmgr_t* mmgr,
qse_size_t ext,
qse_size_t capa
qse_size_t ext,
qse_size_t capa
);
void qse_str_close (
qse_str_t* str
void qse_mbs_close (
qse_mbs_t* mbs
);
/**
* The qse_str_init() function initializes a dynamically resizable string
* The qse_mbs_init() function initializes a dynamically resizable string
* If the parameter capa is 0, it doesn't allocate the internal buffer
* in advance.
*/
qse_str_t* qse_str_init (
qse_str_t* str,
qse_mbs_t* qse_mbs_init (
qse_mbs_t* str,
qse_mmgr_t* mmgr,
qse_size_t capa
);
/**
* The qse_str_fini() function finalizes a dynamically resizable string.
* The qse_mbs_fini() function finalizes a dynamically resizable string.
*/
void qse_str_fini (
qse_str_t* str
void qse_mbs_fini (
qse_mbs_t* str
);
/**
* The qse_str_yield() function assigns the buffer to an variable of the
* qse_xstr_t type and recreate a new buffer of the @a new_capa capacity.
* The qse_mbs_yield() function assigns the buffer to an variable of the
* #qse_mxstr_t type and recreate a new buffer of the @a new_capa capacity.
* The function fails if it fails to allocate a new buffer.
* @return 0 on success, and -1 on failure.
*/
int qse_str_yield (
qse_str_t* str, /**< string */
qse_xstr_t* buf, /**< buffer pointer */
int new_capa /**< new capacity */
int qse_mbs_yield (
qse_mbs_t* str, /**< string */
qse_mxstr_t* buf, /**< buffer pointer */
qse_size_t new_capa /**< new capacity */
);
/**
* The qse_str_getsizer() function gets the sizer.
* The qse_mbs_getsizer() function gets the sizer.
* @return sizer function set or QSE_NULL if no sizer is set.
*/
qse_str_sizer_t qse_str_getsizer (
qse_str_t* str
qse_mbs_sizer_t qse_mbs_getsizer (
qse_mbs_t* str
);
/**
* The qse_str_setsizer() function specify a new sizer for a dynamic string.
* The qse_mbs_setsizer() function specify a new sizer for a dynamic string.
* With no sizer specified, the dynamic string doubles the current buffer
* when it needs to increase its size. The sizer function is passed a dynamic
* string and the minimum capacity required to hold data after resizing.
* The string is truncated if the sizer function returns a smaller number
* than the hint passed.
*/
void qse_str_setsizer (
qse_str_t* str,
qse_str_sizer_t sizer
void qse_mbs_setsizer (
qse_mbs_t* str,
qse_mbs_sizer_t sizer
);
/******/
/**
* The qse_str_getcapa() function returns the current capacity.
* The qse_mbs_getcapa() function returns the current capacity.
* You may use QSE_STR_CAPA(str) macro for performance sake.
* @return current capacity in number of characters.
*/
qse_size_t qse_str_getcapa (
qse_str_t* str
qse_size_t qse_mbs_getcapa (
qse_mbs_t* str
);
/**
* The qse_str_setcapa() function sets the new capacity. If the new capacity
* The qse_mbs_setcapa() function sets the new capacity. If the new capacity
* is smaller than the old, the overflowing characters are removed from
* from the buffer.
* @return (qse_size_t)-1 on failure, new capacity on success
*/
qse_size_t qse_str_setcapa (
qse_str_t* str,
qse_size_t qse_mbs_setcapa (
qse_mbs_t* str,
qse_size_t capa
);
/**
* The qse_str_getlen() function return the string length.
* The qse_mbs_getlen() function return the string length.
*/
qse_size_t qse_str_getlen (
qse_str_t* str
qse_size_t qse_mbs_getlen (
qse_mbs_t* str
);
/**
* The qse_str_setlen() function changes the string length.
* The qse_mbs_setlen() function changes the string length.
* @return (qse_size_t)-1 on failure, new length on success
*/
qse_size_t qse_str_setlen (
qse_str_t* str,
qse_size_t qse_mbs_setlen (
qse_mbs_t* str,
qse_size_t len
);
/**
* The qse_str_clear() funtion deletes all characters in a string and sets
* The qse_mbs_clear() funtion deletes all characters in a string and sets
* the length to 0. It doesn't resize the internal buffer.
*/
void qse_str_clear (
qse_str_t* str
void qse_mbs_clear (
qse_mbs_t* str
);
/**
* The qse_str_swap() function exchanges the pointers to a buffer between
* The qse_mbs_swap() function exchanges the pointers to a buffer between
* two strings. It updates the length and the capacity accordingly.
*/
void qse_str_swap (
qse_str_t* str1,
qse_str_t* str2
void qse_mbs_swap (
qse_mbs_t* str1,
qse_mbs_t* str2
);
qse_size_t qse_str_cpy (
qse_str_t* str,
const qse_char_t* s
qse_size_t qse_mbs_cpy (
qse_mbs_t* str,
const qse_mchar_t* s
);
qse_size_t qse_str_ncpy (
qse_str_t* str,
const qse_char_t* s,
qse_size_t len
qse_size_t qse_mbs_ncpy (
qse_mbs_t* str,
const qse_mchar_t* s,
qse_size_t len
);
qse_size_t qse_str_cat (
qse_str_t* str,
const qse_char_t* s
qse_size_t qse_mbs_cat (
qse_mbs_t* str,
const qse_mchar_t* s
);
qse_size_t qse_str_ncat (
qse_str_t* str,
const qse_char_t* s,
qse_size_t len
qse_size_t qse_mbs_ncat (
qse_mbs_t* str,
const qse_mchar_t* s,
qse_size_t len
);
qse_size_t qse_str_ccat (
qse_str_t* str,
qse_char_t c
qse_size_t qse_mbs_ccat (
qse_mbs_t* str,
qse_mchar_t c
);
qse_size_t qse_str_nccat (
qse_str_t* str,
qse_char_t c,
qse_size_t len
qse_size_t qse_mbs_nccat (
qse_mbs_t* str,
qse_mchar_t c,
qse_size_t len
);
qse_size_t qse_str_del (
qse_str_t* str,
qse_size_t qse_mbs_del (
qse_mbs_t* str,
qse_size_t index,
qse_size_t size
);
qse_size_t qse_str_trm (
qse_str_t* str
qse_size_t qse_mbs_trm (
qse_mbs_t* str
);
qse_size_t qse_str_pac (
qse_str_t* str
qse_size_t qse_mbs_pac (
qse_mbs_t* str
);
QSE_DEFINE_COMMON_FUNCTIONS (wcs)
qse_wcs_t* qse_wcs_open (
qse_mmgr_t* mmgr,
qse_size_t ext,
qse_size_t capa
);
void qse_wcs_close (
qse_wcs_t* wcs
);
/**
* The qse_wcs_init() function initializes a dynamically resizable string
* If the parameter capa is 0, it doesn't allocate the internal buffer
* in advance.
*/
qse_wcs_t* qse_wcs_init (
qse_wcs_t* str,
qse_mmgr_t* mmgr,
qse_size_t capa
);
/**
* The qse_wcs_fini() function finalizes a dynamically resizable string.
*/
void qse_wcs_fini (
qse_wcs_t* str
);
/**
* The qse_wcs_yield() function assigns the buffer to an variable of the
* #qse_wxstr_t type and recreate a new buffer of the @a new_capa capacity.
* The function fails if it fails to allocate a new buffer.
* @return 0 on success, and -1 on failure.
*/
int qse_wcs_yield (
qse_wcs_t* str, /**< string */
qse_wxstr_t* buf, /**< buffer pointer */
qse_size_t new_capa /**< new capacity */
);
/**
* The qse_wcs_getsizer() function gets the sizer.
* @return sizer function set or QSE_NULL if no sizer is set.
*/
qse_wcs_sizer_t qse_wcs_getsizer (
qse_wcs_t* str
);
/**
* The qse_wcs_setsizer() function specify a new sizer for a dynamic string.
* With no sizer specified, the dynamic string doubles the current buffer
* when it needs to increase its size. The sizer function is passed a dynamic
* string and the minimum capacity required to hold data after resizing.
* The string is truncated if the sizer function returns a smaller number
* than the hint passed.
*/
void qse_wcs_setsizer (
qse_wcs_t* str,
qse_wcs_sizer_t sizer
);
/******/
/**
* The qse_wcs_getcapa() function returns the current capacity.
* You may use QSE_STR_CAPA(str) macro for performance sake.
* @return current capacity in number of characters.
*/
qse_size_t qse_wcs_getcapa (
qse_wcs_t* str
);
/**
* The qse_wcs_setcapa() function sets the new capacity. If the new capacity
* is smaller than the old, the overflowing characters are removed from
* from the buffer.
* @return (qse_size_t)-1 on failure, new capacity on success
*/
qse_size_t qse_wcs_setcapa (
qse_wcs_t* str,
qse_size_t capa
);
/**
* The qse_wcs_getlen() function return the string length.
*/
qse_size_t qse_wcs_getlen (
qse_wcs_t* str
);
/**
* The qse_wcs_setlen() function changes the string length.
* @return (qse_size_t)-1 on failure, new length on success
*/
qse_size_t qse_wcs_setlen (
qse_wcs_t* str,
qse_size_t len
);
/**
* The qse_wcs_clear() funtion deletes all characters in a string and sets
* the length to 0. It doesn't resize the internal buffer.
*/
void qse_wcs_clear (
qse_wcs_t* str
);
/**
* The qse_wcs_swap() function exchanges the pointers to a buffer between
* two strings. It updates the length and the capacity accordingly.
*/
void qse_wcs_swap (
qse_wcs_t* str1,
qse_wcs_t* str2
);
qse_size_t qse_wcs_cpy (
qse_wcs_t* str,
const qse_wchar_t* s
);
qse_size_t qse_wcs_ncpy (
qse_wcs_t* str,
const qse_wchar_t* s,
qse_size_t len
);
qse_size_t qse_wcs_cat (
qse_wcs_t* str,
const qse_wchar_t* s
);
qse_size_t qse_wcs_ncat (
qse_wcs_t* str,
const qse_wchar_t* s,
qse_size_t len
);
qse_size_t qse_wcs_ccat (
qse_wcs_t* str,
qse_wchar_t c
);
qse_size_t qse_wcs_nccat (
qse_wcs_t* str,
qse_wchar_t c,
qse_size_t len
);
qse_size_t qse_wcs_del (
qse_wcs_t* str,
qse_size_t index,
qse_size_t size
);
qse_size_t qse_wcs_trm (
qse_wcs_t* str
);
qse_size_t qse_wcs_pac (
qse_wcs_t* str
);
#ifdef QSE_CHAR_IS_MCHAR
# define qse_str_setmmgr(str,mmgr) qse_mbs_wetmmgr(str,mmgr)
# define qse_str_getmmgr(str) qse_mbs_getmmgr(str)
# define qse_str_open(mmgr,ext,capa) qse_mbs_open(mmgr,ext,capa)
# define qse_str_close(str) qse_mbs_close(str)
# define qse_str_init(str,mmgr,capa) qse_mbs_init(str,mmgr,capa)
# define qse_str_fini(str) qse_mbs_fini(str)
# define qse_str_yield(str,buf,ncapa) qse_mbs_yield(str,buf,ncapa)
# define qse_str_getsizer(str) qse_mbs_getsizer(str)
# define qse_str_setsizer(str,sizer) qse_mbs_setsizer(str,sizer)
# define qse_str_getcapa(str) qse_mbs_getcapa(str)
# define qse_str_setcapa(str,capa) qse_mbs_setcapa(str,capa)
# define qse_str_getlen(str) qse_mbs_getlen(str)
# define qse_str_setlen(str,len) qse_mbs_setlen(str,len)
# define qse_str_clear(str) qse_mbs_clear(str)
# define qse_str_swap(str1,str2) qse_mbs_swap(str1,str2)
# define qse_str_cpy(str,s) qse_mbs_cpy(str,s)
# define qse_str_ncpy(str,s,len) qse_mbs_ncpy(str,s,len)
# define qse_str_cat(str,s) qse_mbs_cat(str,s)
# define qse_str_ncat(str,s,len) qse_mbs_ncat(str,s,len)
# define qse_str_ccat(str,c) qse_mbs_ccat(str,c)
# define qse_str_nccat(str,c,len) qse_mbs_nccat(str,c,len)
# define qse_str_del(str,index,size) qse_mbs_del(str,index,size)
# define qse_str_trm(str) qse_mbs_trm(str)
# define qse_str_pac(str) qse_mbs_pac(str)
#else
# define qse_str_setmmgr(str,mmgr) qse_wcs_wetmmgr(str,mmgr)
# define qse_str_getmmgr(str) qse_wcs_getmmgr(str)
# define qse_str_open(mmgr,ext,capa) qse_wcs_open(mmgr,ext,capa)
# define qse_str_close(str) qse_wcs_close(str)
# define qse_str_init(str,mmgr,capa) qse_wcs_init(str,mmgr,capa)
# define qse_str_fini(str) qse_wcs_fini(str)
# define qse_str_yield(str,buf,ncapa) qse_wcs_yield(str,buf,ncapa)
# define qse_str_getsizer(str) qse_wcs_getsizer(str)
# define qse_str_setsizer(str,sizer) qse_wcs_setsizer(str,sizer)
# define qse_str_getcapa(str) qse_wcs_getcapa(str)
# define qse_str_setcapa(str,capa) qse_wcs_setcapa(str,capa)
# define qse_str_getlen(str) qse_wcs_getlen(str)
# define qse_str_setlen(str,len) qse_wcs_setlen(str,len)
# define qse_str_clear(str) qse_wcs_clear(str)
# define qse_str_swap(str1,str2) qse_wcs_swap(str1,str2)
# define qse_str_cpy(str,s) qse_wcs_cpy(str,s)
# define qse_str_ncpy(str,s,len) qse_wcs_ncpy(str,s,len)
# define qse_str_cat(str,s) qse_wcs_cat(str,s)
# define qse_str_ncat(str,s,len) qse_wcs_ncat(str,s,len)
# define qse_str_ccat(str,c) qse_wcs_ccat(str,c)
# define qse_str_nccat(str,c,len) qse_wcs_nccat(str,c,len)
# define qse_str_del(str,index,size) qse_wcs_del(str,index,size)
# define qse_str_trm(str) qse_wcs_trm(str)
# define qse_str_pac(str) qse_wcs_pac(str)
#endif
#ifdef __cplusplus
}
#endif

View File

@ -10,10 +10,10 @@ libqsecmn_la_SOURCES = \
syscall.h mem.h \
mem.c xma.c fma.c chr.c chr_cnv.c rex.c \
str_beg.c str_cat.c str_chr.c str_cnv.c str_cmp.c str_cpy.c \
str_del.c str_dup.c str_dyn.c str_end.c str_excl.c str_fcpy.c \
str_incl.c str_len.c str_pac.c str_pbrk.c str_put.c str_rev.c \
str_rot.c str_set.c str_spl.c str_spn.c str_str.c str_subst.c \
str_tok.c str_trm.c str_word.c \
str_del.c str_dup.c str_dynm str_dynw.c str_end.c str_excl.c \
str_fcpy.c str_incl.c str_len.c str_pac.c str_pbrk.c str_put.c \
str_rev.c str_rot.c str_set.c str_spl.c str_spn.c str_str.c \
str_subst.c str_tok.c str_trm.c str_word.c \
lda.c oht.c htb.c rbt.c sll.c gdl.c dll.c opt.c \
tio.c tio_get.c tio_put.c \
fio.c pio.c sio.c \

View File

@ -74,7 +74,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
libqsecmn_la_DEPENDENCIES =
am_libqsecmn_la_OBJECTS = mem.lo xma.lo fma.lo chr.lo chr_cnv.lo \
rex.lo str_beg.lo str_cat.lo str_chr.lo str_cnv.lo str_cmp.lo \
str_cpy.lo str_del.lo str_dup.lo str_dyn.lo str_end.lo \
str_cpy.lo str_del.lo str_dup.lo str_dynm.lo str_dynw.lo str_end.lo \
str_excl.lo str_fcpy.lo str_incl.lo str_len.lo str_pac.lo \
str_pbrk.lo str_put.lo str_rev.lo str_rot.lo str_set.lo \
str_spl.lo str_spn.lo str_str.lo str_subst.lo str_tok.lo \
@ -270,10 +270,10 @@ libqsecmn_la_SOURCES = \
syscall.h mem.h \
mem.c xma.c fma.c chr.c chr_cnv.c rex.c \
str_beg.c str_cat.c str_chr.c str_cnv.c str_cmp.c str_cpy.c \
str_del.c str_dup.c str_dyn.c str_end.c str_excl.c str_fcpy.c \
str_incl.c str_len.c str_pac.c str_pbrk.c str_put.c str_rev.c \
str_rot.c str_set.c str_spl.c str_spn.c str_str.c str_subst.c \
str_tok.c str_trm.c str_word.c \
str_del.c str_dup.c str_dynm.c str_dynw.c str_end.c str_excl.c \
str_fcpy.c str_incl.c str_len.c str_pac.c str_pbrk.c str_put.c \
str_rev.c str_rot.c str_set.c str_spl.c str_spn.c str_str.c \
str_subst.c str_tok.c str_trm.c str_word.c \
lda.c oht.c htb.c rbt.c sll.c gdl.c dll.c opt.c \
tio.c tio_get.c tio_put.c \
fio.c pio.c sio.c \
@ -399,7 +399,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_cpy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_del.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_dup.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_dyn.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_dynm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_dynw.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_end.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_excl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_fcpy.Plo@am__quote@

View File

@ -21,11 +21,11 @@
#include <qse/cmn/str.h>
#include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (str)
QSE_IMPLEMENT_COMMON_FUNCTIONS (mbs)
qse_str_t* qse_str_open (qse_mmgr_t* mmgr, qse_size_t ext, qse_size_t capa)
qse_mbs_t* qse_mbs_open (qse_mmgr_t* mmgr, qse_size_t ext, qse_size_t capa)
{
qse_str_t* str;
qse_mbs_t* str;
if (mmgr == QSE_NULL)
{
@ -37,10 +37,10 @@ qse_str_t* qse_str_open (qse_mmgr_t* mmgr, qse_size_t ext, qse_size_t capa)
if (mmgr == QSE_NULL) return QSE_NULL;
}
str = (qse_str_t*) QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_str_t) + ext);
str = (qse_mbs_t*) QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_mbs_t) + ext);
if (str == QSE_NULL) return QSE_NULL;
if (qse_str_init (str, mmgr, capa) == QSE_NULL)
if (qse_mbs_init (str, mmgr, capa) == QSE_NULL)
{
QSE_MMGR_FREE (mmgr, str);
return QSE_NULL;
@ -49,17 +49,17 @@ qse_str_t* qse_str_open (qse_mmgr_t* mmgr, qse_size_t ext, qse_size_t capa)
return str;
}
void qse_str_close (qse_str_t* str)
void qse_mbs_close (qse_mbs_t* str)
{
qse_str_fini (str);
qse_mbs_fini (str);
QSE_MMGR_FREE (str->mmgr, str);
}
qse_str_t* qse_str_init (qse_str_t* str, qse_mmgr_t* mmgr, qse_size_t capa)
qse_mbs_t* qse_mbs_init (qse_mbs_t* str, qse_mmgr_t* mmgr, qse_size_t capa)
{
if (mmgr == QSE_NULL) mmgr = QSE_MMGR_GETDFL();
QSE_MEMSET (str, 0, QSE_SIZEOF(qse_str_t));
QSE_MEMSET (str, 0, QSE_SIZEOF(qse_mbs_t));
str->mmgr = mmgr;
str->sizer = QSE_NULL;
@ -67,10 +67,10 @@ qse_str_t* qse_str_init (qse_str_t* str, qse_mmgr_t* mmgr, qse_size_t capa)
if (capa == 0) str->ptr = QSE_NULL;
else
{
str->ptr = (qse_char_t*) QSE_MMGR_ALLOC (
mmgr, QSE_SIZEOF(qse_char_t) * (capa + 1));
str->ptr = (qse_mchar_t*) QSE_MMGR_ALLOC (
mmgr, QSE_SIZEOF(qse_mchar_t) * (capa + 1));
if (str->ptr == QSE_NULL) return QSE_NULL;
str->ptr[0] = QSE_T('\0');
str->ptr[0] = QSE_MT('\0');
}
str->len = 0;
@ -79,22 +79,22 @@ qse_str_t* qse_str_init (qse_str_t* str, qse_mmgr_t* mmgr, qse_size_t capa)
return str;
}
void qse_str_fini (qse_str_t* str)
void qse_mbs_fini (qse_mbs_t* str)
{
if (str->ptr != QSE_NULL) QSE_MMGR_FREE (str->mmgr, str->ptr);
}
int qse_str_yield (qse_str_t* str, qse_xstr_t* buf, int new_capa)
int qse_mbs_yield (qse_mbs_t* str, qse_mxstr_t* buf, qse_size_t new_capa)
{
qse_char_t* tmp;
qse_mchar_t* tmp;
if (new_capa == 0) tmp = QSE_NULL;
else
{
tmp = (qse_char_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_char_t) * (new_capa + 1));
tmp = (qse_mchar_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_mchar_t) * (new_capa + 1));
if (tmp == QSE_NULL) return -1;
tmp[0] = QSE_T('\0');
tmp[0] = QSE_MT('\0');
}
if (buf != QSE_NULL)
@ -110,45 +110,45 @@ int qse_str_yield (qse_str_t* str, qse_xstr_t* buf, int new_capa)
return 0;
}
qse_str_sizer_t qse_str_getsizer (qse_str_t* str)
qse_mbs_sizer_t qse_mbs_getsizer (qse_mbs_t* str)
{
return str->sizer;
}
void qse_str_setsizer (qse_str_t* str, qse_str_sizer_t sizer)
void qse_mbs_setsizer (qse_mbs_t* str, qse_mbs_sizer_t sizer)
{
str->sizer = sizer;
}
qse_size_t qse_str_getcapa (qse_str_t* str)
qse_size_t qse_mbs_getcapa (qse_mbs_t* str)
{
return str->capa;
}
qse_size_t qse_str_setcapa (qse_str_t* str, qse_size_t capa)
qse_size_t qse_mbs_setcapa (qse_mbs_t* str, qse_size_t capa)
{
qse_char_t* tmp;
qse_mchar_t* tmp;
if (capa == str->capa) return capa;
if (str->mmgr->realloc != QSE_NULL && str->ptr != QSE_NULL)
{
tmp = (qse_char_t*) QSE_MMGR_REALLOC (
tmp = (qse_mchar_t*) QSE_MMGR_REALLOC (
str->mmgr, str->ptr,
QSE_SIZEOF(qse_char_t)*(capa+1));
QSE_SIZEOF(qse_mchar_t)*(capa+1));
if (tmp == QSE_NULL) return (qse_size_t)-1;
}
else
{
tmp = (qse_char_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_char_t)*(capa+1));
tmp = (qse_mchar_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_mchar_t)*(capa+1));
if (tmp == QSE_NULL) return (qse_size_t)-1;
if (str->ptr != QSE_NULL)
{
qse_size_t ncopy = (str->len <= capa)? str->len: capa;
QSE_MEMCPY (tmp, str->ptr,
QSE_SIZEOF(qse_char_t)*(ncopy+1));
QSE_SIZEOF(qse_mchar_t)*(ncopy+1));
QSE_MMGR_FREE (str->mmgr, str->ptr);
}
}
@ -156,7 +156,7 @@ qse_size_t qse_str_setcapa (qse_str_t* str, qse_size_t capa)
if (capa < str->len)
{
str->len = capa;
tmp[capa] = QSE_T('\0');
tmp[capa] = QSE_MT('\0');
}
str->capa = capa;
@ -165,44 +165,44 @@ qse_size_t qse_str_setcapa (qse_str_t* str, qse_size_t capa)
return str->capa;
}
qse_size_t qse_str_getlen (qse_str_t* str)
qse_size_t qse_mbs_getlen (qse_mbs_t* str)
{
return QSE_STR_LEN (str);
return QSE_MBS_LEN (str);
}
qse_size_t qse_str_setlen (qse_str_t* str, qse_size_t len)
qse_size_t qse_mbs_setlen (qse_mbs_t* str, qse_size_t len)
{
if (len == str->len) return len;
if (len < str->len)
{
str->len = len;
str->ptr[len] = QSE_T('\0');
str->ptr[len] = QSE_MT('\0');
return len;
}
if (len > str->capa)
{
if (qse_str_setcapa (str, len) == (qse_size_t)-1)
if (qse_mbs_setcapa (str, len) == (qse_size_t)-1)
return (qse_size_t)-1;
}
while (str->len < len) str->ptr[str->len++] = QSE_T(' ');
while (str->len < len) str->ptr[str->len++] = QSE_MT(' ');
return str->len;
}
void qse_str_clear (qse_str_t* str)
void qse_mbs_clear (qse_mbs_t* str)
{
str->len = 0;
if (str->ptr != QSE_NULL)
{
QSE_ASSERT (str->capa >= 1);
str->ptr[0] = QSE_T('\0');
str->ptr[0] = QSE_MT('\0');
}
}
void qse_str_swap (qse_str_t* str, qse_str_t* str1)
void qse_mbs_swap (qse_mbs_t* str, qse_mbs_t* str1)
{
qse_str_t tmp;
qse_mbs_t tmp;
tmp.ptr = str->ptr;
tmp.len = str->len;
@ -220,20 +220,20 @@ void qse_str_swap (qse_str_t* str, qse_str_t* str1)
str1->mmgr = tmp.mmgr;
}
qse_size_t qse_str_cpy (qse_str_t* str, const qse_char_t* s)
qse_size_t qse_mbs_cpy (qse_mbs_t* str, const qse_mchar_t* s)
{
/* TODO: improve it */
return qse_str_ncpy (str, s, qse_strlen(s));
return qse_mbs_ncpy (str, s, qse_mbslen(s));
}
qse_size_t qse_str_ncpy (qse_str_t* str, const qse_char_t* s, qse_size_t len)
qse_size_t qse_mbs_ncpy (qse_mbs_t* str, const qse_mchar_t* s, qse_size_t len)
{
if (len > str->capa || str->ptr == QSE_NULL)
{
qse_char_t* buf;
qse_mchar_t* buf;
buf = (qse_char_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_char_t) * (len + 1));
buf = (qse_mchar_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_mchar_t) * (len + 1));
if (buf == QSE_NULL) return (qse_size_t)-1;
if (str->ptr != QSE_NULL) QSE_MMGR_FREE (str->mmgr, str->ptr);
@ -241,18 +241,18 @@ qse_size_t qse_str_ncpy (qse_str_t* str, const qse_char_t* s, qse_size_t len)
str->ptr = buf;
}
str->len = qse_strncpy (str->ptr, s, len);
str->ptr[str->len] = QSE_T('\0');
str->len = qse_mbsncpy (str->ptr, s, len);
str->ptr[str->len] = QSE_MT('\0');
return str->len;
}
qse_size_t qse_str_cat (qse_str_t* str, const qse_char_t* s)
qse_size_t qse_mbs_cat (qse_mbs_t* str, const qse_mchar_t* s)
{
/* TODO: improve it */
return qse_str_ncat (str, s, qse_strlen(s));
return qse_mbs_ncat (str, s, qse_mbslen(s));
}
qse_size_t qse_str_ncat (qse_str_t* str, const qse_char_t* s, qse_size_t len)
qse_size_t qse_mbs_ncat (qse_mbs_t* str, const qse_mchar_t* s, qse_size_t len)
{
if (len > str->capa - str->len)
{
@ -282,7 +282,7 @@ qse_size_t qse_str_ncat (qse_str_t* str, const qse_char_t* s, qse_size_t len)
/* change the capacity */
do
{
if (qse_str_setcapa (str, ncapa) != (qse_size_t)-1) break;
if (qse_mbs_setcapa (str, ncapa) != (qse_size_t)-1) break;
if (ncapa <= mincapa) return (qse_size_t)-1;
ncapa--;
}
@ -300,22 +300,22 @@ qse_size_t qse_str_ncat (qse_str_t* str, const qse_char_t* s, qse_size_t len)
{
QSE_MEMCPY (&str->ptr[str->len], s, len*QSE_SIZEOF(*s));
str->len += len;
str->ptr[str->len] = QSE_T('\0');
str->ptr[str->len] = QSE_MT('\0');
}
return str->len;
}
qse_size_t qse_str_ccat (qse_str_t* str, qse_char_t c)
qse_size_t qse_mbs_ccat (qse_mbs_t* str, qse_mchar_t c)
{
return qse_str_ncat (str, &c, 1);
return qse_mbs_ncat (str, &c, 1);
}
qse_size_t qse_str_nccat (qse_str_t* str, qse_char_t c, qse_size_t len)
qse_size_t qse_mbs_nccat (qse_mbs_t* str, qse_mchar_t c, qse_size_t len)
{
while (len > 0)
{
if (qse_str_ncat (str, &c, 1) == (qse_size_t)-1)
if (qse_mbs_ncat (str, &c, 1) == (qse_size_t)-1)
{
return (qse_size_t)-1;
}
@ -325,19 +325,19 @@ qse_size_t qse_str_nccat (qse_str_t* str, qse_char_t c, qse_size_t len)
return str->len;
}
qse_size_t qse_str_del (qse_str_t* str, qse_size_t index, qse_size_t size)
qse_size_t qse_mbs_del (qse_mbs_t* str, qse_size_t index, qse_size_t size)
{
if (str->ptr != QSE_NULL && index < str->len && size > 0)
{
qse_size_t nidx = index + size;
if (nidx >= str->len)
{
str->ptr[index] = QSE_T('\0');
str->ptr[index] = QSE_MT('\0');
str->len = index;
}
else
{
qse_strncpy (
qse_mbsncpy (
&str->ptr[index], &str->ptr[nidx],
str->len - nidx);
str->len -= size;
@ -347,23 +347,24 @@ qse_size_t qse_str_del (qse_str_t* str, qse_size_t index, qse_size_t size)
return str->len;
}
qse_size_t qse_str_trm (qse_str_t* str)
qse_size_t qse_mbs_trm (qse_mbs_t* str)
{
if (str->ptr != QSE_NULL)
{
str->len = qse_strxtrm (str->ptr, str->len);
str->len = qse_mbsxtrm (str->ptr, str->len);
}
return str->len;
}
qse_size_t qse_str_pac (qse_str_t* str)
qse_size_t qse_mbs_pac (qse_mbs_t* str)
{
if (str->ptr != QSE_NULL)
{
str->len = qse_strxpac (str->ptr, str->len);
str->len = qse_mbsxpac (str->ptr, str->len);
}
return str->len;
}

370
qse/lib/cmn/str_dynw.c Normal file
View File

@ -0,0 +1,370 @@
/*
* $Id: str_dyn.c 441 2011-04-22 14:28:43Z hyunghwan.chung $
*
Copyright 2006-2011 Chung, Hyung-Hwan.
This file is part of QSE.
QSE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
QSE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qse/cmn/str.h>
#include "mem.h"
QSE_IMPLEMENT_COMMON_FUNCTIONS (wcs)
qse_wcs_t* qse_wcs_open (qse_mmgr_t* mmgr, qse_size_t ext, qse_size_t capa)
{
qse_wcs_t* str;
if (mmgr == QSE_NULL)
{
mmgr = QSE_MMGR_GETDFL();
QSE_ASSERTX (mmgr != QSE_NULL,
"Set the memory manager with QSE_MMGR_SETDFL()");
if (mmgr == QSE_NULL) return QSE_NULL;
}
str = (qse_wcs_t*) QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(qse_wcs_t) + ext);
if (str == QSE_NULL) return QSE_NULL;
if (qse_wcs_init (str, mmgr, capa) == QSE_NULL)
{
QSE_MMGR_FREE (mmgr, str);
return QSE_NULL;
}
return str;
}
void qse_wcs_close (qse_wcs_t* str)
{
qse_wcs_fini (str);
QSE_MMGR_FREE (str->mmgr, str);
}
qse_wcs_t* qse_wcs_init (qse_wcs_t* str, qse_mmgr_t* mmgr, qse_size_t capa)
{
if (mmgr == QSE_NULL) mmgr = QSE_MMGR_GETDFL();
QSE_MEMSET (str, 0, QSE_SIZEOF(qse_wcs_t));
str->mmgr = mmgr;
str->sizer = QSE_NULL;
if (capa == 0) str->ptr = QSE_NULL;
else
{
str->ptr = (qse_wchar_t*) QSE_MMGR_ALLOC (
mmgr, QSE_SIZEOF(qse_wchar_t) * (capa + 1));
if (str->ptr == QSE_NULL) return QSE_NULL;
str->ptr[0] = QSE_WT('\0');
}
str->len = 0;
str->capa = capa;
return str;
}
void qse_wcs_fini (qse_wcs_t* str)
{
if (str->ptr != QSE_NULL) QSE_MMGR_FREE (str->mmgr, str->ptr);
}
int qse_wcs_yield (qse_wcs_t* str, qse_wxstr_t* buf, qse_size_t new_capa)
{
qse_wchar_t* tmp;
if (new_capa == 0) tmp = QSE_NULL;
else
{
tmp = (qse_wchar_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_wchar_t) * (new_capa + 1));
if (tmp == QSE_NULL) return -1;
tmp[0] = QSE_WT('\0');
}
if (buf != QSE_NULL)
{
buf->ptr = str->ptr;
buf->len = str->len;
}
str->ptr = tmp;
str->len = 0;
str->capa = new_capa;
return 0;
}
qse_wcs_sizer_t qse_wcs_getsizer (qse_wcs_t* str)
{
return str->sizer;
}
void qse_wcs_setsizer (qse_wcs_t* str, qse_wcs_sizer_t sizer)
{
str->sizer = sizer;
}
qse_size_t qse_wcs_getcapa (qse_wcs_t* str)
{
return str->capa;
}
qse_size_t qse_wcs_setcapa (qse_wcs_t* str, qse_size_t capa)
{
qse_wchar_t* tmp;
if (capa == str->capa) return capa;
if (str->mmgr->realloc != QSE_NULL && str->ptr != QSE_NULL)
{
tmp = (qse_wchar_t*) QSE_MMGR_REALLOC (
str->mmgr, str->ptr,
QSE_SIZEOF(qse_wchar_t)*(capa+1));
if (tmp == QSE_NULL) return (qse_size_t)-1;
}
else
{
tmp = (qse_wchar_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_wchar_t)*(capa+1));
if (tmp == QSE_NULL) return (qse_size_t)-1;
if (str->ptr != QSE_NULL)
{
qse_size_t ncopy = (str->len <= capa)? str->len: capa;
QSE_MEMCPY (tmp, str->ptr,
QSE_SIZEOF(qse_wchar_t)*(ncopy+1));
QSE_MMGR_FREE (str->mmgr, str->ptr);
}
}
if (capa < str->len)
{
str->len = capa;
tmp[capa] = QSE_WT('\0');
}
str->capa = capa;
str->ptr = tmp;
return str->capa;
}
qse_size_t qse_wcs_getlen (qse_wcs_t* str)
{
return QSE_WCS_LEN (str);
}
qse_size_t qse_wcs_setlen (qse_wcs_t* str, qse_size_t len)
{
if (len == str->len) return len;
if (len < str->len)
{
str->len = len;
str->ptr[len] = QSE_WT('\0');
return len;
}
if (len > str->capa)
{
if (qse_wcs_setcapa (str, len) == (qse_size_t)-1)
return (qse_size_t)-1;
}
while (str->len < len) str->ptr[str->len++] = QSE_WT(' ');
return str->len;
}
void qse_wcs_clear (qse_wcs_t* str)
{
str->len = 0;
if (str->ptr != QSE_NULL)
{
QSE_ASSERT (str->capa >= 1);
str->ptr[0] = QSE_WT('\0');
}
}
void qse_wcs_swap (qse_wcs_t* str, qse_wcs_t* str1)
{
qse_wcs_t tmp;
tmp.ptr = str->ptr;
tmp.len = str->len;
tmp.capa = str->capa;
tmp.mmgr = str->mmgr;
str->ptr = str1->ptr;
str->len = str1->len;
str->capa = str1->capa;
str->mmgr = str1->mmgr;
str1->ptr = tmp.ptr;
str1->len = tmp.len;
str1->capa = tmp.capa;
str1->mmgr = tmp.mmgr;
}
qse_size_t qse_wcs_cpy (qse_wcs_t* str, const qse_wchar_t* s)
{
/* TODO: improve it */
return qse_wcs_ncpy (str, s, qse_wcslen(s));
}
qse_size_t qse_wcs_ncpy (qse_wcs_t* str, const qse_wchar_t* s, qse_size_t len)
{
if (len > str->capa || str->ptr == QSE_NULL)
{
qse_wchar_t* buf;
buf = (qse_wchar_t*) QSE_MMGR_ALLOC (
str->mmgr, QSE_SIZEOF(qse_wchar_t) * (len + 1));
if (buf == QSE_NULL) return (qse_size_t)-1;
if (str->ptr != QSE_NULL) QSE_MMGR_FREE (str->mmgr, str->ptr);
str->capa = len;
str->ptr = buf;
}
str->len = qse_wcsncpy (str->ptr, s, len);
str->ptr[str->len] = QSE_WT('\0');
return str->len;
}
qse_size_t qse_wcs_cat (qse_wcs_t* str, const qse_wchar_t* s)
{
/* TODO: improve it */
return qse_wcs_ncat (str, s, qse_wcslen(s));
}
qse_size_t qse_wcs_ncat (qse_wcs_t* str, const qse_wchar_t* s, qse_size_t len)
{
if (len > str->capa - str->len)
{
qse_size_t ncapa, mincapa;
/* let the minimum capacity be as large as
* to fit in the new substring */
mincapa = str->len + len;
if (str->sizer == QSE_NULL)
{
/* increase the capacity by the length to add */
ncapa = mincapa;
/* if the new capacity is less than the double,
* just double it */
if (ncapa < str->capa * 2) ncapa = str->capa * 2;
}
else
{
/* let the user determine the new capacity.
* pass the minimum capacity required as a hint */
ncapa = str->sizer (str, mincapa);
/* if no change in capacity, return current length */
if (ncapa == str->capa) return str->len;
}
/* change the capacity */
do
{
if (qse_wcs_setcapa (str, ncapa) != (qse_size_t)-1) break;
if (ncapa <= mincapa) return (qse_size_t)-1;
ncapa--;
}
while (1);
}
if (len > str->capa - str->len)
{
/* copy as many characters as the number of cells available.
* if the capacity has been decreased, len is adjusted here */
len = str->capa - str->len;
}
if (len > 0)
{
QSE_MEMCPY (&str->ptr[str->len], s, len*QSE_SIZEOF(*s));
str->len += len;
str->ptr[str->len] = QSE_WT('\0');
}
return str->len;
}
qse_size_t qse_wcs_ccat (qse_wcs_t* str, qse_wchar_t c)
{
return qse_wcs_ncat (str, &c, 1);
}
qse_size_t qse_wcs_nccat (qse_wcs_t* str, qse_wchar_t c, qse_size_t len)
{
while (len > 0)
{
if (qse_wcs_ncat (str, &c, 1) == (qse_size_t)-1)
{
return (qse_size_t)-1;
}
len--;
}
return str->len;
}
qse_size_t qse_wcs_del (qse_wcs_t* str, qse_size_t index, qse_size_t size)
{
if (str->ptr != QSE_NULL && index < str->len && size > 0)
{
qse_size_t nidx = index + size;
if (nidx >= str->len)
{
str->ptr[index] = QSE_WT('\0');
str->len = index;
}
else
{
qse_wcsncpy (
&str->ptr[index], &str->ptr[nidx],
str->len - nidx);
str->len -= size;
}
}
return str->len;
}
qse_size_t qse_wcs_trm (qse_wcs_t* str)
{
if (str->ptr != QSE_NULL)
{
str->len = qse_wcsxtrm (str->ptr, str->len);
}
return str->len;
}
qse_size_t qse_wcs_pac (qse_wcs_t* str)
{
if (str->ptr != QSE_NULL)
{
str->len = qse_wcsxpac (str->ptr, str->len);
}
return str->len;
}

View File

@ -42,7 +42,7 @@ WVList
0
10
WPickList
58
59
11
MItem
3
@ -619,8 +619,8 @@ WVList
0
139
MItem
32
..\..\..\..\..\lib\cmn\str_dyn.c
33
..\..\..\..\..\lib\cmn\str_dynm.c
140
WString
4
@ -637,8 +637,8 @@ WVList
0
143
MItem
32
..\..\..\..\..\lib\cmn\str_end.c
33
..\..\..\..\..\lib\cmn\str_dynw.c
144
WString
4
@ -655,8 +655,8 @@ WVList
0
147
MItem
33
..\..\..\..\..\lib\cmn\str_excl.c
32
..\..\..\..\..\lib\cmn\str_end.c
148
WString
4
@ -674,7 +674,7 @@ WVList
151
MItem
33
..\..\..\..\..\lib\cmn\str_fcpy.c
..\..\..\..\..\lib\cmn\str_excl.c
152
WString
4
@ -692,7 +692,7 @@ WVList
155
MItem
33
..\..\..\..\..\lib\cmn\str_incl.c
..\..\..\..\..\lib\cmn\str_fcpy.c
156
WString
4
@ -709,8 +709,8 @@ WVList
0
159
MItem
32
..\..\..\..\..\lib\cmn\str_len.c
33
..\..\..\..\..\lib\cmn\str_incl.c
160
WString
4
@ -728,7 +728,7 @@ WVList
163
MItem
32
..\..\..\..\..\lib\cmn\str_pac.c
..\..\..\..\..\lib\cmn\str_len.c
164
WString
4
@ -745,8 +745,8 @@ WVList
0
167
MItem
33
..\..\..\..\..\lib\cmn\str_pbrk.c
32
..\..\..\..\..\lib\cmn\str_pac.c
168
WString
4
@ -763,8 +763,8 @@ WVList
0
171
MItem
32
..\..\..\..\..\lib\cmn\str_put.c
33
..\..\..\..\..\lib\cmn\str_pbrk.c
172
WString
4
@ -782,7 +782,7 @@ WVList
175
MItem
32
..\..\..\..\..\lib\cmn\str_rev.c
..\..\..\..\..\lib\cmn\str_put.c
176
WString
4
@ -800,7 +800,7 @@ WVList
179
MItem
32
..\..\..\..\..\lib\cmn\str_rot.c
..\..\..\..\..\lib\cmn\str_rev.c
180
WString
4
@ -818,7 +818,7 @@ WVList
183
MItem
32
..\..\..\..\..\lib\cmn\str_set.c
..\..\..\..\..\lib\cmn\str_rot.c
184
WString
4
@ -836,7 +836,7 @@ WVList
187
MItem
32
..\..\..\..\..\lib\cmn\str_spl.c
..\..\..\..\..\lib\cmn\str_set.c
188
WString
4
@ -854,7 +854,7 @@ WVList
191
MItem
32
..\..\..\..\..\lib\cmn\str_spn.c
..\..\..\..\..\lib\cmn\str_spl.c
192
WString
4
@ -872,7 +872,7 @@ WVList
195
MItem
32
..\..\..\..\..\lib\cmn\str_str.c
..\..\..\..\..\lib\cmn\str_spn.c
196
WString
4
@ -889,8 +889,8 @@ WVList
0
199
MItem
34
..\..\..\..\..\lib\cmn\str_subst.c
32
..\..\..\..\..\lib\cmn\str_str.c
200
WString
4
@ -907,8 +907,8 @@ WVList
0
203
MItem
32
..\..\..\..\..\lib\cmn\str_tok.c
34
..\..\..\..\..\lib\cmn\str_subst.c
204
WString
4
@ -926,7 +926,7 @@ WVList
207
MItem
32
..\..\..\..\..\lib\cmn\str_trm.c
..\..\..\..\..\lib\cmn\str_tok.c
208
WString
4
@ -943,8 +943,8 @@ WVList
0
211
MItem
33
..\..\..\..\..\lib\cmn\str_word.c
32
..\..\..\..\..\lib\cmn\str_trm.c
212
WString
4
@ -961,8 +961,8 @@ WVList
0
215
MItem
29
..\..\..\..\..\lib\cmn\time.c
33
..\..\..\..\..\lib\cmn\str_word.c
216
WString
4
@ -979,8 +979,8 @@ WVList
0
219
MItem
28
..\..\..\..\..\lib\cmn\tio.c
29
..\..\..\..\..\lib\cmn\time.c
220
WString
4
@ -997,8 +997,8 @@ WVList
0
223
MItem
32
..\..\..\..\..\lib\cmn\tio_get.c
28
..\..\..\..\..\lib\cmn\tio.c
224
WString
4
@ -1016,7 +1016,7 @@ WVList
227
MItem
32
..\..\..\..\..\lib\cmn\tio_put.c
..\..\..\..\..\lib\cmn\tio_get.c
228
WString
4
@ -1033,8 +1033,8 @@ WVList
0
231
MItem
28
..\..\..\..\..\lib\cmn\xma.c
32
..\..\..\..\..\lib\cmn\tio_put.c
232
WString
4
@ -1051,26 +1051,26 @@ WVList
0
235
MItem
3
*.h
28
..\..\..\..\..\lib\cmn\xma.c
236
WString
3
NIL
4
COBJ
237
WVList
0
238
WVList
0
-1
11
1
1
0
239
MItem
28
..\..\..\..\..\lib\cmn\mem.h
3
*.h
240
WString
3
@ -1081,14 +1081,14 @@ WVList
242
WVList
0
235
-1
1
1
0
243
MItem
32
..\..\..\..\..\lib\cmn\syscall.h
28
..\..\..\..\..\lib\cmn\mem.h
244
WString
3
@ -1099,7 +1099,25 @@ WVList
246
WVList
0
235
239
1
1
0
247
MItem
32
..\..\..\..\..\lib\cmn\syscall.h
248
WString
3
NIL
249
WVList
0
250
WVList
0
239
1
1
0

View File

@ -42,7 +42,7 @@ WVList
0
10
WPickList
58
59
11
MItem
3
@ -619,8 +619,8 @@ WVList
0
139
MItem
32
..\..\..\..\..\lib\cmn\str_dyn.c
33
..\..\..\..\..\lib\cmn\str_dynm.c
140
WString
4
@ -637,8 +637,8 @@ WVList
0
143
MItem
32
..\..\..\..\..\lib\cmn\str_end.c
33
..\..\..\..\..\lib\cmn\str_dynw.c
144
WString
4
@ -655,8 +655,8 @@ WVList
0
147
MItem
33
..\..\..\..\..\lib\cmn\str_excl.c
32
..\..\..\..\..\lib\cmn\str_end.c
148
WString
4
@ -674,7 +674,7 @@ WVList
151
MItem
33
..\..\..\..\..\lib\cmn\str_fcpy.c
..\..\..\..\..\lib\cmn\str_excl.c
152
WString
4
@ -692,7 +692,7 @@ WVList
155
MItem
33
..\..\..\..\..\lib\cmn\str_incl.c
..\..\..\..\..\lib\cmn\str_fcpy.c
156
WString
4
@ -709,8 +709,8 @@ WVList
0
159
MItem
32
..\..\..\..\..\lib\cmn\str_len.c
33
..\..\..\..\..\lib\cmn\str_incl.c
160
WString
4
@ -728,7 +728,7 @@ WVList
163
MItem
32
..\..\..\..\..\lib\cmn\str_pac.c
..\..\..\..\..\lib\cmn\str_len.c
164
WString
4
@ -745,8 +745,8 @@ WVList
0
167
MItem
33
..\..\..\..\..\lib\cmn\str_pbrk.c
32
..\..\..\..\..\lib\cmn\str_pac.c
168
WString
4
@ -763,8 +763,8 @@ WVList
0
171
MItem
32
..\..\..\..\..\lib\cmn\str_put.c
33
..\..\..\..\..\lib\cmn\str_pbrk.c
172
WString
4
@ -782,7 +782,7 @@ WVList
175
MItem
32
..\..\..\..\..\lib\cmn\str_rev.c
..\..\..\..\..\lib\cmn\str_put.c
176
WString
4
@ -800,7 +800,7 @@ WVList
179
MItem
32
..\..\..\..\..\lib\cmn\str_rot.c
..\..\..\..\..\lib\cmn\str_rev.c
180
WString
4
@ -818,7 +818,7 @@ WVList
183
MItem
32
..\..\..\..\..\lib\cmn\str_set.c
..\..\..\..\..\lib\cmn\str_rot.c
184
WString
4
@ -836,7 +836,7 @@ WVList
187
MItem
32
..\..\..\..\..\lib\cmn\str_spl.c
..\..\..\..\..\lib\cmn\str_set.c
188
WString
4
@ -854,7 +854,7 @@ WVList
191
MItem
32
..\..\..\..\..\lib\cmn\str_spn.c
..\..\..\..\..\lib\cmn\str_spl.c
192
WString
4
@ -872,7 +872,7 @@ WVList
195
MItem
32
..\..\..\..\..\lib\cmn\str_str.c
..\..\..\..\..\lib\cmn\str_spn.c
196
WString
4
@ -889,8 +889,8 @@ WVList
0
199
MItem
34
..\..\..\..\..\lib\cmn\str_subst.c
32
..\..\..\..\..\lib\cmn\str_str.c
200
WString
4
@ -907,8 +907,8 @@ WVList
0
203
MItem
32
..\..\..\..\..\lib\cmn\str_tok.c
34
..\..\..\..\..\lib\cmn\str_subst.c
204
WString
4
@ -926,7 +926,7 @@ WVList
207
MItem
32
..\..\..\..\..\lib\cmn\str_trm.c
..\..\..\..\..\lib\cmn\str_tok.c
208
WString
4
@ -943,8 +943,8 @@ WVList
0
211
MItem
33
..\..\..\..\..\lib\cmn\str_word.c
32
..\..\..\..\..\lib\cmn\str_trm.c
212
WString
4
@ -961,8 +961,8 @@ WVList
0
215
MItem
29
..\..\..\..\..\lib\cmn\time.c
33
..\..\..\..\..\lib\cmn\str_word.c
216
WString
4
@ -979,8 +979,8 @@ WVList
0
219
MItem
28
..\..\..\..\..\lib\cmn\tio.c
29
..\..\..\..\..\lib\cmn\time.c
220
WString
4
@ -997,8 +997,8 @@ WVList
0
223
MItem
32
..\..\..\..\..\lib\cmn\tio_get.c
28
..\..\..\..\..\lib\cmn\tio.c
224
WString
4
@ -1016,7 +1016,7 @@ WVList
227
MItem
32
..\..\..\..\..\lib\cmn\tio_put.c
..\..\..\..\..\lib\cmn\tio_get.c
228
WString
4
@ -1033,8 +1033,8 @@ WVList
0
231
MItem
28
..\..\..\..\..\lib\cmn\xma.c
32
..\..\..\..\..\lib\cmn\tio_put.c
232
WString
4
@ -1051,26 +1051,26 @@ WVList
0
235
MItem
3
*.h
28
..\..\..\..\..\lib\cmn\xma.c
236
WString
3
NIL
4
COBJ
237
WVList
0
238
WVList
0
-1
11
1
1
0
239
MItem
28
..\..\..\..\..\lib\cmn\mem.h
3
*.h
240
WString
3
@ -1081,14 +1081,14 @@ WVList
242
WVList
0
235
-1
1
1
0
243
MItem
32
..\..\..\..\..\lib\cmn\syscall.h
28
..\..\..\..\..\lib\cmn\mem.h
244
WString
3
@ -1099,7 +1099,25 @@ WVList
246
WVList
0
235
239
1
1
0
247
MItem
32
..\..\..\..\..\lib\cmn\syscall.h
248
WString
3
NIL
249
WVList
0
250
WVList
0
239
1
1
0

View File

@ -84,14 +84,14 @@ WRect
1880
5700
4240
1
0
0
22
WFileName
30
release/os2/lib/cmn/qsecmn.tgt
36
42
28
30
23
VComponent
24
@ -144,8 +144,8 @@ release/os2/lib/scm/qsescm.tgt
VComponent
33
WRect
60
1373
380
-160
5700
4240
0
@ -155,7 +155,7 @@ WFileName
28
debug/os2/lib/cmn/qsecmn.tgt
29
36
32
35
VComponent
36
@ -219,7 +219,7 @@ WFileName
30
debug/win32/lib/cmn/qsecmn.tgt
29
29
30
47
VComponent
48
@ -260,14 +260,14 @@ WRect
80
5700
4240
0
1
0
55
WFileName
28
debug/os2/lib/awk/qseawk.tgt
8
15
10
56
VComponent
57
@ -289,7 +289,7 @@ VComponent
60
WRect
2920
906
893
5700
4240
0
@ -300,4 +300,4 @@ WFileName
debug/os2/cmd/awk/qseawk.tgt
0
1
59
32

View File

@ -42,7 +42,7 @@ WVList
0
10
WPickList
58
59
11
MItem
3
@ -683,8 +683,8 @@ WVList
0
155
MItem
32
..\..\..\..\..\lib\cmn\str_dyn.c
33
..\..\..\..\..\lib\cmn\str_dynm.c
156
WString
4
@ -701,8 +701,8 @@ WVList
0
159
MItem
32
..\..\..\..\..\lib\cmn\str_end.c
33
..\..\..\..\..\lib\cmn\str_dynw.c
160
WString
4
@ -719,8 +719,8 @@ WVList
0
163
MItem
33
..\..\..\..\..\lib\cmn\str_excl.c
32
..\..\..\..\..\lib\cmn\str_end.c
164
WString
4
@ -738,7 +738,7 @@ WVList
167
MItem
33
..\..\..\..\..\lib\cmn\str_fcpy.c
..\..\..\..\..\lib\cmn\str_excl.c
168
WString
4
@ -756,7 +756,7 @@ WVList
171
MItem
33
..\..\..\..\..\lib\cmn\str_incl.c
..\..\..\..\..\lib\cmn\str_fcpy.c
172
WString
4
@ -773,8 +773,8 @@ WVList
0
175
MItem
32
..\..\..\..\..\lib\cmn\str_len.c
33
..\..\..\..\..\lib\cmn\str_incl.c
176
WString
4
@ -792,7 +792,7 @@ WVList
179
MItem
32
..\..\..\..\..\lib\cmn\str_pac.c
..\..\..\..\..\lib\cmn\str_len.c
180
WString
4
@ -809,8 +809,8 @@ WVList
0
183
MItem
33
..\..\..\..\..\lib\cmn\str_pbrk.c
32
..\..\..\..\..\lib\cmn\str_pac.c
184
WString
4
@ -827,8 +827,8 @@ WVList
0
187
MItem
32
..\..\..\..\..\lib\cmn\str_put.c
33
..\..\..\..\..\lib\cmn\str_pbrk.c
188
WString
4
@ -846,7 +846,7 @@ WVList
191
MItem
32
..\..\..\..\..\lib\cmn\str_rev.c
..\..\..\..\..\lib\cmn\str_put.c
192
WString
4
@ -864,7 +864,7 @@ WVList
195
MItem
32
..\..\..\..\..\lib\cmn\str_rot.c
..\..\..\..\..\lib\cmn\str_rev.c
196
WString
4
@ -882,7 +882,7 @@ WVList
199
MItem
32
..\..\..\..\..\lib\cmn\str_set.c
..\..\..\..\..\lib\cmn\str_rot.c
200
WString
4
@ -900,7 +900,7 @@ WVList
203
MItem
32
..\..\..\..\..\lib\cmn\str_spl.c
..\..\..\..\..\lib\cmn\str_set.c
204
WString
4
@ -918,7 +918,7 @@ WVList
207
MItem
32
..\..\..\..\..\lib\cmn\str_spn.c
..\..\..\..\..\lib\cmn\str_spl.c
208
WString
4
@ -936,7 +936,7 @@ WVList
211
MItem
32
..\..\..\..\..\lib\cmn\str_str.c
..\..\..\..\..\lib\cmn\str_spn.c
212
WString
4
@ -953,8 +953,8 @@ WVList
0
215
MItem
34
..\..\..\..\..\lib\cmn\str_subst.c
32
..\..\..\..\..\lib\cmn\str_str.c
216
WString
4
@ -971,8 +971,8 @@ WVList
0
219
MItem
32
..\..\..\..\..\lib\cmn\str_tok.c
34
..\..\..\..\..\lib\cmn\str_subst.c
220
WString
4
@ -990,7 +990,7 @@ WVList
223
MItem
32
..\..\..\..\..\lib\cmn\str_trm.c
..\..\..\..\..\lib\cmn\str_tok.c
224
WString
4
@ -1007,8 +1007,8 @@ WVList
0
227
MItem
33
..\..\..\..\..\lib\cmn\str_word.c
32
..\..\..\..\..\lib\cmn\str_trm.c
228
WString
4
@ -1025,8 +1025,8 @@ WVList
0
231
MItem
29
..\..\..\..\..\lib\cmn\time.c
33
..\..\..\..\..\lib\cmn\str_word.c
232
WString
4
@ -1043,8 +1043,8 @@ WVList
0
235
MItem
28
..\..\..\..\..\lib\cmn\tio.c
29
..\..\..\..\..\lib\cmn\time.c
236
WString
4
@ -1061,8 +1061,8 @@ WVList
0
239
MItem
32
..\..\..\..\..\lib\cmn\tio_get.c
28
..\..\..\..\..\lib\cmn\tio.c
240
WString
4
@ -1080,7 +1080,7 @@ WVList
243
MItem
32
..\..\..\..\..\lib\cmn\tio_put.c
..\..\..\..\..\lib\cmn\tio_get.c
244
WString
4
@ -1097,8 +1097,8 @@ WVList
0
247
MItem
28
..\..\..\..\..\lib\cmn\xma.c
32
..\..\..\..\..\lib\cmn\tio_put.c
248
WString
4
@ -1115,26 +1115,26 @@ WVList
0
251
MItem
3
*.h
28
..\..\..\..\..\lib\cmn\xma.c
252
WString
3
NIL
4
COBJ
253
WVList
0
254
WVList
0
-1
11
1
1
0
255
MItem
28
..\..\..\..\..\lib\cmn\mem.h
3
*.h
256
WString
3
@ -1145,14 +1145,14 @@ WVList
258
WVList
0
251
-1
1
1
0
259
MItem
32
..\..\..\..\..\lib\cmn\syscall.h
28
..\..\..\..\..\lib\cmn\mem.h
260
WString
3
@ -1163,7 +1163,25 @@ WVList
262
WVList
0
251
255
1
1
0
263
MItem
32
..\..\..\..\..\lib\cmn\syscall.h
264
WString
3
NIL
265
WVList
0
266
WVList
0
255
1
1
0