pidgin/android/libpurple

Parents 822d515c34c9
Children b9046377fdde
Conditionally removed the getpass call in nullclient, because Android does not provide getpass.
--- a/libpurple/example/nullclient.c Mon May 06 15:50:09 2013 +0200
+++ b/libpurple/example/nullclient.c Wed May 08 13:19:51 2013 +0200
@@ -297,7 +297,18 @@
account = purple_account_new(name, prpl);
/* Get the password for the account */
+ #ifdef ANDROID
+ /* Android does not have getpass */
+ printf("Password: ");
+ res = fgets(password, sizeof(password), stdin);
+ if (!res) {
+ fprintf(stderr, "Failed to read password.");
+ abort();
+ }
+ password[strlen(password) - 1] = 0;
+ #else
password = getpass("Password: ");
+ #endif
purple_account_set_password(account, password);
/* It's necessary to enable the account first. */