fsck_util: rename: escape -> translit

In the `escape_control_chars()` function, we're not actually
"escaping" the characters, just replacing them.
This commit is contained in:
CismonX 2025-03-17 12:45:40 +08:00
parent 00ae9dbccb
commit 4be158c988
No known key found for this signature in database
GPG key ID: 3094873E29A482FB
3 changed files with 4 additions and 4 deletions

View file

@ -190,7 +190,7 @@ print_entry (
struct bookmarkfs_fsck_data const *data
) {
char name_buf[sizeof(data->name)];
escape_control_chars(name_buf, sizeof(name_buf), data->name, '?');
translit_control_chars(name_buf, sizeof(name_buf), data->name, '?');
printf("id: %" PRIu64 "\nname: %s\n", data->id, name_buf);
}

View file

@ -39,7 +39,7 @@ explain_fsck_result (
struct bookmarkfs_fsck_data const *data
) {
char name_buf[sizeof(data->name)];
escape_control_chars(name_buf, sizeof(name_buf), data->name, '?');
translit_control_chars(name_buf, sizeof(name_buf), data->name, '?');
#define PRINT_FSCK_RESULT(s, ...) \
printf("bookmark %" PRIu64 " name '%.*s' " s "\n", data->id, \
@ -78,7 +78,7 @@ explain_fsck_result (
}
int
escape_control_chars (
translit_control_chars (
char *restrict dst,
size_t dst_max,
char const *restrict src,

View file

@ -40,7 +40,7 @@ explain_fsck_result (
* Returns the number of characters replaced.
*/
int
escape_control_chars (
translit_control_chars (
char *restrict dst,
size_t dst_max,
char const *restrict src,