1
0
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:
Laurent MONIN 2006-01-29 18:01:22 +01:00 committed by Laurent MONIN
parent 0c4bc5a362
commit af2cc87054

View File

@ -84,13 +84,17 @@ compare(FSP_RDENTRY *a, FSP_RDENTRY *b)
static void
display_entry(FSP_RDENTRY *fentry, unsigned char dircolor[])
{
printf("%10d\t<a href=\"%s%s\">", fentry->size,
fentry->name, fentry->type == FSP_RDTYPE_DIR ? "/" : "");
if (fentry->type == FSP_RDTYPE_DIR && *dircolor)
printf("<font color=\"%s\"><b>", dircolor);
printf("%s", fentry->name);
if (fentry->type == FSP_RDTYPE_DIR && *dircolor)
printf("</b></font>");
printf("%10d\t<a href=\"%s", fentry->size, fentry->name);
if (fentry->type == FSP_RDTYPE_DIR) {
printf("/\">");
if (*dircolor)
printf("<font color=\"%s\"><b>", dircolor);
printf("%s/", fentry->name);
if (*dircolor)
printf("</b></font>");
} else {
printf("/\">%s", fentry->name);
}
puts("</a>");
}