Re: Identical function names in bash source code

2019-01-07 Thread Peng Yu
> > > > https://pastebin.com/cV1jP41Y > > Really? What is your analysis? There are 100 duplicate global symbols > shared between bash and other libraries? Or is it your assertion that > one should never use the same symbol names, unconditionally? You're not > making much of a point here. It is

Re: Identical function names in bash source code

2019-01-06 Thread Chet Ramey
On 1/6/19 9:05 PM, Peng Yu wrote: >> "Not uncommon" is stretching it, since it happens in only one place: >> lib/readline/shell.c. > > No. it is not uncommon. See the analysis of duplicated function/macro > names and where they appear. There are around ~100 of them. Note that > this analysis is

Re: Identical function names in bash source code

2019-01-06 Thread Peng Yu
> "Not uncommon" is stretching it, since it happens in only one place: > lib/readline/shell.c. No. it is not uncommon. See the analysis of duplicated function/macro names and where they appear. There are around ~100 of them. Note that this analysis is not very accurate. But the balkpark estimate

Re: Identical function names in bash source code

2019-01-06 Thread Chet Ramey
On 1/5/19 1:39 PM, Eduardo Bustamante wrote: > What would you say the "suggested improvement" is here? > > To me, it reads as a generic C programming question that just happens > to use the source tree of GNU bash / GNU readline as an example. It's fine; he's just looking to understand how

Re: Identical function names in bash source code

2019-01-06 Thread Chet Ramey
On 1/5/19 1:25 PM, don fong wrote: > for my 2c, the post seems within the charter. > > quoting from the bug-bash info > page: > >> This list distributes, to the active maintainers of BASH (the Bourne Again >> SHell), bug reports and fixes for, and

Re: Identical function names in bash source code

2019-01-06 Thread Chet Ramey
On 1/5/19 9:19 AM, Peng Yu wrote: > Hi, > > It is not uncommon to see the same name is used to defined functions > in different .c files in bash source code. "Not uncommon" is stretching it, since it happens in only one place: lib/readline/shell.c. > For example, sh_single_quote is defined in

Re: Identical function names in bash source code

2019-01-05 Thread Eduardo Bustamante
On Sat, Jan 5, 2019 at 11:38 AM Peng Yu wrote: > > > What would you say the "suggested improvement" is here? > > This is implied. If it is agreed that identical function names are not > good by the majority of bash developers, then what I found could be > turned into an explicit suggestion. > >

Re: Identical function names in bash source code

2019-01-05 Thread Peng Yu
> What would you say the "suggested improvement" is here? This is implied. If it is agreed that identical function names are not good by the majority of bash developers, then what I found could be turned into an explicit suggestion. Since maybe there is a good reason, I don't want to pretend

Re: Identical function names in bash source code

2019-01-05 Thread Eduardo Bustamante
On Sat, Jan 5, 2019 at 10:25 AM don fong wrote: > > for my 2c, the post seems within the charter. > > quoting from the bug-bash info > page: > > > This list distributes, to the active maintainers of BASH (the Bourne Again > > SHell), bug reports

Re: Identical function names in bash source code

2019-01-05 Thread don fong
for my 2c, the post seems within the charter. quoting from the bug-bash info page: > This list distributes, to the active maintainers of BASH (the Bourne Again > SHell), bug reports and fixes for, and *suggestions for improvements in > BASH. *

Re: Identical function names in bash source code

2019-01-05 Thread Eduardo A . Bustamante López
On Sat, Jan 05, 2019 at 08:19:38AM -0600, Peng Yu wrote: > Hi, > > It is not uncommon to see the same name is used to defined functions > in different .c files in bash source code. > > For example, sh_single_quote is defined in both lib/readline/shell.c > and lib/sh/shquote.c with the exact same

Identical function names in bash source code

2019-01-05 Thread Peng Yu
Hi, It is not uncommon to see the same name is used to defined functions in different .c files in bash source code. For example, sh_single_quote is defined in both lib/readline/shell.c and lib/sh/shquote.c with the exact same signature. The two pieces of code are slightly different. Do they do