diff options
| author | erdgeist <> | 2006-12-08 19:20:51 +0000 | 
|---|---|---|
| committer | erdgeist <> | 2006-12-08 19:20:51 +0000 | 
| commit | 2adf4fb28af99dd72c6b2fc816bcc11e5dde1ffc (patch) | |
| tree | 76b4283abe57c76b0efc7c48355f787ee6781b7b /scan_urlencoded_query.h | |
| parent | 88679832f066d35d3b1fadba0ef13bf42a54cd15 (diff) | |
Our scanner routine for the URI query string
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 | ||
