diff --git a/mio/lib/mio-utl.h b/mio/lib/mio-utl.h index 9fcffa1..da99392 100644 --- a/mio/lib/mio-utl.h +++ b/mio/lib/mio-utl.h @@ -469,18 +469,17 @@ MIO_EXPORT mio_bch_t* mio_find_bchar_in_bcstr ( ); MIO_EXPORT mio_uch_t* mio_trim_uchars ( - mio_uch_t* str, - mio_oow_t* len, - int flags + const mio_uch_t* str, + mio_oow_t* len, + int flags ); MIO_EXPORT mio_bch_t* mio_trim_bchars ( - mio_bch_t* str, - mio_oow_t* len, - int flags + const mio_bch_t* str, + mio_oow_t* len, + int flags ); - MIO_EXPORT int mio_split_ucstr ( mio_uch_t* s, const mio_uch_t* delim, diff --git a/mio/lib/utl.c b/mio/lib/utl.c index fc3678f..69fd591 100644 --- a/mio/lib/utl.c +++ b/mio/lib/utl.c @@ -639,9 +639,9 @@ const mio_uch_t* mio_find_ucstr_word_in_ucstr (const mio_uch_t* str, const mio_u /* ========================================================================= */ -mio_uch_t* mio_trim_uchars (mio_uch_t* str, mio_oow_t* len, int flags) +mio_uch_t* mio_trim_uchars (const mio_uch_t* str, mio_oow_t* len, int flags) { - mio_uch_t* p = str, * end = str + *len; + const mio_uch_t* p = str, * end = str + *len; if (p < end) { @@ -678,12 +678,12 @@ mio_uch_t* mio_trim_uchars (mio_uch_t* str, mio_oow_t* len, int flags) } } - return str; + return (mio_uch_t*)str; } -mio_bch_t* mio_trim_bchars (mio_bch_t* str, mio_oow_t* len, int flags) +mio_bch_t* mio_trim_bchars (const mio_bch_t* str, mio_oow_t* len, int flags) { - mio_bch_t* p = str, * end = str + *len; + const mio_bch_t* p = str, * end = str + *len; if (p < end) { @@ -720,7 +720,7 @@ mio_bch_t* mio_trim_bchars (mio_bch_t* str, mio_oow_t* len, int flags) } } - return str; + return (mio_bch_t*)str; } /* ========================================================================= */