On Fri, Oct 30, 2026 at 10:09 PM Kaartic Sivaraam
[off-list ref] wrote:
On 10/12/26 13:14, Christian Couder wrote:
quoted
+static enum parse_opt_result parse_long_opt(struct parse_opt_ctx_t *p,
+ const char *arg,
+ const struct option *options)
+{
+ struct parsed_option found;
+ struct parsed_option other;
+ const char *stuck;
+ enum long_opt_lookup result = lookup_long_opt(p, arg, options,
+ &found, &other, &stuck);
+
Would it not be better to consume the `enum long_op_lookup` return value
via a switch rather than having a set of if statements to cover all the
cases?
Yeah, it might be a bit better with a switch, so the v4 I just sent
uses a switch.
Thanks.