diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-12-30 00:52:10 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-12-30 00:52:10 -0800 |
commit | bc5ac38040eb49c751e39700651f2b98cd866228 (patch) | |
tree | b2a68a3910a24b36b6a0dee84ba3013ceb2c1884 /src | |
parent | eac1e4d50a73bb33c35e5f9f95a201e22d295827 (diff) | |
download | grep-bc5ac38040eb49c751e39700651f2b98cd866228.tar.gz |
doc: spell "back-reference" more consistently
Diffstat (limited to 'src')
-rw-r--r-- | src/dfasearch.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dfasearch.c b/src/dfasearch.c index b1a242a5..0160d718 100644 --- a/src/dfasearch.c +++ b/src/dfasearch.c @@ -103,8 +103,8 @@ kwsmusts (struct dfa_comp *dc) dfamustfree (dm); } -/* Return true if KEYS, of length LEN, might contain a backreference. - Return false if KEYS cannot contain a backreference. +/* Return true if KEYS, of length LEN, might contain a back-reference. + Return false if KEYS cannot contain a back-reference. BS_SAFE is true of encodings where a backslash cannot appear as the last byte of a multibyte character. */ static bool _GL_ATTRIBUTE_PURE @@ -116,13 +116,13 @@ possible_backrefs_in_pattern (char const *keys, ptrdiff_t len, bool bs_safe) multibyte character. */ int second_backslash = bs_safe ? '\\' : CHAR_MAX + 1; - /* This code can return true even if KEYS lacks a backreference, for + /* This code can return true even if KEYS lacks a back-reference, for patterns like [\2], or for encodings where '\' appears as the last byte of a multibyte character. However, false alarms should be rare and do not affect correctness. */ /* Do not look for a backslash in the pattern's last byte, since it - can't be part of a backreference and this streamlines the code. */ + can't be part of a back-reference and this streamlines the code. */ len--; if (0 <= len) @@ -204,7 +204,7 @@ GEAcompile (char *pattern, size_t size, reg_syntax_t syntax_bits) char const *prev = pattern; - /* Buffer containing backreference-free patterns. */ + /* Buffer containing back-reference-free patterns. */ char *buf = NULL; ptrdiff_t buflen = 0; size_t bufalloc = 0; @@ -449,7 +449,7 @@ EGexecute (void *vdc, char const *buf, size_t size, size_t *match_size, end = memchr (next_beg, eol, buflim - next_beg); end = end ? end + 1 : buflim; - /* Successful, no backreferences encountered! */ + /* Successful, no back-references encountered! */ if (!backref) goto success; ptr = beg; |