1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

ftp: Decode strftime results from the system codepage.

This commit is contained in:
Kalle Olavi Niemitalo 2007-03-20 09:18:28 +02:00 committed by Witold Filipczyk
parent 605d04378f
commit 36ce51f912

View File

@ -1097,6 +1097,7 @@ ftp_got_final_response(struct socket *socket, struct read_buffer *rb)
/* How to format an FTP directory listing in HTML. */
struct ftp_dir_html_format {
int libc_codepage;
int colorize_dir;
unsigned char dircolor[8];
};
@ -1174,7 +1175,8 @@ display_dir_entry(struct cache_entry *cached, off_t *pos, int *tries,
fmt = "%b %e %H:%M";
wr = strftime(date, sizeof(date), fmt, when_tm);
add_html_to_string(&string, date, wr);
add_cp_html_to_string(&string, format->libc_codepage,
date, wr);
} else
#endif
add_to_string(&string, " ");
@ -1350,6 +1352,8 @@ out_of_mem:
}
if (ftp->dir) {
format.libc_codepage = get_cp_index("System");
format.colorize_dir = get_opt_bool("document.browse.links.color_dirs");
if (format.colorize_dir) {