aboutsummaryrefslogtreecommitdiffstats
path: root/src/expr.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2021-04-11 18:23:21 +0100
committerPádraig Brady <P@draigBrady.com>2021-04-11 18:33:45 +0100
commitef772bf97f7ec577754cbb5b278504d83cf41a43 (patch)
treeb6553bdc35b4d08368d427dbb3bb790acf43129c /src/expr.c
parentls: cache name width determination (diff)
downloadcoreutils-ef772bf97f7ec577754cbb5b278504d83cf41a43.tar.gz
coreutils-ef772bf97f7ec577754cbb5b278504d83cf41a43.zip
maint: use "char const *" rather than "const char *"
* cfg.mk (sc_prohibit-const-char): Add a new syntax-check to enforce this style. * *.[ch]: sed -i 's/const char \*/char const */g'
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expr.c b/src/expr.c
index 4893d948f..ec76f7607 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -114,7 +114,7 @@ static void printv (VALUE *v);
mbs_logical_cspn ('\xCE\xB1bc','\xCE\xB1') => 1
mbs_logical_cspn ('\xCE\xB1bc','c') => 3 */
static size_t
-mbs_logical_cspn (const char *s, const char *accept)
+mbs_logical_cspn (char const *s, char const *accept)
{
size_t idx = 0;
@@ -166,7 +166,7 @@ mbs_logical_cspn (const char *s, const char *accept)
Upon exit, sets v->s to the new string.
The new string might be empty if POS/LEN are invalid. */
static char *
-mbs_logical_substr (const char *s, size_t pos, size_t len)
+mbs_logical_substr (char const *s, size_t pos, size_t len)
{
char *v, *vlim;
@@ -221,7 +221,7 @@ mbs_logical_substr (const char *s, size_t pos, size_t len)
up to the first 4 bytes (The U+2767 which occupies 3 bytes and 'x'):
mbs_count_to_offset ("\xE2\x9D\xA7xyz", 4) => 2 */
static size_t
-mbs_offset_to_chars (const char *s, size_t ofs)
+mbs_offset_to_chars (char const *s, size_t ofs)
{
mbui_iterator_t iter;
size_t c = 0;
@@ -584,7 +584,7 @@ static VALUE *
docolon (VALUE *sv, VALUE *pv)
{
VALUE *v IF_LINT ( = NULL);
- const char *errmsg;
+ char const *errmsg;
struct re_pattern_buffer re_buffer;
char fastmap[UCHAR_MAX + 1];
struct re_registers re_regs;