remove qse_cstr_t and related types. switched all existing references to qse_cstr_t and its family
This commit is contained in:
@ -386,7 +386,7 @@ static int handle_non_wild_segments (glob_t* g, segment_t* seg)
|
||||
if (!seg->next && path_exists(g, QSE_STR_PTR(&g->path)) > 0)
|
||||
{
|
||||
/* reached the last segment. match if the path exists */
|
||||
if (g->cbimpl (QSE_STR_CSTR(&g->path), g->cbctx) <= -1) return -1;
|
||||
if (g->cbimpl (QSE_STR_XSTR(&g->path), g->cbctx) <= -1) return -1;
|
||||
g->expanded = 1;
|
||||
}
|
||||
}
|
||||
@ -492,7 +492,7 @@ entry:
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g->cbimpl (QSE_STR_CSTR(&g->path), g->cbctx) <= -1) goto oops;
|
||||
if (g->cbimpl (QSE_STR_XSTR(&g->path), g->cbctx) <= -1) goto oops;
|
||||
g->expanded = 1;
|
||||
}
|
||||
}
|
||||
|
@ -577,7 +577,7 @@ qse_mchar_t* qse_wcsatombsdupwithcmgr (
|
||||
}
|
||||
|
||||
qse_mchar_t* qse_wcsnatombsdupwithcmgr (
|
||||
const qse_wcstr_t wcs[], qse_size_t* mbslen, qse_mmgr_t* mmgr, qse_cmgr_t* cmgr)
|
||||
const qse_wxstr_t wcs[], qse_size_t* mbslen, qse_mmgr_t* mmgr, qse_cmgr_t* cmgr)
|
||||
{
|
||||
qse_size_t wl, ml, capa, pos, i;
|
||||
qse_mchar_t* mbs;
|
||||
|
@ -234,7 +234,7 @@ qse_mchar_t* qse_wcsatombsdup (
|
||||
}
|
||||
|
||||
qse_mchar_t* qse_wcsnatombsdup (
|
||||
const qse_wcstr_t wcs[], qse_size_t* mbslen, qse_mmgr_t* mmgr)
|
||||
const qse_wxstr_t wcs[], qse_size_t* mbslen, qse_mmgr_t* mmgr)
|
||||
{
|
||||
return qse_wcsnatombsdupwithcmgr (wcs, mbslen, mmgr, dfl_cmgr);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int qse_mbsntonwad (const qse_mchar_t* str, qse_size_t len, qse_nwad_t* nwad)
|
||||
{
|
||||
const qse_mchar_t* p;
|
||||
const qse_mchar_t* end;
|
||||
qse_mcstr_t tmp;
|
||||
qse_mxstr_t tmp;
|
||||
qse_nwad_t tmpad;
|
||||
|
||||
QSE_MEMSET (&tmpad, 0, QSE_SIZEOF(tmpad));
|
||||
@ -227,7 +227,7 @@ int qse_wcsntonwad (const qse_wchar_t* str, qse_size_t len, qse_nwad_t* nwad)
|
||||
{
|
||||
const qse_wchar_t* p;
|
||||
const qse_wchar_t* end;
|
||||
qse_wcstr_t tmp;
|
||||
qse_wxstr_t tmp;
|
||||
qse_nwad_t tmpad;
|
||||
|
||||
QSE_MEMSET (&tmpad, 0, QSE_SIZEOF(tmpad));
|
||||
|
@ -33,7 +33,7 @@ struct comp_t
|
||||
{
|
||||
qse_rex_t* rex;
|
||||
|
||||
qse_cstr_t re;
|
||||
qse_xstr_t re;
|
||||
|
||||
const qse_char_t* ptr;
|
||||
const qse_char_t* end;
|
||||
@ -490,7 +490,7 @@ else qse_printf (QSE_T("getc => %c\n"), com->c);
|
||||
|
||||
struct ccinfo_t
|
||||
{
|
||||
qse_cstr_t name;
|
||||
qse_xstr_t name;
|
||||
int (*func) (exec_t* e, qse_char_t c);
|
||||
};
|
||||
|
||||
@ -1982,8 +1982,8 @@ static void fini_exec_dds (exec_t* e)
|
||||
}
|
||||
|
||||
int qse_rex_exec (
|
||||
qse_rex_t* rex, const qse_cstr_t* str,
|
||||
const qse_cstr_t* substr, qse_cstr_t* matstr)
|
||||
qse_rex_t* rex, const qse_xstr_t* str,
|
||||
const qse_xstr_t* substr, qse_xstr_t* matstr)
|
||||
{
|
||||
exec_t e;
|
||||
int n = 0;
|
||||
@ -2061,8 +2061,8 @@ void* qse_buildrex (
|
||||
int qse_matchrex (
|
||||
qse_mmgr_t* mmgr, qse_size_t depth,
|
||||
void* code, int option,
|
||||
const qse_cstr_t* str, const qse_cstr_t* substr,
|
||||
qse_cstr_t* match, qse_rex_errnum_t* errnum)
|
||||
const qse_xstr_t* str, const qse_xstr_t* substr,
|
||||
qse_xstr_t* match, qse_rex_errnum_t* errnum)
|
||||
{
|
||||
qse_rex_t rex;
|
||||
int n;
|
||||
|
@ -92,7 +92,7 @@ qse_mchar_t* qse_mbsadup (const qse_mchar_t* str[], qse_size_t* len, qse_mmgr_t*
|
||||
return buf;
|
||||
}
|
||||
|
||||
qse_mchar_t* qse_mcstrdup (const qse_mcstr_t* str, qse_mmgr_t* mmgr)
|
||||
qse_mchar_t* qse_mcstrdup (const qse_mxstr_t* str, qse_mmgr_t* mmgr)
|
||||
{
|
||||
qse_mchar_t* buf;
|
||||
|
||||
@ -106,7 +106,7 @@ qse_mchar_t* qse_mcstrdup (const qse_mcstr_t* str, qse_mmgr_t* mmgr)
|
||||
return buf;
|
||||
}
|
||||
|
||||
qse_mchar_t* qse_mcstradup (const qse_mcstr_t str[], qse_size_t* len, qse_mmgr_t* mmgr)
|
||||
qse_mchar_t* qse_mcstradup (const qse_mxstr_t str[], qse_size_t* len, qse_mmgr_t* mmgr)
|
||||
{
|
||||
qse_mchar_t* buf, * ptr;
|
||||
qse_size_t i;
|
||||
@ -201,7 +201,7 @@ qse_wchar_t* qse_wcsadup (const qse_wchar_t* str[], qse_size_t* len, qse_mmgr_t*
|
||||
return buf;
|
||||
}
|
||||
|
||||
qse_wchar_t* qse_wcstrdup (const qse_wcstr_t* str, qse_mmgr_t* mmgr)
|
||||
qse_wchar_t* qse_wcstrdup (const qse_wxstr_t* str, qse_mmgr_t* mmgr)
|
||||
{
|
||||
qse_wchar_t* buf;
|
||||
|
||||
@ -215,7 +215,7 @@ qse_wchar_t* qse_wcstrdup (const qse_wcstr_t* str, qse_mmgr_t* mmgr)
|
||||
return buf;
|
||||
}
|
||||
|
||||
qse_wchar_t* qse_wcstradup (const qse_wcstr_t str[], qse_size_t* len, qse_mmgr_t* mmgr)
|
||||
qse_wchar_t* qse_wcstradup (const qse_wxstr_t str[], qse_size_t* len, qse_mmgr_t* mmgr)
|
||||
{
|
||||
qse_wchar_t* buf, * ptr;
|
||||
qse_size_t i;
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#undef T
|
||||
#undef char_t
|
||||
#undef cstr_t
|
||||
#undef xstr_t
|
||||
#undef strfcpy
|
||||
#undef strfncpy
|
||||
#undef strxfcpy
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
#define T(x) QSE_MT(x)
|
||||
#define char_t qse_mchar_t
|
||||
#define cstr_t qse_mcstr_t
|
||||
#define xstr_t qse_mxstr_t
|
||||
#define strfcpy qse_mbsfcpy
|
||||
#define strfncpy qse_mbsfncpy
|
||||
#define strxfcpy qse_mbsxfcpy
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
#undef T
|
||||
#undef char_t
|
||||
#undef cstr_t
|
||||
#undef xstr_t
|
||||
#undef strfcpy
|
||||
#undef strfncpy
|
||||
#undef strxfcpy
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
#define T(x) QSE_WT(x)
|
||||
#define char_t qse_wchar_t
|
||||
#define cstr_t qse_wcstr_t
|
||||
#define xstr_t qse_wxstr_t
|
||||
#define strfcpy qse_wcsfcpy
|
||||
#define strfncpy qse_wcsfncpy
|
||||
#define strxfcpy qse_wcsxfcpy
|
||||
|
@ -64,7 +64,7 @@ qse_size_t strfcpy (
|
||||
}
|
||||
|
||||
qse_size_t strfncpy (
|
||||
char_t* buf, const char_t* fmt, const cstr_t str[])
|
||||
char_t* buf, const char_t* fmt, const xstr_t str[])
|
||||
{
|
||||
char_t* b = buf;
|
||||
const char_t* f = fmt;
|
||||
@ -181,7 +181,7 @@ fini:
|
||||
|
||||
qse_size_t strxfncpy (
|
||||
char_t* buf, qse_size_t bsz,
|
||||
const char_t* fmt, const cstr_t str[])
|
||||
const char_t* fmt, const xstr_t str[])
|
||||
{
|
||||
char_t* b = buf;
|
||||
char_t* end = buf + bsz - 1;
|
||||
|
@ -23,7 +23,7 @@
|
||||
/* ----------------------------------- */
|
||||
|
||||
#undef char_t
|
||||
#undef cstr_t
|
||||
#undef xstr_t
|
||||
#undef T
|
||||
#undef NOBUF
|
||||
#undef strlen
|
||||
@ -34,7 +34,7 @@
|
||||
#undef strxnsubst
|
||||
|
||||
#define char_t qse_mchar_t
|
||||
#define cstr_t qse_mcstr_t
|
||||
#define xstr_t qse_mxstr_t
|
||||
#define T(x) QSE_MT(x)
|
||||
#define NOBUF QSE_MBSSUBST_NOBUF
|
||||
#define strlen qse_mbslen
|
||||
@ -48,7 +48,7 @@
|
||||
/* ----------------------------------- */
|
||||
|
||||
#undef char_t
|
||||
#undef cstr_t
|
||||
#undef xstr_t
|
||||
#undef T
|
||||
#undef NOBUF
|
||||
#undef strlen
|
||||
@ -59,7 +59,7 @@
|
||||
#undef strxnsubst
|
||||
|
||||
#define char_t qse_wchar_t
|
||||
#define cstr_t qse_wcstr_t
|
||||
#define xstr_t qse_wxstr_t
|
||||
#define T(x) QSE_WT(x)
|
||||
#define NOBUF QSE_WCSSUBST_NOBUF
|
||||
#define strlen qse_wcslen
|
||||
|
@ -18,12 +18,12 @@
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(char_t) && !defined(cstr_t) && !defined(strxsubst)
|
||||
#if !defined(char_t) && !defined(xstr_t) && !defined(strxsubst)
|
||||
# error Never include this file
|
||||
#endif
|
||||
|
||||
static const char_t* scan_dollar (
|
||||
const char_t* f, qse_size_t l, cstr_t* ident, cstr_t* dfl, int depth)
|
||||
const char_t* f, qse_size_t l, xstr_t* ident, xstr_t* dfl, int depth)
|
||||
{
|
||||
const char_t* end = f + l;
|
||||
|
||||
@ -89,7 +89,7 @@ static const char_t* scan_dollar (
|
||||
}
|
||||
|
||||
static char_t* expand_dollar (
|
||||
char_t* buf, qse_size_t bsz, const cstr_t* ident, const cstr_t* dfl,
|
||||
char_t* buf, qse_size_t bsz, const xstr_t* ident, const xstr_t* dfl,
|
||||
subst_t subst, void* ctx)
|
||||
{
|
||||
char_t* tmp;
|
||||
@ -138,7 +138,7 @@ qse_size_t strxnsubst (
|
||||
if (*(f + 1) == T('{'))
|
||||
{
|
||||
const char_t* tmp;
|
||||
cstr_t ident, dfl;
|
||||
xstr_t ident, dfl;
|
||||
|
||||
tmp = scan_dollar (f, fend - f, &ident, &dfl, 0);
|
||||
if (tmp == QSE_NULL || ident.len <= 0) goto normal;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <qse/cmn/chr.h>
|
||||
|
||||
qse_mchar_t* qse_mbstok (
|
||||
const qse_mchar_t* s, const qse_mchar_t* delim, qse_mcstr_t* tok)
|
||||
const qse_mchar_t* s, const qse_mchar_t* delim, qse_mxstr_t* tok)
|
||||
{
|
||||
const qse_mchar_t* p = s, *d;
|
||||
const qse_mchar_t* sp = QSE_NULL, * ep = QSE_NULL;
|
||||
@ -98,7 +98,7 @@ exit_loop:
|
||||
|
||||
qse_mchar_t* qse_mbsxtok (
|
||||
const qse_mchar_t* s, qse_size_t len,
|
||||
const qse_mchar_t* delim, qse_mcstr_t* tok)
|
||||
const qse_mchar_t* delim, qse_mxstr_t* tok)
|
||||
{
|
||||
const qse_mchar_t* p = s, *d;
|
||||
const qse_mchar_t* end = s + len;
|
||||
@ -178,7 +178,7 @@ exit_loop:
|
||||
|
||||
qse_mchar_t* qse_mbsxntok (
|
||||
const qse_mchar_t* s, qse_size_t len,
|
||||
const qse_mchar_t* delim, qse_size_t delim_len, qse_mcstr_t* tok)
|
||||
const qse_mchar_t* delim, qse_size_t delim_len, qse_mxstr_t* tok)
|
||||
{
|
||||
const qse_mchar_t* p = s, *d;
|
||||
const qse_mchar_t* end = s + len;
|
||||
@ -259,7 +259,7 @@ exit_loop:
|
||||
|
||||
|
||||
qse_wchar_t* qse_wcstok (
|
||||
const qse_wchar_t* s, const qse_wchar_t* delim, qse_wcstr_t* tok)
|
||||
const qse_wchar_t* s, const qse_wchar_t* delim, qse_wxstr_t* tok)
|
||||
{
|
||||
const qse_wchar_t* p = s, *d;
|
||||
const qse_wchar_t* sp = QSE_NULL, * ep = QSE_NULL;
|
||||
@ -335,7 +335,7 @@ exit_loop:
|
||||
|
||||
qse_wchar_t* qse_wcsxtok (
|
||||
const qse_wchar_t* s, qse_size_t len,
|
||||
const qse_wchar_t* delim, qse_wcstr_t* tok)
|
||||
const qse_wchar_t* delim, qse_wxstr_t* tok)
|
||||
{
|
||||
const qse_wchar_t* p = s, *d;
|
||||
const qse_wchar_t* end = s + len;
|
||||
@ -415,7 +415,7 @@ exit_loop:
|
||||
|
||||
qse_wchar_t* qse_wcsxntok (
|
||||
const qse_wchar_t* s, qse_size_t len,
|
||||
const qse_wchar_t* delim, qse_size_t delim_len, qse_wcstr_t* tok)
|
||||
const qse_wchar_t* delim, qse_size_t delim_len, qse_wxstr_t* tok)
|
||||
{
|
||||
const qse_wchar_t* p = s, *d;
|
||||
const qse_wchar_t* end = s + len;
|
||||
|
Reference in New Issue
Block a user