From: Michael Wallner Date: Mon, 28 Sep 2015 14:38:41 +0000 (+0200) Subject: rm unused file X-Git-Tag: RELEASE_3_0_0_RC1~17 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=82ec78d4285a896f0998f61e3ea72c1afad425bd;ds=inline rm unused file --- diff --git a/php_http_strlist.c b/php_http_strlist.c deleted file mode 100644 index 6b7d8e8..0000000 --- a/php_http_strlist.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - +--------------------------------------------------------------------+ - | PECL :: http | - +--------------------------------------------------------------------+ - | Redistribution and use in source and binary forms, with or without | - | modification, are permitted provided that the conditions mentioned | - | in the accompanying LICENSE file are met. | - +--------------------------------------------------------------------+ - | Copyright (c) 2004-2014, Michael Wallner | - +--------------------------------------------------------------------+ -*/ - -#include "php_http_api.h" - -php_http_strlist_iterator_t *php_http_strlist_iterator_init(php_http_strlist_iterator_t *iter, const char list[], unsigned factor) -{ - if (!iter) { - iter = emalloc(sizeof(*iter)); - } - memset(iter, 0, sizeof(*iter)); - - iter->p = &list[0]; - iter->factor = factor; - - return iter; -} - -const char *php_http_strlist_iterator_this(php_http_strlist_iterator_t *iter, unsigned *id) -{ - if (id) { - *id = (iter->major + 1) * iter->factor + iter->minor; - } - - return iter->p; -} - -const char *php_http_strlist_iterator_next(php_http_strlist_iterator_t *iter) -{ - if (*iter->p) { - while (*iter->p) { - ++iter->p; - } - ++iter->p; - ++iter->minor; - - if (!*iter->p) { - ++iter->p; - ++iter->major; - iter->minor = 0; - } - } - - return iter->p; -} - -void php_http_strlist_iterator_dtor(php_http_strlist_iterator_t *iter) -{ - (void) iter; -} - -void php_http_strlist_iterator_free(php_http_strlist_iterator_t **iter) -{ - if (*iter) { - efree(*iter); - *iter = NULL; - } -} - -const char *php_http_strlist_find(const char list[], unsigned factor, unsigned item) -{ - unsigned M = 0, m = 0, major, minor; - const char *p = &list[0]; - - if (factor) { - major = (item / factor) - 1; - minor = item % factor; - } else { - major = 0; - minor = item; - } - while (*p && major != M++) { - while (*p) { - while (*p) { - ++p; - } - ++p; - } - ++p; - } - - while (*p && minor != m++) { - while (*p) { - ++p; - } - ++p; - } - - return p; -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ -