diff options
Diffstat (limited to 'passwd/apr_getpass.c')
-rw-r--r-- | passwd/apr_getpass.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/passwd/apr_getpass.c b/passwd/apr_getpass.c index 5426b8a36..b4bdb5356 100644 --- a/passwd/apr_getpass.c +++ b/passwd/apr_getpass.c @@ -112,20 +112,20 @@ static char *get_password(const char *prompt) /* WCE lacks console. So the getpass is unsuported * The only way is to use the GUI so the getpass should be implemented * on per-application basis. - */ + */ static char password[128]; int n = 0; int ch; fputs(prompt, stderr); - + while ((ch = _getch()) != '\r') { if (ch == EOF) /* EOF */ { fputs("[EOF]\n", stderr); return NULL; } else if (ch == 0 || ch == 0xE0) { - /* FN Keys (0 or E0) are a sentinal for a FN code */ + /* FN Keys (0 or E0) are a sentinal for a FN code */ ch = (ch << 4) | _getch(); /* Catch {DELETE}, {<--}, Num{DEL} and Num{<--} */ if ((ch == 0xE53 || ch == 0xE4B || ch == 0x053 || ch == 0x04b) && n) { @@ -162,7 +162,7 @@ static char *get_password(const char *prompt) fputc('\a', stderr); } } - + fputc('\n', stderr); password[n] = '\0'; return password; @@ -194,7 +194,7 @@ static char *get_password(const char *prompt) n = 0; } } - + password[n] = '\0'; printf("\n"); if (n > (MAX_STRING_LEN - 1)) { |