diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-03-26 12:47:19 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-03-26 12:47:19 +0000 |
commit | 9cf89b4437df6a7741532dd73fed770cd8eef9f2 (patch) | |
tree | abdeb249d992b1ba90d44b838318d0d09c3369a2 /src/libexecline/el_parse_from_string.c | |
parent | cfe736ed5615d6e00f4ce6704591782fe790a752 (diff) | |
download | execline-9cf89b4437df6a7741532dd73fed770cd8eef9f2.tar.gz execline-9cf89b4437df6a7741532dd73fed770cd8eef9f2.tar.xz execline-9cf89b4437df6a7741532dd73fed770cd8eef9f2.zip |
- added el_parse() and friends
- refactored execlineb to use them - version: rc for 2.1.1.1
Diffstat (limited to 'src/libexecline/el_parse_from_string.c')
-rw-r--r-- | src/libexecline/el_parse_from_string.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libexecline/el_parse_from_string.c b/src/libexecline/el_parse_from_string.c new file mode 100644 index 0000000..04c48a3 --- /dev/null +++ b/src/libexecline/el_parse_from_string.c @@ -0,0 +1,15 @@ +/* ISC license. */ + +#include <skalibs/stralloc.h> +#include <execline/execline.h> + +static int next (unsigned char *c, void *p) +{ + *c = *(*(char const **)p)++ ; + return 1 ; +} + +int el_parse_from_string (stralloc *sa, char const *s) +{ + return el_parse(sa, &next, &s) ; +} |