diff options
author | Jim Meyering <meyering@redhat.com> | 2010-04-05 11:37:06 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-09-15 10:56:34 +0200 |
commit | 875ead86cca8f52129cef813ccc0f4c730dc0620 (patch) | |
tree | d3ea635d76b52fc0feb763fc4e903dedd7d517ad /src | |
parent | e0ddc20aede7255a9f287cac6f31ab55d4fb72d9 (diff) | |
download | grep-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.c | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -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) { |