termux-packages/packages/newsboat/src-remote_api.cpp.patch

27 lines
673 B
Diff
Raw Normal View History

2018-06-26 04:54:43 +02:00
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 @@
2017-10-15 00:36:54 +02:00
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
+
2018-06-26 04:54:43 +02:00
credentials remote_api::get_credentials(const std::string& scope,
const std::string& name)
{