diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-01-31 11:21:30 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-01-31 13:51:49 +0100 |
commit | cdccc69c62579b0c13b35fad0728079652b8f3c9 (patch) | |
tree | 9fa54c710f73c5e08a9c8466e7a712eb63ee07ac /lib/compat/getsubopt.c | |
parent | 2182129c8f359c4fa1390eaba7a65b595ccd4182 (diff) |
Move library source into src sub-directory
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/compat/getsubopt.c')
-rw-r--r-- | lib/compat/getsubopt.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/compat/getsubopt.c b/lib/compat/getsubopt.c deleted file mode 100644 index e6fea1a..0000000 --- a/lib/compat/getsubopt.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "compat.h" - -#include <stdlib.h> -#include <string.h> - -#ifndef HAVE_GETSUBOPT -int getsubopt(char **opt, char *const *keys, char **val) -{ - char *s = *opt; - int i; - - *val = NULL; - *opt = strchr(s, ','); - if (*opt) *(*opt)++ = 0; - else *opt = s + strlen(s); - - for (i=0; keys[i]; i++) { - size_t l = strlen(keys[i]); - if (strncmp(keys[i], s, l)) continue; - if (s[l] == '=') - *val = s + l + 1; - else if (s[l]) continue; - return i; - } - return -1; -} -#endif |