mirror of
https://github.com/troglobit/editline.git
synced 2025-09-17 17:58:07 +08:00
Revert "Coding style and const fixes to last PR"
This reverts commit fbb1f8800a
.
This commit is contained in:
@@ -398,22 +398,17 @@ char *rl_complete(char *token, int *match)
|
||||
}
|
||||
|
||||
static rl_check_secret_func_t *el_check_secret_func = NULL;
|
||||
|
||||
/* Added for the BitShares Core project. */
|
||||
/* For compatibility with the Heimdal project. */
|
||||
rl_check_secret_func_t *rl_set_check_secret_func(rl_check_secret_func_t *func)
|
||||
{
|
||||
rl_check_secret_func_t *old = el_check_secret_func;
|
||||
|
||||
el_check_secret_func = func;
|
||||
|
||||
return old;
|
||||
}
|
||||
|
||||
int rl_check_secret(const char *line)
|
||||
int rl_check_secret(char *source)
|
||||
{
|
||||
if (el_check_secret_func)
|
||||
return el_check_secret_func(line);
|
||||
|
||||
return el_check_secret_func(source);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -1138,7 +1138,7 @@ static void hist_add(const char *p)
|
||||
if (s == NULL)
|
||||
return;
|
||||
|
||||
/* Don't add secret information in history */
|
||||
// Don't add secret information in history
|
||||
if (rl_check_secret(s))
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user