lib/strutils: extend parse_switch() to accept more options
* allow to specify more 0|1 pairs * allow to specify error message Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
e5cf147655
commit
30b294c491
3 changed files with 49 additions and 19 deletions
|
@ -36,7 +36,7 @@ extern void strtotimeval_or_err(const char *str, struct timeval *tv,
|
|||
|
||||
extern int isdigit_string(const char *str);
|
||||
|
||||
extern int parse_switch(const char *arg, const char *a, const char *b);
|
||||
extern int parse_switch(const char *arg, const char *errmesg, ...);
|
||||
|
||||
#ifndef HAVE_MEMPCPY
|
||||
extern void *mempcpy(void *restrict dest, const void *restrict src, size_t n);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue