GNU bug report logs - #34951
[PATCH] grep: a kwset matcher not work in a grep matcher

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Sat, 23 Mar 2019 02:30:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 34951 <at> debbugs.gnu.org (full text, mbox):

From: arnold <at> skeeve.com
To: noritnk <at> kcn.ne.jp, eggert <at> cs.ucla.edu, 34951 <at> debbugs.gnu.org
Cc: arnold <at> skeeve.com, bug-gnulib <at> gnu.org
Subject: Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep
 matcher
Date: Thu, 12 Dec 2019 00:31:06 -0700
Hi Paul.

Paul Eggert <eggert <at> cs.ucla.edu> wrote:

> https://lists.gnu.org/r/bug-gnulib/2019-12/msg00058.html
> https://lists.gnu.org/r/bug-gnulib/2019-12/msg00059.html

Looking at this:

| @@ -1733,11 +1733,11 @@ add_utf8_anychar (struct dfa *dfa)
|      /* f0-f7: 4-byte sequence.  */
|      CHARCLASS_INIT (0, 0, 0, 0, 0, 0, 0, 0xff0000)
|    };
| -  const unsigned int n = sizeof (utf8_classes) / sizeof (utf8_classes[0]);
| +  int n = sizeof utf8_classes / sizeof *utf8_classes;

Why are you throwing away const here?

Other than this, I think internally too, I'd prefer that you

	1,$s/ptrdiff_t/ssize_t/g

(and fix any printf calls).  It just feels like an abuse of
the type, which is for representing differences between pointers,
and not regular large signed integeers.

However, I'm not going to insist about it internally, whereas
I would object strongly to the use of ptrdiff_t in the API.

Thanks!

Arnold




This bug report was last modified 5 years and 153 days ago.

Previous Next


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