diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-11-06 22:53:50 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-11-06 22:53:50 +0000 |
commit | 9f4f16b55d7df262774aee227933347e0ae3846e (patch) | |
tree | 26ebae60a02e272ec1fb8d2ead8dfc7559372fd5 /lib/getpass.c | |
parent | e05922c4285bf72b2246c9909703c7411f98163b (diff) |
new getpass proto and function pointer usage
Diffstat (limited to 'lib/getpass.c')
-rw-r--r-- | lib/getpass.c | 7 |
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 |