summaryrefslogtreecommitdiff
path: root/scan_urlencoded_query.h
diff options
context:
space:
mode:
Diffstat (limited to 'scan_urlencoded_query.h')
-rw-r--r--scan_urlencoded_query.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/scan_urlencoded_query.h b/scan_urlencoded_query.h
index 7ff6e42..a0b77af 100644
--- a/scan_urlencoded_query.h
+++ b/scan_urlencoded_query.h
@@ -8,6 +8,11 @@
8 8
9#include <sys/types.h> 9#include <sys/types.h>
10 10
11typedef struct {
12 char *key;
13 int value;
14} ot_keywords;
15
11typedef enum { 16typedef enum {
12 SCAN_PATH = 1, 17 SCAN_PATH = 1,
13 SCAN_SEARCHPATH_PARAM = 2, 18 SCAN_SEARCHPATH_PARAM = 2,
@@ -21,9 +26,20 @@ typedef enum {
21 flags determines, what to parse 26 flags determines, what to parse
22 returns number of valid converted characters in deststring 27 returns number of valid converted characters in deststring
23 or -1 for parse error 28 or -1 for parse error
29 or -2 for terminator found
24*/ 30*/
25ssize_t scan_urlencoded_query(char **string, char *deststring, SCAN_SEARCHPATH_FLAG flags); 31ssize_t scan_urlencoded_query(char **string, char *deststring, SCAN_SEARCHPATH_FLAG flags);
26 32
33/* string in: pointer to source
34 out: pointer to next scan position
35 flags determines, what to parse
36 returns value for matched keyword
37 or -1 for parse error
38 or -2 for terminator found
39 or -3 for no keyword matched
40 */
41int scan_find_keywords( const ot_keywords * keywords, char **string, SCAN_SEARCHPATH_FLAG flags);
42
27/* string in: pointer to value of a param=value pair to skip 43/* string in: pointer to value of a param=value pair to skip
28 out: pointer to next scan position on return 44 out: pointer to next scan position on return
29*/ 45*/