From 97dfab0cbc17e3b4d22b20f062e550fc0ef54ecc Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 23 Oct 2020 13:51:17 +0200 Subject: [PATCH] *.h.in: apply clang-format --- include/libhashkit-1.0/configure.h.in | 8 ---- include/libmemcached-1.0/configure.h.in | 7 ---- src/libhashkit/hashkitcon.h.in | 50 +++++++------------------ src/mem_config.h.in | 31 +++++++++++---- test/conf.h.in | 15 ++++++++ 5 files changed, 52 insertions(+), 59 deletions(-) diff --git a/include/libhashkit-1.0/configure.h.in b/include/libhashkit-1.0/configure.h.in index 824c15d3..8cef3b58 100644 --- a/include/libhashkit-1.0/configure.h.in +++ b/include/libhashkit-1.0/configure.h.in @@ -17,11 +17,3 @@ #define LIBHASHKIT_VERSION_STRING "@LIBHASHKIT_VERSION@" #define LIBHASHKIT_VERSION_HEX @LIBHASHKIT_VERSION_HEX@ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif diff --git a/include/libmemcached-1.0/configure.h.in b/include/libmemcached-1.0/configure.h.in index dc54d90b..f1bf37fc 100644 --- a/include/libmemcached-1.0/configure.h.in +++ b/include/libmemcached-1.0/configure.h.in @@ -15,16 +15,9 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #cmakedefine01 LIBMEMCACHED_ENABLE_DEPRECATED #cmakedefine01 LIBMEMCACHED_WITH_SASL_SUPPORT #define LIBMEMCACHED_VERSION_STRING "@LIBMEMCACHED_VERSION@" #define LIBMEMCACHED_VERSION_HEX @LIBMEMCACHED_VERSION_HEX@ -#ifdef __cplusplus -} -#endif diff --git a/src/libhashkit/hashkitcon.h.in b/src/libhashkit/hashkitcon.h.in index 98349625..e42200be 100644 --- a/src/libhashkit/hashkitcon.h.in +++ b/src/libhashkit/hashkitcon.h.in @@ -1,39 +1,17 @@ -/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: - * - * HashKit library - * - * Copyright (C) 2012 Data Differential, http://datadifferential.com/ - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * The names of its contributors may not be used to endorse or - * promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - +/* + +--------------------------------------------------------------------+ + | libmemcached - C/C++ Client Library for memcached | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted under the terms of the BSD license. | + | You should have received a copy of the license in a bundled file | + | named LICENSE; in case you did not receive a copy you can review | + | the terms online at: https://opensource.org/licenses/BSD-3-Clause | + +--------------------------------------------------------------------+ + | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ | + | Copyright (c) 2020 Michael Wallner | + +--------------------------------------------------------------------+ +*/ #pragma once diff --git a/src/mem_config.h.in b/src/mem_config.h.in index 7601a3dd..bfc0aa89 100644 --- a/src/mem_config.h.in +++ b/src/mem_config.h.in @@ -1,3 +1,18 @@ +/* + +--------------------------------------------------------------------+ + | libmemcached - C/C++ Client Library for memcached | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted under the terms of the BSD license. | + | You should have received a copy of the license in a bundled file | + | named LICENSE; in case you did not receive a copy you can review | + | the terms online at: https://opensource.org/licenses/BSD-3-Clause | + +--------------------------------------------------------------------+ + | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ | + | Copyright (c) 2020 Michael Wallner | + +--------------------------------------------------------------------+ +*/ + #pragma once #cmakedefine01 LIBMEMCACHED_WITH_SASL_SUPPORT @@ -62,22 +77,22 @@ #cmakedefine HAVE_CINTTYPES 1 #cmakedefine HAVE_CSTDINT 1 #if defined(__cplusplus) -# if defined HAVE_CINTTYPES -# include -# elif defined HAVE_CSTDINT -# include -# endif +# if defined HAVE_CINTTYPES +# include +# elif defined HAVE_CSTDINT +# include +# endif #else # include #endif #if HAVE_BACKTRACE -# define BACKTRACE_HEADER <@Backtrace_HEADER@> +# define BACKTRACE_HEADER <@Backtrace_HEADER@> #endif #if HAVE_BYTESWAP -# define BYTESWAP_32 @BYTESWAP_32@ -# cmakedefine BYTESWAP_HEADER <@BYTESWAP_HEADER@> +# define BYTESWAP_32 @BYTESWAP_32@ +# cmakedefine BYTESWAP_HEADER <@BYTESWAP_HEADER@> #endif #define HAVE_LIBMEMCACHED 1 diff --git a/test/conf.h.in b/test/conf.h.in index 40101a63..22193bfb 100644 --- a/test/conf.h.in +++ b/test/conf.h.in @@ -1,3 +1,18 @@ +/* + +--------------------------------------------------------------------+ + | libmemcached - C/C++ Client Library for memcached | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted under the terms of the BSD license. | + | You should have received a copy of the license in a bundled file | + | named LICENSE; in case you did not receive a copy you can review | + | the terms online at: https://opensource.org/licenses/BSD-3-Clause | + +--------------------------------------------------------------------+ + | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ | + | Copyright (c) 2020 Michael Wallner | + +--------------------------------------------------------------------+ +*/ + #pragma once #cmakedefine HAVE_MEMASLAP 1 -- 2.30.2