GNU bug report logs - #16729
suggested small refactoring in dfa.c

Previous Next

Package: grep;

Reported by: arnold <at> skeeve.com

Date: Wed, 12 Feb 2014 14:00:03 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#16729: closed (suggested small refactoring in dfa.c)
Date: Sat, 01 Mar 2014 06:57:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 28 Feb 2014 22:56:49 -0800
with message-id <531184B1.8030501 <at> cs.ucla.edu>
and subject line Re:  suggested small refactoring in dfa.c
has caused the debbugs.gnu.org bug report #16729,
regarding suggested small refactoring in dfa.c
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
16729: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16729
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: arnold <at> skeeve.com
To: bug-grep <at> gnu.org
Subject: suggested small refactoring in dfa.c
Date: Wed, 12 Feb 2014 06:58:53 -0700
Hi Jim, Paul.

Here is the small refactoring I suggest for dfa.c

Thanks,

Arnold
--------------------
diff --git a/dfa.c b/dfa.c
index d5e7fdf..dcd28e5 100644
--- a/dfa.c
+++ b/dfa.c
@@ -1767,18 +1767,19 @@ add_utf8_anychar (void)
 static void
 atom (void)
 {
-  if (0)
+  if (MBS_SUPPORT && tok == WCHAR)
     {
-      /* empty */
-    }
-  else if (MBS_SUPPORT && tok == WCHAR)
-    {
-      addtok_wc (case_fold ? towlower (wctok) : wctok);
-      if (case_fold && iswalpha (wctok))
-        {
-          addtok_wc (towupper (wctok));
-          addtok (OR);
-        }
+      if (! case_fold)
+        addtok_wc (wctok);
+      else
+      {
+        addtok_wc (towlower (wctok));
+        if (iswalpha (wctok))
+          {
+            addtok_wc (towupper (wctok));
+            addtok (OR);
+          }
+      }
 
       tok = lex ();
     }


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 16729-done <at> debbugs.gnu.org
Subject: Re:  suggested small refactoring in dfa.c
Date: Fri, 28 Feb 2014 22:56:49 -0800
My recent changes to dfa.c have incorporated the removal of that "if 
(0)" and have refactored the rest so I'm marking this bug as done.


This bug report was last modified 11 years and 144 days ago.

Previous Next


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