From 223dbf02779ed1268fdbea5640609f84dd7474e9 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Thu, 20 Oct 2022 19:55:13 +0100 Subject: [PATCH] core: Adjust clang-format guards of external files --- src/core/model/cairo-wideint-private.h | 14 +++++++------- src/core/model/cairo-wideint.c | 9 ++++----- src/core/model/hash-fnv.cc | 18 +++++++++++++++--- src/core/model/valgrind.h | 6 ++++-- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/core/model/cairo-wideint-private.h b/src/core/model/cairo-wideint-private.h index d4f9eb848..9dbc1e3b2 100644 --- a/src/core/model/cairo-wideint-private.h +++ b/src/core/model/cairo-wideint-private.h @@ -25,10 +25,13 @@ * The Initial Developer of the Original Code is Keith Packard * * Contributor(s): - * Keith R. Packard + * Keith R. Packard * */ +// NOLINTBEGIN +// clang-format off + #ifndef CAIRO_WIDEINT_H #define CAIRO_WIDEINT_H @@ -48,9 +51,6 @@ // extern const char * cairo_impl64; // extern const char * cairo_impl128; -// NOLINTBEGIN -// clang-format off - /*for compatibility with MacOS and Cygwin*/ #ifndef HAVE_STDINT_H #ifdef __APPLE__ @@ -356,11 +356,11 @@ _cairo_int_96by64_32x64_divrem (cairo_int128_t num, #undef I - // clang-format on - // NOLINTEND - #ifdef __cplusplus }; #endif #endif /* CAIRO_WIDEINT_H */ + +// clang-format on +// NOLINTEND diff --git a/src/core/model/cairo-wideint.c b/src/core/model/cairo-wideint.c index 2776a26dc..893112f32 100644 --- a/src/core/model/cairo-wideint.c +++ b/src/core/model/cairo-wideint.c @@ -1,4 +1,3 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* cairo - a vector graphics library with display and print output * * Copyright © 2004 Keith Packard @@ -26,11 +25,14 @@ * The Initial Developer of the Original Code is Keith Packard * * Contributor(s): - * Keith R. Packard + * Keith R. Packard * * Code changes for ns-3 from upstream are marked with `//PDB' */ +// NOLINTBEGIN +// clang-format off + #include "cairo-wideint-private.h" #include @@ -41,9 +43,6 @@ * Implementation of the cairo_x functions which implement high precision arithmetic. */ -// NOLINTBEGIN -// clang-format off - #if HAVE_UINT64_T const char * cairo_impl64 = "uint64_t"; diff --git a/src/core/model/hash-fnv.cc b/src/core/model/hash-fnv.cc index 9dfa3d92e..9e1a9a54b 100644 --- a/src/core/model/hash-fnv.cc +++ b/src/core/model/hash-fnv.cc @@ -69,12 +69,14 @@ namespace Fnv1aImplementation extern "C" { - // Changes from FNV distribution are marked with `//PDB' - // - // NOLINTBEGIN // clang-format off +// Changes from FNV distribution are marked with `//PDB' +// + +/* Begin fnv.h ----------------------------------------> */ + /* * fnv - Fowler/Noll/Vo- hash code * @@ -296,6 +298,10 @@ enum fnv_type { #endif /* __FNV_H__ */ +/* End fnv.h ------------------------------------------> */ + +/* Begin hash_32a.c -----------------------------------> */ + /* * hash_32 - 32 bit Fowler/Noll/Vo FNV-1a hash code * @@ -439,6 +445,10 @@ fnv_32a_str(char *str, Fnv32_t hval) return hval; } +/* End hash_32a.c -------------------------------------> */ + +/* Begin hash_64a.c -----------------------------------> */ + /* * hash_64 - 64 bit Fowler/Noll/Vo-0 FNV-1a hash code * @@ -731,6 +741,8 @@ fnv_64a_str(char *str, Fnv64_t hval) return hval; } +/* End hash_64a.c -------------------------------------> */ + // clang-format on // NOLINTEND diff --git a/src/core/model/valgrind.h b/src/core/model/valgrind.h index 64fc3ba2b..466f61feb 100644 --- a/src/core/model/valgrind.h +++ b/src/core/model/valgrind.h @@ -55,6 +55,9 @@ ---------------------------------------------------------------- */ +// NOLINTBEGIN +// clang-format off + /* This file is for inclusion into client (your!) code. You can use these macros to manipulate and query Valgrind's @@ -69,8 +72,6 @@ problem, you can compile with the NVALGRIND symbol defined (gcc -DNVALGRIND) so that client requests are not even compiled in. */ -// clang-format off - #ifndef __VALGRIND_H #define __VALGRIND_H @@ -5625,3 +5626,4 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) #endif /* __VALGRIND_H */ // clang-format on +// NOLINTEND