diff options
Diffstat (limited to 'scan_urlencoded_query.h')
-rw-r--r-- | scan_urlencoded_query.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scan_urlencoded_query.h b/scan_urlencoded_query.h new file mode 100644 index 0000000..379bc32 --- /dev/null +++ b/scan_urlencoded_query.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifdef __SCAN_URLENCODED_QUERY_H__ | ||
2 | #define __SCAN_URLENCODED_QUERY_H__ | ||
3 | |||
4 | #define BREAK_AT_QUESTIONMARK (1<<0) | ||
5 | #define BREAK_AT_WHITESPACE (1<<1) | ||
6 | #define BREAK_AT_AMPERSAND (1<<2) | ||
7 | #define BREAK_AT_EQUALSIGN (1<<3) | ||
8 | |||
9 | #define SCAN_PATH ( BREAK_AT_QUESTIONMARK | BREAK_AT_WHITESPACE ) | ||
10 | #define SCAN_SEARCHPATH_PARAM ( BREAK_AT_EQUALSIGN ) | ||
11 | #define SCAN_SEARCHPATH_VALUE ( BREAK_AT_AMPERSAND | BREAK_AT_WHITESPACE ) | ||
12 | |||
13 | // string pointer to source, pointer to after terminator on return | ||
14 | // deststring pointer to destination | ||
15 | // flags determines, what to parse | ||
16 | // returns number of valid converted characters in deststring | ||
17 | // or -1 for parse error | ||
18 | size_t scan_urlencoded_query(char **string, char *deststring, int flags); | ||
19 | |||
20 | #endif | ||