mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
FSP: display_entry() cleanup, and mark directories by an ending /
in lists.
This commit is contained in:
parent
0c4bc5a362
commit
af2cc87054
@ -84,13 +84,17 @@ compare(FSP_RDENTRY *a, FSP_RDENTRY *b)
|
|||||||
static void
|
static void
|
||||||
display_entry(FSP_RDENTRY *fentry, unsigned char dircolor[])
|
display_entry(FSP_RDENTRY *fentry, unsigned char dircolor[])
|
||||||
{
|
{
|
||||||
printf("%10d\t<a href=\"%s%s\">", fentry->size,
|
printf("%10d\t<a href=\"%s", fentry->size, fentry->name);
|
||||||
fentry->name, fentry->type == FSP_RDTYPE_DIR ? "/" : "");
|
if (fentry->type == FSP_RDTYPE_DIR) {
|
||||||
if (fentry->type == FSP_RDTYPE_DIR && *dircolor)
|
printf("/\">");
|
||||||
|
if (*dircolor)
|
||||||
printf("<font color=\"%s\"><b>", dircolor);
|
printf("<font color=\"%s\"><b>", dircolor);
|
||||||
printf("%s", fentry->name);
|
printf("%s/", fentry->name);
|
||||||
if (fentry->type == FSP_RDTYPE_DIR && *dircolor)
|
if (*dircolor)
|
||||||
printf("</b></font>");
|
printf("</b></font>");
|
||||||
|
} else {
|
||||||
|
printf("/\">%s", fentry->name);
|
||||||
|
}
|
||||||
puts("</a>");
|
puts("</a>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user