diff --git a/lib/util.c b/lib/util.c index 315b00989..732a18afb 100644 --- a/lib/util.c +++ b/lib/util.c @@ -393,20 +393,7 @@ fake_name_quote (const char *s, int quote_percent) /* --------------------------------------------------------------------------------------------- */ /** - * Remove the middle part of the string to fit given length. - * Use "~" to show where the string was truncated. - * Return static buffer, no need to free() it. - */ - -const char * -name_trunc (const char *txt, size_t trunc_len) -{ - return str_trunc (txt, trunc_len); -} - -/* --------------------------------------------------------------------------------------------- */ -/** - * path_trunc() is the same as name_trunc() above but + * path_trunc() is the same as str_trunc() but * it deletes possible password from path for security * reasons. */ diff --git a/lib/util.h b/lib/util.h index 71cc6473a..b5e1bdada 100644 --- a/lib/util.h +++ b/lib/util.h @@ -115,12 +115,7 @@ char *name_quote (const char *c, int quote_percent); /* returns a duplicate of c. */ char *fake_name_quote (const char *c, int quote_percent); -/* Remove the middle part of the string to fit given length. - * Use "~" to show where the string was truncated. - * Return static buffer, no need to free() it. */ -const char *name_trunc (const char *txt, size_t trunc_len); - -/* path_trunc() is the same as name_trunc() above but +/* path_trunc() is the same as str_trunc() but * it deletes possible password from path for security * reasons. */ const char *path_trunc (const char *path, size_t trunc_len); diff --git a/src/chmod.c b/src/chmod.c index b55e9c040..1063089e2 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -81,7 +81,7 @@ static int c_file, end_chmod; static mode_t and_mask, or_mask, c_stat; -/* FIXME: these variables are superfluous, aren't they? (hint: name_trunc +/* FIXME: these variables are superfluous, aren't they? (hint: str_trunc * returns a pointer to a static buffer, and label_new creates its own copy * of its argument) * --rillig, 2004-08-29 */ diff --git a/src/file.c b/src/file.c index 5fd182cda..afe74b28f 100644 --- a/src/file.c +++ b/src/file.c @@ -1604,7 +1604,7 @@ compute_dir_size_update_ui (const void *ui, const char *dirname) if (ui == NULL) return FILE_CONT; - label_set_text (this->dirname, name_trunc (dirname, this->dlg->cols - 6)); + label_set_text (this->dirname, str_trunc (dirname, this->dlg->cols - 6)); event.x = -1; /* Don't show the GPM cursor */ c = tty_get_event (&event, FALSE, FALSE);