fixed little bug with long-only options

This commit is contained in:
2026-07-01 11:57:07 +03:00
parent f1162e4df1
commit 566ca36af8
4 changed files with 29 additions and 18 deletions

View File

@@ -52,6 +52,8 @@ static glob_pars const Gdefault = {
* name has_arg flag val type argptr help
* BE carefull! The `help` field is mandatory! Omitting it equivalent of 'end_option'
*/
// if val < 33 || val > 127 we mean this like long-only option;
// you can repeat the same `val` for several long-only options without any problem
static sl_option_t cmdlnopts[] = {
// short option in only-long options should be zeroed, or you can add flag to set it to given value
{"lo0", NEED_ARG, NULL, 0, arg_int, APTR(&G.lo0), _("only long arg 0 (int)")},