remove HAVE_ defines for mandatory libs
[m6w6/ext-http] / php_http_url.c
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 /* $Id: http_url_api.c 292841 2009-12-31 08:48:57Z mike $ */
14
15 #include "php_http.h"
16
17 static inline char *localhostname(void)
18 {
19 char hostname[1024] = {0};
20
21 #ifdef PHP_WIN32
22 if (SUCCESS == gethostname(hostname, lenof(hostname))) {
23 return estrdup(hostname);
24 }
25 #elif defined(HAVE_GETHOSTNAME)
26 if (SUCCESS == gethostname(hostname, lenof(hostname))) {
27 # if defined(HAVE_GETDOMAINNAME)
28 size_t hlen = strlen(hostname);
29 if (hlen <= lenof(hostname) - lenof("(none)")) {
30 hostname[hlen++] = '.';
31 if (SUCCESS == getdomainname(&hostname[hlen], lenof(hostname) - hlen)) {
32 if (!strcmp(&hostname[hlen], "(none)")) {
33 hostname[hlen - 1] = '\0';
34 }
35 return estrdup(hostname);
36 }
37 }
38 # endif
39 if (strcmp(hostname, "(none)")) {
40 return estrdup(hostname);
41 }
42 }
43 #endif
44 return estrndup("localhost", lenof("localhost"));
45 }
46
47 PHP_HTTP_API char *php_http_url_absolute(const char *url, int flags TSRMLS_DC)
48 {
49 char *abs = NULL;
50 php_url *purl = NULL;
51
52 if (url) {
53 purl = php_url_parse(abs = estrdup(url));
54 STR_SET(abs, NULL);
55 if (!purl) {
56 php_http_error(HE_WARNING, PHP_HTTP_E_URL, "Could not parse URL (%s)", url);
57 return NULL;
58 }
59 }
60
61 php_http_url(flags, purl, NULL, NULL, &abs, NULL TSRMLS_CC);
62
63 if (purl) {
64 php_url_free(purl);
65 }
66
67 return abs;
68 }
69
70 PHP_HTTP_API void php_http_url(int flags, const php_url *old_url, const php_url *new_url, php_url **url_ptr, char **url_str, size_t *url_len TSRMLS_DC)
71 {
72 #if defined(HAVE_GETSERVBYPORT) || defined(HAVE_GETSERVBYNAME)
73 struct servent *se;
74 #endif
75 php_url *url = ecalloc(1, sizeof(php_url));
76
77 #define __URLSET(u,n) \
78 ((u)&&(u)->n)
79 #define __URLCPY(n) \
80 url->n = __URLSET(new_url,n) ? estrdup(new_url->n) : (__URLSET(old_url,n) ? estrdup(old_url->n) : NULL)
81
82 if (!(flags & PHP_HTTP_URL_STRIP_PORT)) {
83 url->port = __URLSET(new_url, port) ? new_url->port : ((old_url) ? old_url->port : 0);
84 }
85 if (!(flags & PHP_HTTP_URL_STRIP_USER)) {
86 __URLCPY(user);
87 }
88 if (!(flags & PHP_HTTP_URL_STRIP_PASS)) {
89 __URLCPY(pass);
90 }
91
92 __URLCPY(scheme);
93 __URLCPY(host);
94
95 if (!(flags & PHP_HTTP_URL_STRIP_PATH)) {
96 if ((flags & PHP_HTTP_URL_JOIN_PATH) && __URLSET(old_url, path) && __URLSET(new_url, path) && *new_url->path != '/') {
97 size_t old_path_len = strlen(old_url->path), new_path_len = strlen(new_url->path);
98
99 url->path = ecalloc(1, old_path_len + new_path_len + 1 + 1);
100
101 strcat(url->path, old_url->path);
102 if (url->path[old_path_len - 1] != '/') {
103 php_dirname(url->path, old_path_len);
104 strcat(url->path, "/");
105 }
106 strcat(url->path, new_url->path);
107 } else {
108 __URLCPY(path);
109 }
110 }
111 if (!(flags & PHP_HTTP_URL_STRIP_QUERY)) {
112 if ((flags & PHP_HTTP_URL_JOIN_QUERY) && __URLSET(new_url, query) && __URLSET(old_url, query)) {
113 zval qarr, qstr;
114
115 INIT_PZVAL(&qstr);
116 INIT_PZVAL(&qarr);
117 array_init(&qarr);
118
119 ZVAL_STRING(&qstr, old_url->query, 0);
120 php_http_querystring_modify(&qarr, &qstr TSRMLS_CC);
121 ZVAL_STRING(&qstr, new_url->query, 0);
122 php_http_querystring_modify(&qarr, &qstr TSRMLS_CC);
123
124 ZVAL_NULL(&qstr);
125 php_http_querystring_update(&qarr, &qstr TSRMLS_CC);
126 url->query = Z_STRVAL(qstr);
127 zval_dtor(&qarr);
128 } else {
129 __URLCPY(query);
130 }
131 }
132 if (!(flags & PHP_HTTP_URL_STRIP_FRAGMENT)) {
133 __URLCPY(fragment);
134 }
135
136 if (!url->scheme) {
137 if (flags & PHP_HTTP_URL_FROM_ENV) {
138 zval *https = php_http_env_get_server_var(ZEND_STRL("HTTPS"), 1 TSRMLS_CC);
139 if (https && !strcasecmp(Z_STRVAL_P(https), "ON")) {
140 url->scheme = estrndup("https", lenof("https"));
141 } else switch (url->port) {
142 case 443:
143 url->scheme = estrndup("https", lenof("https"));
144 break;
145
146 #ifndef HAVE_GETSERVBYPORT
147 default:
148 #endif
149 case 80:
150 case 0:
151 url->scheme = estrndup("http", lenof("http"));
152 break;
153
154 #ifdef HAVE_GETSERVBYPORT
155 default:
156 if ((se = getservbyport(htons(url->port), "tcp")) && se->s_name) {
157 url->scheme = estrdup(se->s_name);
158 } else {
159 url->scheme = estrndup("http", lenof("http"));
160 }
161 break;
162 #endif
163 }
164 } else {
165 url->scheme = estrndup("http", lenof("http"));
166 }
167 }
168
169 if (!url->host) {
170 if (flags & PHP_HTTP_URL_FROM_ENV) {
171 zval *zhost;
172
173 if ((((zhost = php_http_env_get_server_var(ZEND_STRL("HTTP_HOST"), 1 TSRMLS_CC)) ||
174 (zhost = php_http_env_get_server_var(ZEND_STRL("SERVER_NAME"), 1 TSRMLS_CC)))) && Z_STRLEN_P(zhost)) {
175 url->host = estrndup(Z_STRVAL_P(zhost), Z_STRLEN_P(zhost));
176 } else {
177 url->host = localhostname();
178 }
179 } else {
180 url->host = estrndup("localhost", lenof("localhost"));
181 }
182 }
183
184 if (!url->path) {
185 if ((flags & PHP_HTTP_URL_FROM_ENV) && SG(request_info).request_uri && SG(request_info).request_uri[0]) {
186 const char *q = strchr(SG(request_info).request_uri, '?');
187
188 if (q) {
189 url->path = estrndup(SG(request_info).request_uri, q - SG(request_info).request_uri);
190 } else {
191 url->path = estrdup(SG(request_info).request_uri);
192 }
193 } else {
194 url->path = estrndup("/", 1);
195 }
196 } else if (url->path[0] != '/') {
197 if ((flags & PHP_HTTP_URL_FROM_ENV) && SG(request_info).request_uri && SG(request_info).request_uri[0]) {
198 size_t ulen = strlen(SG(request_info).request_uri);
199 size_t plen = strlen(url->path);
200 char *path;
201
202 if (SG(request_info).request_uri[ulen-1] != '/') {
203 for (--ulen; ulen && SG(request_info).request_uri[ulen - 1] != '/'; --ulen);
204 }
205
206 path = emalloc(ulen + plen + 1);
207 memcpy(path, SG(request_info).request_uri, ulen);
208 memcpy(path + ulen, url->path, plen);
209 path[ulen + plen] = '\0';
210 STR_SET(url->path, path);
211 } else {
212 size_t plen = strlen(url->path);
213 char *path = emalloc(plen + 1 + 1);
214
215 path[0] = '/';
216 memcpy(&path[1], url->path, plen + 1);
217 STR_SET(url->path, path);
218 }
219 }
220 /* replace directory references if path is not a single slash */
221 if (url->path[0] && (url->path[0] != '/' || url->path[1])) {
222 char *ptr, *end = url->path + strlen(url->path) + 1;
223
224 for (ptr = strstr(url->path, "/."); ptr; ptr = strstr(ptr, "/.")) {
225 switch (ptr[2]) {
226 case '\0':
227 ptr[1] = '\0';
228 break;
229
230 case '/':
231 memmove(&ptr[1], &ptr[3], end - &ptr[3]);
232 break;
233
234 case '.':
235 if (ptr[3] == '/') {
236 char *pos = &ptr[4];
237 while (ptr != url->path) {
238 if (*--ptr == '/') {
239 break;
240 }
241 }
242 memmove(&ptr[1], pos, end - pos);
243 break;
244 } else if (!ptr[3]) {
245 /* .. at the end */
246 ptr[1] = '\0';
247 }
248 /* fallthrough */
249
250 default:
251 /* something else */
252 ++ptr;
253 break;
254 }
255 }
256 }
257
258 if (url->port) {
259 if ( ((url->port == 80) && !strcmp(url->scheme, "http"))
260 || ((url->port ==443) && !strcmp(url->scheme, "https"))
261 #ifdef HAVE_GETSERVBYNAME
262 || ((se = getservbyname(url->scheme, "tcp")) && se->s_port &&
263 (url->port == ntohs(se->s_port)))
264 #endif
265 ) {
266 url->port = 0;
267 }
268 }
269
270 if (url_str) {
271 size_t len;
272
273 *url_str = emalloc(PHP_HTTP_URL_MAXLEN + 1);
274
275 **url_str = '\0';
276 strlcat(*url_str, url->scheme, PHP_HTTP_URL_MAXLEN);
277 strlcat(*url_str, "://", PHP_HTTP_URL_MAXLEN);
278
279 if (url->user && *url->user) {
280 strlcat(*url_str, url->user, PHP_HTTP_URL_MAXLEN);
281 if (url->pass && *url->pass) {
282 strlcat(*url_str, ":", PHP_HTTP_URL_MAXLEN);
283 strlcat(*url_str, url->pass, PHP_HTTP_URL_MAXLEN);
284 }
285 strlcat(*url_str, "@", PHP_HTTP_URL_MAXLEN);
286 }
287
288 strlcat(*url_str, url->host, PHP_HTTP_URL_MAXLEN);
289
290 if (url->port) {
291 char port_str[8];
292
293 snprintf(port_str, sizeof(port_str), "%d", (int) url->port);
294 strlcat(*url_str, ":", PHP_HTTP_URL_MAXLEN);
295 strlcat(*url_str, port_str, PHP_HTTP_URL_MAXLEN);
296 }
297
298 strlcat(*url_str, url->path, PHP_HTTP_URL_MAXLEN);
299
300 if (url->query && *url->query) {
301 strlcat(*url_str, "?", PHP_HTTP_URL_MAXLEN);
302 strlcat(*url_str, url->query, PHP_HTTP_URL_MAXLEN);
303 }
304
305 if (url->fragment && *url->fragment) {
306 strlcat(*url_str, "#", PHP_HTTP_URL_MAXLEN);
307 strlcat(*url_str, url->fragment, PHP_HTTP_URL_MAXLEN);
308 }
309
310 if (PHP_HTTP_URL_MAXLEN == (len = strlen(*url_str))) {
311 php_http_error(HE_NOTICE, PHP_HTTP_E_URL, "Length of URL exceeds PHP_HTTP_URL_MAXLEN");
312 }
313 if (url_len) {
314 *url_len = len;
315 }
316 }
317
318 if (url_ptr) {
319 *url_ptr = url;
320 } else {
321 php_url_free(url);
322 }
323 }
324
325 PHP_HTTP_API STATUS php_http_url_encode_hash(HashTable *hash, zend_bool override_argsep, char *pre_encoded_data, size_t pre_encoded_len, char **encoded_data, size_t *encoded_len TSRMLS_DC)
326 {
327 char *arg_sep;
328 size_t arg_sep_len;
329 php_http_buffer *qstr = php_http_buffer_new();
330
331 if (override_argsep || !(arg_sep_len = strlen(arg_sep = INI_STR("arg_separator.output")))) {
332 arg_sep = PHP_HTTP_URL_ARGSEP;
333 arg_sep_len = lenof(PHP_HTTP_URL_ARGSEP);
334 }
335
336 if (pre_encoded_len && pre_encoded_data) {
337 php_http_buffer_append(qstr, pre_encoded_data, pre_encoded_len);
338 }
339
340 if (SUCCESS != php_http_url_encode_hash_recursive(hash, qstr, arg_sep, arg_sep_len, NULL, 0)) {
341 php_http_buffer_free(&qstr);
342 return FAILURE;
343 }
344
345 php_http_buffer_data(qstr, encoded_data, encoded_len);
346 php_http_buffer_free(&qstr);
347
348 return SUCCESS;
349 }
350
351 PHP_HTTP_API STATUS php_http_url_encode_hash_recursive(HashTable *ht, php_http_buffer *str, const char *arg_sep, size_t arg_sep_len, const char *prefix, size_t prefix_len TSRMLS_DC)
352 {
353 php_http_array_hashkey_t key = php_http_array_hashkey_init(0);
354 zval **data = NULL;
355 HashPosition pos;
356
357 if (!ht || !str) {
358 php_http_error(HE_WARNING, PHP_HTTP_E_INVALID_PARAM, "Invalid parameters");
359 return FAILURE;
360 }
361 if (ht->nApplyCount > 0) {
362 return SUCCESS;
363 }
364
365 FOREACH_HASH_KEYVAL(pos, ht, key, data) {
366 char *encoded_key;
367 int encoded_len;
368 php_http_buffer new_prefix;
369
370 if (!data || !*data) {
371 php_http_buffer_dtor(str);
372 return FAILURE;
373 }
374
375 if (key.type == HASH_KEY_IS_STRING) {
376 if (!*key.str) {
377 /* only public properties */
378 continue;
379 }
380 if (key.len && key.str[key.len - 1] == '\0') {
381 --key.len;
382 }
383 encoded_key = php_url_encode(key.str, key.len, &encoded_len);
384 } else {
385 encoded_len = spprintf(&encoded_key, 0, "%ld", key.num);
386 }
387
388 {
389 php_http_buffer_init(&new_prefix);
390 if (prefix && prefix_len) {
391 php_http_buffer_append(&new_prefix, prefix, prefix_len);
392 php_http_buffer_appends(&new_prefix, "%5B");
393 }
394
395 php_http_buffer_append(&new_prefix, encoded_key, encoded_len);
396 efree(encoded_key);
397
398 if (prefix && prefix_len) {
399 php_http_buffer_appends(&new_prefix, "%5D");
400 }
401 php_http_buffer_fix(&new_prefix);
402 }
403
404 if (Z_TYPE_PP(data) == IS_ARRAY || Z_TYPE_PP(data) == IS_OBJECT) {
405 STATUS status;
406 ++ht->nApplyCount;
407 status = php_http_url_encode_hash_recursive(HASH_OF(*data), str, arg_sep, arg_sep_len, PHP_HTTP_BUFFER_VAL(&new_prefix), PHP_HTTP_BUFFER_LEN(&new_prefix) TSRMLS_CC);
408 --ht->nApplyCount;
409 if (SUCCESS != status) {
410 php_http_buffer_dtor(&new_prefix);
411 php_http_buffer_dtor(str);
412 return FAILURE;
413 }
414 } else {
415 zval *val = php_http_zsep(IS_STRING, *data);
416
417 if (PHP_HTTP_BUFFER_LEN(str)) {
418 php_http_buffer_append(str, arg_sep, arg_sep_len);
419 }
420 php_http_buffer_append(str, PHP_HTTP_BUFFER_VAL(&new_prefix), PHP_HTTP_BUFFER_LEN(&new_prefix));
421 php_http_buffer_appends(str, "=");
422
423 if (Z_STRLEN_P(val) && Z_STRVAL_P(val)) {
424 char *encoded_val;
425 int encoded_len;
426
427 encoded_val = php_url_encode(Z_STRVAL_P(val), Z_STRLEN_P(val), &encoded_len);
428 php_http_buffer_append(str, encoded_val, encoded_len);
429 efree(encoded_val);
430 }
431
432 zval_ptr_dtor(&val);
433 }
434 php_http_buffer_dtor(&new_prefix);
435 }
436 return SUCCESS;
437 }
438
439 #define PHP_HTTP_BEGIN_ARGS(method, req_args) PHP_HTTP_BEGIN_ARGS_EX(HttpUrl, method, 0, req_args)
440 #define PHP_HTTP_EMPTY_ARGS(method) PHP_HTTP_EMPTY_ARGS_EX(HttpUrl, method, 0)
441 #define PHP_HTTP_URL_ME(method, visibility) PHP_ME(HttpUrl, method, PHP_HTTP_ARGS(HttpUrl, method), visibility)
442
443 PHP_HTTP_BEGIN_ARGS(__construct, 0)
444 PHP_HTTP_ARG_VAL(old_url, 0)
445 PHP_HTTP_ARG_VAL(new_url, 0)
446 PHP_HTTP_ARG_VAL(flags, 0)
447 PHP_HTTP_END_ARGS;
448 PHP_HTTP_EMPTY_ARGS(toString);
449
450 zend_class_entry *php_http_url_class_entry;
451 zend_function_entry php_http_url_method_entry[] = {
452 PHP_HTTP_URL_ME(__construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
453 PHP_HTTP_URL_ME(toString, ZEND_ACC_PUBLIC)
454 ZEND_MALIAS(HttpUrl, __toString, toString, PHP_HTTP_ARGS(HttpUrl, toString), ZEND_ACC_PUBLIC)
455 EMPTY_FUNCTION_ENTRY
456 };
457
458 PHP_METHOD(HttpUrl, __construct)
459 {
460 with_error_handling(EH_THROW, PHP_HTTP_EX_CE(runtime)) {
461 zval *new_url = NULL, *old_url = NULL;
462 long flags = PHP_HTTP_URL_FROM_ENV;
463
464 if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z!z!l", &old_url, &new_url, &flags)) {
465 with_error_handling(EH_THROW, PHP_HTTP_EX_CE(url)) {
466 php_url *res_purl, *new_purl = NULL, *old_purl = NULL;
467
468 if (new_url) {
469 switch (Z_TYPE_P(new_url)) {
470 case IS_OBJECT:
471 case IS_ARRAY:
472 new_purl = php_http_url_from_struct(NULL, HASH_OF(new_url) TSRMLS_CC);
473 break;
474 default: {
475 zval *cpy = php_http_zsep(IS_STRING, new_url);
476
477 new_purl = php_url_parse(Z_STRVAL_P(new_url));
478 zval_ptr_dtor(&cpy);
479 break;
480 }
481 }
482 if (!new_purl) {
483 return;
484 }
485 }
486 if (old_url) {
487 switch (Z_TYPE_P(old_url)) {
488 case IS_OBJECT:
489 case IS_ARRAY:
490 old_purl = php_http_url_from_struct(NULL, HASH_OF(old_url) TSRMLS_CC);
491 break;
492 default: {
493 zval *cpy = php_http_zsep(IS_STRING, old_url);
494
495 old_purl = php_url_parse(Z_STRVAL_P(old_url));
496 zval_ptr_dtor(&cpy);
497 break;
498 }
499 }
500 if (!old_purl) {
501 if (new_purl) {
502 php_url_free(new_purl);
503 }
504 return;
505 }
506 }
507
508 php_http_url(flags, old_purl, new_purl, &res_purl, NULL, NULL TSRMLS_CC);
509 php_http_url_to_struct(res_purl, getThis() TSRMLS_CC);
510
511 php_url_free(res_purl);
512 if (old_purl) {
513 php_url_free(old_purl);
514 }
515 if (new_purl) {
516 php_url_free(new_purl);
517 }
518 } end_error_handling();
519 }
520 } end_error_handling();
521 }
522
523 PHP_METHOD(HttpUrl, toString)
524 {
525 if (SUCCESS == zend_parse_parameters_none()) {
526 php_url *purl;
527
528 if ((purl = php_http_url_from_struct(NULL, HASH_OF(getThis()) TSRMLS_CC))) {
529 char *str;
530 size_t len;
531
532 php_http_url(0, purl, NULL, NULL, &str, &len TSRMLS_CC);
533 php_url_free(purl);
534 RETURN_STRINGL(str, len, 0);
535 }
536 }
537 RETURN_EMPTY_STRING();
538 }
539
540 PHP_MINIT_FUNCTION(http_url)
541 {
542 PHP_HTTP_REGISTER_CLASS(http, Url, http_url, php_http_object_class_entry, 0);
543
544 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("scheme"), ZEND_ACC_PUBLIC TSRMLS_CC);
545 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("user"), ZEND_ACC_PUBLIC TSRMLS_CC);
546 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("pass"), ZEND_ACC_PUBLIC TSRMLS_CC);
547 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("host"), ZEND_ACC_PUBLIC TSRMLS_CC);
548 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("port"), ZEND_ACC_PUBLIC TSRMLS_CC);
549 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("path"), ZEND_ACC_PUBLIC TSRMLS_CC);
550 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("query"), ZEND_ACC_PUBLIC TSRMLS_CC);
551 zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("fragment"), ZEND_ACC_PUBLIC TSRMLS_CC);
552
553 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("REPLACE"), PHP_HTTP_URL_REPLACE TSRMLS_CC);
554 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("JOIN_PATH"), PHP_HTTP_URL_JOIN_PATH TSRMLS_CC);
555 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("JOIN_QUERY"), PHP_HTTP_URL_JOIN_QUERY TSRMLS_CC);
556 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_USER"), PHP_HTTP_URL_STRIP_USER TSRMLS_CC);
557 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_PASS"), PHP_HTTP_URL_STRIP_PASS TSRMLS_CC);
558 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_AUTH"), PHP_HTTP_URL_STRIP_AUTH TSRMLS_CC);
559 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_PORT"), PHP_HTTP_URL_STRIP_PORT TSRMLS_CC);
560 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_PATH"), PHP_HTTP_URL_STRIP_PATH TSRMLS_CC);
561 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_QUERY"), PHP_HTTP_URL_STRIP_QUERY TSRMLS_CC);
562 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_FRAGMENT"), PHP_HTTP_URL_STRIP_FRAGMENT TSRMLS_CC);
563 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("STRIP_ALL"), PHP_HTTP_URL_STRIP_ALL TSRMLS_CC);
564 zend_declare_class_constant_long(php_http_url_class_entry, ZEND_STRL("FROM_ENV"), PHP_HTTP_URL_FROM_ENV TSRMLS_CC);
565
566 return SUCCESS;
567 }
568
569
570 /*
571 * Local variables:
572 * tab-width: 4
573 * c-basic-offset: 4
574 * End:
575 * vim600: noet sw=4 ts=4 fdm=marker
576 * vim<600: noet sw=4 ts=4
577 */
578