Browse Source
Changed packages: * alpine * dropbear * emacs * isync * lftp * msmtp * newsboat * rsync * screen * texlive-bin * unrar * w3mandroid-5
committed by
Fredrik Fornwall
27 changed files with 36 additions and 617 deletions
@ -1,232 +0,0 @@ |
|||
/* Copyright (C) 1992-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc.
|
|||
|
|||
This file is part of the GNU C Library. |
|||
|
|||
This program is free software; you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation; either version 2, or (at your option) |
|||
any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License along |
|||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
|||
|
|||
/*#ifndef _LIBC
|
|||
# include <config.h> |
|||
#endifi*/ |
|||
|
|||
#include "getpass.h" |
|||
|
|||
|
|||
#include <stdio.h> |
|||
|
|||
#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) |
|||
|
|||
# include <stdbool.h> |
|||
|
|||
# if HAVE_DECL___FSETLOCKING && HAVE___FSETLOCKING |
|||
# if HAVE_STDIO_EXT_H |
|||
# include <stdio_ext.h> |
|||
# endif |
|||
# else |
|||
# define __fsetlocking(stream, type) /* empty */ |
|||
# endif |
|||
|
|||
# if HAVE_TERMIOS_H |
|||
# include <termios.h> |
|||
# endif |
|||
|
|||
# if USE_UNLOCKED_IO |
|||
# include "unlocked-io.h" |
|||
# else |
|||
# if !HAVE_DECL_FFLUSH_UNLOCKED |
|||
# undef fflush_unlocked |
|||
# define fflush_unlocked(x) fflush (x) |
|||
# endif |
|||
# if !HAVE_DECL_FLOCKFILE |
|||
# undef flockfile |
|||
# define flockfile(x) ((void) 0) |
|||
# endif |
|||
# if !HAVE_DECL_FUNLOCKFILE |
|||
# undef funlockfile |
|||
# define funlockfile(x) ((void) 0) |
|||
# endif |
|||
# if !HAVE_DECL_FPUTS_UNLOCKED |
|||
# undef fputs_unlocked |
|||
# define fputs_unlocked(str,stream) fputs (str, stream) |
|||
# endif |
|||
# if !HAVE_DECL_PUTC_UNLOCKED |
|||
# undef putc_unlocked |
|||
# define putc_unlocked(c,stream) putc (c, stream) |
|||
# endif |
|||
# endif |
|||
|
|||
/* It is desirable to use this bit on systems that have it.
|
|||
The only bit of terminal state we want to twiddle is echoing, which is |
|||
done in software; there is no need to change the state of the terminal |
|||
hardware. */ |
|||
|
|||
# ifndef TCSASOFT |
|||
# define TCSASOFT 0 |
|||
# endif |
|||
|
|||
static void |
|||
call_fclose (void *arg) |
|||
{ |
|||
if (arg != NULL) |
|||
fclose (arg); |
|||
} |
|||
|
|||
char * |
|||
getpass (const char *prompt) |
|||
{ |
|||
FILE *tty; |
|||
FILE *in, *out; |
|||
# if HAVE_TCGETATTR |
|||
struct termios s, t; |
|||
# endif |
|||
bool tty_changed = false; |
|||
static char *buf; |
|||
static size_t bufsize; |
|||
ssize_t nread; |
|||
|
|||
/* Try to write to and read from the terminal if we can.
|
|||
If we can't open the terminal, use stderr and stdin. */ |
|||
|
|||
tty = fopen ("/dev/tty", "w+"); |
|||
if (tty == NULL) |
|||
{ |
|||
in = stdin; |
|||
out = stderr; |
|||
} |
|||
else |
|||
{ |
|||
/* We do the locking ourselves. */ |
|||
__fsetlocking (tty, FSETLOCKING_BYCALLER); |
|||
|
|||
out = in = tty; |
|||
} |
|||
|
|||
flockfile (out); |
|||
|
|||
/* Turn echoing off if it is on now. */ |
|||
# if HAVE_TCGETATTR |
|||
if (tcgetattr (fileno (in), &t) == 0) |
|||
{ |
|||
/* Save the old one. */ |
|||
s = t; |
|||
/* Tricky, tricky. */ |
|||
t.c_lflag &= ~(ECHO | ISIG); |
|||
tty_changed = (tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &t) == 0); |
|||
} |
|||
# endif |
|||
|
|||
/* Write the prompt. */ |
|||
fputs_unlocked (prompt, out); |
|||
fflush_unlocked (out); |
|||
|
|||
/* Read the password. */ |
|||
nread = getline (&buf, &bufsize, in); |
|||
|
|||
/* According to the C standard, input may not be followed by output
|
|||
on the same stream without an intervening call to a file |
|||
positioning function. Suppose in == out; then without this fseek |
|||
call, on Solaris, HP-UX, AIX, OSF/1, the previous input gets |
|||
echoed, whereas on IRIX, the following newline is not output as |
|||
it should be. POSIX imposes similar restrictions if fileno (in) |
|||
== fileno (out). The POSIX restrictions are tricky and change |
|||
from POSIX version to POSIX version, so play it safe and invoke |
|||
fseek even if in != out. */ |
|||
fseeko (out, 0, SEEK_CUR); |
|||
|
|||
if (buf != NULL) |
|||
{ |
|||
if (nread < 0) |
|||
buf[0] = '\0'; |
|||
else if (buf[nread - 1] == '\n') |
|||
{ |
|||
/* Remove the newline. */ |
|||
buf[nread - 1] = '\0'; |
|||
if (tty_changed) |
|||
{ |
|||
/* Write the newline that was not echoed. */ |
|||
putc_unlocked ('\n', out); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/* Restore the original setting. */ |
|||
# if HAVE_TCSETATTR |
|||
if (tty_changed) |
|||
tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &s); |
|||
# endif |
|||
|
|||
funlockfile (out); |
|||
|
|||
call_fclose (tty); |
|||
|
|||
return buf; |
|||
} |
|||
|
|||
#else /* W32 native */ |
|||
|
|||
/* Windows implementation by Martin Lambers <marlam@marlam.de>,
|
|||
improved by Simon Josefsson. */ |
|||
|
|||
/* For PASS_MAX. */ |
|||
# include <limits.h> |
|||
/* For _getch(). */ |
|||
# include <conio.h> |
|||
/* For strdup(). */ |
|||
# include <string.h> |
|||
|
|||
# ifndef PASS_MAX |
|||
# define PASS_MAX 512 |
|||
# endif |
|||
|
|||
char * |
|||
getpass (const char *prompt) |
|||
{ |
|||
char getpassbuf[PASS_MAX + 1]; |
|||
size_t i = 0; |
|||
int c; |
|||
|
|||
if (prompt) |
|||
{ |
|||
fputs (prompt, stderr); |
|||
fflush (stderr); |
|||
} |
|||
|
|||
for (;;) |
|||
{ |
|||
c = _getch (); |
|||
if (c == '\r') |
|||
{ |
|||
getpassbuf[i] = '\0'; |
|||
break; |
|||
} |
|||
else if (i < PASS_MAX) |
|||
{ |
|||
getpassbuf[i++] = c; |
|||
} |
|||
|
|||
if (i >= PASS_MAX) |
|||
{ |
|||
getpassbuf[i] = '\0'; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
if (prompt) |
|||
{ |
|||
fputs ("\r\n", stderr); |
|||
fflush (stderr); |
|||
} |
|||
|
|||
return strdup (getpassbuf); |
|||
} |
|||
#endif |
@ -1,30 +0,0 @@ |
|||
/* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin.
|
|||
Copyright (C) 2004, 2009-2016 Free Software Foundation, Inc. |
|||
Contributed by Simon Josefsson <jas@extundo.com>, 2004. |
|||
|
|||
This program is free software; you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation; either version 2, or (at your option) |
|||
any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
|||
|
|||
#ifndef GETPASS_H |
|||
# define GETPASS_H |
|||
|
|||
/* Get getpass declaration, if available. */ |
|||
# include <unistd.h> |
|||
|
|||
# if !HAVE_DECL_GETPASS |
|||
/* Read a password of arbitrary length from /dev/tty or stdin. */ |
|||
char *getpass (const char *prompt); |
|||
|
|||
# endif |
|||
|
|||
#endif /* GETPASS_H */ |
@ -1,10 +0,0 @@ |
|||
--- ./imap/src/mtest/mtest.c 2018-03-21 20:56:14.145999441 +0000
|
|||
+++ ../mtest.c 2018-03-21 21:23:34.179966620 +0000
|
|||
@@ -34,6 +34,7 @@
|
|||
#include <signal.h> |
|||
#include "c-client.h" |
|||
#include "imap4r1.h" |
|||
+#include "../../include/getpass.h"
|
|||
|
|||
/* Excellent reasons to hate ifdefs, and why my real code never uses them */ |
|||
|
@ -1,42 +0,0 @@ |
|||
diff -uNr dropbear-2018.76/cli-auth.c dropbear-2018.76.mod/cli-auth.c
|
|||
--- dropbear-2018.76/cli-auth.c 2018-02-27 16:25:10.000000000 +0200
|
|||
+++ dropbear-2018.76.mod/cli-auth.c 2018-04-21 13:44:51.797063206 +0300
|
|||
@@ -32,6 +32,38 @@
|
|||
#include "packet.h" |
|||
#include "runopts.h" |
|||
|
|||
+
|
|||
+// getpass implementation
|
|||
+#ifdef __ANDROID__
|
|||
+#include <termios.h>
|
|||
+#include <readline/readline.h>
|
|||
+
|
|||
+static char* getpass(const char *prompt) {
|
|||
+ struct termios term_old, term_new;
|
|||
+ int nread;
|
|||
+
|
|||
+ /* Turn echoing off and fail if we can't. */
|
|||
+ if (tcgetattr (0, &term_old) != 0) {
|
|||
+ return NULL;
|
|||
+ }
|
|||
+
|
|||
+ term_new = term_old;
|
|||
+ term_new.c_lflag &= ~ECHO;
|
|||
+
|
|||
+ if (tcsetattr (0, TCSAFLUSH, &term_new) != 0) {
|
|||
+ return NULL;
|
|||
+ }
|
|||
+
|
|||
+ /* Read the password. */
|
|||
+ char *password = readline(prompt);
|
|||
+
|
|||
+ /* Restore terminal. */
|
|||
+ (void) tcsetattr (0, TCSAFLUSH, &term_old);
|
|||
+
|
|||
+ return password;
|
|||
+}
|
|||
+#endif
|
|||
+
|
|||
void cli_authinitialise() { |
|||
|
|||
memset(&ses.authstate, 0, sizeof(ses.authstate)); |
@ -1,35 +0,0 @@ |
|||
diff -u -r ../emacs-24.3/lib-src/pop.c ./lib-src/pop.c
|
|||
--- ../emacs-24.3/lib-src/pop.c 2013-01-01 21:37:17.000000000 +0100
|
|||
+++ ./lib-src/pop.c 2014-02-19 02:54:30.000000000 +0100
|
|||
@@ -63,6 +63,7 @@
|
|||
#include <stdio.h> |
|||
#include <string.h> |
|||
#include <unistd.h> |
|||
+#include <stdbool.h>
|
|||
|
|||
#ifdef KERBEROS |
|||
# ifdef HAVE_KRB5_H |
|||
@@ -126,6 +127,23 @@
|
|||
char pop_error[ERROR_MAX]; |
|||
int pop_debug = 0; |
|||
|
|||
+#ifdef __ANDROID__
|
|||
+static char* getpass(const char* prompt) {
|
|||
+ printf("%s\n", prompt);
|
|||
+ static char chars[128];
|
|||
+ int len = 0;
|
|||
+ while (true) {
|
|||
+ 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
|
|||
+
|
|||
+
|
|||
/* |
|||
* Function: pop_open (char *host, char *username, char *password, |
|||
* int flags) |
@ -1,12 +1,8 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://isync.sourceforge.net |
|||
TERMUX_PKG_DESCRIPTION="IMAP and MailDir mailbox synchronizer" |
|||
TERMUX_PKG_VERSION=1.3.0 |
|||
TERMUX_PKG_REVISION=1 |
|||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/isync/isync/${TERMUX_PKG_VERSION}/isync-${TERMUX_PKG_VERSION}.tar.gz |
|||
TERMUX_PKG_SHA256=8d5f583976e3119705bdba27fa4fc962e807ff5996f24f354957178ffa697c9c |
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-sasl ac_cv_header_db=no ac_cv_berkdb4=no" |
|||
TERMUX_PKG_DEPENDS="readline, openssl" |
|||
TERMUX_PKG_BUILD_DEPENDS="readline-dev, openssl-dev" |
|||
|
|||
termux_step_pre_configure() { |
|||
LDFLAGS+=" -lreadline" |
|||
} |
|||
TERMUX_PKG_DEPENDS="openssl" |
|||
|
@ -1,12 +1,12 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://marlam.de/msmtp/ |
|||
TERMUX_PKG_DESCRIPTION="Lightweight SMTP client" |
|||
TERMUX_PKG_VERSION=1.8.0 |
|||
TERMUX_PKG_REVISION=1 |
|||
TERMUX_PKG_SHA256=bd730cbf000d1b8382849ea21d569a387e63f936be00dc07c569f67915e53ccd |
|||
TERMUX_PKG_SRCURL=https://marlam.de/msmtp/releases/msmtp-$TERMUX_PKG_VERSION.tar.xz |
|||
TERMUX_PKG_DEPENDS="libgnutls, libidn" |
|||
|
|||
termux_step_pre_configure () { |
|||
LDFLAGS=" -llog" |
|||
cp $TERMUX_SCRIPTDIR/packages/alpine/getpass* src/ |
|||
autoreconf -if |
|||
} |
|||
|
@ -1,12 +0,0 @@ |
|||
--- ../cache/msmtp-1.6.6/src/Makefile.am 2014-11-30 22:26:00.000000000 +0000
|
|||
+++ ./src/Makefile.am 2018-01-24 00:22:11.210726100 +0000
|
|||
@@ -12,7 +12,8 @@
|
|||
tools.c tools.h \ |
|||
xalloc.c xalloc.h \ |
|||
gettext.h \ |
|||
- aliases.c aliases.h
|
|||
+ aliases.c aliases.h \
|
|||
+ getpass.c getpass.h
|
|||
|
|||
if HAVE_TLS |
|||
msmtp_SOURCES += tls.c tls.h |
@ -1,10 +0,0 @@ |
|||
--- ../cache/msmtp-1.6.6/src/msmtp.c 2016-11-14 19:44:01.000000000 +0000
|
|||
+++ ./src/msmtp.c 2018-01-24 00:14:54.940709798 +0000
|
|||
@@ -37,6 +37,7 @@
|
|||
#include <errno.h> |
|||
#include <time.h> |
|||
#include <getopt.h> |
|||
+#include <getpass.h>
|
|||
extern char *optarg; |
|||
extern int optind; |
|||
#include <unistd.h> |
@ -1,26 +0,0 @@ |
|||
diff -u -r ../newsboat-2.12/src/remote_api.cpp ./src/remote_api.cpp
|
|||
--- ../newsboat-2.12/src/remote_api.cpp 2018-06-24 21:30:30.000000000 +0200
|
|||
+++ ./src/remote_api.cpp 2018-06-26 03:56:48.528961214 +0200
|
|||
@@ -39,6 +39,22 @@
|
|||
return pass; |
|||
} |
|||
|
|||
+#ifdef __ANDROID__
|
|||
+static char* getpass(const char* prompt) {
|
|||
+ printf("%s\n", 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
|
|||
+
|
|||
credentials remote_api::get_credentials(const std::string& scope, |
|||
const std::string& name) |
|||
{ |
@ -0,0 +1,16 @@ |
|||
diff -uNr rsync-3.1.3/lib/getpass.c rsync-3.1.3.mod/lib/getpass.c
|
|||
--- rsync-3.1.3/lib/getpass.c 2013-05-20 01:01:29.000000000 +0300
|
|||
+++ rsync-3.1.3.mod/lib/getpass.c 2018-08-16 13:29:02.517996377 +0300
|
|||
@@ -23,6 +23,7 @@
|
|||
|
|||
#include "rsync.h" |
|||
|
|||
+#ifndef HAVE_GETPASS
|
|||
char *getpass(const char *prompt) |
|||
{ |
|||
static char password[256]; |
|||
@@ -70,3 +71,4 @@
|
|||
|
|||
return NULL; |
|||
} |
|||
+#endif
|
@ -1,22 +0,0 @@ |
|||
--- src/texk/dvipdfm-x/pdfencrypt.h~ 2016-01-06 11:13:28.000000000 +0100
|
|||
+++ src/texk/dvipdfm-x/pdfencrypt.h 2016-12-31 11:13:43.734942973 +0100
|
|||
@@ -38,4 +38,19 @@
|
|||
unsigned char **cipher, size_t *cipher_len); |
|||
extern pdf_obj *pdf_encrypt_obj (void); |
|||
|
|||
+
|
|||
+#ifdef __ANDROID__
|
|||
+static char* getpass(const char* prompt) {
|
|||
+ static char chars[128];
|
|||
+ int len = 0;
|
|||
+ while (true) {
|
|||
+ 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
|
|||
#endif /* _PDFENCRYPT_H_ */ |
@ -1,7 +1,8 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://www.rarlab.com/ |
|||
TERMUX_PKG_DESCRIPTION="Tool for extracting files from .rar archives" |
|||
TERMUX_PKG_VERSION=5.6.6 |
|||
TERMUX_PKG_REVISION=1 |
|||
TERMUX_PKG_SHA256=5dbdd3cff955c4bc54dd50bf58120af7cb30dec0763a79ffff350f26f96c4430 |
|||
TERMUX_PKG_SRCURL=https://www.rarlab.com/rar/unrarsrc-${TERMUX_PKG_VERSION}.tar.gz |
|||
TERMUX_PKG_DEPENDS="libandroid-support,readline" |
|||
TERMUX_PKG_DEPENDS="libandroid-support" |
|||
TERMUX_PKG_BUILD_IN_SRC=yes |
|||
|
@ -1,53 +0,0 @@ |
|||
diff -uNr unrar/consio.cpp unrar.mod/consio.cpp
|
|||
--- unrar/consio.cpp 2018-06-24 18:10:30.000000000 +0300
|
|||
+++ unrar.mod/consio.cpp 2018-07-03 14:07:07.362069977 +0300
|
|||
@@ -1,6 +1,10 @@
|
|||
#include "rar.hpp" |
|||
#include "log.cpp" |
|||
|
|||
+// For getpass()
|
|||
+#include <termios.h>
|
|||
+#include <readline/readline.h>
|
|||
+
|
|||
static MESSAGE_TYPE MsgStream=MSG_STDOUT; |
|||
static RAR_CHARSET RedirectCharset=RCH_DEFAULT; |
|||
|
|||
@@ -62,6 +66,38 @@
|
|||
|
|||
|
|||
#ifndef SILENT |
|||
+#ifdef __ANDROID__
|
|||
+static char* getpass(const char *prompt) {
|
|||
+ struct termios term_old, term_new;
|
|||
+
|
|||
+ /* Turn echoing off and fail if we can't. */
|
|||
+ if (tcgetattr(0, &term_old) != 0) {
|
|||
+ fprintf(stderr, "%s(): tcgetattr failed.\n", __func__);
|
|||
+ return NULL;
|
|||
+ }
|
|||
+
|
|||
+ term_new = term_old;
|
|||
+ term_new.c_lflag &= ~ECHO;
|
|||
+
|
|||
+ if (tcsetattr(0, TCSANOW, &term_new) != 0) {
|
|||
+ fprintf(stderr, "%s(): tcsetattr failed.\n", __func__);
|
|||
+ return NULL;
|
|||
+ }
|
|||
+
|
|||
+ /* Read the password. */
|
|||
+ char *password = readline(prompt);
|
|||
+
|
|||
+ /* prevent segfault when failed to read password */
|
|||
+ if (!password) {
|
|||
+ password="";
|
|||
+ }
|
|||
+
|
|||
+ /* Restore terminal. */
|
|||
+ (void) tcsetattr(0, TCSANOW, &term_old);
|
|||
+
|
|||
+ return password;
|
|||
+}
|
|||
+#endif
|
|||
static void cvt_wprintf(FILE *dest,const wchar *fmt,va_list arglist) |
|||
{ |
|||
// This buffer is for format string only, not for entire output, |
@ -1,25 +0,0 @@ |
|||
diff -u -r ../w3m-0.5.3/file.c ./file.c
|
|||
--- ../w3m-0.5.3/file.c 2011-01-04 04:22:21.000000000 -0500
|
|||
+++ ./file.c 2015-11-19 17:37:37.536882299 -0500
|
|||
@@ -1513,6 +1513,21 @@
|
|||
return hauth->scheme ? hauth : NULL; |
|||
} |
|||
|
|||
+#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
|
|||
+
|
|||
static void |
|||
getAuthCookie(struct http_auth *hauth, char *auth_header, |
|||
TextList *extra_header, ParsedURL *pu, HRequest *hr, |
@ -1,25 +0,0 @@ |
|||
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(¤t_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) |
|||
{ |
Loading…
Reference in new issue