X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_etag.c;h=543ce5fcf4078721953e94b8edebb7e12c737972;hb=a458b9a25cf0ec9b4d8bde2b22e43c44d71427c8;hp=87164fef22b3406faf0755a4b41c30cc4bdcf19b;hpb=25b667802b9bf0351f7e5e9f4848b65181b76ac9;p=m6w6%2Fext-http diff --git a/php_http_etag.c b/php_http_etag.c index 87164fe..543ce5f 100644 --- a/php_http_etag.c +++ b/php_http_etag.c @@ -1,7 +1,18 @@ -#include "php_http.h" +/* + +--------------------------------------------------------------------+ + | 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-2011, Michael Wallner | + +--------------------------------------------------------------------+ +*/ +#include "php_http.h" -#ifdef PHP_HTTP_HAVE_HASH +#if PHP_HTTP_HAVE_HASH # include "php_hash.h" #endif @@ -14,7 +25,7 @@ PHP_HTTP_API php_http_etag_t *php_http_etag_init(const char *mode TSRMLS_DC) void *ctx; php_http_etag_t *e; -#ifdef PHP_HTTP_HAVE_HASH +#if PHP_HTTP_HAVE_HASH const php_hash_ops *eho = NULL; if (mode && (eho = php_hash_fetch_ops(mode, strlen(mode)))) { @@ -46,7 +57,7 @@ PHP_HTTP_API char *php_http_etag_finish(php_http_etag_t *e) unsigned char digest[128] = {0}; char *etag = NULL; -#ifdef PHP_HTTP_HAVE_HASH +#if PHP_HTTP_HAVE_HASH const php_hash_ops *eho = NULL; if (e->mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) { @@ -73,7 +84,7 @@ PHP_HTTP_API char *php_http_etag_finish(php_http_etag_t *e) PHP_HTTP_API size_t php_http_etag_update(php_http_etag_t *e, const char *data_ptr, size_t data_len) { -#ifdef PHP_HTTP_HAVE_HASH +#if PHP_HTTP_HAVE_HASH const php_hash_ops *eho = NULL; if (e->mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) { @@ -95,3 +106,13 @@ PHP_HTTP_API size_t php_http_etag_update(php_http_etag_t *e, const char *data_pt return data_len; } + +/* + * 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 + */ +