1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Remove unused fsp_info struct; use sizeof(*table); fix dir entry hiliting

This commit is contained in:
Jonas Fonseca 2006-01-17 00:54:06 +01:00 committed by Jonas Fonseca
parent 28fbb9317b
commit c7bdf62152

View File

@ -63,10 +63,6 @@ struct module fsp_protocol_module = struct_module(
);
struct fsp_info {
int init;
};
static void
fsp_error(unsigned char *error)
{
@ -113,16 +109,16 @@ sort_and_display_entries(FSP_DIR *dir)
memcpy(&table[size], &fentry, sizeof(fentry));
size++;
}
qsort(table, size, sizeof(fentry),
qsort(table, size, sizeof(*table),
(int (*)(const void *, const void *)) compare);
for (i = 0; i < size; i++) {
printf("%10d\t<a href=\"%s\">", table[i].size, table[i].name);
if (fentry.type == FSP_RDTYPE_DIR && *dircolor) {
if (table[i].type == FSP_RDTYPE_DIR && *dircolor) {
printf("<font color=\"%s\"><b>", dircolor);
}
printf("%s", table[i].name);
if (fentry.type == FSP_RDTYPE_DIR && *dircolor) {
if (table[i].type == FSP_RDTYPE_DIR && *dircolor) {
printf("</b></font>");
}
puts("</a>");