summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-04-05 11:37:06 +0200
committerJim Meyering <meyering@redhat.com>2011-09-15 10:56:34 +0200
commit875ead86cca8f52129cef813ccc0f4c730dc0620 (patch)
treed3ea635d76b52fc0feb763fc4e903dedd7d517ad /src
parente0ddc20aede7255a9f287cac6f31ab55d4fb72d9 (diff)
downloadgrep-875ead86cca8f52129cef813ccc0f4c730dc0620.tar.gz
maint: dfa: improve comments
* src/dfa.c (match_mb_charset, match_anychar): Improve comments.
Diffstat (limited to 'src')
-rw-r--r--src/dfa.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/dfa.c b/src/dfa.c
index a0d644fb..5b5ed93d 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -2863,11 +2863,9 @@ transit_state_singlebyte (struct dfa *d, int s, unsigned char const *p,
return rval;
}
-/* Check whether period can match or not in the current context. If it can,
- return the amount of the bytes with which period can match, otherwise
- return 0.
- `pos' is the position of the period. `idx' is the index from the
- buf_begin, and it is the current position in the buffer. */
+/* Match a "." against the current context. buf_begin[IDX] is the
+ current position. Return the length of the match, in bytes.
+ POS is the position of the ".". */
static int
match_anychar (struct dfa *d, int s, position pos, int idx)
{
@@ -2903,11 +2901,10 @@ match_anychar (struct dfa *d, int s, position pos, int idx)
return mbclen;
}
-/* Check whether bracket expression can match or not in the current context.
- If it can, return the amount of the bytes with which expression can match,
- otherwise return 0.
- `pos' is the position of the bracket expression. `idx' is the index
- from the buf_begin, and it is the current position in the buffer. */
+/* Match a bracket expression against the current context.
+ buf_begin[IDX] is the current position.
+ Return the length of the match, in bytes.
+ POS is the position of the bracket expression. */
static int
match_mb_charset (struct dfa *d, int s, position pos, int idx)
{