2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 21:18:02 +00:00

[#3210] update copyright dates

This commit is contained in:
Andrei Pavel 2024-03-04 12:19:56 +02:00
parent ebfe5a6be8
commit 34bf4c9103
No known key found for this signature in database
GPG Key ID: D4E804481939CB21
9 changed files with 86 additions and 86 deletions

View File

@ -1,4 +1,4 @@
// Copyright (C) 2012-2023 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@ -1,4 +1,4 @@
// Copyright (C) 2013-2023 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@ -1,4 +1,4 @@
// Copyright (C) 2012-2023 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@ -1,4 +1,4 @@
// Copyright (C) 2019-2023 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2019-2024 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@ -1,4 +1,4 @@
// Copyright (C) 2022-2023 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2022-2024 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@ -1,4 +1,4 @@
// Copyright (C) 2022-2023 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2022-2024 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@ -1,30 +1,30 @@
// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef KEA_UTIL_STR_H #ifndef KEA_UTIL_STR_H
#define KEA_UTIL_STR_H #define KEA_UTIL_STR_H
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <algorithm> #include <algorithm>
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
namespace isc { namespace isc {
namespace util { namespace util {
namespace str { namespace str {
/// @brief A Set of C++ Utilities for Manipulating Strings /// @brief A Set of C++ Utilities for Manipulating Strings
/// ///
/// @brief A standard string util exception that is thrown if getToken or /// @brief A standard string util exception that is thrown if getToken or
/// numToToken are called with bad input data /// numToToken are called with bad input data
@ -36,16 +36,16 @@ public:
}; };
/// @brief Trim leading and trailing spaces. /// @brief Trim leading and trailing spaces.
/// ///
/// Returns a copy of the input string but with any leading or trailing spaces /// Returns a copy of the input string but with any leading or trailing spaces
/// or tabs removed. /// or tabs removed.
/// ///
/// @param input Input string to modify. /// @param input Input string to modify.
/// ///
/// @return String with leading and trailing spaces removed. /// @return String with leading and trailing spaces removed.
std::string std::string
trim(const std::string& input); trim(const std::string& input);
/// @brief Finds the "trimmed" end of a buffer /// @brief Finds the "trimmed" end of a buffer
/// ///
/// Works backward from the end of the buffer, looking for the first /// Works backward from the end of the buffer, looking for the first
@ -68,71 +68,71 @@ seekTrimmed(Iterator const& begin, Iterator end, uint8_t const trim_val) {
} }
return (end); return (end);
} }
/// @brief Split string into tokens. /// @brief Split string into tokens.
/// ///
/// Splits a string into tokens (the tokens being delimited by one or more of /// Splits a string into tokens (the tokens being delimited by one or more of
/// the delimiter characters) and returns the tokens in a vector. /// the delimiter characters) and returns the tokens in a vector.
/// Adjacent delimiters are considered to be a single delimiter. /// Adjacent delimiters are considered to be a single delimiter.
/// ///
/// Special cases are: /// Special cases are:
/// -# The empty string is considered to be zero tokens. /// -# The empty string is considered to be zero tokens.
/// -# A string comprising nothing but delimiters is considered to be zero /// -# A string comprising nothing but delimiters is considered to be zero
/// tokens. /// tokens.
/// ///
/// The reasoning behind this is that the string can be thought of as having /// The reasoning behind this is that the string can be thought of as having
/// invisible leading and trailing delimiter characters. Therefore both cases /// invisible leading and trailing delimiter characters. Therefore both cases
/// reduce to a set of contiguous delimiters, which are considered a single /// reduce to a set of contiguous delimiters, which are considered a single
/// delimiter (so getting rid of the string). /// delimiter (so getting rid of the string).
/// Optional escape allows to escape delimiter characters (and *only* them /// Optional escape allows to escape delimiter characters (and *only* them
/// and the escape character itself) using backslash. /// and the escape character itself) using backslash.
/// ///
/// We could use Boost for this, but this (simple) function eliminates one /// We could use Boost for this, but this (simple) function eliminates one
/// dependency in the code. /// dependency in the code.
/// ///
/// @param text String to be split. Passed by value as the internal copy is /// @param text String to be split. Passed by value as the internal copy is
/// altered during the processing. /// altered during the processing.
/// @param delim Delimiter characters /// @param delim Delimiter characters
/// @param escape Use backslash to escape delimiter characters /// @param escape Use backslash to escape delimiter characters
/// ///
/// @return Vector of tokens. /// @return Vector of tokens.
std::vector<std::string> std::vector<std::string>
tokens(const std::string& text, const std::string& delim = " \t\n", bool escape = false); tokens(const std::string& text, const std::string& delim = " \t\n", bool escape = false);
/// @brief Convert character to uppercase. /// @brief Convert character to uppercase.
/// ///
/// Used in uppercase() to pass as a parameter to std::transform(). The /// Used in uppercase() to pass as a parameter to std::transform(). The
/// function std::toupper() can't be used as it takes an "int" as its parameter; /// function std::toupper() can't be used as it takes an "int" as its parameter;
/// this confuses the template expansion mechanism because dereferencing a /// this confuses the template expansion mechanism because dereferencing a
/// string::iterator returns a char. /// string::iterator returns a char.
/// ///
/// @param chr Character to be upper-cased. /// @param chr Character to be upper-cased.
/// ///
/// @return Uppercase version of the input character. /// @return Uppercase version of the input character.
char char
toUpper(char const chr); toUpper(char const chr);
/// @brief Convert string to uppercase. /// @brief Convert string to uppercase.
/// ///
/// @param text String to be upper-cased. /// @param text String to be upper-cased.
void void
uppercase(std::string& text); uppercase(std::string& text);
/// @brief Convert character to lowercase. /// @brief Convert character to lowercase.
/// ///
/// Used in lowercase() to pass as a parameter to std::transform(). The /// Used in lowercase() to pass as a parameter to std::transform(). The
/// function std::tolower() can't be used as it takes an "int" as its parameter; /// function std::tolower() can't be used as it takes an "int" as its parameter;
/// this confuses the template expansion mechanism because dereferencing a /// this confuses the template expansion mechanism because dereferencing a
/// string::iterator returns a char. /// string::iterator returns a char.
/// ///
/// @param chr Character to be lower-cased. /// @param chr Character to be lower-cased.
/// ///
/// @return Lowercase version of the input character. /// @return Lowercase version of the input character.
char char
toLower(char const chr); toLower(char const chr);
/// @brief Convert string to lowercase. /// @brief Convert string to lowercase.
/// ///
/// @param text String to be lower-cased. /// @param text String to be lower-cased.
void void
lowercase(std::string& text); lowercase(std::string& text);
@ -288,5 +288,5 @@ dumpAsHex(const uint8_t* data, size_t length);
} // namespace str } // namespace str
} // namespace util } // namespace util
} // namespace isc } // namespace isc
#endif // KEA_UTIL_STR_H #endif // KEA_UTIL_STR_H

View File

@ -1,29 +1,29 @@
SUBDIRS = . SUBDIRS = .
AM_CPPFLAGS = AM_CPPFLAGS =
AM_CPPFLAGS += -DABS_SRCDIR=\"$(abs_srcdir)\" AM_CPPFLAGS += -DABS_SRCDIR=\"$(abs_srcdir)\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_builddir)\" AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_builddir)\"
AM_CPPFLAGS += -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib AM_CPPFLAGS += -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES) AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS) AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_STATIC_LINK if USE_STATIC_LINK
AM_LDFLAGS = -static AM_LDFLAGS = -static
endif endif
CLEANFILES = *.gcno *.gcda CLEANFILES = *.gcno *.gcda
# CSV files are created by unit tests for CSVFile class. # CSV files are created by unit tests for CSVFile class.
CLEANFILES += *.csv CLEANFILES += *.csv
TESTS_ENVIRONMENT = $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND) TESTS_ENVIRONMENT = $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
TESTS = TESTS =
if HAVE_GTEST if HAVE_GTEST
TESTS += run_unittests TESTS += run_unittests
run_unittests_SOURCES = run_unittests.cc run_unittests_SOURCES = run_unittests.cc
run_unittests_SOURCES += bigint_unittest.cc run_unittests_SOURCES += bigint_unittest.cc
run_unittests_SOURCES += boost_time_utils_unittest.cc run_unittests_SOURCES += boost_time_utils_unittest.cc
run_unittests_SOURCES += buffer_unittest.cc run_unittests_SOURCES += buffer_unittest.cc
run_unittests_SOURCES += chrono_time_utils_unittest.cc run_unittests_SOURCES += chrono_time_utils_unittest.cc
run_unittests_SOURCES += csv_file_unittest.cc run_unittests_SOURCES += csv_file_unittest.cc
run_unittests_SOURCES += dhcp_space_unittest.cc run_unittests_SOURCES += dhcp_space_unittest.cc
@ -55,14 +55,14 @@ run_unittests_SOURCES += versioned_csv_file_unittest.cc
run_unittests_SOURCES += watch_socket_unittests.cc run_unittests_SOURCES += watch_socket_unittests.cc
run_unittests_SOURCES += watched_thread_unittest.cc run_unittests_SOURCES += watched_thread_unittest.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS) run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
run_unittests_LDADD = $(top_builddir)/src/lib/util/unittests/libutil_unittests.la run_unittests_LDADD = $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la run_unittests_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
run_unittests_LDADD += $(GTEST_LDADD) run_unittests_LDADD += $(GTEST_LDADD)
endif endif
noinst_PROGRAMS = $(TESTS) noinst_PROGRAMS = $(TESTS)

View File

@ -1,18 +1,18 @@
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h> #include <config.h>
#include <util/unittests/run_all.h> #include <util/unittests/run_all.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
int int
main(int argc, char* argv[]) { main(int argc, char* argv[]) {
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
return (isc::util::unittests::run_all()); return (isc::util::unittests::run_all());
} }