mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Use slashes after directories. Blocks are not used where there is only
one instruction
This commit is contained in:
parent
20498d7140
commit
f47daa2291
@ -113,14 +113,13 @@ sort_and_display_entries(FSP_DIR *dir)
|
|||||||
(int (*)(const void *, const void *)) compare);
|
(int (*)(const void *, const void *)) compare);
|
||||||
|
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
printf("%10d\t<a href=\"%s\">", table[i].size, table[i].name);
|
printf("%10d\t<a href=\"%s%s\">", table[i].size, table[i].name,
|
||||||
if (table[i].type == FSP_RDTYPE_DIR && *dircolor) {
|
table[i].type == FSP_RDTYPE_DIR ? "/" : "");
|
||||||
|
if (table[i].type == FSP_RDTYPE_DIR && *dircolor)
|
||||||
printf("<font color=\"%s\"><b>", dircolor);
|
printf("<font color=\"%s\"><b>", dircolor);
|
||||||
}
|
|
||||||
printf("%s", table[i].name);
|
printf("%s", table[i].name);
|
||||||
if (table[i].type == FSP_RDTYPE_DIR && *dircolor) {
|
if (table[i].type == FSP_RDTYPE_DIR && *dircolor)
|
||||||
printf("</b></font>");
|
printf("</b></font>");
|
||||||
}
|
|
||||||
puts("</a>");
|
puts("</a>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,14 +159,13 @@ fsp_directory(FSP_SESSION *ses, struct uri *uri)
|
|||||||
|
|
||||||
while (!fsp_readdir_native(dir, &fentry, &fresult)) {
|
while (!fsp_readdir_native(dir, &fentry, &fresult)) {
|
||||||
if (!fresult) break;
|
if (!fresult) break;
|
||||||
printf("%10d\t<a href=\"%s\">", fentry.size, fentry.name);
|
printf("%10d\t<a href=\"%s%s\">", fentry.size,
|
||||||
if (fentry.type == FSP_RDTYPE_DIR && *dircolor) {
|
fentry.name, fentry.type == FSP_RDTYPE_DIR ? "/" : "");
|
||||||
|
if (fentry.type == FSP_RDTYPE_DIR && *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 (fentry.type == FSP_RDTYPE_DIR && *dircolor)
|
||||||
printf("</b></font>");
|
printf("</b></font>");
|
||||||
}
|
|
||||||
puts("</a>");
|
puts("</a>");
|
||||||
}
|
}
|
||||||
fsp_closedir(dir);
|
fsp_closedir(dir);
|
||||||
|
Loading…
Reference in New Issue
Block a user