GNU bug report logs - #26779
expr length

Previous Next

Package: coreutils;

Reported by: Андрей Воронов <voronov <at> factor-ts.ru>

Date: Thu, 4 May 2017 15:24:02 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Assaf Gordon <assafgordon <at> gmail.com>, Pádraig Brady <P <at> draigBrady.com>
Cc: 26779 <at> debbugs.gnu.org, Андрей Воронов <voronov <at> factor-ts.ru>
Subject: bug#26779: expr length
Date: Thu, 18 May 2017 22:47:33 -0700
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....




This bug report was last modified 8 years and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.