[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26779: expr length
From: |
Paul Eggert |
Subject: |
bug#26779: expr length |
Date: |
Thu, 18 May 2017 22:47:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
Assaf Gordon wrote:
The downside of 'mbstowcs' is that it fails and does not continue
when it encounters invalid multibyte sequences,
It's OK for expr to report an error and exit in that case, which should be
simple.
It's not a big deal.
I fixed the one case I spotted - if I missed any, please let me know
("make syntax-check" passes, but there could be others).
char* -> char *
MB_CUR_MAX==1 -> MB_CUR_MAX == 1
mbs_logical_cspn ('hello','a') -> mbs_logical_cspn ('hello', 'a') [in a comment]
const char *_string -> const char *string
* mbui_cur_ptr (iter) -> *mbui_cur_ptr (iter)
(s+1) -> s + 1
Put */ at end of last line of comment, not at start of next.
MB_CUR_MAX>1 -> MB_CUR_MAX > 1
xmalloc ( blen + 1 ) -> xmalloc (blen + 1)
idx<pos -> idx < pos
mempcpy ( vlim -> mempcpy (vlim
d>=ofs -> d >= ofs
size_t c=0; -> size_t c = 0;
No need to use "const" on locals, unless perhaps you take their address.
Probably more instances; got tired of looking....