diff options
author | pommicket <pommicket@gmail.com> | 2023-01-03 17:10:40 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-03 17:10:40 -0500 |
commit | 0d92c03f3998fe4d16f3ba928d3a94583755e1ce (patch) | |
tree | a2afad849822433ea795ce6bc216321722e754f2 /find.c | |
parent | baae904ed2c97ba5c701442ec5ef6900715f785d (diff) |
rename ted_seterr to ted_error
Diffstat (limited to 'find.c')
-rw-r--r-- | find.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -22,12 +22,12 @@ TextBuffer *find_search_buffer(Ted *ted) { } -static void ted_seterr_to_pcre2_err(Ted *ted, int err) { +static void ted_error_from_pcre2_error(Ted *ted, int err) { char32_t buf[256] = {0}; size_t len = (size_t)pcre2_get_error_message(err, buf, arr_count(buf) - 1); char *error_cstr = str32_to_utf8_cstr(str32(buf, len)); if (error_cstr) { - ted_seterr(ted, "Search error: %s.", error_cstr); + ted_error(ted, "Search error: %s.", error_cstr); free(error_cstr); } } @@ -51,7 +51,7 @@ static bool find_compile_pattern(Ted *ted) { } pcre2_match_data_free(match_data); } else { - ted_seterr(ted, "Out of memory."); + ted_error(ted, "Out of memory."); } } else { ted->find_invalid_pattern = false; @@ -256,11 +256,11 @@ static bool find_replace_match(Ted *ted, u32 match_idx) { } success = true; } else if (ret < 0) { - ted_seterr_to_pcre2_err(ted, ret); + ted_error_from_pcre2_error(ted, ret); } free(output_buffer); } else { - ted_seterr(ted, "Out of memory."); + ted_error(ted, "Out of memory."); } return success; } |