[master] b3eae40d5 vtc_process: Rename term_match_text*() functions

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Feb 7 17:35:05 UTC 2022


commit b3eae40d59af3f47080dbf65b3f8ef9887bd6e21
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Feb 7 18:17:21 2022 +0100

    vtc_process: Rename term_match_text*() functions
    
    To match (pun intended) the naming convention in other places, keep
    "match" for regular expressions matching.

diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c
index 7387dfa39..d9d5ddaad 100644
--- a/bin/varnishtest/vtc_process.c
+++ b/bin/varnishtest/vtc_process.c
@@ -256,7 +256,7 @@ term_resize(struct process *pp, int lin, int col)
 }
 
 static int
-term_match_textline(const struct process *pp, int *x, int y, const char *pat)
+term_find_textline(const struct process *pp, int *x, int y, const char *pat)
 {
 	const char *t;
 
@@ -275,19 +275,19 @@ term_match_textline(const struct process *pp, int *x, int y, const char *pat)
 }
 
 static int
-term_match_text(const struct process *pp, int *x, int *y, const char *pat)
+term_find_text(const struct process *pp, int *x, int *y, const char *pat)
 {
 	int yy;
 
 	if (*y == 0) {
 		for (yy = 0; yy < pp->nlin; yy++) {
-			if (term_match_textline(pp, x, yy, pat)) {
+			if (term_find_textline(pp, x, yy, pat)) {
 				*y = yy + 1;
 				return (1);
 			}
 		}
 	} else if (*y <= pp->nlin) {
-		if (term_match_textline(pp, x, *y - 1, pat))
+		if (term_find_textline(pp, x, *y - 1, pat))
 			return (1);
 	}
 	return (0);
@@ -310,7 +310,7 @@ term_expect_text(struct process *pp,
 		vtc_fatal(pp->vl, "XXX %d ncol %d", x, pp->ncol);
 	l = strlen(pat);
 	AZ(pthread_mutex_lock(&pp->mtx));
-	while (!term_match_text(pp, &x, &y, pat)) {
+	while (!term_find_text(pp, &x, &y, pat)) {
 		if (x != 0 && y != 0) {
 			t = pp->vram[y - 1] + x - 1;
 			vtc_log(pp->vl, 4,


More information about the varnish-commit mailing list