mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
[string] string_replace -> el_string_replace
This commit is contained in:
parent
d03273db63
commit
d783cf4add
@ -126,7 +126,7 @@ try_exmode_exec(struct session *ses, const char *val)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
add_to_string(&inp, val);
|
add_to_string(&inp, val);
|
||||||
string_replace(&res, &inp, &what, &replace);
|
el_string_replace(&res, &inp, &what, &replace);
|
||||||
next = res.source;
|
next = res.source;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -164,7 +164,7 @@ render_gemini_document(struct cache_entry *cached, struct document *document,
|
|||||||
|| !strncmp(line.source + len - 3, "```", 3))) {
|
|| !strncmp(line.source + len - 3, "```", 3))) {
|
||||||
preformat = !preformat;
|
preformat = !preformat;
|
||||||
repl = preformat ? &pre_start : &pre_end;
|
repl = preformat ? &pre_start : &pre_end;
|
||||||
string_replace(&html, &line, &gem_pre, repl);
|
el_string_replace(&html, &line, &gem_pre, repl);
|
||||||
} else if (preformat) {
|
} else if (preformat) {
|
||||||
add_string_to_string(&html, &line);
|
add_string_to_string(&html, &line);
|
||||||
add_char_to_string(&html, '\n');
|
add_char_to_string(&html, '\n');
|
||||||
|
@ -912,7 +912,7 @@ mjs_document_replace(js_State *J)
|
|||||||
|
|
||||||
struct string nu_str;
|
struct string nu_str;
|
||||||
if (init_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);
|
delete_entry_content(cached);
|
||||||
/* TBD: somehow better rerender the document
|
/* TBD: somehow better rerender the document
|
||||||
* now it's places on the session level in doc_loading_callback */
|
* now it's places on the session level in doc_loading_callback */
|
||||||
|
@ -1001,7 +1001,7 @@ js_document_replace(JSContext *ctx, JSValueConst this_val, int argc, JSValueCons
|
|||||||
|
|
||||||
struct string nu_str;
|
struct string nu_str;
|
||||||
if (init_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);
|
delete_entry_content(cached);
|
||||||
/* TBD: somehow better rerender the document
|
/* TBD: somehow better rerender the document
|
||||||
* now it's places on the session level in doc_loading_callback */
|
* now it's places on the session level in doc_loading_callback */
|
||||||
|
@ -1299,7 +1299,7 @@ document_replace(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
|||||||
|
|
||||||
struct string nu_str;
|
struct string nu_str;
|
||||||
if (init_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);
|
delete_entry_content(cached);
|
||||||
/* TBD: somehow better rerender the document
|
/* TBD: somehow better rerender the document
|
||||||
* now it's places on the session level in doc_loading_callback */
|
* now it's places on the session level in doc_loading_callback */
|
||||||
|
@ -545,7 +545,7 @@ add_format_to_string(struct string *string, const char *format, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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 tmp;
|
||||||
struct string tmp2;
|
struct string tmp2;
|
||||||
|
@ -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 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. */
|
/** Returns an empty C string or @a str if different from NULL. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user