Re: Bash-4.3 Official Patch 30

2014-10-08 Thread Chet Ramey
On 10/8/14, 4:03 AM, Andreas Schwab wrote: > Chet Ramey writes: > >> Yes, that's right. The question is whether that case of the index out >> of bounds should continue to return NULL, but in a clearer way, or >> return "" to differentiate it from the case where shell_input_line is >> NULL. > >

Re: Bash-4.3 Official Patch 30

2014-10-08 Thread Andreas Schwab
Chet Ramey writes: > Yes, that's right. The question is whether that case of the index out > of bounds should continue to return NULL, but in a clearer way, or > return "" to differentiate it from the case where shell_input_line is > NULL. Do you need that difference? The only caller treats th

Re: Bash-4.3 Official Patch 30

2014-10-07 Thread Chet Ramey
On 10/7/14, 6:31 PM, Ángel González wrote: >>> Changing it to return 0 instead of '\0' would probably be more clear. >>> No need to return a pointer to a static empty string. >> >> It depends on how you want the function to work. It is nice to >> differentiate between the cases where there is no

Re: Bash-4.3 Official Patch 30

2014-10-07 Thread Ángel González
Chet Ramey wrote: > On 10/6/14, 6:16 PM, John E. Malmberg wrote: > > >>> Do you mean return ""; ? > >> > >> Yes, good catch. It doesn't make a difference: clang and gcc both accept > >> it as written and it behaves as desired. However, I'll change it for the > >> next version. > > > > Changing

Re: Bash-4.3 Official Patch 30

2014-10-07 Thread Chet Ramey
On 10/6/14, 6:16 PM, John E. Malmberg wrote: >>> Do you mean return ""; ? >> >> Yes, good catch. It doesn't make a difference: clang and gcc both accept >> it as written and it behaves as desired. However, I'll change it for the >> next version. > > Changing it to return 0 instead of '\0' would

Re: Bash-4.3 Official Patch 30

2014-10-06 Thread John E. Malmberg
On 10/6/2014 6:43 AM, Chet Ramey wrote: On 10/6/14, 1:35 AM, tsugutomo.en...@jp.sony.com wrote: Hi, + char * + parser_remaining_input () + { + if (shell_input_line == 0) + return 0; + if (shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len) + return '\0';

Re: Bash-4.3 Official Patch 30

2014-10-06 Thread Ryan Cunningham
Thank you for the clarification. -- Sent from my iPad > On Oct 6, 2014, at 4:12 AM, Chet Ramey wrote: > >> On 10/5/14, 9:45 PM, Ryan Cunningham wrote: >> This patch contains statements that add references to the patch directory, >> "bash-4.3-patched". You should reissue the patch without such

Re: Bash-4.3 Official Patch 30

2014-10-06 Thread Chet Ramey
On 10/6/14, 1:35 AM, tsugutomo.en...@jp.sony.com wrote: > Hi, > >> + char * >> + parser_remaining_input () >> + { >> + if (shell_input_line == 0) >> + return 0; >> + if (shell_input_line_index < 0 || shell_input_line_index >= >> shell_input_line_len) >> + return '\0'; /* XXX */ > >

Re: Bash-4.3 Official Patch 30

2014-10-06 Thread Chet Ramey
On 10/5/14, 9:45 PM, Ryan Cunningham wrote: > This patch contains statements that add references to the patch directory, > "bash-4.3-patched". You should reissue the patch without such statements if > you find it feasible to do so. Why? I want those pathnames in there, rather than the ones that

Re: Bash-4.3 Official Patch 30

2014-10-06 Thread tsugutomo . enami
Hi, > + char * > + parser_remaining_input () > + { > + if (shell_input_line == 0) > + return 0; > + if (shell_input_line_index < 0 || shell_input_line_index >= > shell_input_line_len) > + return '\0';/* XXX */ Do you mean return ""; ? enami.

Re: Bash-4.3 Official Patch 30

2014-10-05 Thread Ryan Cunningham
This patch contains statements that add references to the patch directory, "bash-4.3-patched". You should reissue the patch without such statements if you find it feasible to do so. -- Sent from my iPad > On Oct 5, 2014, at 4:06 PM, Chet Ramey wrote: > > BASH PATCH REPORT >