summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bin/hi.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/bin/hi.c b/bin/hi.c
index c3644d30..7c791909 100644
--- a/bin/hi.c
+++ b/bin/hi.c
@@ -61,7 +61,6 @@ struct Syntax {
 	bool newline;
 	size_t subexp;
 	const char *pattern;
-	const char *pattend;
 };
 
 #define WB "(^|[^_[:alnum:]]|\n)"
@@ -230,9 +229,6 @@ static void highlight(struct Language lang, enum Class *hi, const char *str) {
 	for (size_t i = 0; i < lang.len; ++i) {
 		struct Syntax syn = lang.syntax[i];
 		regex_t regex = compile(syn.pattern, syn.newline ? 0 : REG_NEWLINE);
-		regex_t regend = {0};
-		if (syn.pattend) regend = compile(syn.pattend, 0);
-
 		assert(syn.subexp < SubsLen);
 		assert(syn.subexp <= regex.re_nsub);
 		regmatch_t subs[SubsLen] = {{0}};
@@ -242,18 +238,6 @@ static void highlight(struct Language lang, enum Class *hi, const char *str) {
 			);
 			if (error == REG_NOMATCH) break;
 			if (error) errx(EX_SOFTWARE, "regexec: %d", error);
-
-			if (lang.syntax[i].pattend) {
-				regmatch_t end;
-				error = regexec(
-					&regend, &str[offset + subs[syn.subexp].rm_eo],
-					1, &end, REG_NOTBOL
-				);
-				if (error == REG_NOMATCH) break;
-				if (error) errx(EX_SOFTWARE, "regexec: %d", error);
-				subs[syn.subexp].rm_eo += end.rm_eo;
-			}
-
 			regmatch_t sub = subs[syn.subexp];
 			if (syn.parent) {
 				if (~syn.parent & SET(hi[offset + sub.rm_so])) continue;
@@ -263,7 +247,6 @@ static void highlight(struct Language lang, enum Class *hi, const char *str) {
 			}
 		}
 		regfree(&regex);
-		if (lang.syntax[i].pattend) regfree(&regend);
 	}
 }
 
@@ -281,10 +264,6 @@ static void check(void) {
 				);
 			}
 			regfree(&regex);
-			if (syn.pattend) {
-				regex = compile(syn.pattend, REG_NOSUB);
-				regfree(&regex);
-			}
 		}
 	}
 }
14dbab07f8cd68927cc9f7544cfc0d99706aa&follow=1'>Allow replacing empty string with fc old=newJune McEnroe 2019-01-13Enable warnings in libeditJune McEnroe 2019-01-13Show full path in RPS1June McEnroe 2019-01-13Shorten $HOME to ~ in prompt expansionJune McEnroe 2019-01-13Document PSlitJune McEnroe 2019-01-13Document PS0June McEnroe 2019-01-13Set PS0 in cashJune McEnroe 2019-01-13Add PS0June McEnroe 2019-01-13Change default ENV from cashrc to env.shJune McEnroe 2019-01-13Use colours in cash promptsJune McEnroe 2019-01-12Set PSlit like NetBSD shJune McEnroe 2019-01-12Install gnupg2 from pkgsrc and symlink gpgJune McEnroe 2019-01-12Reference cash builtin man pages in cash.1 SEE ALSOJune McEnroe 2019-01-12Restore cash builtin man page datesJune McEnroe 2019-01-12Use local libeditJune McEnroe 2019-01-12Replace libedit MakefileJune McEnroe 2019-01-11Import /usr/src/lib/libedit from NetBSD 8.0June McEnroe 2019-01-11Add PSlit for prompt escapesJune McEnroe 2019-01-11Don't make depend automaticallyJune McEnroe