mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 11:48:51 +00:00
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:
parent
00ae9dbccb
commit
4be158c988
3 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue