On Thu, Jan 08, 2026 at 11:49:55AM +0200, Costa Shulyupin wrote: > getopt_long() processes short and long options independently. > RTLA, like the majority of applications, uses both short and long > variants for each logical option. > > Since the val member of struct option holds the letter of the short > variant, the string of short options can be reconstructed from the > array of long options. > > Add getopt_auto() to generate optstring from an array of long options, > eliminating the need to maintain separate short option strings. > > Signed-off-by: Costa Shulyupin <[email protected]> ...
That's very clever. Reviewed-by: Wander Lairson Costa <[email protected]>
