Initial push
[termux-packages] / packages / unrar / no_getpass.patch
1 diff -u -r ../unrar/consio.cpp ./consio.cpp
2 --- ../unrar/consio.cpp 2013-12-01 09:10:14.000000000 +0100
3 +++ ./consio.cpp 2014-02-13 00:27:45.000000000 +0100
4 @@ -144,6 +144,20 @@
5
6
7 #ifndef SILENT
8 +#ifdef __ANDROID__
9 +static char* getpass(const char* prompt) {
10 + static char chars[128];
11 + int len = 0;
12 + while (true) {
13 + char c = fgetc(stdin);
14 + if (c == '\r' || c == '\n' || c == 0) break;
15 + chars[len++] = c;
16 + if (len == sizeof(chars)-1) break;
17 + }
18 + chars[len] = 0;
19 + return chars;
20 +}
21 +#endif
22 static void GetPasswordText(wchar *Str,uint MaxLength)
23 {
24 if (MaxLength==0)