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