[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.21-46-g5dffb9c
From: |
Jim Meyering |
Subject: |
grep branch, master, updated. v2.21-46-g5dffb9c |
Date: |
Mon, 06 Jul 2015 01:44:01 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via 5dffb9cbf9223c5cd923f5c0da9583db95b9e8d0 (commit)
from ebd293f8a18a3ebbbbf108a04b58d417c6e34516 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=5dffb9cbf9223c5cd923f5c0da9583db95b9e8d0
commit 5dffb9cbf9223c5cd923f5c0da9583db95b9e8d0
Author: Jim Meyering <address@hidden>
Date: Wed Sep 24 08:44:28 2014 -0700
maint: dfa: used unsigned types where appropriate
* src/dfa.c (case_folded_counterparts): Return unsigned int, not int.
Change type of two locals to unsigned int, to reflect that their
values are never negative.
(parse_bracket_exp): Adjust type of result at each use, as well
as that of related index variables.
diff --git a/src/dfa.c b/src/dfa.c
index 2f82282..565446d 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -910,11 +910,11 @@ enum
/* Find the characters equal to C after case-folding, other than C
itself, and store them into FOLDED. Return the number of characters
stored. */
-static int
+static unsigned int
case_folded_counterparts (wchar_t c, wchar_t folded[CASE_FOLDED_BUFSIZE])
{
- int i;
- int n = 0;
+ unsigned int i;
+ unsigned int n = 0;
wint_t uc = towupper (c);
wint_t lc = towlower (uc);
if (uc != c)
@@ -1201,9 +1201,10 @@ parse_bracket_exp (void)
else
{
wchar_t folded[CASE_FOLDED_BUFSIZE + 1];
- int i;
- int n = (case_fold ? case_folded_counterparts (wc, folded + 1) + 1
- : 1);
+ unsigned int i;
+ unsigned int n = (case_fold
+ ? case_folded_counterparts (wc, folded + 1) + 1
+ : 1);
folded[0] = wc;
for (i = 0; i < n; i++)
if (!setbit_wc (folded[i], ccl))
@@ -1829,7 +1830,7 @@ atom (void)
if (case_fold)
{
wchar_t folded[CASE_FOLDED_BUFSIZE];
- int i, n = case_folded_counterparts (wctok, folded);
+ unsigned int i, n = case_folded_counterparts (wctok, folded);
for (i = 0; i < n; i++)
{
addtok_wc (folded[i]);
-----------------------------------------------------------------------
Summary of changes:
src/dfa.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.21-46-g5dffb9c,
Jim Meyering <=