You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
795 B

diff -u -r ../newsboat-2.10.1/src/remote_api.cpp ./src/remote_api.cpp
--- ../newsboat-2.10.1/src/remote_api.cpp 2017-09-22 22:01:50.000000000 +0200
+++ ./src/remote_api.cpp 2017-10-15 00:14:41.848769212 +0200
@@ -36,6 +36,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) {
std::string user = cfg->get_configvalue(scope+"-login");
std::string pass = cfg->get_configvalue(scope+"-password");