aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2017-07-30 22:42:18 +0300
committerEli Zaretskii2017-07-30 22:42:18 +0300
commitdcfcaf40d577808d640016c886d4fae7280a7fd5 (patch)
tree446db878c5ce38a52e177bb059edf9475ca81eed
parentc8f44e4b53c40dfea1c83ad0ff3bd653e72c4f4e (diff)
downloademacs-dcfcaf40d577808d640016c886d4fae7280a7fd5.tar.gz
emacs-dcfcaf40d577808d640016c886d4fae7280a7fd5.zip
; Don't use non-ASCII quotes in comments
* src/regex.h: * src/regex.c (re_wctype_parse): Don't use non-ASCII quotes in comments.
-rw-r--r--src/regex.c8
-rw-r--r--src/regex.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/regex.c b/src/regex.c
index fb48765c96c..0dbb47309e4 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1942,7 +1942,7 @@ struct range_table_work_area
1942 returned. If name is not a valid character class name zero, or RECC_ERROR, 1942 returned. If name is not a valid character class name zero, or RECC_ERROR,
1943 is returned. 1943 is returned.
1944 1944
1945 Otherwise, if *strp doesnt begin with "[:name:]", -1 is returned. 1945 Otherwise, if *strp doesn't begin with "[:name:]", -1 is returned.
1946 1946
1947 The function can be used on ASCII and multibyte (UTF-8-encoded) strings. 1947 The function can be used on ASCII and multibyte (UTF-8-encoded) strings.
1948 */ 1948 */
@@ -1954,8 +1954,8 @@ re_wctype_parse (const unsigned char **strp, unsigned limit)
1954 if (limit < 4 || beg[0] != '[' || beg[1] != ':') 1954 if (limit < 4 || beg[0] != '[' || beg[1] != ':')
1955 return -1; 1955 return -1;
1956 1956
1957 beg += 2; /* skip opening [: */ 1957 beg += 2; /* skip opening "[:" */
1958 limit -= 3; /* opening [: and half of closing :]; --limit handles rest */ 1958 limit -= 3; /* opening "[:" and half of closing ":]"; --limit handles rest */
1959 for (it = beg; it[0] != ':' || it[1] != ']'; ++it) 1959 for (it = beg; it[0] != ':' || it[1] != ']'; ++it)
1960 if (!--limit) 1960 if (!--limit)
1961 return -1; 1961 return -1;
@@ -1985,7 +1985,7 @@ re_wctype_parse (const unsigned char **strp, unsigned limit)
1985 2 [:cntrl:] 1985 2 [:cntrl:]
1986 1 [:ff:] 1986 1 [:ff:]
1987 1987
1988 If you update this list, consider also updating chain of ored conditions 1988 If you update this list, consider also updating chain of or'ed conditions
1989 in execute_charset function. 1989 in execute_charset function.
1990 */ 1990 */
1991 1991
diff --git a/src/regex.h b/src/regex.h
index 1d439de259c..5e3a79763ec 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -21,7 +21,7 @@
21#define _REGEX_H 1 21#define _REGEX_H 1
22 22
23#if defined emacs && (defined _REGEX_RE_COMP || defined _LIBC) 23#if defined emacs && (defined _REGEX_RE_COMP || defined _LIBC)
24/* Were not defining re_set_syntax and using a different prototype of 24/* We're not defining re_set_syntax and using a different prototype of
25 re_compile_pattern when building Emacs so fail compilation early with 25 re_compile_pattern when building Emacs so fail compilation early with
26 a (somewhat helpful) error message when conflict is detected. */ 26 a (somewhat helpful) error message when conflict is detected. */
27# error "_REGEX_RE_COMP nor _LIBC can be defined if emacs is defined." 27# error "_REGEX_RE_COMP nor _LIBC can be defined if emacs is defined."