]> git.ipfire.org Git - thirdparty/zstd.git/commit
improved 2-args macro to support both syntaxes 2250/head
authorYann Collet <cyan@fb.com>
Tue, 21 Jul 2020 00:41:32 +0000 (17:41 -0700)
committerYann Collet <cyan@fb.com>
Tue, 21 Jul 2020 00:41:32 +0000 (17:41 -0700)
commit610c41f90f636bbdd62683dce26e5aa7c34542cc
treeb26c751ca713cb3399e4d59b0568a64b1e44ad0b
parent23941eec049ca6c0f9e8b520a2e025e0005f39cf
improved 2-args macro to support both syntaxes

both `--long-commmand=arg` and `--long-command arg`
are supported by macro `NEXT_FIELD()`
so that the long-command only needs to be listed once.

This extends the syntax to support new syntaxes like
`-o=FILE` or `-D=dict`,
though there is no need to advertise this capability for the time being.

Also : added `NEXT_UINT32()`,
which is wrapper around `NEXT_FIELD()`
to read integer parameters.
Use the wrapper to new field, such as `--memlimit`
which can now support both syntaxes too.
programs/zstdcli.c