1999-09-11 23:53:40 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2004-01-08 17:33:29 +00:00
|
|
|
| PHP Version 5 |
|
1999-09-11 23:53:40 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2007-12-31 07:17:19 +00:00
|
|
|
| Copyright (c) 1997-2008 The PHP Group |
|
1999-09-11 23:53:40 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 12:51:34 +00:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
1999-09-11 23:53:40 +00:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-10 20:04:29 +00:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 12:51:34 +00:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
1999-09-11 23:53:40 +00:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Author: Sascha Schumann <sascha@schumann.cx> |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
/* $Id$ */
|
|
|
|
|
1999-09-11 23:47:16 +00:00
|
|
|
#ifndef URI_SCANNER_H
|
|
|
|
#define URI_SCANNER_H
|
|
|
|
|
2001-08-26 11:49:43 +00:00
|
|
|
int php_url_scanner_activate(TSRMLS_D);
|
|
|
|
int php_url_scanner_deactivate(TSRMLS_D);
|
2000-09-19 17:21:26 +00:00
|
|
|
|
1999-09-11 23:47:16 +00:00
|
|
|
char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen);
|
|
|
|
|
2000-08-01 07:45:14 +00:00
|
|
|
enum url_state {
|
|
|
|
STATE_NORMAL,
|
|
|
|
STATE_TAG_START,
|
|
|
|
STATE_TAG,
|
|
|
|
STATE_IN_TAG,
|
|
|
|
STATE_TAG_ATTR,
|
|
|
|
STATE_TAG_IS,
|
|
|
|
STATE_TAG_IS2,
|
|
|
|
STATE_TAG_VAL,
|
|
|
|
STATE_TAG_VAL2,
|
|
|
|
STATE_TAG_QVAL1,
|
|
|
|
STATE_TAG_QVAL2,
|
|
|
|
STATE_TAG_QVAL2b
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct url_adapt_struct {
|
|
|
|
enum url_state state;
|
|
|
|
char *tag;
|
|
|
|
char *attr;
|
|
|
|
char *val;
|
|
|
|
char delim;
|
|
|
|
char *p;
|
2001-08-11 17:03:37 +00:00
|
|
|
int l, ml;
|
2000-08-04 15:23:19 +00:00
|
|
|
int attr_done;
|
2000-08-01 07:45:14 +00:00
|
|
|
} url_adapt_state_t;
|
|
|
|
|
1999-09-11 23:47:16 +00:00
|
|
|
#endif
|