projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
4d3f3e6
)
- there's no php_memnstr in PHP-4
author
Michael Wallner
<mike@php.net>
Thu, 6 Apr 2006 09:32:27 +0000
(09:32 +0000)
committer
Michael Wallner
<mike@php.net>
Thu, 6 Apr 2006 09:32:27 +0000
(09:32 +0000)
http_info_api.c
patch
|
blob
|
history
diff --git
a/http_info_api.c
b/http_info_api.c
index ec238fb4f937a727796aeefd82cf07eff1a46253..95263b3bb17bc4809f7d2c05d4c7e632e5dd9885 100644
(file)
--- a/
http_info_api.c
+++ b/
http_info_api.c
@@
-55,6
+55,28
@@
PHP_HTTP_API void _http_info_dtor(http_info *i)
}
}
}
}
+#if !defined(ZEND_ENGINE_2)
+inline char *php_memnstr(char *h, char *n, size_t n_len, char *e)
+{
+ char *p;
+
+ if (e > h && b_len > 0) {
+ while (h != e) {
+ if (*h == *n) {
+ for (p = n; *p == h[p-n]; ++p) {
+ if (p == n+n_len-1) {
+ return h;
+ }
+ }
+ }
+ ++h;
+ }
+ }
+
+ return NULL;
+}
+#endif
+
PHP_HTTP_API STATUS _http_info_parse_ex(const char *pre_header, http_info *info, zend_bool silent TSRMLS_DC)
{
const char *end, *http;
PHP_HTTP_API STATUS _http_info_parse_ex(const char *pre_header, http_info *info, zend_bool silent TSRMLS_DC)
{
const char *end, *http;