mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 07:15:33 +02:00
Merge latest MariaDB 5.5 into MWL#192: Non-blocking client library.
This commit is contained in:
commit
9305f2b52f
281 changed files with 7981 additions and 3760 deletions
|
|
@ -71,9 +71,9 @@ void get_tty_password_buff(const char *opt_message, char *to, size_t length)
|
|||
_cputs(opt_message ? opt_message : "Enter password: ");
|
||||
for (;;)
|
||||
{
|
||||
char tmp;
|
||||
int tmp;
|
||||
tmp=_getch();
|
||||
if (tmp == '\b' || (int) tmp == 127)
|
||||
if (tmp == '\b' || tmp == 127)
|
||||
{
|
||||
if (pos != to)
|
||||
{
|
||||
|
|
@ -82,15 +82,13 @@ void get_tty_password_buff(const char *opt_message, char *to, size_t length)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (tmp == '\n' || tmp == '\r' || tmp == 3)
|
||||
if (tmp == -1 || tmp == '\n' || tmp == '\r' || tmp == 3)
|
||||
break;
|
||||
if (iscntrl(tmp) || pos == end)
|
||||
continue;
|
||||
_cputs("*");
|
||||
*(pos++) = tmp;
|
||||
*(pos++) = (char)tmp;
|
||||
}
|
||||
while (pos != to && isspace(pos[-1]) == ' ')
|
||||
pos--; /* Allow dummy space at end */
|
||||
*pos=0;
|
||||
_cputs("\n");
|
||||
}
|
||||
|
|
@ -137,8 +135,6 @@ static void get_password(char *to,uint length,int fd, my_bool echo)
|
|||
}
|
||||
*(pos++) = tmp;
|
||||
}
|
||||
while (pos != to && isspace(pos[-1]) == ' ')
|
||||
pos--; /* Allow dummy space at end */
|
||||
*pos=0;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue