From 3a2492d584e3c7d4cada1386921d80ace33c1fd2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 23 Sep 2021 20:51:04 -0700 Subject: WIP: working line breaks, formatting, etc. All seems functional, but a bit messy --- Lua/lbp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lua') diff --git a/Lua/lbp.c b/Lua/lbp.c index 0c81188..6ce03a6 100644 --- a/Lua/lbp.c +++ b/Lua/lbp.c @@ -36,7 +36,7 @@ static void push_matchstring(lua_State *L, match_t *m) char *buf = NULL; size_t size = 0; FILE *out = open_memstream(&buf, &size); - fprint_match(out, m->start, m); + fprint_match(out, m->start, m, NULL); fflush(out); lua_pushlstring(L, buf, size); fclose(out); @@ -184,7 +184,7 @@ static int Lreplace(lua_State *L) const char *prev = text; for (match_t *m = NULL; next_match(&m, NULL, text, &text[textlen], maybe_pat.value.pat, NULL, false); ) { fwrite(prev, sizeof(char), (size_t)(m->start - prev), out); - fprint_match(out, text, m); + fprint_match(out, text, m, NULL); prev = m->end; ++replacements; } -- cgit v1.2.3