aboutsummaryrefslogtreecommitdiff
path: root/lib/getpass.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-11-06 22:53:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-11-06 22:53:50 +0000
commit9f4f16b55d7df262774aee227933347e0ae3846e (patch)
tree26ebae60a02e272ec1fb8d2ead8dfc7559372fd5 /lib/getpass.c
parente05922c4285bf72b2246c9909703c7411f98163b (diff)
new getpass proto and function pointer usage
Diffstat (limited to 'lib/getpass.c')
-rw-r--r--lib/getpass.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/getpass.c b/lib/getpass.c
index 9dd08132a..d18f6d79f 100644
--- a/lib/getpass.c
+++ b/lib/getpass.c
@@ -68,7 +68,7 @@
# define perror(x) fprintf(stderr, "Error in: %s\n", x)
#endif
-void my_getpass(const char *prompt, char *buffer, int buflen)
+int my_getpass(void *client, const char *prompt, char *buffer, int buflen)
{
FILE *infp;
FILE *outfp;
@@ -176,11 +176,12 @@ void my_getpass(const char *prompt, char *buffer, int buflen)
signal(SIGTSTP, sigtstp);
#endif
+ return 0; /* we always return success */
}
#else /* WIN32 */
#include <stdio.h>
#include <conio.h>
-void my_getpass(const char *prompt, char *buffer, int buflen)
+int my_getpass(void *client, const char *prompt, char *buffer, int buflen)
{
int i;
printf("%s", prompt);
@@ -195,6 +196,8 @@ void my_getpass(const char *prompt, char *buffer, int buflen)
/* if user didn't hit ENTER, terminate buffer */
if (i==buflen)
buffer[buflen-1]=0;
+
+ return 0; /* we always return success */
}
#endif