mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
DIRLIST: Cleanup macros used in the FTP directory listing
This commit is contained in:
parent
d8ef7e1b68
commit
94f4b2fd1d
@ -1267,15 +1267,8 @@ out_of_mem:
|
||||
return;
|
||||
}
|
||||
|
||||
#define ADD_CONST(str) { \
|
||||
add_fragment(conn->cached, conn->from, str, sizeof(str) - 1); \
|
||||
conn->from += (sizeof(str) - 1); }
|
||||
|
||||
#define ADD_STRING() { \
|
||||
add_fragment(conn->cached, conn->from, string.source, string.length); \
|
||||
conn->from += string.length; }
|
||||
|
||||
ADD_STRING();
|
||||
add_fragment(conn->cached, conn->from, string.source, string.length);
|
||||
conn->from += string.length;
|
||||
|
||||
done_string(&string);
|
||||
|
||||
@ -1335,6 +1328,10 @@ out_of_mem:
|
||||
(unsigned char *) dircolor) == -1)
|
||||
goto out_of_mem;
|
||||
|
||||
#define ADD_CONST(str) { \
|
||||
add_fragment(conn->cached, conn->from, str, sizeof(str) - 1); \
|
||||
conn->from += (sizeof(str) - 1); }
|
||||
|
||||
if (ftp->dir) ADD_CONST("</pre>\n<hr>\n</body>\n</html>");
|
||||
|
||||
close_socket(conn->data_socket);
|
||||
|
Loading…
x
Reference in New Issue
Block a user