tool_getparam: bsearch cmdline options

- the option names are now alpha sorted and lookup is a lot faster

- use case sensitive matching. It was previously case insensitive, but that
  was not documented nor tested.

- remove "partial match" feature. It was not documented, not tested and
  was always fragile as existing use could break when we add a new
  option

- lookup short options via a table

Closes #12631
This commit is contained in:
Daniel Stenberg 2024-01-08 17:00:05 +01:00
parent 57cc70e559
commit 07dd60c05b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 343 additions and 336 deletions

View file

@ -16,7 +16,7 @@ tftp
TFTP send
</name>
<command>
-T %LOGDIR/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT// --connect-time 549
-T %LOGDIR/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT// --connect-timeout 549
</command>
<file name="%LOGDIR/test%TESTNUMBER.txt">
a chunk of

View file

@ -35,7 +35,7 @@ http
Reject too large HTTP response headers on endless redirects
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --max-redir 400 --location
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --max-redirs 400 --location
</command>
</client>