summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-04-13 15:08:09 +0200
committerJim Meyering <meyering@redhat.com>2012-04-13 15:08:09 +0200
commit7f91ae570b381a425b771c27f56dfef3bc22d600 (patch)
treeb4f3685605145f054e728d44e885708f71c94dbf /src
parent6e6c1fb5e8c7fc7fe260e809e3bcdc0927d519cf (diff)
downloadgrep-7f91ae570b381a425b771c27f56dfef3bc22d600.tar.gz
maint: dfa: add/improve comments
* src/dfa.c (transit_state_consume_1char): Note always-ignored return value. Fix typos: s/equivalent class/equivalence class/.
Diffstat (limited to 'src')
-rw-r--r--src/dfa.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dfa.c b/src/dfa.c
index cd243fba..e686687b 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -313,7 +313,7 @@ struct mb_char_classes
wchar_t *range_sts; /* Range characters (start of the range). */
wchar_t *range_ends; /* Range characters (end of the range). */
size_t nranges;
- char **equivs; /* Equivalent classes. */
+ char **equivs; /* Equivalence classes. */
size_t nequivs;
char **coll_elems;
size_t ncoll_elems; /* Collating elements. */
@@ -1027,7 +1027,7 @@ parse_bracket_exp (void)
char *elem = xmemdup (str, len + 1);
if (c1 == '=')
- /* build equivalent class. */
+ /* build equivalence class. */
{
REALLOC_IF_NECESSARY (work_mbc->equivs,
equivs_al, work_mbc->nequivs + 1);
@@ -3012,7 +3012,7 @@ match_mb_charset (struct dfa *d, state_num s, position pos, size_t idx)
strncpy (buffer, (char const *) buf_begin + idx, match_len);
buffer[match_len] = '\0';
- /* match with an equivalent class? */
+ /* match with an equivalence class? */
for (i = 0; i < work_mbc->nequivs; i++)
{
op_len = strlen (work_mbc->equivs[i]);
@@ -3147,6 +3147,8 @@ transit_state_consume_1char (struct dfa *d, state_num s,
if (match_lens == NULL && work_mbls != NULL)
free (work_mbls);
+
+ /* FIXME: this return value is always ignored. */
return rs;
}