termux-packages/packages/w3m/ftp.c.patch

26 lines
566 B
Diff

diff -u -r ../w3m-0.5.3/ftp.c ./ftp.c
--- ../w3m-0.5.3/ftp.c 2011-01-04 04:22:21.000000000 -0500
+++ ./ftp.c 2015-11-19 17:38:19.404593027 -0500
@@ -342,6 +342,21 @@
ftp_close(&current_ftp);
}
+#ifdef __ANDROID__
+static char* getpass(const char* prompt) {
+ static char chars[128];
+ int len = 0;
+ while (1) {
+ char c = fgetc(stdin);
+ if (c == '\r' || c == '\n' || c == 0) break;
+ chars[len++] = c;
+ if (len == sizeof(chars)-1) break;
+ }
+ chars[len] = 0;
+ return chars;
+}
+#endif
+
InputStream
openFTPStream(ParsedURL *pu, URLFile *uf)
{