| 1 | diff -u -r ../newsboat-2.10.1/src/remote_api.cpp ./src/remote_api.cpp |
| 2 | --- ../newsboat-2.10.1/src/remote_api.cpp 2017-09-22 22:01:50.000000000 +0200 |
| 3 | +++ ./src/remote_api.cpp 2017-10-15 00:14:41.848769212 +0200 |
| 4 | @@ -36,6 +36,22 @@ |
| 5 | return pass; |
| 6 | } |
| 7 | |
| 8 | +#ifdef __ANDROID__ |
| 9 | +static char* getpass(const char* prompt) { |
| 10 | + printf("%s\n", prompt); |
| 11 | + static char chars[128]; |
| 12 | + int len = 0; |
| 13 | + while (1) { |
| 14 | + char c = fgetc(stdin); |
| 15 | + if (c == '\r' || c == '\n' || c == 0) break; |
| 16 | + chars[len++] = c; |
| 17 | + if (len == sizeof(chars)-1) break; |
| 18 | + } |
| 19 | + chars[len] = 0; |
| 20 | + return chars; |
| 21 | +} |
| 22 | +#endif |
| 23 | + |
| 24 | credentials remote_api::get_credentials(const std::string& scope, const std::string& name) { |
| 25 | std::string user = cfg->get_configvalue(scope+"-login"); |
| 26 | std::string pass = cfg->get_configvalue(scope+"-password"); |