From d783cf4add50535e6f8f6ed0257cfeb2c7ae8153 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 1 Jul 2023 19:40:24 +0200 Subject: [PATCH] [string] string_replace -> el_string_replace --- src/dialogs/exmode.c | 2 +- src/document/gemini/renderer.c | 2 +- src/ecmascript/libdom/mujs/document.c | 2 +- src/ecmascript/libdom/quickjs/document.c | 2 +- src/ecmascript/libdom/spidermonkey/document.cpp | 2 +- src/util/string.c | 2 +- src/util/string.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dialogs/exmode.c b/src/dialogs/exmode.c index 7647c25b..ca116303 100644 --- a/src/dialogs/exmode.c +++ b/src/dialogs/exmode.c @@ -126,7 +126,7 @@ try_exmode_exec(struct session *ses, const char *val) return; } add_to_string(&inp, val); - string_replace(&res, &inp, &what, &replace); + el_string_replace(&res, &inp, &what, &replace); next = res.source; while (1) { diff --git a/src/document/gemini/renderer.c b/src/document/gemini/renderer.c index 2702c235..e5b05c8b 100644 --- a/src/document/gemini/renderer.c +++ b/src/document/gemini/renderer.c @@ -164,7 +164,7 @@ render_gemini_document(struct cache_entry *cached, struct document *document, || !strncmp(line.source + len - 3, "```", 3))) { preformat = !preformat; repl = preformat ? &pre_start : &pre_end; - string_replace(&html, &line, &gem_pre, repl); + el_string_replace(&html, &line, &gem_pre, repl); } else if (preformat) { add_string_to_string(&html, &line); add_char_to_string(&html, '\n'); diff --git a/src/ecmascript/libdom/mujs/document.c b/src/ecmascript/libdom/mujs/document.c index 5c52a98c..228082ec 100644 --- a/src/ecmascript/libdom/mujs/document.c +++ b/src/ecmascript/libdom/mujs/document.c @@ -912,7 +912,7 @@ mjs_document_replace(js_State *J) struct string nu_str; if (init_string(&nu_str)) { - string_replace(&nu_str, &f_data, &needle, &heystack); + el_string_replace(&nu_str, &f_data, &needle, &heystack); delete_entry_content(cached); /* TBD: somehow better rerender the document * now it's places on the session level in doc_loading_callback */ diff --git a/src/ecmascript/libdom/quickjs/document.c b/src/ecmascript/libdom/quickjs/document.c index 8e896b72..86e885f4 100644 --- a/src/ecmascript/libdom/quickjs/document.c +++ b/src/ecmascript/libdom/quickjs/document.c @@ -1001,7 +1001,7 @@ js_document_replace(JSContext *ctx, JSValueConst this_val, int argc, JSValueCons struct string nu_str; if (init_string(&nu_str)) { - string_replace(&nu_str, &f_data, &needle, &heystack); + el_string_replace(&nu_str, &f_data, &needle, &heystack); delete_entry_content(cached); /* TBD: somehow better rerender the document * now it's places on the session level in doc_loading_callback */ diff --git a/src/ecmascript/libdom/spidermonkey/document.cpp b/src/ecmascript/libdom/spidermonkey/document.cpp index e67367b1..7bb8d96c 100644 --- a/src/ecmascript/libdom/spidermonkey/document.cpp +++ b/src/ecmascript/libdom/spidermonkey/document.cpp @@ -1299,7 +1299,7 @@ document_replace(JSContext *ctx, unsigned int argc, JS::Value *vp) struct string nu_str; if (init_string(&nu_str)) { - string_replace(&nu_str, &f_data, &needle, &heystack); + el_string_replace(&nu_str, &f_data, &needle, &heystack); delete_entry_content(cached); /* TBD: somehow better rerender the document * now it's places on the session level in doc_loading_callback */ diff --git a/src/util/string.c b/src/util/string.c index 3d2c308b..4a4f687e 100644 --- a/src/util/string.c +++ b/src/util/string.c @@ -545,7 +545,7 @@ add_format_to_string(struct string *string, const char *format, ...) } void -string_replace(struct string *res, struct string *inp, struct string *what, struct string *repl) +el_string_replace(struct string *res, struct string *inp, struct string *what, struct string *repl) { struct string tmp; struct string tmp2; diff --git a/src/util/string.h b/src/util/string.h index a394a8c0..eaa505fd 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -317,7 +317,7 @@ struct string *add_to_ecmascript_string_list(LIST_OF(struct ecmascript_string_li void free_ecmascript_string_list(LIST_OF(struct ecmascript_string_list_item) *list); -void string_replace(struct string *res, struct string *inp, struct string *what, struct string *repl); +void el_string_replace(struct string *res, struct string *inp, struct string *what, struct string *repl); /** Returns an empty C string or @a str if different from NULL. */