1c1
< /* $FreeBSD: head/contrib/libreadline/complete.c 157188 2006-03-27 23:11:32Z ache $ */
---
> /* $FreeBSD: head/contrib/libreadline/complete.c 165675 2006-12-31 09:22:31Z ache $ */
954c954
< char **matches, *temp;
---
> char **matches;
973,976c973
< /* Beware -- we're stripping the quotes here. Do this only if we know
< we are doing filename completion and the application has defined a
< filename dequoting function. */
< temp = (char *)NULL;
---
> /* XXX -- filename dequoting moved into rl_filename_completion_function */
978,985d974
< if (found_quote && our_func == rl_filename_completion_function &&
< rl_filename_dequoting_function)
< {
< /* delete single and double quotes */
< temp = (*rl_filename_dequoting_function) (text, quote_char);
< text = temp; /* not freeing text is not a memory leak */
< }
<
987d975
< FREE (temp);
1120c1108,1109
< mbstate_t ps_back = ps1;
---
> mbstate_t ps_back;
> ps_back = ps1;
1977a1967,1968
> /* The directory completion hook should perform any necessary
> dequoting. */
1983c1974,1980
<
---
> else if (rl_completion_found_quote && rl_filename_dequoting_function)
> {
> /* delete single and double quotes */
> temp = (*rl_filename_dequoting_function) (users_dirname, rl_completion_quote_character);
> free (users_dirname);
> users_dirname = temp;
> }
1984a1982,1990
>
> /* Now dequote a non-null filename. */
> if (filename && *filename && rl_completion_found_quote && rl_filename_dequoting_function)
> {
> /* delete single and double quotes */
> temp = (*rl_filename_dequoting_function) (filename, rl_completion_quote_character);
> free (filename);
> filename = temp;
> }
< /* $FreeBSD: head/contrib/libreadline/complete.c 157188 2006-03-27 23:11:32Z ache $ */
---
> /* $FreeBSD: head/contrib/libreadline/complete.c 165675 2006-12-31 09:22:31Z ache $ */
954c954
< char **matches, *temp;
---
> char **matches;
973,976c973
< /* Beware -- we're stripping the quotes here. Do this only if we know
< we are doing filename completion and the application has defined a
< filename dequoting function. */
< temp = (char *)NULL;
---
> /* XXX -- filename dequoting moved into rl_filename_completion_function */
978,985d974
< if (found_quote && our_func == rl_filename_completion_function &&
< rl_filename_dequoting_function)
< {
< /* delete single and double quotes */
< temp = (*rl_filename_dequoting_function) (text, quote_char);
< text = temp; /* not freeing text is not a memory leak */
< }
<
987d975
< FREE (temp);
1120c1108,1109
< mbstate_t ps_back = ps1;
---
> mbstate_t ps_back;
> ps_back = ps1;
1977a1967,1968
> /* The directory completion hook should perform any necessary
> dequoting. */
1983c1974,1980
<
---
> else if (rl_completion_found_quote && rl_filename_dequoting_function)
> {
> /* delete single and double quotes */
> temp = (*rl_filename_dequoting_function) (users_dirname, rl_completion_quote_character);
> free (users_dirname);
> users_dirname = temp;
> }
1984a1982,1990
>
> /* Now dequote a non-null filename. */
> if (filename && *filename && rl_completion_found_quote && rl_filename_dequoting_function)
> {
> /* delete single and double quotes */
> temp = (*rl_filename_dequoting_function) (filename, rl_completion_quote_character);
> free (filename);
> filename = temp;
> }