summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-03-26 12:47:19 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-03-26 12:47:19 +0000
commit9cf89b4437df6a7741532dd73fed770cd8eef9f2 (patch)
treeabdeb249d992b1ba90d44b838318d0d09c3369a2 /src/include
parentcfe736ed5615d6e00f4ce6704591782fe790a752 (diff)
downloadexecline-9cf89b4437df6a7741532dd73fed770cd8eef9f2.tar.xz
- added el_parse() and friends
- refactored execlineb to use them - version: rc for 2.1.1.1
Diffstat (limited to 'src/include')
-rw-r--r--src/include/execline/execline.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/execline/execline.h b/src/include/execline/execline.h
index 1f1ec68..7691cf1 100644
--- a/src/include/execline/execline.h
+++ b/src/include/execline/execline.h
@@ -5,12 +5,23 @@
#include <sys/types.h>
#include <skalibs/gccattributes.h>
+#include <skalibs/buffer.h>
#include <skalibs/stralloc.h>
#define EXECLINE_BLOCK_QUOTE_CHAR ' '
#define EXECLINE_BLOCK_END_CHAR '\0'
+/* Parsing */
+
+typedef int el_chargen_func_t (unsigned char *, void *) ;
+typedef el_chargen_func_t *el_chargen_func_t_ref ;
+
+extern int el_parse (stralloc *, el_chargen_func_t_ref, void *) ;
+extern int el_parse_from_string (stralloc *, char const *) ;
+extern int el_parse_from_buffer (stralloc *, buffer *) ;
+
+
/* Basics */
extern int el_vardupl (char const *, char const *, unsigned int) gccattr_pure ;