tools

various tools
git clone git://deadbeef.fr/tools.git
Log | Files | Refs | README | LICENSE

commit 8d6b3a1c842b90919ba10bb6f58a59e34f99eed2
parent 5d4ab82bdb1c6e02a1b930dd4d5ea66c78179dfd
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Fri, 26 Jun 2020 17:51:35 +0200

add STD_HELP define to reduce duplicated code

Diffstat:
Mbtl/src/optparser.hpp | 2++
Mlmerge/src/lmerge.cpp | 2+-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/btl/src/optparser.hpp b/btl/src/optparser.hpp @@ -10,6 +10,8 @@ extern "C" { #define nullptr 0 #endif +#define STD_HELP { "help", "shows this message", 'h', 0, nullptr, nullptr, nullptr } + #ifndef FILE_PTR #warning "FILE_PTR was not defined, defaulting to void*" #define FILE_PTR void* diff --git a/lmerge/src/lmerge.cpp b/lmerge/src/lmerge.cpp @@ -88,7 +88,7 @@ int main( int argc, char const *const *argv ) opt_desc_t opts[] = { - { "help", "shows this message", 'h', 0, nullptr, nullptr, nullptr }, + STD_HELP, #ifndef NO_CMDLINE { "field_sep", "field separator", 't' , 0, &SEP_START, set<char const**>, show<char*> }, { "entry_sep", "entry separator", 'l' , 0, &SEP_ENTRY, set<char const**>, show<char*> },