Re: add non-option reordering to in-tree getopt_long

Поиск
Список
Период
Сортировка
Искать
От
Kyotaro Horiguchi
Тема
Re: add non-option reordering to in-tree getopt_long
Дата
Msg-id
20230620.141244.1061039848681375358.horikyota.ntt@gmail.com
Ответ на
Список
Дерево обсуждения
add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Michael Paquier <michael@paquier.xyz>
Re: add non-option reordering to in-tree getopt_long Michael Paquier <michael@paquier.xyz>
Re: add non-option reordering to in-tree getopt_long Noah Misch <noah@leadboat.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Noah Misch <noah@leadboat.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Michael Paquier <michael@paquier.xyz>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Michael Paquier <michael@paquier.xyz>
Re: add non-option reordering to in-tree getopt_long Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Michael Paquier <michael@paquier.xyz>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Michael Paquier <michael@paquier.xyz>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Tom Lane <tgl@sss.pgh.pa.us>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
Re: add non-option reordering to in-tree getopt_long Tom Lane <tgl@sss.pgh.pa.us>
Re: add non-option reordering to in-tree getopt_long Nathan Bossart <nathandbossart@gmail.com>
At Fri, 16 Jun 2023 11:28:47 -0700, Nathan Bossart  wrote in 
> On Fri, Jun 16, 2023 at 04:51:38PM +0900, Kyotaro Horiguchi wrote:
> > (Honestly, the rearrangement code looks somewhat tricky to grasp..)
> 
> Yeah, I think there's still some room for improvement here.

The argv elements get shuffled around many times with the
patch. However, I couldn't find a way to decrease the count without
resorting to a forward scan.  So I've concluded the current approach
is them most effeicient, considering the complexity.

> Ah, so it effectively retains the non-option ordering, even if there is a
> '--'.  I think this behavior is worth keeping.  I attempted to fix this in
> the attached patch.

I tried some patterns with the patch and it generates the same results
with the glibc version.

The TAP test looks fine and it catches the change.

Everything looks fine to me.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
От: Michael Paquier
Дата:
FAQ