From d6e80469927211a3ab054d93bdb560fc41997481 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Fri, 22 Apr 2016 19:19:02 -0700 Subject: [PATCH] updated cleanupCFiles --- arangosh/Benchmark/BenchFeature.h | 4 +- arangosh/Benchmark/BenchmarkCounter.h | 4 +- arangosh/Benchmark/BenchmarkOperation.h | 4 +- arangosh/Benchmark/BenchmarkThread.h | 4 +- arangosh/Dump/DumpFeature.h | 4 +- arangosh/Import/ImportFeature.cpp | 4 +- arangosh/Import/ImportFeature.h | 4 +- arangosh/Import/ImportHelper.h | 6 +- arangosh/Restore/RestoreFeature.h | 4 +- arangosh/Shell/ShellFeature.h | 4 +- arangosh/Shell/V8ClientConnection.h | 4 +- arangosh/Shell/V8ShellFeature.cpp | 2 +- arangosh/Shell/V8ShellFeature.h | 4 +- arangosh/V8Client/ArangoClientHelper.cpp | 2 +- arangosh/V8Client/ArangoClientHelper.h | 4 +- lib/ApplicationFeatures/ApplicationFeature.h | 6 +- lib/ApplicationFeatures/ApplicationServer.cpp | 2 +- lib/ApplicationFeatures/ApplicationServer.h | 12 +-- lib/ApplicationFeatures/ClientFeature.h | 4 +- lib/ApplicationFeatures/ConfigFeature.cpp | 2 +- lib/ApplicationFeatures/ConfigFeature.h | 6 +- lib/ApplicationFeatures/ConsoleFeature.h | 4 +- lib/ApplicationFeatures/DaemonFeature.h | 4 +- .../HttpEndpointProvider.h | 4 +- lib/ApplicationFeatures/LanguageFeature.h | 4 +- lib/ApplicationFeatures/NonceFeature.h | 4 +- lib/ApplicationFeatures/PrivilegeFeature.cpp | 2 +- lib/ApplicationFeatures/PrivilegeFeature.h | 4 +- lib/ApplicationFeatures/ShutdownFeature.h | 4 +- lib/ApplicationFeatures/SslFeature.h | 8 +- lib/ApplicationFeatures/SupervisorFeature.h | 4 +- lib/ApplicationFeatures/TempFeature.h | 4 +- lib/ApplicationFeatures/V8PlatformFeature.h | 4 +- lib/ApplicationFeatures/WorkMonitorFeature.h | 4 +- lib/Basics/ArangoGlobalContext.h | 4 +- lib/Basics/AssocMulti.h | 6 +- lib/Basics/AssocUnique.h | 8 +- lib/Basics/AssociativeArray.h | 4 +- lib/Basics/AttributeNameParser.h | 4 +- lib/Basics/Barrier.h | 4 +- lib/Basics/BloomFilter.h | 4 +- lib/Basics/Common.h | 4 +- lib/Basics/ConditionLocker.h | 6 +- lib/Basics/ConditionVariable.h | 4 +- lib/Basics/DataProtector.h | 4 +- lib/Basics/DeadlockDetector.h | 6 +- lib/Basics/Dictionary.h | 4 +- lib/Basics/Exceptions.cpp | 4 +- lib/Basics/Exceptions.h | 4 +- lib/Basics/FileUtils.h | 4 +- lib/Basics/JsonHelper.h | 4 +- lib/Basics/Mutex.h | 4 +- lib/Basics/MutexLocker.h | 4 +- lib/Basics/Nonce.h | 4 +- lib/Basics/ReadLocker.h | 4 +- lib/Basics/ReadUnlocker.h | 4 +- lib/Basics/ReadWriteLock.h | 4 +- lib/Basics/ReadWriteLockCPP11.cpp | 20 ++--- lib/Basics/ReadWriteLockCPP11.h | 4 +- lib/Basics/ScopeGuard.h | 4 +- lib/Basics/SkipList.h | 4 +- lib/Basics/StringBuffer.h | 6 +- lib/Basics/StringUtils.h | 4 +- lib/Basics/Thread.h | 6 +- lib/Basics/ThreadPool.h | 4 +- lib/Basics/Traverser.h | 4 +- lib/Basics/Utf8Helper.h | 4 +- lib/Basics/VelocyPackHelper.cpp | 24 ++--- lib/Basics/VelocyPackHelper.h | 34 +++---- lib/Basics/WorkDescription.h | 4 +- lib/Basics/WorkItem.h | 4 +- lib/Basics/WorkMonitor.cpp | 4 +- lib/Basics/WorkMonitor.h | 4 +- lib/Basics/WorkerThread.h | 4 +- lib/Basics/WriteLocker.h | 4 +- lib/Basics/WriteUnlocker.h | 4 +- lib/Basics/application-exit.h | 4 +- lib/Basics/conversions.h | 4 +- lib/Basics/csv.h | 4 +- lib/Basics/debugging.h | 4 +- lib/Basics/error.cpp | 2 +- lib/Basics/error.h | 4 +- lib/Basics/files.cpp | 4 +- lib/Basics/files.h | 4 +- lib/Basics/gcd.h | 4 +- lib/Basics/hashes.h | 4 +- lib/Basics/json-utilities.h | 4 +- lib/Basics/json.h | 4 +- lib/Basics/levenshtein.h | 4 +- lib/Basics/local-configuration-win.h | 6 +- lib/Basics/locks-posix.h | 4 +- lib/Basics/locks-win32.h | 4 +- lib/Basics/locks.h | 4 +- lib/Basics/make_unique.h | 4 +- lib/Basics/memory-map-posix.cpp | 8 +- lib/Basics/memory-map-posix.h | 4 +- lib/Basics/memory-map-win32.cpp | 2 +- lib/Basics/memory-map-win32.h | 4 +- lib/Basics/memory-map.h | 4 +- lib/Basics/memory.h | 4 +- lib/Basics/messages.h | 4 +- lib/Basics/mimetypes.h | 4 +- lib/Basics/operating-system.h | 6 +- lib/Basics/prime-numbers.h | 4 +- lib/Basics/process-utils.h | 4 +- lib/Basics/shell-colors.h | 4 +- lib/Basics/socket-utils.h | 4 +- lib/Basics/ssl-helper.h | 4 +- lib/Basics/structures.h | 4 +- lib/Basics/system-compiler.h | 4 +- lib/Basics/system-functions.h | 4 +- lib/Basics/terminal-utils.h | 4 +- lib/Basics/threads-posix.h | 4 +- lib/Basics/threads-win32.h | 4 +- lib/Basics/threads.h | 4 +- lib/Basics/tri-strings.h | 4 +- lib/Basics/tri-zip.h | 4 +- lib/Basics/vector.h | 4 +- lib/Basics/voc-errors.h | 6 +- lib/Basics/voc-mimetypes.cpp | 1 + lib/Basics/win-utils.cpp | 2 +- lib/Basics/win-utils.h | 4 +- lib/Endpoint/ConnectionInfo.h | 4 +- lib/Endpoint/Endpoint.cpp | 4 +- lib/Endpoint/Endpoint.h | 4 +- lib/Endpoint/EndpointIp.h | 4 +- lib/Endpoint/EndpointIpV4.h | 4 +- lib/Endpoint/EndpointIpV6.h | 4 +- lib/Endpoint/EndpointList.h | 4 +- lib/Endpoint/EndpointSrv.h | 4 +- lib/Endpoint/EndpointUnixDomain.h | 4 +- lib/JsonParser/json-parser.cpp | 89 +++++++++---------- lib/Logger/LogAppender.h | 4 +- lib/Logger/LogAppenderFile.h | 4 +- lib/Logger/LogAppenderSyslog.h | 4 +- lib/Logger/LogAppenderTty.h | 4 +- lib/Logger/LogBuffer.h | 4 +- lib/Logger/LogLevel.h | 4 +- lib/Logger/LogMacros.h | 4 +- lib/Logger/LogThread.h | 4 +- lib/Logger/LogTopic.h | 4 +- lib/Logger/Logger.h | 4 +- lib/Logger/LoggerBufferFeature.h | 4 +- lib/Logger/LoggerFeature.cpp | 2 +- lib/Logger/LoggerFeature.h | 4 +- lib/Logger/LoggerStream.h | 4 +- lib/ProgramOptions/Parameters.h | 4 +- lib/ProgramOptions/ProgramOptions.h | 8 +- lib/Random/RandomFeature.h | 4 +- lib/Random/RandomGenerator.h | 4 +- lib/Random/UniformCharacter.h | 4 +- lib/Rest/GeneralRequest.cpp | 8 +- lib/Rest/GeneralRequest.h | 4 +- lib/Rest/GeneralResponse.h | 4 +- lib/Rest/HttpRequest.cpp | 4 +- lib/Rest/HttpRequest.h | 4 +- lib/Rest/HttpResponse.h | 4 +- lib/Rest/InitializeRest.h | 4 +- lib/Rest/RequestContext.h | 4 +- lib/Rest/RequestUser.h | 4 +- lib/Rest/SslInterface.h | 4 +- lib/Rest/Version.h | 4 +- lib/SimpleHttpClient/ClientConnection.h | 4 +- lib/SimpleHttpClient/ConnectionManager.h | 4 +- .../GeneralClientConnection.h | 4 +- lib/SimpleHttpClient/SimpleHttpClient.cpp | 6 +- lib/SimpleHttpClient/SimpleHttpClient.h | 6 +- lib/SimpleHttpClient/SimpleHttpResult.h | 4 +- lib/SimpleHttpClient/SslClientConnection.cpp | 6 +- lib/SimpleHttpClient/SslClientConnection.h | 6 +- lib/Utilities/Completer.h | 4 +- lib/Utilities/LineEditor.h | 4 +- lib/Utilities/LinenoiseShell.h | 4 +- lib/Utilities/ScriptLoader.h | 4 +- lib/Utilities/ShellBase.h | 4 +- lib/V8/JSLoader.h | 4 +- lib/V8/V8LineEditor.h | 4 +- lib/V8/v8-buffer.cpp | 2 +- lib/V8/v8-buffer.h | 14 +-- lib/V8/v8-conv.h | 4 +- lib/V8/v8-globals.h | 6 +- lib/V8/v8-json.cpp | 67 ++++++-------- lib/V8/v8-shell.h | 4 +- lib/V8/v8-utils.h | 4 +- lib/V8/v8-vpack.cpp | 2 +- lib/V8/v8-vpack.h | 4 +- lib/V8/v8-wrapper.h | 4 +- utils/cleanupCFiles | 85 +++++++----------- 188 files changed, 528 insertions(+), 564 deletions(-) diff --git a/arangosh/Benchmark/BenchFeature.h b/arangosh/Benchmark/BenchFeature.h index 0280ffe11c..0e0fadeed2 100644 --- a/arangosh/Benchmark/BenchFeature.h +++ b/arangosh/Benchmark/BenchFeature.h @@ -20,8 +20,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_ARANGOB_FEATURE_H -#define APPLICATION_FEATURES_ARANGOB_FEATURE_H 1 +#ifndef ARANGODB_BENCHMARK_BENCH_FEATURE_H +#define ARANGODB_BENCHMARK_BENCH_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/arangosh/Benchmark/BenchmarkCounter.h b/arangosh/Benchmark/BenchmarkCounter.h index be18a23dce..99a36254c8 100644 --- a/arangosh/Benchmark/BenchmarkCounter.h +++ b/arangosh/Benchmark/BenchmarkCounter.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGOSH_BENCHMARK_BENCHMARK_COUNTER_H -#define ARANGOSH_BENCHMARK_BENCHMARK_COUNTER_H 1 +#ifndef ARANGODB_BENCHMARK_BENCHMARK_COUNTER_H +#define ARANGODB_BENCHMARK_BENCHMARK_COUNTER_H 1 #include "Basics/Common.h" #include "Basics/Mutex.h" diff --git a/arangosh/Benchmark/BenchmarkOperation.h b/arangosh/Benchmark/BenchmarkOperation.h index 6bf86446ea..a555b1d8ad 100644 --- a/arangosh/Benchmark/BenchmarkOperation.h +++ b/arangosh/Benchmark/BenchmarkOperation.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGOSH_BENCHMARK_BENCHMARK_OPERATION_H -#define ARANGOSH_BENCHMARK_BENCHMARK_OPERATION_H 1 +#ifndef ARANGODB_BENCHMARK_BENCHMARK_OPERATION_H +#define ARANGODB_BENCHMARK_BENCHMARK_OPERATION_H 1 #include "Basics/Common.h" #include "SimpleHttpClient/SimpleHttpClient.h" diff --git a/arangosh/Benchmark/BenchmarkThread.h b/arangosh/Benchmark/BenchmarkThread.h index 11245d8350..10e72cb69a 100644 --- a/arangosh/Benchmark/BenchmarkThread.h +++ b/arangosh/Benchmark/BenchmarkThread.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGOSH_BENCHMARK_BENCHMARK_THREAD_H -#define ARANGOSH_BENCHMARK_BENCHMARK_THREAD_H 1 +#ifndef ARANGODB_BENCHMARK_BENCHMARK_THREAD_H +#define ARANGODB_BENCHMARK_BENCHMARK_THREAD_H 1 #include "Basics/Common.h" diff --git a/arangosh/Dump/DumpFeature.h b/arangosh/Dump/DumpFeature.h index 50a9d81e86..4968227b77 100644 --- a/arangosh/Dump/DumpFeature.h +++ b/arangosh/Dump/DumpFeature.h @@ -20,8 +20,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_ARANGODUMP_FEATURE_H -#define APPLICATION_FEATURES_ARANGODUMP_FEATURE_H 1 +#ifndef ARANGODB_DUMP_DUMP_FEATURE_H +#define ARANGODB_DUMP_DUMP_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" #include "V8Client/ArangoClientHelper.h" diff --git a/arangosh/Import/ImportFeature.cpp b/arangosh/Import/ImportFeature.cpp index d7af100d1b..fedbba2c73 100644 --- a/arangosh/Import/ImportFeature.cpp +++ b/arangosh/Import/ImportFeature.cpp @@ -79,10 +79,10 @@ void ImportFeature::collectOptions( options->addOption("--collection", "collection name", new StringParameter(&_collectionName)); - + options->addOption("--from-collection-prefix", "_from collection name prefix (will be prepended to all values in '_from')", new StringParameter(&_fromCollectionPrefix)); - + options->addOption("--to-collection-prefix", "_to collection name prefix (will be prepended to all values in '_to')", new StringParameter(&_toCollectionPrefix)); diff --git a/arangosh/Import/ImportFeature.h b/arangosh/Import/ImportFeature.h index f835f16abf..31816b318f 100644 --- a/arangosh/Import/ImportFeature.h +++ b/arangosh/Import/ImportFeature.h @@ -20,8 +20,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_ARANGOIMP_FEATURE_H -#define APPLICATION_FEATURES_ARANGOIMP_FEATURE_H 1 +#ifndef ARANGODB_IMPORT_IMPORT_FEATURE_H +#define ARANGODB_IMPORT_IMPORT_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" #include "V8Client/ArangoClientHelper.h" diff --git a/arangosh/Import/ImportHelper.h b/arangosh/Import/ImportHelper.h index 3189f239b6..f4ec7e9519 100644 --- a/arangosh/Import/ImportHelper.h +++ b/arangosh/Import/ImportHelper.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGOSH_V8_CLIENT_IMPORT_HELPER_H -#define ARANGOSH_V8_CLIENT_IMPORT_HELPER_H 1 +#ifndef ARANGODB_IMPORT_IMPORT_HELPER_H +#define ARANGODB_IMPORT_IMPORT_HELPER_H 1 #include "Basics/Common.h" @@ -108,7 +108,7 @@ class ImportHelper { ////////////////////////////////////////////////////////////////////////////// /// @brief set collection name prefix for _to ////////////////////////////////////////////////////////////////////////////// - + void setTo (std::string const& to) { _toCollectionPrefix = to; } diff --git a/arangosh/Restore/RestoreFeature.h b/arangosh/Restore/RestoreFeature.h index 8a92e43e6f..8d1c734352 100644 --- a/arangosh/Restore/RestoreFeature.h +++ b/arangosh/Restore/RestoreFeature.h @@ -20,8 +20,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_ARANGORESTORE_FEATURE_H -#define APPLICATION_FEATURES_ARANGORESTORE_FEATURE_H 1 +#ifndef ARANGODB_RESTORE_RESTORE_FEATURE_H +#define ARANGODB_RESTORE_RESTORE_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/arangosh/Shell/ShellFeature.h b/arangosh/Shell/ShellFeature.h index d876387c6d..5a844a760c 100644 --- a/arangosh/Shell/ShellFeature.h +++ b/arangosh/Shell/ShellFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_ARANGOSH_FEATURE_H -#define APPLICATION_FEATURES_ARANGOSH_FEATURE_H 1 +#ifndef ARANGODB_SHELL_SHELL_FEATURE_H +#define ARANGODB_SHELL_SHELL_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/arangosh/Shell/V8ClientConnection.h b/arangosh/Shell/V8ClientConnection.h index f200709ab7..8c8fa17762 100644 --- a/arangosh/Shell/V8ClientConnection.h +++ b/arangosh/Shell/V8ClientConnection.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGOSH_V8_CLIENT_V8_CLIENT_CONNECTION_H -#define ARANGOSH_V8_CLIENT_V8_CLIENT_CONNECTION_H 1 +#ifndef ARANGODB_SHELL_V8CLIENT_CONNECTION_H +#define ARANGODB_SHELL_V8CLIENT_CONNECTION_H 1 #include "Basics/Common.h" diff --git a/arangosh/Shell/V8ShellFeature.cpp b/arangosh/Shell/V8ShellFeature.cpp index 1246df96d1..4cb37e9e64 100644 --- a/arangosh/Shell/V8ShellFeature.cpp +++ b/arangosh/Shell/V8ShellFeature.cpp @@ -138,7 +138,7 @@ void V8ShellFeature::start() { void V8ShellFeature::stop() { LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::stop"; - + { v8::Locker locker{_isolate}; diff --git a/arangosh/Shell/V8ShellFeature.h b/arangosh/Shell/V8ShellFeature.h index 48cf889f29..b1dd19d99b 100644 --- a/arangosh/Shell/V8ShellFeature.h +++ b/arangosh/Shell/V8ShellFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef SHELL_V8_SHELL_FEATURE_H -#define SHELL_V8_SHELL_FEATURE_H 1 +#ifndef ARANGODB_SHELL_V8SHELL_FEATURE_H +#define ARANGODB_SHELL_V8SHELL_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/arangosh/V8Client/ArangoClientHelper.cpp b/arangosh/V8Client/ArangoClientHelper.cpp index fe4a2dc9b9..16e5e7a185 100644 --- a/arangosh/V8Client/ArangoClientHelper.cpp +++ b/arangosh/V8Client/ArangoClientHelper.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2016 ArangoDB GmbH, Cologne, Germany diff --git a/arangosh/V8Client/ArangoClientHelper.h b/arangosh/V8Client/ArangoClientHelper.h index 173a06c3ea..fdaba07681 100644 --- a/arangosh/V8Client/ArangoClientHelper.h +++ b/arangosh/V8Client/ArangoClientHelper.h @@ -20,8 +20,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_ARANGO_CLIENT_HELPER_H -#define APPLICATION_FEATURES_ARANGO_CLIENT_HELPER_H 1 +#ifndef ARANGODB_V8CLIENT_ARANGO_CLIENT_HELPER_H +#define ARANGODB_V8CLIENT_ARANGO_CLIENT_HELPER_H 1 #include "Basics/Common.h" diff --git a/lib/ApplicationFeatures/ApplicationFeature.h b/lib/ApplicationFeatures/ApplicationFeature.h index 4e121e2138..1b7c135d30 100644 --- a/lib/ApplicationFeatures/ApplicationFeature.h +++ b/lib/ApplicationFeatures/ApplicationFeature.h @@ -20,8 +20,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_APPLICATION_FEATURE_H -#define APPLICATION_FEATURES_APPLICATION_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_APPLICATION_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_APPLICATION_FEATURE_H 1 #include "Basics/Common.h" @@ -61,7 +61,7 @@ class ApplicationFeature { // ignored and no methods apart from `collectOptions` will be called for the // feature void disable() { setEnabled(false); } - + // disable the feature, and perform no checks if it's optional void forceDisable() { _enabled = false; } diff --git a/lib/ApplicationFeatures/ApplicationServer.cpp b/lib/ApplicationFeatures/ApplicationServer.cpp index e9096d4a8f..a599e78625 100644 --- a/lib/ApplicationFeatures/ApplicationServer.cpp +++ b/lib/ApplicationFeatures/ApplicationServer.cpp @@ -78,7 +78,7 @@ void ApplicationServer::disableFeatures(std::vector const& names) { void ApplicationServer::forceDisableFeatures(std::vector const& names) { disableFeatures(names, true); } - + void ApplicationServer::disableFeatures(std::vector const& names, bool force) { for (auto const& name : names) { auto feature = ApplicationServer::lookupFeature(name); diff --git a/lib/ApplicationFeatures/ApplicationServer.h b/lib/ApplicationFeatures/ApplicationServer.h index b197b29e7f..4246425a9c 100644 --- a/lib/ApplicationFeatures/ApplicationServer.h +++ b/lib/ApplicationFeatures/ApplicationServer.h @@ -20,8 +20,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_APPLICATION_SERVER_H -#define APPLICATION_FEATURES_APPLICATION_SERVER_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_APPLICATION_SERVER_H +#define ARANGODB_APPLICATION_FEATURES_APPLICATION_SERVER_H 1 #include "Basics/Common.h" @@ -93,8 +93,8 @@ class ApplicationServer { public: static ApplicationServer* server; static ApplicationFeature* lookupFeature(std::string const&); - - template + + template static T* getFeature(std::string const& name) { T* feature = dynamic_cast(application_features::ApplicationServer::lookupFeature(name)); if (feature == nullptr) { @@ -102,7 +102,7 @@ class ApplicationServer { } return feature; } - + static void disableFeatures(std::vector const&); static void forceDisableFeatures(std::vector const&); @@ -152,7 +152,7 @@ class ApplicationServer { static void throwFeatureNotFoundException(std::string const& name); static void disableFeatures(std::vector const& names, bool force); - + // fail and abort with the specified message void fail(std::string const& message); diff --git a/lib/ApplicationFeatures/ClientFeature.h b/lib/ApplicationFeatures/ClientFeature.h index 7606c223a8..f4aa086055 100644 --- a/lib/ApplicationFeatures/ClientFeature.h +++ b/lib/ApplicationFeatures/ClientFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_CLIENT_FEATURE_H -#define APPLICATION_FEATURES_CLIENT_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_CLIENT_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_CLIENT_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" #include "ApplicationFeatures/HttpEndpointProvider.h" diff --git a/lib/ApplicationFeatures/ConfigFeature.cpp b/lib/ApplicationFeatures/ConfigFeature.cpp index 0ba56a9505..d01decef4f 100644 --- a/lib/ApplicationFeatures/ConfigFeature.cpp +++ b/lib/ApplicationFeatures/ConfigFeature.cpp @@ -70,7 +70,7 @@ void ConfigFeature::loadOptions(std::shared_ptr options) { LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::loadOptions"; loadConfigFile(options); - + if (_checkConfiguration) { exit(EXIT_SUCCESS); } diff --git a/lib/ApplicationFeatures/ConfigFeature.h b/lib/ApplicationFeatures/ConfigFeature.h index e18806820d..55c8fd1cd8 100644 --- a/lib/ApplicationFeatures/ConfigFeature.h +++ b/lib/ApplicationFeatures/ConfigFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_CONFIG_FEATURE_H -#define APPLICATION_FEATURES_CONFIG_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_CONFIG_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_CONFIG_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" @@ -43,7 +43,7 @@ class ConfigFeature final : public application_features::ApplicationFeature { private: void loadConfigFile(std::shared_ptr); - + private: std::string _progname; }; diff --git a/lib/ApplicationFeatures/ConsoleFeature.h b/lib/ApplicationFeatures/ConsoleFeature.h index 40385ae8a6..f7bdb2f979 100644 --- a/lib/ApplicationFeatures/ConsoleFeature.h +++ b/lib/ApplicationFeatures/ConsoleFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_CONSOLE_FEATURE_H -#define APPLICATION_FEATURES_CONSOLE_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_CONSOLE_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_CONSOLE_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/ApplicationFeatures/DaemonFeature.h b/lib/ApplicationFeatures/DaemonFeature.h index f66ce93b57..ecfce0fed9 100644 --- a/lib/ApplicationFeatures/DaemonFeature.h +++ b/lib/ApplicationFeatures/DaemonFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_DAEMON_FEATURE_H -#define APPLICATION_FEATURES_DAEMON_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_DAEMON_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_DAEMON_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/ApplicationFeatures/HttpEndpointProvider.h b/lib/ApplicationFeatures/HttpEndpointProvider.h index d17f6a8b2d..a841fa1962 100644 --- a/lib/ApplicationFeatures/HttpEndpointProvider.h +++ b/lib/ApplicationFeatures/HttpEndpointProvider.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_HTTP_ENDPOINT_PROVIDER_H -#define APPLICATION_FEATURES_HTTP_ENDPOINT_PROVIDER_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_HTTP_ENDPOINT_PROVIDER_H +#define ARANGODB_APPLICATION_FEATURES_HTTP_ENDPOINT_PROVIDER_H 1 #include "Basics/Common.h" diff --git a/lib/ApplicationFeatures/LanguageFeature.h b/lib/ApplicationFeatures/LanguageFeature.h index ac6883be91..1ab6fc1d8c 100644 --- a/lib/ApplicationFeatures/LanguageFeature.h +++ b/lib/ApplicationFeatures/LanguageFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_LANGUAGE_FEATURE_H -#define APPLICATION_FEATURES_LANGUAGE_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_LANGUAGE_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_LANGUAGE_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/ApplicationFeatures/NonceFeature.h b/lib/ApplicationFeatures/NonceFeature.h index 3c79294fc2..3ebeed5033 100644 --- a/lib/ApplicationFeatures/NonceFeature.h +++ b/lib/ApplicationFeatures/NonceFeature.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGOD_CLUSTER_FILE_NONCE_FEATURE_H -#define ARANGOD_CLUSTER_FILE_NONCE_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_NONCE_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_NONCE_FEATURE_H 1 #include "Basics/Common.h" diff --git a/lib/ApplicationFeatures/PrivilegeFeature.cpp b/lib/ApplicationFeatures/PrivilegeFeature.cpp index fcb9b226b5..61ace4891b 100644 --- a/lib/ApplicationFeatures/PrivilegeFeature.cpp +++ b/lib/ApplicationFeatures/PrivilegeFeature.cpp @@ -22,7 +22,7 @@ #include "PrivilegeFeature.h" -//YYY #warning FRANK TODO +//YYY #warning FRANK TODO #if 0 SslFeature::SslFeature(application_features::ApplicationServer* server) diff --git a/lib/ApplicationFeatures/PrivilegeFeature.h b/lib/ApplicationFeatures/PrivilegeFeature.h index 8c0715757b..deedcc455d 100644 --- a/lib/ApplicationFeatures/PrivilegeFeature.h +++ b/lib/ApplicationFeatures/PrivilegeFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_PRIVILEGE_FEATURE_H -#define APPLICATION_FEATURES_PRIVILEGE_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_PRIVILEGE_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_PRIVILEGE_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/ApplicationFeatures/ShutdownFeature.h b/lib/ApplicationFeatures/ShutdownFeature.h index f11e6d1df9..cce3af7595 100644 --- a/lib/ApplicationFeatures/ShutdownFeature.h +++ b/lib/ApplicationFeatures/ShutdownFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_SHUTDOWN_FEATURE_H -#define APPLICATION_FEATURES_SHUTDOWN_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_SHUTDOWN_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_SHUTDOWN_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/ApplicationFeatures/SslFeature.h b/lib/ApplicationFeatures/SslFeature.h index ca4bb3c3bd..df644e77e6 100644 --- a/lib/ApplicationFeatures/SslFeature.h +++ b/lib/ApplicationFeatures/SslFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_SSL_FEATURE_H -#define APPLICATION_FEATURES_SSL_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_SSL_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_SSL_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" @@ -40,7 +40,7 @@ class SslFeature final : public application_features::ApplicationFeature { public: SSL_CTX* sslContext() const { return _sslContext; } - + public: std::string _cafile; std::string _keyfile; @@ -49,7 +49,7 @@ class SslFeature final : public application_features::ApplicationFeature { uint64_t _protocol; uint64_t _options; std::string _ecdhCurve; - + private: void createSslContext(); std::string stringifySslOptions(uint64_t opts) const; diff --git a/lib/ApplicationFeatures/SupervisorFeature.h b/lib/ApplicationFeatures/SupervisorFeature.h index 66cd02a865..f41fcda3c2 100644 --- a/lib/ApplicationFeatures/SupervisorFeature.h +++ b/lib/ApplicationFeatures/SupervisorFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_SUPERVISOR_FEATURE_H -#define APPLICATION_FEATURES_SUPERVISOR_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_SUPERVISOR_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_SUPERVISOR_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/ApplicationFeatures/TempFeature.h b/lib/ApplicationFeatures/TempFeature.h index 5f011c1996..145fe1fb24 100644 --- a/lib/ApplicationFeatures/TempFeature.h +++ b/lib/ApplicationFeatures/TempFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_TEMP_FEATURE_H -#define APPLICATION_FEATURES_TEMP_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_TEMP_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_TEMP_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/ApplicationFeatures/V8PlatformFeature.h b/lib/ApplicationFeatures/V8PlatformFeature.h index b118ddfc42..f7da36e46f 100644 --- a/lib/ApplicationFeatures/V8PlatformFeature.h +++ b/lib/ApplicationFeatures/V8PlatformFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_V8PLATFORM_FEATURE_H -#define APPLICATION_FEATURES_V8PLATFORM_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_V8PLATFORM_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_V8PLATFORM_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/ApplicationFeatures/WorkMonitorFeature.h b/lib/ApplicationFeatures/WorkMonitorFeature.h index 221d28e499..2e4266b2f0 100644 --- a/lib/ApplicationFeatures/WorkMonitorFeature.h +++ b/lib/ApplicationFeatures/WorkMonitorFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_WORK_MONITOR_FEATURE_H -#define APPLICATION_FEATURES_WOR_KMONITOR_FEATURE_H 1 +#ifndef ARANGODB_APPLICATION_FEATURES_WORK_MONITOR_FEATURE_H +#define ARANGODB_APPLICATION_FEATURES_WORK_MONITOR_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/Basics/ArangoGlobalContext.h b/lib/Basics/ArangoGlobalContext.h index 210f30b229..917876f87b 100644 --- a/lib/Basics/ArangoGlobalContext.h +++ b/lib/Basics/ArangoGlobalContext.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef BASICS_ARANGO_GLOBAL_CONTEXT_H -#define BASICS_ARANGO_GLOBAL_CONTEXT_H 1 +#ifndef ARANGODB_BASICS_ARANGO_GLOBAL_CONTEXT_H +#define ARANGODB_BASICS_ARANGO_GLOBAL_CONTEXT_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/AssocMulti.h b/lib/Basics/AssocMulti.h index 21c48ce988..d91ed70d6a 100644 --- a/lib/Basics/AssocMulti.h +++ b/lib/Basics/AssocMulti.h @@ -23,8 +23,8 @@ /// @author Max Neunhoeffer //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_ASSOC_MULTI_H -#define LIB_BASICS_ASSOC_MULTI_H 1 +#ifndef ARANGODB_BASICS_ASSOC_MULTI_H +#define ARANGODB_BASICS_ASSOC_MULTI_H 1 // Activate for additional debugging: // #define TRI_CHECK_MULTI_POINTER_HASH 1 @@ -1144,7 +1144,7 @@ class AssocMulti { LOG(TRACE) << "resizing index " << cb << ", target size: " << size; - LOG_TOPIC(TRACE, Logger::PERFORMANCE) << + LOG_TOPIC(TRACE, Logger::PERFORMANCE) << "index-resize " << cb << ", target size: " << size; double start = TRI_microtime(); diff --git a/lib/Basics/AssocUnique.h b/lib/Basics/AssocUnique.h index cf27fda5b8..e07202041a 100644 --- a/lib/Basics/AssocUnique.h +++ b/lib/Basics/AssocUnique.h @@ -23,8 +23,8 @@ /// @author Michael hackstein //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_ASSOC_UNIQUE_H -#define LIB_BASICS_ASSOC_UNIQUE_H 1 +#ifndef ARANGODB_BASICS_ASSOC_UNIQUE_H +#define ARANGODB_BASICS_ASSOC_UNIQUE_H 1 #include "Basics/Common.h" @@ -195,7 +195,7 @@ class AssocUnique { double start = TRI_microtime(); if (targetSize > NotificationSizeThreshold) { - LOG_TOPIC(TRACE, Logger::PERFORMANCE) << + LOG_TOPIC(TRACE, Logger::PERFORMANCE) << "index-resize " << cb << ", target size: " << targetSize; } @@ -822,7 +822,7 @@ class AssocUnique { return old; } - + ////////////////////////////////////////////////////////////////////////////// /// @brief a method to iterate over all elements in the hash. this method /// can NOT be used for deleting elements diff --git a/lib/Basics/AssociativeArray.h b/lib/Basics/AssociativeArray.h index 45d8713bf3..c217c72eff 100644 --- a/lib/Basics/AssociativeArray.h +++ b/lib/Basics/AssociativeArray.h @@ -22,8 +22,8 @@ /// @author Martin Schoenert //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_ASSOCIATIVE_ARRAY_H -#define LIB_BASICS_ASSOCIATIVE_ARRAY_H 1 +#ifndef ARANGODB_BASICS_ASSOCIATIVE_ARRAY_H +#define ARANGODB_BASICS_ASSOCIATIVE_ARRAY_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/AttributeNameParser.h b/lib/Basics/AttributeNameParser.h index b3379e1864..d3c0156956 100644 --- a/lib/Basics/AttributeNameParser.h +++ b/lib/Basics/AttributeNameParser.h @@ -21,8 +21,8 @@ /// @author Michael Hackstein //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_ATTRIBUTE_NAME_PARSER_H -#define LIB_BASICS_ATTRIBUTE_NAME_PARSER_H 1 +#ifndef ARANGODB_BASICS_ATTRIBUTE_NAME_PARSER_H +#define ARANGODB_BASICS_ATTRIBUTE_NAME_PARSER_H 1 #include "Common.h" #include diff --git a/lib/Basics/Barrier.h b/lib/Basics/Barrier.h index 775da678f0..b4c18db386 100644 --- a/lib/Basics/Barrier.h +++ b/lib/Basics/Barrier.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_BARRIER_H -#define LIB_BASICS_BARRIER_H 1 +#ifndef ARANGODB_BASICS_BARRIER_H +#define ARANGODB_BASICS_BARRIER_H 1 #include "Basics/Common.h" #include "Basics/ConditionVariable.h" diff --git a/lib/Basics/BloomFilter.h b/lib/Basics/BloomFilter.h index 245a11d0a6..b260cec915 100644 --- a/lib/Basics/BloomFilter.h +++ b/lib/Basics/BloomFilter.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_BLOOM_FILTER_H -#define LIB_BASICS_BLOOM_FILTER_H 1 +#ifndef ARANGODB_BASICS_BLOOM_FILTER_H +#define ARANGODB_BASICS_BLOOM_FILTER_H 1 #include "Basics/Common.h" #include "Basics/fasthash.h" diff --git a/lib/Basics/Common.h b/lib/Basics/Common.h index 89d6c20620..e297a68518 100644 --- a/lib/Basics/Common.h +++ b/lib/Basics/Common.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_COMMON_H -#define LIB_BASICS_COMMON_H 1 +#ifndef ARANGODB_BASICS_COMMON_H +#define ARANGODB_BASICS_COMMON_H 1 #ifdef _WIN32 diff --git a/lib/Basics/ConditionLocker.h b/lib/Basics/ConditionLocker.h index 161a6807a2..839be9d232 100644 --- a/lib/Basics/ConditionLocker.h +++ b/lib/Basics/ConditionLocker.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_CONDITION_LOCKER_H -#define LIB_BASICS_CONDITION_LOCKER_H 1 +#ifndef ARANGODB_BASICS_CONDITION_LOCKER_H +#define ARANGODB_BASICS_CONDITION_LOCKER_H 1 #include "Basics/Common.h" @@ -44,7 +44,7 @@ namespace arangodb { namespace basics { -class ConditionVariable; +class ConditionVariable; //////////////////////////////////////////////////////////////////////////////// /// @brief condition locker diff --git a/lib/Basics/ConditionVariable.h b/lib/Basics/ConditionVariable.h index af012abad0..ea73b540ce 100644 --- a/lib/Basics/ConditionVariable.h +++ b/lib/Basics/ConditionVariable.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_CONDITION_VARIABLE_H -#define LIB_BASICS_CONDITION_VARIABLE_H 1 +#ifndef ARANGODB_BASICS_CONDITION_VARIABLE_H +#define ARANGODB_BASICS_CONDITION_VARIABLE_H 1 #include "Basics/Common.h" #include "Basics/locks.h" diff --git a/lib/Basics/DataProtector.h b/lib/Basics/DataProtector.h index 4424c0f6e4..e7bca8c366 100644 --- a/lib/Basics/DataProtector.h +++ b/lib/Basics/DataProtector.h @@ -21,8 +21,8 @@ /// @author Max Neunhoeffer //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_DATA_PROTECTOR_H -#define LIB_BASICS_DATA_PROTECTOR_H 1 +#ifndef ARANGODB_BASICS_DATA_PROTECTOR_H +#define ARANGODB_BASICS_DATA_PROTECTOR_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/DeadlockDetector.h b/lib/Basics/DeadlockDetector.h index d49b394a3c..eeb3ff64d5 100644 --- a/lib/Basics/DeadlockDetector.h +++ b/lib/Basics/DeadlockDetector.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_DEADLOCK_DETECTOR_H -#define LIB_BASICS_DEADLOCK_DETECTOR_H 1 +#ifndef ARANGODB_BASICS_DEADLOCK_DETECTOR_H +#define ARANGODB_BASICS_DEADLOCK_DETECTOR_H 1 #include "Basics/Common.h" #include "Basics/Mutex.h" @@ -388,7 +388,7 @@ class DeadlockDetector { if (wasBlockedBefore) { #ifdef ARANGODB_ENABLE_MAINTAINER_MODE - auto erased = + auto erased = #endif _blocked.erase(tid); #ifdef ARANGODB_ENABLE_MAINTAINER_MODE diff --git a/lib/Basics/Dictionary.h b/lib/Basics/Dictionary.h index af9c0aa846..f333dcb303 100644 --- a/lib/Basics/Dictionary.h +++ b/lib/Basics/Dictionary.h @@ -22,8 +22,8 @@ /// @author Martin Schoenert //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_DICTIONARY_H -#define LIB_BASICS_DICTIONARY_H 1 +#ifndef ARANGODB_BASICS_DICTIONARY_H +#define ARANGODB_BASICS_DICTIONARY_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/Exceptions.cpp b/lib/Basics/Exceptions.cpp index 1ba80373c1..94d6224183 100644 --- a/lib/Basics/Exceptions.cpp +++ b/lib/Basics/Exceptions.cpp @@ -47,7 +47,7 @@ Exception::Exception(int code, char const* file, int line) _file(file), _line(line), _code(code) { - + appendLocation(); } @@ -71,7 +71,7 @@ Exception::Exception(int code, std::string const& errorMessage, Exception::Exception(int code, char const* errorMessage, char const* file, int line) : _errorMessage(errorMessage), _file(file), _line(line), _code(code) { - + appendLocation(); } diff --git a/lib/Basics/Exceptions.h b/lib/Basics/Exceptions.h index 6dde6cd0ac..1288940220 100644 --- a/lib/Basics/Exceptions.h +++ b/lib/Basics/Exceptions.h @@ -22,8 +22,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_EXCEPTIONS_H -#define LIB_BASICS_EXCEPTIONS_H 1 +#ifndef ARANGODB_BASICS_EXCEPTIONS_H +#define ARANGODB_BASICS_EXCEPTIONS_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/FileUtils.h b/lib/Basics/FileUtils.h index 7b09bab558..aa0a728994 100644 --- a/lib/Basics/FileUtils.h +++ b/lib/Basics/FileUtils.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_FILE_UTILS_H -#define LIB_BASICS_FILE_UTILS_H 1 +#ifndef ARANGODB_BASICS_FILE_UTILS_H +#define ARANGODB_BASICS_FILE_UTILS_H 1 #include "Basics/Common.h" #include "Basics/files.h" diff --git a/lib/Basics/JsonHelper.h b/lib/Basics/JsonHelper.h index 2874353a79..2633e9cdde 100644 --- a/lib/Basics/JsonHelper.h +++ b/lib/Basics/JsonHelper.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_JSON_HELPER_H -#define LIB_BASICS_JSON_HELPER_H 1 +#ifndef ARANGODB_BASICS_JSON_HELPER_H +#define ARANGODB_BASICS_JSON_HELPER_H 1 #include "Basics/Common.h" #include "Basics/Exceptions.h" diff --git a/lib/Basics/Mutex.h b/lib/Basics/Mutex.h index 09b3a99978..31bcbeb60c 100644 --- a/lib/Basics/Mutex.h +++ b/lib/Basics/Mutex.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MUTEX_H -#define LIB_BASICS_MUTEX_H 1 +#ifndef ARANGODB_BASICS_MUTEX_H +#define ARANGODB_BASICS_MUTEX_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/MutexLocker.h b/lib/Basics/MutexLocker.h index 928f8cbd21..835f2898b9 100644 --- a/lib/Basics/MutexLocker.h +++ b/lib/Basics/MutexLocker.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MUTEX_LOCKER_H -#define LIB_BASICS_MUTEX_LOCKER_H 1 +#ifndef ARANGODB_BASICS_MUTEX_LOCKER_H +#define ARANGODB_BASICS_MUTEX_LOCKER_H 1 #include "Basics/Common.h" #include "Basics/Mutex.h" diff --git a/lib/Basics/Nonce.h b/lib/Basics/Nonce.h index 5f51dc9023..a8497b7888 100644 --- a/lib/Basics/Nonce.h +++ b/lib/Basics/Nonce.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_NONCE_H -#define LIB_BASICS_NONCE_H 1 +#ifndef ARANGODB_BASICS_NONCE_H +#define ARANGODB_BASICS_NONCE_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/ReadLocker.h b/lib/Basics/ReadLocker.h index e6ebadff23..22c8058b2b 100644 --- a/lib/Basics/ReadLocker.h +++ b/lib/Basics/ReadLocker.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_READ_LOCKER_H -#define LIB_BASICS_READ_LOCKER_H 1 +#ifndef ARANGODB_BASICS_READ_LOCKER_H +#define ARANGODB_BASICS_READ_LOCKER_H 1 #include "Basics/Common.h" #include "Basics/ReadWriteLock.h" diff --git a/lib/Basics/ReadUnlocker.h b/lib/Basics/ReadUnlocker.h index 7f2557f40e..8561286e0e 100644 --- a/lib/Basics/ReadUnlocker.h +++ b/lib/Basics/ReadUnlocker.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_READ_UNLOCKER_H -#define LIB_BASICS_READ_UNLOCKER_H 1 +#ifndef ARANGODB_BASICS_READ_UNLOCKER_H +#define ARANGODB_BASICS_READ_UNLOCKER_H 1 #include "Basics/Common.h" #include "Basics/ReadWriteLock.h" diff --git a/lib/Basics/ReadWriteLock.h b/lib/Basics/ReadWriteLock.h index 73db876f90..8dcf84a686 100644 --- a/lib/Basics/ReadWriteLock.h +++ b/lib/Basics/ReadWriteLock.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_READ_WRITE_LOCK_H -#define LIB_BASICS_READ_WRITE_LOCK_H 1 +#ifndef ARANGODB_BASICS_READ_WRITE_LOCK_H +#define ARANGODB_BASICS_READ_WRITE_LOCK_H 1 #include "Basics/Common.h" #include "Basics/locks.h" diff --git a/lib/Basics/ReadWriteLockCPP11.cpp b/lib/Basics/ReadWriteLockCPP11.cpp index 25bb4233bd..94f02db36e 100644 --- a/lib/Basics/ReadWriteLockCPP11.cpp +++ b/lib/Basics/ReadWriteLockCPP11.cpp @@ -42,9 +42,9 @@ static void LockError(ReadWriteLockCPP11* lock, int mode) { using namespace arangodb::basics; -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// @brief locks for writing -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// void ReadWriteLockCPP11::writeLock() { #ifdef TRI_TRACE_LOCKS @@ -73,9 +73,9 @@ void ReadWriteLockCPP11::writeLock() { #endif } -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// @brief locks for writing, but only tries -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// bool ReadWriteLockCPP11::tryWriteLock() { #ifdef TRI_TRACE_LOCKS @@ -95,9 +95,9 @@ bool ReadWriteLockCPP11::tryWriteLock() { return false; } -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// @brief locks for reading -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// void ReadWriteLockCPP11::readLock() { #ifdef TRI_TRACE_LOCKS @@ -127,9 +127,9 @@ void ReadWriteLockCPP11::readLock() { _state += 1; } -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// @brief locks for reading, tries only -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// bool ReadWriteLockCPP11::tryReadLock() { #ifdef TRI_TRACE_LOCKS @@ -148,9 +148,9 @@ bool ReadWriteLockCPP11::tryReadLock() { return false; } -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// @brief releases the read-lock or write-lock -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// void ReadWriteLockCPP11::unlock() { #ifdef TRI_TRACE_LOCKS diff --git a/lib/Basics/ReadWriteLockCPP11.h b/lib/Basics/ReadWriteLockCPP11.h index a401df3707..078b9428cc 100644 --- a/lib/Basics/ReadWriteLockCPP11.h +++ b/lib/Basics/ReadWriteLockCPP11.h @@ -21,8 +21,8 @@ /// @author Max Neunhoeffer //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_READ_WRITE_LOCK_CPP11_H -#define LIB_BASICS_READ_WRITE_LOCK_CPP11_H 1 +#ifndef ARANGODB_BASICS_READ_WRITE_LOCK_CPP11_H +#define ARANGODB_BASICS_READ_WRITE_LOCK_CPP11_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/ScopeGuard.h b/lib/Basics/ScopeGuard.h index 98a8256752..330c2a40d3 100644 --- a/lib/Basics/ScopeGuard.h +++ b/lib/Basics/ScopeGuard.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_SCOPE_GUARD_H -#define LIB_BASICS_SCOPE_GUARD_H 1 +#ifndef ARANGODB_BASICS_SCOPE_GUARD_H +#define ARANGODB_BASICS_SCOPE_GUARD_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/SkipList.h b/lib/Basics/SkipList.h index 9865609331..db74567c60 100644 --- a/lib/Basics/SkipList.h +++ b/lib/Basics/SkipList.h @@ -21,8 +21,8 @@ /// @author Max Neunhoeffer //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_SKIP_LIST_H -#define LIB_BASICS_SKIP_LIST_H 1 +#ifndef ARANGODB_BASICS_SKIP_LIST_H +#define ARANGODB_BASICS_SKIP_LIST_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/StringBuffer.h b/lib/Basics/StringBuffer.h index 3f3eb2eaa1..62991ddf02 100644 --- a/lib/Basics/StringBuffer.h +++ b/lib/Basics/StringBuffer.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_STRING_BUFFER_H -#define LIB_BASICS_STRING_BUFFER_H 1 +#ifndef ARANGODB_BASICS_STRING_BUFFER_H +#define ARANGODB_BASICS_STRING_BUFFER_H 1 #include "Basics/Common.h" #include "Logger/Logger.h" @@ -744,7 +744,7 @@ class StringBuffer { _buffer._current = other->_current; _buffer._len = other->_len; } - + ////////////////////////////////////////////////////////////////////////////// /// @brief make sure the buffer is null-terminated ////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/StringUtils.h b/lib/Basics/StringUtils.h index 1129f3580d..b24260fb1d 100644 --- a/lib/Basics/StringUtils.h +++ b/lib/Basics/StringUtils.h @@ -22,8 +22,8 @@ /// @author Dr. Oreste Costa-Panaia //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_STRING_UTILS_H -#define LIB_BASICS_STRING_UTILS_H 1 +#ifndef ARANGODB_BASICS_STRING_UTILS_H +#define ARANGODB_BASICS_STRING_UTILS_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/Thread.h b/lib/Basics/Thread.h index ddbf5f639a..6ea313d444 100644 --- a/lib/Basics/Thread.h +++ b/lib/Basics/Thread.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_THREAD_H -#define LIB_BASICS_THREAD_H 1 +#ifndef ARANGODB_BASICS_THREAD_H +#define ARANGODB_BASICS_THREAD_H 1 #include "Basics/Common.h" @@ -64,7 +64,7 @@ class Thread { enum class ThreadState { CREATED, STARTED, STOPPING, STOPPED, DETACHED }; - static std::string stringify(ThreadState); + static std::string stringify(ThreadState); public: ////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/ThreadPool.h b/lib/Basics/ThreadPool.h index e4740c1511..83c57e4593 100644 --- a/lib/Basics/ThreadPool.h +++ b/lib/Basics/ThreadPool.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_THREAD_POOL_H -#define LIB_BASICS_THREAD_POOL_H 1 +#ifndef ARANGODB_BASICS_THREAD_POOL_H +#define ARANGODB_BASICS_THREAD_POOL_H 1 #include "Basics/Common.h" #include "Basics/ConditionLocker.h" diff --git a/lib/Basics/Traverser.h b/lib/Basics/Traverser.h index 5864104a5f..981920d9a4 100644 --- a/lib/Basics/Traverser.h +++ b/lib/Basics/Traverser.h @@ -21,8 +21,8 @@ /// @author Michael Hackstein //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_TRAVERSER_H -#define LIB_BASICS_TRAVERSER_H 1 +#ifndef ARANGODB_BASICS_TRAVERSER_H +#define ARANGODB_BASICS_TRAVERSER_H 1 #include "Basics/Common.h" #include "Basics/Exceptions.h" diff --git a/lib/Basics/Utf8Helper.h b/lib/Basics/Utf8Helper.h index 7ecd235c45..3f8f16b36a 100644 --- a/lib/Basics/Utf8Helper.h +++ b/lib/Basics/Utf8Helper.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_UTF8_HELPER_H -#define LIB_BASICS_UTF8_HELPER_H 1 +#ifndef ARANGODB_BASICS_UTF8HELPER_H +#define ARANGODB_BASICS_UTF8HELPER_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/VelocyPackHelper.cpp b/lib/Basics/VelocyPackHelper.cpp index 7d2f6f79d0..64edb05f67 100644 --- a/lib/Basics/VelocyPackHelper.cpp +++ b/lib/Basics/VelocyPackHelper.cpp @@ -71,7 +71,7 @@ struct SystemAttributeExcludeHandler : public VPackAttributeExcludeHandler { //////////////////////////////////////////////////////////////////////////////// /// @brief static initializer for all VPack values //////////////////////////////////////////////////////////////////////////////// - + void VelocyPackHelper::initialize() { LOG(TRACE) << "initializing vpack"; @@ -90,11 +90,11 @@ void VelocyPackHelper::initialize() { // set the attribute translator in the global options VPackOptions::Defaults.attributeTranslator = Translator.get(); // VPackOptions::Defaults.unsupportedTypeBehavior = VPackOptions::ConvertUnsupportedType; - + // initialize exclude handler for system attributes ExcludeHandler.reset(new SystemAttributeExcludeHandler); } - + void VelocyPackHelper::disableAssemblerFunctions() { arangodb::velocypack::disableAssemblerFunctions(); } @@ -134,7 +134,7 @@ static int TypeWeight(VPackSlice const& slice) { case VPackValueType::MinKey: return -99; // must be lowest case VPackValueType::Illegal: - return -1; + return -1; case VPackValueType::None: case VPackValueType::Null: return 0; @@ -156,7 +156,7 @@ static int TypeWeight(VPackSlice const& slice) { return 4; case VPackValueType::Object: return 5; - case VPackValueType::External: + case VPackValueType::External: return TypeWeight(slice.resolveExternal()); default: // All other values have equal weight @@ -291,7 +291,7 @@ TRI_json_t* VelocyPackHelper::velocyPackToJson(VPackSlice const& slice, VPackOpt //////////////////////////////////////////////////////////////////////////////// /// @brief parses a json file to VelocyPack -////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// std::shared_ptr VelocyPackHelper::velocyPackFromFile( std::string const& path) { @@ -362,9 +362,9 @@ static bool PrintVelocyPack(int fd, VPackSlice const& slice, return true; } -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// @brief writes a VelocyPack to a file -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// bool VelocyPackHelper::velocyPackToFile(char const* filename, VPackSlice const& slice, @@ -462,7 +462,7 @@ int VelocyPackHelper::compare(VPackSlice lhs, VPackSlice rhs, case VPackValueType::Illegal: case VPackValueType::MinKey: case VPackValueType::MaxKey: - return 0; + return 0; case VPackValueType::None: case VPackValueType::Null: return 0; // null == null; @@ -483,7 +483,7 @@ int VelocyPackHelper::compare(VPackSlice lhs, VPackSlice rhs, case VPackValueType::SmallInt: { return compareNumberValues(lhs, rhs); } - case VPackValueType::Custom: + case VPackValueType::Custom: case VPackValueType::String: { std::string lhsString; VPackValueLength nl; @@ -500,8 +500,8 @@ int VelocyPackHelper::compare(VPackSlice lhs, VPackSlice rhs, left = lhs.getString(nl); } TRI_ASSERT(left != nullptr); - - std::string rhsString; + + std::string rhsString; VPackValueLength nr; char const* right; if (rhs.isCustom()) { diff --git a/lib/Basics/VelocyPackHelper.h b/lib/Basics/VelocyPackHelper.h index ed88de48ed..8ffddea699 100644 --- a/lib/Basics/VelocyPackHelper.h +++ b/lib/Basics/VelocyPackHelper.h @@ -21,8 +21,8 @@ /// @author Michael Hackstein //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_VELOCY_PACK_HELPER_H -#define LIB_BASICS_VELOCY_PACK_HELPER_H 1 +#ifndef ARANGODB_BASICS_VELOCY_PACK_HELPER_H +#define ARANGODB_BASICS_VELOCY_PACK_HELPER_H 1 #include "Basics/JsonHelper.h" #include "Logger/Logger.h" @@ -50,13 +50,13 @@ class VelocyPackHelper { //////////////////////////////////////////////////////////////////////////////// /// @brief static initializer for all VPack values //////////////////////////////////////////////////////////////////////////////// - + static void initialize(); static void disableAssemblerFunctions(); - + static arangodb::velocypack::AttributeExcludeHandler* getExcludeHandler(); static arangodb::velocypack::AttributeTranslator* getTranslator(); - + struct VPackHash { size_t operator()(arangodb::velocypack::Slice const&) const; }; @@ -203,15 +203,15 @@ class VelocyPackHelper { /// @brief Compares two VelocyPack number values ////////////////////////////////////////////////////////////////////////////// - static int compareNumberValues(arangodb::velocypack::Slice lhs, + static int compareNumberValues(arangodb::velocypack::Slice lhs, arangodb::velocypack::Slice rhs); ////////////////////////////////////////////////////////////////////////////// /// @brief Compares two VelocyPack slices ////////////////////////////////////////////////////////////////////////////// - static int compare(arangodb::velocypack::Slice lhs, - arangodb::velocypack::Slice rhs, + static int compare(arangodb::velocypack::Slice lhs, + arangodb::velocypack::Slice rhs, bool useUTF8, arangodb::velocypack::Options const* options = &arangodb::velocypack::Options::Defaults, arangodb::velocypack::Slice const* lhsBase = nullptr, arangodb::velocypack::Slice const* rhsBase = nullptr); @@ -234,31 +234,31 @@ class VelocyPackHelper { static uint64_t hashByAttributes(VPackSlice, std::vector const&, bool, int&, std::string const& key = ""); - static inline arangodb::velocypack::Slice NullValue() { - return arangodb::velocypack::Slice::nullSlice(); + static inline arangodb::velocypack::Slice NullValue() { + return arangodb::velocypack::Slice::nullSlice(); } static inline arangodb::velocypack::Slice TrueValue() { - return arangodb::velocypack::Slice::trueSlice(); + return arangodb::velocypack::Slice::trueSlice(); } static inline arangodb::velocypack::Slice FalseValue() { - return arangodb::velocypack::Slice::falseSlice(); + return arangodb::velocypack::Slice::falseSlice(); } static inline arangodb::velocypack::Slice BooleanValue(bool value) { if (value) { - return arangodb::velocypack::Slice::trueSlice(); + return arangodb::velocypack::Slice::trueSlice(); } - return arangodb::velocypack::Slice::falseSlice(); + return arangodb::velocypack::Slice::falseSlice(); } static inline arangodb::velocypack::Slice EmptyArrayValue() { - return arangodb::velocypack::Slice::emptyArraySlice(); + return arangodb::velocypack::Slice::emptyArraySlice(); } static inline arangodb::velocypack::Slice EmptyObjectValue() { - return arangodb::velocypack::Slice::emptyObjectSlice(); + return arangodb::velocypack::Slice::emptyObjectSlice(); } ////////////////////////////////////////////////////////////////////////////// @@ -267,7 +267,7 @@ class VelocyPackHelper { ////////////////////////////////////////////////////////////////////////////// static inline arangodb::velocypack::Slice IllegalValue() { - return arangodb::velocypack::Slice::illegalSlice(); + return arangodb::velocypack::Slice::illegalSlice(); } }; } diff --git a/lib/Basics/WorkDescription.h b/lib/Basics/WorkDescription.h index 34633093ff..f736454a95 100644 --- a/lib/Basics/WorkDescription.h +++ b/lib/Basics/WorkDescription.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGODB_UTILS_WORK_DESCRIPTION -#define ARANGODB_UTILS_WORK_DESCRIPTION 1 +#ifndef ARANGODB_BASICS_WORK_DESCRIPTION_H +#define ARANGODB_BASICS_WORK_DESCRIPTION_H 1 #include "Common.h" diff --git a/lib/Basics/WorkItem.h b/lib/Basics/WorkItem.h index 09ee16d3e6..bc91fb44e9 100644 --- a/lib/Basics/WorkItem.h +++ b/lib/Basics/WorkItem.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGODB_UTILS_WORK_ITEM -#define ARANGODB_UTILS_WORK_ITEM 1 +#ifndef ARANGODB_BASICS_WORK_ITEM_H +#define ARANGODB_BASICS_WORK_ITEM_H 1 namespace arangodb { diff --git a/lib/Basics/WorkMonitor.cpp b/lib/Basics/WorkMonitor.cpp index da557c9e96..be31347915 100644 --- a/lib/Basics/WorkMonitor.cpp +++ b/lib/Basics/WorkMonitor.cpp @@ -133,7 +133,7 @@ bool WorkMonitor::pushThread(Thread* thread) { if (WORK_MONITOR_STOPPED.load()) { return false; } - + TRI_ASSERT(thread != nullptr); TRI_ASSERT(Thread::CURRENT_THREAD == nullptr); Thread::CURRENT_THREAD = thread; @@ -163,7 +163,7 @@ void WorkMonitor::popThread(Thread* thread) { if (WORK_MONITOR_STOPPED.load()) { return; } - + TRI_ASSERT(thread != nullptr); WorkDescription* desc = deactivateWorkDescription(); diff --git a/lib/Basics/WorkMonitor.h b/lib/Basics/WorkMonitor.h index 19214cf2cb..c2c74d9aac 100644 --- a/lib/Basics/WorkMonitor.h +++ b/lib/Basics/WorkMonitor.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGODB_UTILS_WORK_MONITOR -#define ARANGODB_UTILS_WORK_MONITOR 1 +#ifndef ARANGODB_BASICS_WORK_MONITOR_H +#define ARANGODB_BASICS_WORK_MONITOR_H 1 #include "Basics/Thread.h" diff --git a/lib/Basics/WorkerThread.h b/lib/Basics/WorkerThread.h index 2a3003ffd0..5e20923cee 100644 --- a/lib/Basics/WorkerThread.h +++ b/lib/Basics/WorkerThread.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_WORKER_THREAD_H -#define LIB_BASICS_WORKER_THREAD_H 1 +#ifndef ARANGODB_BASICS_WORKER_THREAD_H +#define ARANGODB_BASICS_WORKER_THREAD_H 1 #include "Basics/Common.h" #include "Basics/Thread.h" diff --git a/lib/Basics/WriteLocker.h b/lib/Basics/WriteLocker.h index cbe537245a..4c40c604a6 100644 --- a/lib/Basics/WriteLocker.h +++ b/lib/Basics/WriteLocker.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_WRITE_LOCKER_H -#define LIB_BASICS_WRITE_LOCKER_H 1 +#ifndef ARANGODB_BASICS_WRITE_LOCKER_H +#define ARANGODB_BASICS_WRITE_LOCKER_H 1 #include "Basics/Common.h" #include "Basics/ReadWriteLock.h" diff --git a/lib/Basics/WriteUnlocker.h b/lib/Basics/WriteUnlocker.h index 304f369376..62a682ff73 100644 --- a/lib/Basics/WriteUnlocker.h +++ b/lib/Basics/WriteUnlocker.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_WRITE_UNLOCKER_H -#define LIB_BASICS_WRITE_UNLOCKER_H 1 +#ifndef ARANGODB_BASICS_WRITE_UNLOCKER_H +#define ARANGODB_BASICS_WRITE_UNLOCKER_H 1 #include "Basics/Common.h" #include "Basics/ReadWriteLock.h" diff --git a/lib/Basics/application-exit.h b/lib/Basics/application-exit.h index 707a2667df..9444df3633 100644 --- a/lib/Basics/application-exit.h +++ b/lib/Basics/application-exit.h @@ -21,8 +21,8 @@ /// @author Dr. Oreste Costa-Panaia //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_APPLICATION_EXIT_H -#define LIB_BASICS_APPLICATION_EXIT_H 1 +#ifndef ARANGODB_BASICS_APPLICATION__EXIT_H +#define ARANGODB_BASICS_APPLICATION__EXIT_H 1 #ifndef TRI_WITHIN_COMMON #error use diff --git a/lib/Basics/conversions.h b/lib/Basics/conversions.h index be5bff094a..a84fdc6846 100644 --- a/lib/Basics/conversions.h +++ b/lib/Basics/conversions.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_CONVERSIONS_H -#define LIB_BASICS_CONVERSIONS_H 1 +#ifndef ARANGODB_BASICS_CONVERSIONS_H +#define ARANGODB_BASICS_CONVERSIONS_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/csv.h b/lib/Basics/csv.h index c60cd5a0e6..2f84cf8c32 100644 --- a/lib/Basics/csv.h +++ b/lib/Basics/csv.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_CSV_H -#define LIB_BASICS_CSV_H 1 +#ifndef ARANGODB_BASICS_CSV_H +#define ARANGODB_BASICS_CSV_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/debugging.h b/lib/Basics/debugging.h index 066be6e84d..ce6b9a3d70 100644 --- a/lib/Basics/debugging.h +++ b/lib/Basics/debugging.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_DEBUGGING_H -#define LIB_BASICS_DEBUGGING_H 1 +#ifndef ARANGODB_BASICS_DEBUGGING_H +#define ARANGODB_BASICS_DEBUGGING_H 1 #ifndef TRI_WITHIN_COMMON #error use diff --git a/lib/Basics/error.cpp b/lib/Basics/error.cpp index 93ac8140b8..a323911e76 100644 --- a/lib/Basics/error.cpp +++ b/lib/Basics/error.cpp @@ -86,7 +86,7 @@ int TRI_errno() { if (eptr == nullptr) { return 0; - } + } return eptr->_number; } diff --git a/lib/Basics/error.h b/lib/Basics/error.h index ff2fb74ece..06318ac1ec 100644 --- a/lib/Basics/error.h +++ b/lib/Basics/error.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_ERROR_H -#define LIB_BASICS_ERROR_H 1 +#ifndef ARANGODB_BASICS_ERROR_H +#define ARANGODB_BASICS_ERROR_H 1 #ifndef TRI_WITHIN_COMMON #error use diff --git a/lib/Basics/files.cpp b/lib/Basics/files.cpp index d53da10b4d..7aa7e5b36f 100644 --- a/lib/Basics/files.cpp +++ b/lib/Basics/files.cpp @@ -210,7 +210,7 @@ static void ListTreeRecursively(char const* full, char const* path, for (size_t j = 0; j < 2; ++j) { for (auto const& filename : dirs) { - std::string const newFull = arangodb::basics::FileUtils::buildFilename(full, filename); + std::string const newFull = arangodb::basics::FileUtils::buildFilename(full, filename); std::string newPath; if (*path) { @@ -1140,7 +1140,7 @@ int TRI_CreateLockFile(char const* filename) { } TRI_FreeString(TRI_CORE_MEM_ZONE, buf); - + struct flock lock; lock.l_start = 0; diff --git a/lib/Basics/files.h b/lib/Basics/files.h index 606b3ba2a4..4d50242a36 100644 --- a/lib/Basics/files.h +++ b/lib/Basics/files.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_FILES_H -#define LIB_BASICS_FILES_H 1 +#ifndef ARANGODB_BASICS_FILES_H +#define ARANGODB_BASICS_FILES_H 1 #ifdef _WIN32 #include "Basics/win-utils.h" diff --git a/lib/Basics/gcd.h b/lib/Basics/gcd.h index c6693ad675..3f0ec88058 100644 --- a/lib/Basics/gcd.h +++ b/lib/Basics/gcd.h @@ -22,8 +22,8 @@ /// @author http://en.wikipedia.org/wiki/Binary_GCD_algorithm //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_GCD_H -#define LIB_BASICS_GCD_H 1 +#ifndef ARANGODB_BASICS_GCD_H +#define ARANGODB_BASICS_GCD_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/hashes.h b/lib/Basics/hashes.h index 62475b5362..0ba21eb1eb 100644 --- a/lib/Basics/hashes.h +++ b/lib/Basics/hashes.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_HASHES_H -#define LIB_BASICS_HASHES_H 1 +#ifndef ARANGODB_BASICS_HASHES_H +#define ARANGODB_BASICS_HASHES_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/json-utilities.h b/lib/Basics/json-utilities.h index af262fc9df..cfd9f6f525 100644 --- a/lib/Basics/json-utilities.h +++ b/lib/Basics/json-utilities.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_JSON_UTILITIES_H -#define LIB_BASICS_JSON_UTILITIES_H 1 +#ifndef ARANGODB_BASICS_JSON__UTILITIES_H +#define ARANGODB_BASICS_JSON__UTILITIES_H 1 #include "Basics/Common.h" #include "Basics/json.h" diff --git a/lib/Basics/json.h b/lib/Basics/json.h index 6a52c8a465..4022acef3a 100644 --- a/lib/Basics/json.h +++ b/lib/Basics/json.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_JSON_H -#define LIB_BASICS_JSON_H 1 +#ifndef ARANGODB_BASICS_JSON_H +#define ARANGODB_BASICS_JSON_H 1 #include "Basics/Common.h" #include "Basics/vector.h" diff --git a/lib/Basics/levenshtein.h b/lib/Basics/levenshtein.h index 7e02cee142..86785e47ae 100644 --- a/lib/Basics/levenshtein.h +++ b/lib/Basics/levenshtein.h @@ -21,8 +21,8 @@ /// @author Jen Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_LEVENSHTEIN_H -#define LIB_BASICS_LEVENSHTEIN_H 1 +#ifndef ARANGODB_BASICS_LEVENSHTEIN_H +#define ARANGODB_BASICS_LEVENSHTEIN_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/local-configuration-win.h b/lib/Basics/local-configuration-win.h index bfe342662d..c428d03140 100644 --- a/lib/Basics/local-configuration-win.h +++ b/lib/Basics/local-configuration-win.h @@ -7,7 +7,7 @@ /// /// DISCLAIMER /// -/// Copyright 2014 ArangoDB GmbH, Cologne, Germany +/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,8 +29,8 @@ /// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_LOCAL_CONFIGURATION_WIN_H -#define LIB_BASICS_LOCAL_CONFIGURATION_WIN_H 1 +#ifndef ARANGODB_BASICS_LOCAL__CONFIGURATION__WIN_H +#define ARANGODB_BASICS_LOCAL__CONFIGURATION__WIN_H 1 #ifndef TRI_WITHIN_COMMON #error use diff --git a/lib/Basics/locks-posix.h b/lib/Basics/locks-posix.h index 719f8a86c7..3cab06b79a 100644 --- a/lib/Basics/locks-posix.h +++ b/lib/Basics/locks-posix.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_LOCKS_POSIX_H -#define LIB_BASICS_LOCKS_POSIX_H 1 +#ifndef ARANGODB_BASICS_LOCKS__POSIX_H +#define ARANGODB_BASICS_LOCKS__POSIX_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/locks-win32.h b/lib/Basics/locks-win32.h index 53c7215e8f..aa169f25b9 100644 --- a/lib/Basics/locks-win32.h +++ b/lib/Basics/locks-win32.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_LOCKS_WIN32_H -#define LIB_BASICS_LOCKS_WIN32_H 1 +#ifndef ARANGODB_BASICS_LOCKS__WIN32_H +#define ARANGODB_BASICS_LOCKS__WIN32_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/locks.h b/lib/Basics/locks.h index 07c3586e4a..8aee68d5a2 100644 --- a/lib/Basics/locks.h +++ b/lib/Basics/locks.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_LOCKS_H -#define LIB_BASICS_LOCKS_H 1 +#ifndef ARANGODB_BASICS_LOCKS_H +#define ARANGODB_BASICS_LOCKS_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/make_unique.h b/lib/Basics/make_unique.h index ca53d6e0f0..c5f85ba2f6 100644 --- a/lib/Basics/make_unique.h +++ b/lib/Basics/make_unique.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MAKE_UNIQUE_H -#define LIB_BASICS_MAKE_UNIQUE_H 1 +#ifndef ARANGODB_BASICS_MAKE__UNIQUE_H +#define ARANGODB_BASICS_MAKE__UNIQUE_H 1 #include #include diff --git a/lib/Basics/memory-map-posix.cpp b/lib/Basics/memory-map-posix.cpp index b003bf8b35..49cc8d0f9e 100644 --- a/lib/Basics/memory-map-posix.cpp +++ b/lib/Basics/memory-map-posix.cpp @@ -95,7 +95,7 @@ int TRI_MMFile(void* memoryAddress, size_t numOfBytesToInitialize, if (errno == ENOMEM) { LOG_TOPIC(DEBUG, Logger::MMAP) << "out of memory in mmap"; - + return TRI_ERROR_OUT_OF_MEMORY_MMAP; } @@ -156,13 +156,13 @@ int TRI_ProtectMMFile(void* memoryAddress, size_t numOfBytesToProtect, int TRI_MMFileAdvise(void* memoryAddress, size_t numOfBytes, int advice) { #ifdef __linux__ LOG_TOPIC(TRACE, Logger::MMAP) << "madvise " << advice << " for range " << Logger::RANGE(memoryAddress, numOfBytes); - + int res = madvise(memoryAddress, numOfBytes, advice); if (res == 0) { return TRI_ERROR_NO_ERROR; - } - + } + char buffer[256]; char* p = strerror_r(errno, buffer, 256); LOG_TOPIC(ERR, Logger::MMAP) << "madvise " << advice << " for range " << Logger::RANGE(memoryAddress, numOfBytes) << " failed with: " << p << " "; diff --git a/lib/Basics/memory-map-posix.h b/lib/Basics/memory-map-posix.h index 0d5a2a9a31..af43991236 100644 --- a/lib/Basics/memory-map-posix.h +++ b/lib/Basics/memory-map-posix.h @@ -21,8 +21,8 @@ /// @author Dr. Oreste Costa-Panaia //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MEMORY_MAP_POSIX_H -#define LIB_BASICS_MEMORY_MAP_POSIX_H 1 +#ifndef ARANGODB_BASICS_MEMORY__MAP__POSIX_H +#define ARANGODB_BASICS_MEMORY__MAP__POSIX_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/memory-map-win32.cpp b/lib/Basics/memory-map-win32.cpp index afbdb29183..1011e833a0 100644 --- a/lib/Basics/memory-map-win32.cpp +++ b/lib/Basics/memory-map-win32.cpp @@ -241,7 +241,7 @@ int TRI_MMFile(void* memoryAddress, size_t numOfBytesToInitialize, LOG(DEBUG) << "MapViewOfFile failed with error code = " << errorCode; return TRI_ERROR_SYS_ERROR; } - + LOG_TOPIC(DEBUG, Logger::MMAP) << "memory-mapped range " << Logger::RANGE(*result, numOfBytesToInitialize) << ", file-descriptor " << fileDescriptor; return TRI_ERROR_NO_ERROR; diff --git a/lib/Basics/memory-map-win32.h b/lib/Basics/memory-map-win32.h index 72c277af55..655211db00 100644 --- a/lib/Basics/memory-map-win32.h +++ b/lib/Basics/memory-map-win32.h @@ -21,8 +21,8 @@ /// @author Dr. Oreste Costa-Panaia //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MEMORY_MAP_WIN32_H -#define LIB_BASICS_MEMORY_MAP_WIN32_H 1 +#ifndef ARANGODB_BASICS_MEMORY__MAP__WIN32_H +#define ARANGODB_BASICS_MEMORY__MAP__WIN32_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/memory-map.h b/lib/Basics/memory-map.h index f692f51175..cbd031cfca 100644 --- a/lib/Basics/memory-map.h +++ b/lib/Basics/memory-map.h @@ -21,8 +21,8 @@ /// @author Dr. Oreste Costa-Panaia //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MEMORY_MAP_H -#define LIB_BASICS_MEMORY_MAP_H 1 +#ifndef ARANGODB_BASICS_MEMORY__MAP_H +#define ARANGODB_BASICS_MEMORY__MAP_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/memory.h b/lib/Basics/memory.h index 4597a84e53..451cb9bc2e 100644 --- a/lib/Basics/memory.h +++ b/lib/Basics/memory.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MEMORY_H -#define LIB_BASICS_MEMORY_H 1 +#ifndef ARANGODB_BASICS_MEMORY_H +#define ARANGODB_BASICS_MEMORY_H 1 #ifndef TRI_WITHIN_COMMON #error use diff --git a/lib/Basics/messages.h b/lib/Basics/messages.h index 3cb5a9a436..0220e77262 100644 --- a/lib/Basics/messages.h +++ b/lib/Basics/messages.h @@ -22,8 +22,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MESSAGES_H -#define LIB_BASICS_MESSAGES_H 1 +#ifndef ARANGODB_BASICS_MESSAGES_H +#define ARANGODB_BASICS_MESSAGES_H 1 //////////////////////////////////////////////////////////////////////////////// /// @brief bye bye message diff --git a/lib/Basics/mimetypes.h b/lib/Basics/mimetypes.h index f192f1501a..136e003af9 100644 --- a/lib/Basics/mimetypes.h +++ b/lib/Basics/mimetypes.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_MIMETYPES_H -#define LIB_BASICS_MIMETYPES_H 1 +#ifndef ARANGODB_BASICS_MIMETYPES_H +#define ARANGODB_BASICS_MIMETYPES_H 1 //////////////////////////////////////////////////////////////////////////////// /// @brief register a mimetype for an extension diff --git a/lib/Basics/operating-system.h b/lib/Basics/operating-system.h index 212d51b211..6d14b8be08 100644 --- a/lib/Basics/operating-system.h +++ b/lib/Basics/operating-system.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_OPERATING_SYSTEM_H -#define LIB_BASICS_OPERATING_SYSTEM_H 1 +#ifndef ARANGODB_BASICS_OPERATING__SYSTEM_H +#define ARANGODB_BASICS_OPERATING__SYSTEM_H 1 #ifndef TRI_WITHIN_COMMON #error use @@ -731,7 +731,7 @@ #define TRI_PLATFORM "win32" #endif // Visual Studio 2013 does not support noexcept, higher versions do -#if defined(_MSC_FULL_VER) && _MSC_FULL_VER > 180031101 +#if defined(_MSC_FULL_VER) && _MSC_FULL_VER > 180031101 #else #define noexcept throw() #endif diff --git a/lib/Basics/prime-numbers.h b/lib/Basics/prime-numbers.h index 58ad4ba3ae..9adf73ff90 100644 --- a/lib/Basics/prime-numbers.h +++ b/lib/Basics/prime-numbers.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_PRIME_NUMBERS_H -#define LIB_BASICS_PRIME_NUMBERS_H 1 +#ifndef ARANGODB_BASICS_PRIME__NUMBERS_H +#define ARANGODB_BASICS_PRIME__NUMBERS_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/process-utils.h b/lib/Basics/process-utils.h index da1242deef..1687087376 100644 --- a/lib/Basics/process-utils.h +++ b/lib/Basics/process-utils.h @@ -21,8 +21,8 @@ /// @author Esteban Lombeyda //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_PROCESS_UTILS_H -#define LIB_BASICS_PROCESS_UTILS_H 1 +#ifndef ARANGODB_BASICS_PROCESS__UTILS_H +#define ARANGODB_BASICS_PROCESS__UTILS_H 1 #include "Basics/Common.h" #include "Basics/threads.h" diff --git a/lib/Basics/shell-colors.h b/lib/Basics/shell-colors.h index 109ee38c90..f043376814 100644 --- a/lib/Basics/shell-colors.h +++ b/lib/Basics/shell-colors.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_SHELL_COLORS_H -#define LIB_BASICS_SHELL_COLORS_H 1 +#ifndef ARANGODB_BASICS_SHELL__COLORS_H +#define ARANGODB_BASICS_SHELL__COLORS_H 1 //////////////////////////////////////////////////////////////////////////////// /// @brief color red diff --git a/lib/Basics/socket-utils.h b/lib/Basics/socket-utils.h index 7194e10f4f..550bfb9aea 100644 --- a/lib/Basics/socket-utils.h +++ b/lib/Basics/socket-utils.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_SOCKET_UTILS_H -#define LIB_BASICS_SOCKET_UTILS_H 1 +#ifndef ARANGODB_BASICS_SOCKET__UTILS_H +#define ARANGODB_BASICS_SOCKET__UTILS_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/ssl-helper.h b/lib/Basics/ssl-helper.h index 679c89203c..12f87acf08 100644 --- a/lib/Basics/ssl-helper.h +++ b/lib/Basics/ssl-helper.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_SSL_HELPER_H -#define LIB_BASICS_SSL_HELPER_H 1 +#ifndef ARANGODB_BASICS_SSL__HELPER_H +#define ARANGODB_BASICS_SSL__HELPER_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/structures.h b/lib/Basics/structures.h index 9d335b279d..028d1e62d9 100644 --- a/lib/Basics/structures.h +++ b/lib/Basics/structures.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_STRUCTURES_H -#define LIB_BASICS_STRUCTURES_H 1 +#ifndef ARANGODB_BASICS_STRUCTURES_H +#define ARANGODB_BASICS_STRUCTURES_H 1 //////////////////////////////////////////////////////////////////////////////// /// @brief global blob type diff --git a/lib/Basics/system-compiler.h b/lib/Basics/system-compiler.h index 2dcc0777c2..1fa73225c9 100644 --- a/lib/Basics/system-compiler.h +++ b/lib/Basics/system-compiler.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_SYSTEM_COMPILER_H -#define LIB_BASICS_SYSTEM_COMPILER_H 1 +#ifndef ARANGODB_BASICS_SYSTEM__COMPILER_H +#define ARANGODB_BASICS_SYSTEM__COMPILER_H 1 #ifndef TRI_WITHIN_COMMON #error use diff --git a/lib/Basics/system-functions.h b/lib/Basics/system-functions.h index f5a8898b9a..a8699a47ff 100644 --- a/lib/Basics/system-functions.h +++ b/lib/Basics/system-functions.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_SYSTEM_FUNCTIONS_H -#define LIB_BASICS_SYSTEM_FUNCTIONS_H 1 +#ifndef ARANGODB_BASICS_SYSTEM__FUNCTIONS_H +#define ARANGODB_BASICS_SYSTEM__FUNCTIONS_H 1 #ifndef TRI_WITHIN_COMMON #error use diff --git a/lib/Basics/terminal-utils.h b/lib/Basics/terminal-utils.h index a171286f5a..b0a6e57b7a 100644 --- a/lib/Basics/terminal-utils.h +++ b/lib/Basics/terminal-utils.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_TERMINAL_UTILS_H -#define LIB_BASICS_TERMINAL_UTILS_H 1 +#ifndef ARANGODB_BASICS_TERMINAL__UTILS_H +#define ARANGODB_BASICS_TERMINAL__UTILS_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/threads-posix.h b/lib/Basics/threads-posix.h index cd576ba41b..3131f8744c 100644 --- a/lib/Basics/threads-posix.h +++ b/lib/Basics/threads-posix.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_THREADS_POSIX_H -#define LIB_BASICS_THREADS_POSIX_H 1 +#ifndef ARANGODB_BASICS_THREADS__POSIX_H +#define ARANGODB_BASICS_THREADS__POSIX_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/threads-win32.h b/lib/Basics/threads-win32.h index 75f87c83ed..878a9c0744 100644 --- a/lib/Basics/threads-win32.h +++ b/lib/Basics/threads-win32.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_THREADS_WIN32_H -#define LIB_BASICS_THREADS_WIN32_H 1 +#ifndef ARANGODB_BASICS_THREADS__WIN32_H +#define ARANGODB_BASICS_THREADS__WIN32_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/threads.h b/lib/Basics/threads.h index 235d7284fc..3e7dbeee65 100644 --- a/lib/Basics/threads.h +++ b/lib/Basics/threads.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_THREADS_H -#define LIB_BASICS_THREADS_H 1 +#ifndef ARANGODB_BASICS_THREADS_H +#define ARANGODB_BASICS_THREADS_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/tri-strings.h b/lib/Basics/tri-strings.h index 109261ece9..d9045d14ff 100644 --- a/lib/Basics/tri-strings.h +++ b/lib/Basics/tri-strings.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_TRI_STRINGS_H -#define LIB_BASICS_TRI_STRINGS_H 1 +#ifndef ARANGODB_BASICS_TRI__STRINGS_H +#define ARANGODB_BASICS_TRI__STRINGS_H 1 #include "Basics/Common.h" #include "Basics/vector.h" diff --git a/lib/Basics/tri-zip.h b/lib/Basics/tri-zip.h index 1d65be5a89..a0a27340b4 100644 --- a/lib/Basics/tri-zip.h +++ b/lib/Basics/tri-zip.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_TRI_ZIP_H -#define LIB_BASICS_TRI_ZIP_H 1 +#ifndef ARANGODB_BASICS_TRI__ZIP_H +#define ARANGODB_BASICS_TRI__ZIP_H 1 #ifdef _WIN32 #include "Basics/win-utils.h" diff --git a/lib/Basics/vector.h b/lib/Basics/vector.h index 1d34f34ed7..063481d43a 100644 --- a/lib/Basics/vector.h +++ b/lib/Basics/vector.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_VECTOR_H -#define LIB_BASICS_VECTOR_H 1 +#ifndef ARANGODB_BASICS_VECTOR_H +#define ARANGODB_BASICS_VECTOR_H 1 #include "Basics/Common.h" diff --git a/lib/Basics/voc-errors.h b/lib/Basics/voc-errors.h index b1bdcba5f1..8ef5472ac0 100644 --- a/lib/Basics/voc-errors.h +++ b/lib/Basics/voc-errors.h @@ -573,7 +573,7 @@ /// - 1934: @LIT{Invalid example type. Has to be Array or Object} /// Invalid example type. Has to be Array or Object. /// - 1935: @LIT{Invalid number of arguments. Expected: } -/// Invalid number of arguments. Expected: +/// Invalid number of arguments. Expected: /// - 1936: @LIT{Invalid parameter type.} /// Invalid parameter type. /// - 1937: @LIT{Invalid id} @@ -3043,9 +3043,9 @@ void TRI_InitializeErrorMessages (); //////////////////////////////////////////////////////////////////////////////// /// @brief 1935: ERROR_GRAPH_INVALID_NUMBER_OF_ARGUMENTS /// -/// Invalid number of arguments. Expected: +/// Invalid number of arguments. Expected: /// -/// Invalid number of arguments. Expected: +/// Invalid number of arguments. Expected: //////////////////////////////////////////////////////////////////////////////// #define TRI_ERROR_GRAPH_INVALID_NUMBER_OF_ARGUMENTS (1935) diff --git a/lib/Basics/voc-mimetypes.cpp b/lib/Basics/voc-mimetypes.cpp index c288cabdd7..2f3f76d25a 100644 --- a/lib/Basics/voc-mimetypes.cpp +++ b/lib/Basics/voc-mimetypes.cpp @@ -21,6 +21,7 @@ /// limitations under the License. /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// //////////////////////////////////////////////////////////////////////////////// #include "Basics/Common.h" diff --git a/lib/Basics/win-utils.cpp b/lib/Basics/win-utils.cpp index ddc94ecc10..cd807ea640 100644 --- a/lib/Basics/win-utils.cpp +++ b/lib/Basics/win-utils.cpp @@ -153,7 +153,7 @@ int finalizeWindows(const TRI_win_finalize_e finalizeWhat, char const* data) { switch (finalizeWhat) { case TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL: { /* - TODO: we can't always determine when to call this properly. + TODO: we can't always determine when to call this properly. if we have closed libev, its ok, if we have active socket operations these will fail with errors. int result = diff --git a/lib/Basics/win-utils.h b/lib/Basics/win-utils.h index 9f57085d8f..e313ec5829 100644 --- a/lib/Basics/win-utils.h +++ b/lib/Basics/win-utils.h @@ -21,8 +21,8 @@ /// @author Dr. Oreste Costa-Panaia //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_WIN_UTILS_H -#define LIB_BASICS_WIN_UTILS_H 1 +#ifndef ARANGODB_BASICS_WIN__UTILS_H +#define ARANGODB_BASICS_WIN__UTILS_H 1 #include #include diff --git a/lib/Endpoint/ConnectionInfo.h b/lib/Endpoint/ConnectionInfo.h index 83833029a7..214ca99524 100644 --- a/lib/Endpoint/ConnectionInfo.h +++ b/lib/Endpoint/ConnectionInfo.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_CONNECTION_INFO_H -#define LIB_REST_CONNECTION_INFO_H 1 +#ifndef ARANGODB_ENDPOINT_CONNECTION_INFO_H +#define ARANGODB_ENDPOINT_CONNECTION_INFO_H 1 #include "Basics/Common.h" diff --git a/lib/Endpoint/Endpoint.cpp b/lib/Endpoint/Endpoint.cpp index 905bde5930..6ffa06e1b0 100644 --- a/lib/Endpoint/Endpoint.cpp +++ b/lib/Endpoint/Endpoint.cpp @@ -381,10 +381,10 @@ bool Endpoint::setSocketFlags(TRI_socket_t s) { std::ostream& operator<<(std::ostream& stream, arangodb::Endpoint::TransportType type) { switch (type) { - case arangodb::Endpoint::TransportType::HTTP: + case arangodb::Endpoint::TransportType::HTTP: stream << "http"; break; - case arangodb::Endpoint::TransportType::VPP: + case arangodb::Endpoint::TransportType::VPP: stream << "vsp"; break; } diff --git a/lib/Endpoint/Endpoint.h b/lib/Endpoint/Endpoint.h index d0c73c4f08..ce57a3c097 100644 --- a/lib/Endpoint/Endpoint.h +++ b/lib/Endpoint/Endpoint.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_ENDPOINT_H -#define LIB_REST_ENDPOINT_H 1 +#ifndef ARANGODB_ENDPOINT_ENDPOINT_H +#define ARANGODB_ENDPOINT_ENDPOINT_H 1 #include "Basics/Common.h" diff --git a/lib/Endpoint/EndpointIp.h b/lib/Endpoint/EndpointIp.h index 4c80b194f6..6b4d629a6b 100644 --- a/lib/Endpoint/EndpointIp.h +++ b/lib/Endpoint/EndpointIp.h @@ -22,8 +22,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_ENDPOINT_IP_H -#define LIB_REST_ENDPOINT_IP_H 1 +#ifndef ARANGODB_ENDPOINT_ENDPOINT_IP_H +#define ARANGODB_ENDPOINT_ENDPOINT_IP_H 1 #include "Endpoint/Endpoint.h" diff --git a/lib/Endpoint/EndpointIpV4.h b/lib/Endpoint/EndpointIpV4.h index 34aed19fe2..00cabf09f2 100644 --- a/lib/Endpoint/EndpointIpV4.h +++ b/lib/Endpoint/EndpointIpV4.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_ENDPOINT_IP_V4_H -#define LIB_REST_ENDPOINT_IP_V4_H 1 +#ifndef ARANGODB_ENDPOINT_ENDPOINT_IP_V4_H +#define ARANGODB_ENDPOINT_ENDPOINT_IP_V4_H 1 #include "Basics/Common.h" #include "Basics/StringUtils.h" diff --git a/lib/Endpoint/EndpointIpV6.h b/lib/Endpoint/EndpointIpV6.h index ba64ace636..7a811ae4f0 100644 --- a/lib/Endpoint/EndpointIpV6.h +++ b/lib/Endpoint/EndpointIpV6.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_ENDPOINT_IP_V6_H -#define LIB_REST_ENDPOINT_IP_V6_H 1 +#ifndef ARANGODB_ENDPOINT_ENDPOINT_IP_V6_H +#define ARANGODB_ENDPOINT_ENDPOINT_IP_V6_H 1 #include "Endpoint/EndpointIp.h" diff --git a/lib/Endpoint/EndpointList.h b/lib/Endpoint/EndpointList.h index e7d2e2c723..ecb9c32468 100644 --- a/lib/Endpoint/EndpointList.h +++ b/lib/Endpoint/EndpointList.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_ENDPOINT_LIST_H -#define LIB_REST_ENDPOINT_LIST_H 1 +#ifndef ARANGODB_ENDPOINT_ENDPOINT_LIST_H +#define ARANGODB_ENDPOINT_ENDPOINT_LIST_H 1 #include "Basics/Common.h" diff --git a/lib/Endpoint/EndpointSrv.h b/lib/Endpoint/EndpointSrv.h index 03d71015eb..89fc60a991 100644 --- a/lib/Endpoint/EndpointSrv.h +++ b/lib/Endpoint/EndpointSrv.h @@ -21,8 +21,8 @@ /// @author Copyright 2016, ArangoDB GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef ARANGODB_REST_ENDPOINT_SRV_H -#define ARANGODB_REST_ENDPOINT_SRV_H 1 +#ifndef ARANGODB_ENDPOINT_ENDPOINT_SRV_H +#define ARANGODB_ENDPOINT_ENDPOINT_SRV_H 1 #include "Endpoint/Endpoint.h" diff --git a/lib/Endpoint/EndpointUnixDomain.h b/lib/Endpoint/EndpointUnixDomain.h index e23c9bdad4..ab16d4dc8a 100644 --- a/lib/Endpoint/EndpointUnixDomain.h +++ b/lib/Endpoint/EndpointUnixDomain.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_ENDPOINT_UNIX_DOMAIN_H -#define LIB_REST_ENDPOINT_UNIX_DOMAIN_H 1 +#ifndef ARANGODB_ENDPOINT_ENDPOINT_UNIX_DOMAIN_H +#define ARANGODB_ENDPOINT_ENDPOINT_UNIX_DOMAIN_H 1 #include "Endpoint/Endpoint.h" diff --git a/lib/JsonParser/json-parser.cpp b/lib/JsonParser/json-parser.cpp index b1b5677d5d..72a3ae6560 100644 --- a/lib/JsonParser/json-parser.cpp +++ b/lib/JsonParser/json-parser.cpp @@ -6,7 +6,6 @@ /// /// DISCLAIMER /// -/// Copyright 2004-2012 triagens GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. @@ -20,7 +19,7 @@ /// See the License for the specific language governing permissions and /// limitations under the License. /// -/// Copyright holder is triAGENS GmbH, Cologne, Germany +/// Copyright holder is ArangoDB GmbH, Cologne, Germany /// /// @author Dr. Frank Celler /// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany @@ -76,7 +75,7 @@ int fileno(FILE *stream); #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -93,7 +92,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -232,7 +231,7 @@ typedef size_t yy_size_t; #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -289,7 +288,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -891,7 +890,7 @@ case 4: YY_RULE_SETUP { // performance optimisation for all-ASCII strings without escape characters - // this matches the ASCII chars with ordinal numbers 35 (x23) to 127 (x7f), + // this matches the ASCII chars with ordinal numbers 35 (x23) to 127 (x7f), // plus space (32) and ! (33) but no quotation marks (34, x22) and backslashes (92, x5c) return STRING_CONSTANT_ASCII; } @@ -1453,7 +1452,7 @@ static void tri_jsp__load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE tri_jsp__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) tri_jsp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in tri_jsp__create_buffer()" ); @@ -1519,7 +1518,7 @@ static void tri_jsp__load_buffer_state (yyscan_t yyscanner) } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } @@ -1625,9 +1624,9 @@ static void tri_jsp_ensure_buffer_stack (yyscan_t yyscanner) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in tri_jsp_ensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1656,12 +1655,12 @@ static void tri_jsp_ensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE tri_jsp__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1697,7 +1696,7 @@ YY_BUFFER_STATE tri_jsp__scan_buffer (char * base, yy_size_t size , yyscan_t y */ YY_BUFFER_STATE tri_jsp__scan_string (yyconst char * yystr , yyscan_t yyscanner) { - + return tri_jsp__scan_bytes(yystr,strlen(yystr) ,yyscanner); } @@ -1714,7 +1713,7 @@ YY_BUFFER_STATE tri_jsp__scan_bytes (yyconst char * yybytes, yy_size_t _yybyte char *buf; yy_size_t n; yy_size_t i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) tri_jsp_alloc(n ,yyscanner ); @@ -1782,10 +1781,10 @@ YY_EXTRA_TYPE tri_jsp_get_extra (yyscan_t yyscanner) int tri_jsp_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -1795,10 +1794,10 @@ int tri_jsp_get_lineno (yyscan_t yyscanner) int tri_jsp_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -1860,7 +1859,7 @@ void tri_jsp_set_lineno (int line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "tri_jsp_set_lineno called with no buffer" ); - + yylineno = line_number; } @@ -1875,7 +1874,7 @@ void tri_jsp_set_column (int column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "tri_jsp_set_column called with no buffer" ); - + yycolumn = column_no; } @@ -1958,20 +1957,20 @@ int tri_jsp_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_global errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) tri_jsp_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + tri_jsp_set_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -2143,12 +2142,12 @@ static bool ParseArray (yyscan_t scanner, TRI_json_t* result) { yyextra._message = "out-of-memory"; return false; } - - // be paranoid and initialize the memory + + // be paranoid and initialize the memory TRI_InitNullJson(next); if (! ParseValue(scanner, next, c)) { - // be paranoid + // be paranoid return false; } @@ -2216,7 +2215,7 @@ static bool ParseObject (yyscan_t scanner, TRI_json_t* result) { yyextra._message = "expecting attribute name"; return false; } - + if (name == nullptr) { yyextra._message = "out-of-memory"; return false; @@ -2241,8 +2240,8 @@ static bool ParseObject (yyscan_t scanner, TRI_json_t* result) { if (res != TRI_ERROR_NO_ERROR) { yyextra._message = "out-of-memory"; return false; - } - + } + // get the address of the next element so we can create the attribute name in place TRI_json_t* next = static_cast(TRI_NextVector(&result->_value._objects)); // we made sure with the reserve call that we haven't run out of memory @@ -2255,8 +2254,8 @@ static bool ParseObject (yyscan_t scanner, TRI_json_t* result) { next = static_cast(TRI_NextVector(&result->_value._objects)); // we made sure with the reserve call that we haven't run out of memory TRI_ASSERT(next != nullptr); - - // be paranoid and initialize the memory + + // be paranoid and initialize the memory TRI_InitNullJson(next); if (! ParseValue(scanner, next, c)) { @@ -2345,12 +2344,12 @@ static bool ParseValue (yyscan_t scanner, TRI_json_t* result, int c) { yyextra._message = "out-of-memory"; return false; } - + TRI_InitStringJson(result, ptr, outLength); } return true; } - + case STRING_CONSTANT_ASCII: { if (yyleng <= 2) { // string is empty @@ -2359,12 +2358,12 @@ static bool ParseValue (yyscan_t scanner, TRI_json_t* result, int c) { } else { char* ptr = TRI_DuplicateString(yyextra._memoryZone, yytext + 1, yyleng - 2); - + if (ptr == nullptr) { yyextra._message = "out-of-memory"; return false; } - + TRI_InitStringJson(result, ptr, yyleng - 2); } return true; @@ -2375,7 +2374,7 @@ static bool ParseValue (yyscan_t scanner, TRI_json_t* result, int c) { case OPEN_BRACKET: return ParseArray(scanner, result); - + case CLOSE_BRACE: yyextra._message = "expected object, got '}'"; return false; @@ -2395,7 +2394,7 @@ static bool ParseValue (yyscan_t scanner, TRI_json_t* result, int c) { case UNQUOTED_STRING: yyextra._message = "expected object, got unquoted string"; return false; - + case END_OF_FILE: yyextra._message = "expecting atom, got end-of-file"; return false; @@ -2427,7 +2426,7 @@ TRI_json_t* TRI_Json2String (TRI_memory_zone_t* zone, char const* text, char** e // out of memory return nullptr; } - + // init as a JSON null object so the memory in object is initialized TRI_InitNullJson(object); @@ -2488,7 +2487,7 @@ TRI_json_t* TRI_JsonFile (TRI_memory_zone_t* zone, char const* path, char** erro yyscan_t scanner; value = static_cast(TRI_Allocate(zone, sizeof(TRI_json_t), false)); - + if (value == nullptr) { // out of memory return nullptr; @@ -2541,9 +2540,3 @@ TRI_json_t* TRI_JsonFile (TRI_memory_zone_t* zone, char const* path, char** erro return value; } -// Local Variables: -// mode: C -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: - diff --git a/lib/Logger/LogAppender.h b/lib/Logger/LogAppender.h index 42ffdf7b6b..21b40e7d74 100644 --- a/lib/Logger/LogAppender.h +++ b/lib/Logger/LogAppender.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOG_APPENDER_H -#define LIB_LOGGER_LOG_APPENDER_H 1 +#ifndef ARANGODB_LOGGER_LOG_APPENDER_H +#define ARANGODB_LOGGER_LOG_APPENDER_H 1 #include "Basics/Common.h" diff --git a/lib/Logger/LogAppenderFile.h b/lib/Logger/LogAppenderFile.h index fcc53df1ca..afdda342b2 100644 --- a/lib/Logger/LogAppenderFile.h +++ b/lib/Logger/LogAppenderFile.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOG_APPENDER_FILE_H -#define LIB_LOGGER_LOG_APPENDER_FILE_H 1 +#ifndef ARANGODB_LOGGER_LOG_APPENDER_FILE_H +#define ARANGODB_LOGGER_LOG_APPENDER_FILE_H 1 #include "Logger/LogAppender.h" diff --git a/lib/Logger/LogAppenderSyslog.h b/lib/Logger/LogAppenderSyslog.h index f4bea4ec4d..2b45d4eece 100644 --- a/lib/Logger/LogAppenderSyslog.h +++ b/lib/Logger/LogAppenderSyslog.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOG_APPENDER_SYSLOG_H -#define LIB_LOGGER_LOG_APPENDER_SYSLOG_H 1 +#ifndef ARANGODB_LOGGER_LOG_APPENDER_SYSLOG_H +#define ARANGODB_LOGGER_LOG_APPENDER_SYSLOG_H 1 #include "Logger/LogAppender.h" diff --git a/lib/Logger/LogAppenderTty.h b/lib/Logger/LogAppenderTty.h index dc7405c35d..a61932b5af 100644 --- a/lib/Logger/LogAppenderTty.h +++ b/lib/Logger/LogAppenderTty.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOG_APPENDER_TTY_H -#define LIB_LOGGER_LOG_APPENDER_TTY_H 1 +#ifndef ARANGODB_LOGGER_LOG_APPENDER_TTY_H +#define ARANGODB_LOGGER_LOG_APPENDER_TTY_H 1 #include "Logger/LogAppenderFile.h" diff --git a/lib/Logger/LogBuffer.h b/lib/Logger/LogBuffer.h index d609fce9bd..b317023c33 100644 --- a/lib/Logger/LogBuffer.h +++ b/lib/Logger/LogBuffer.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_LOGGER_BUFFER_H -#define APPLICATION_FEATURES_LOGGER_BUFFER_H 1 +#ifndef ARANGODB_LOGGER_LOG_BUFFER_H +#define ARANGODB_LOGGER_LOG_BUFFER_H 1 #include "Basics/Common.h" diff --git a/lib/Logger/LogLevel.h b/lib/Logger/LogLevel.h index 219b076fb5..28e78be975 100644 --- a/lib/Logger/LogLevel.h +++ b/lib/Logger/LogLevel.h @@ -22,8 +22,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOG_LEVEL_H -#define LIB_LOGGER_LOG_LEVEL_H 1 +#ifndef ARANGODB_LOGGER_LOG_LEVEL_H +#define ARANGODB_LOGGER_LOG_LEVEL_H 1 #include "Basics/Common.h" diff --git a/lib/Logger/LogMacros.h b/lib/Logger/LogMacros.h index 669d4a9da8..6b959468c5 100644 --- a/lib/Logger/LogMacros.h +++ b/lib/Logger/LogMacros.h @@ -55,8 +55,8 @@ /// Author: Ray Sidney //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOG_MACROS_H -#define LIB_LOGGER_LOG_MACROS_H 1 +#ifndef ARANGODB_LOGGER_LOG_MACROS_H +#define ARANGODB_LOGGER_LOG_MACROS_H 1 //////////////////////////////////////////////////////////////////////////////// /// @brief logs a message diff --git a/lib/Logger/LogThread.h b/lib/Logger/LogThread.h index 17274984c7..0ea5e9eeab 100644 --- a/lib/Logger/LogThread.h +++ b/lib/Logger/LogThread.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOG_THREAD_H -#define LIB_LOGGER_LOG_THREAD_H 1 +#ifndef ARANGODB_LOGGER_LOG_THREAD_H +#define ARANGODB_LOGGER_LOG_THREAD_H 1 #include "Basics/Thread.h" diff --git a/lib/Logger/LogTopic.h b/lib/Logger/LogTopic.h index 4ad2c7b81a..0d21dcd684 100644 --- a/lib/Logger/LogTopic.h +++ b/lib/Logger/LogTopic.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOG_TOPIC_H -#define LIB_LOGGER_LOG_TOPIC_H 1 +#ifndef ARANGODB_LOGGER_LOG_TOPIC_H +#define ARANGODB_LOGGER_LOG_TOPIC_H 1 #include "Basics/Common.h" diff --git a/lib/Logger/Logger.h b/lib/Logger/Logger.h index 96db02609d..29d59bf167 100644 --- a/lib/Logger/Logger.h +++ b/lib/Logger/Logger.h @@ -56,8 +56,8 @@ /// Author: Ray Sidney //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOGGER_H -#define LIB_LOGGER_LOGGER_H 1 +#ifndef ARANGODB_LOGGER_LOGGER_H +#define ARANGODB_LOGGER_LOGGER_H 1 #include "Basics/Common.h" diff --git a/lib/Logger/LoggerBufferFeature.h b/lib/Logger/LoggerBufferFeature.h index fa95c5c988..aca3c1981f 100644 --- a/lib/Logger/LoggerBufferFeature.h +++ b/lib/Logger/LoggerBufferFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_LOGGER_BUFFER_FEATURE_H -#define APPLICATION_FEATURES_LOGGER_BUFFER_FEATURE_H 1 +#ifndef ARANGODB_LOGGER_LOGGER_BUFFER_FEATURE_H +#define ARANGODB_LOGGER_LOGGER_BUFFER_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/Logger/LoggerFeature.cpp b/lib/Logger/LoggerFeature.cpp index f99ab083cc..7264788125 100644 --- a/lib/Logger/LoggerFeature.cpp +++ b/lib/Logger/LoggerFeature.cpp @@ -169,7 +169,7 @@ void LoggerFeature::prepare() { LogAppender::addAppender(definition); } - + if (!_backgrounded && _foregroundTty) { LogAppender::addTtyAppender(); } diff --git a/lib/Logger/LoggerFeature.h b/lib/Logger/LoggerFeature.h index 0d0de5e344..416329aa52 100644 --- a/lib/Logger/LoggerFeature.h +++ b/lib/Logger/LoggerFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_LOGGER_FEATURE_H -#define APPLICATION_FEATURES_LOGGER_FEATURE_H 1 +#ifndef ARANGODB_LOGGER_LOGGER_FEATURE_H +#define ARANGODB_LOGGER_LOGGER_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/Logger/LoggerStream.h b/lib/Logger/LoggerStream.h index 6d9bd4da7f..65701b3146 100644 --- a/lib/Logger/LoggerStream.h +++ b/lib/Logger/LoggerStream.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_LOGGER_LOGGER_STREAM_H -#define LIB_LOGGER_LOGGER_STREAM_H 1 +#ifndef ARANGODB_LOGGER_LOGGER_STREAM_H +#define ARANGODB_LOGGER_LOGGER_STREAM_H 1 #include "Basics/Common.h" diff --git a/lib/ProgramOptions/Parameters.h b/lib/ProgramOptions/Parameters.h index 029b03c91d..b26b569917 100644 --- a/lib/ProgramOptions/Parameters.h +++ b/lib/ProgramOptions/Parameters.h @@ -111,7 +111,7 @@ struct Parameter { } return ""; } - + virtual void toVPack(VPackBuilder&) const = 0; }; @@ -295,7 +295,7 @@ struct StringParameter : public Parameter { // this templated type needs a concrete value type template struct DiscreteValuesParameter : public T { - DiscreteValuesParameter(typename T::ValueType* ptr, + DiscreteValuesParameter(typename T::ValueType* ptr, std::unordered_set const& allowed) : T(ptr), allowed(allowed) {} diff --git a/lib/ProgramOptions/ProgramOptions.h b/lib/ProgramOptions/ProgramOptions.h index 7bcf49026e..dcd2a656ab 100644 --- a/lib/ProgramOptions/ProgramOptions.h +++ b/lib/ProgramOptions/ProgramOptions.h @@ -56,10 +56,10 @@ class ProgramOptions { bool touched(std::string const& name) const { return _touched.find(Option::stripPrefix(name)) != _touched.end(); } - + // mark an option as being frozen void freeze(std::string const& name) { _frozen.emplace(name); } - + // whether or not an option was touched during options processing, // not including the current pass bool frozen(std::string const& name) const { @@ -78,7 +78,7 @@ class ProgramOptions { // which options were touched during option processing // this includes options that are touched in the current pass std::unordered_set _touched; - + // which options were touched during option processing // this does not include options that are touched in the current pass std::unordered_set _frozen; @@ -342,7 +342,7 @@ class ProgramOptions { } for (auto const& it : _processingResult._touched) { _processingResult.freeze(it); - } + } } // check whether or not an option requires a value diff --git a/lib/Random/RandomFeature.h b/lib/Random/RandomFeature.h index 4e861343b8..e072172d5f 100644 --- a/lib/Random/RandomFeature.h +++ b/lib/Random/RandomFeature.h @@ -20,8 +20,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef APPLICATION_FEATURES_RANDOM_FEATURE_H -#define APPLICATION_FEATURES_RANDOM_FEATURE_H 1 +#ifndef ARANGODB_RANDOM_RANDOM_FEATURE_H +#define ARANGODB_RANDOM_RANDOM_FEATURE_H 1 #include "ApplicationFeatures/ApplicationFeature.h" diff --git a/lib/Random/RandomGenerator.h b/lib/Random/RandomGenerator.h index 1f99c3c0fd..d378bd9eb8 100644 --- a/lib/Random/RandomGenerator.h +++ b/lib/Random/RandomGenerator.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_RANDOM_GENERATOR_H -#define LIB_BASICS_RANDOM_GENERATOR_H 1 +#ifndef ARANGODB_RANDOM_RANDOM_GENERATOR_H +#define ARANGODB_RANDOM_RANDOM_GENERATOR_H 1 #include "Basics/Common.h" diff --git a/lib/Random/UniformCharacter.h b/lib/Random/UniformCharacter.h index 17d258bd1c..061dc47527 100644 --- a/lib/Random/UniformCharacter.h +++ b/lib/Random/UniformCharacter.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_BASICS_UNIFORM_CHARACTER_H -#define LIB_BASICS_UNIFORM_CHARACTER_H 1 +#ifndef ARANGODB_RANDOM_UNIFORM_CHARACTER_H +#define ARANGODB_RANDOM_UNIFORM_CHARACTER_H 1 #include "Basics/Common.h" diff --git a/lib/Rest/GeneralRequest.cpp b/lib/Rest/GeneralRequest.cpp index 2a2c4d733f..329b0fa410 100644 --- a/lib/Rest/GeneralRequest.cpp +++ b/lib/Rest/GeneralRequest.cpp @@ -220,7 +220,7 @@ void GeneralRequest::addSuffix(std::string const& part) { std::string const& GeneralRequest::header(std::string const& key) const { static std::string EMPTY_STR = ""; - + auto it = _headers.find(key); if (it == _headers.end()) { @@ -232,7 +232,7 @@ std::string const& GeneralRequest::header(std::string const& key) const { std::string const& GeneralRequest::header(std::string const& key, bool& found) const { static std::string EMPTY_STR = ""; - + auto it = _headers.find(key); if (it == _headers.end()) { @@ -246,7 +246,7 @@ std::string const& GeneralRequest::header(std::string const& key, bool& found) c std::string const& GeneralRequest::value(std::string const& key) const { static std::string EMPTY_STR = ""; - + auto it = _values.find(key); if (it == _values.end()) { @@ -258,7 +258,7 @@ std::string const& GeneralRequest::value(std::string const& key) const { std::string const& GeneralRequest::value(std::string const& key, bool& found) const { static std::string EMPTY_STR = ""; - + auto it = _values.find(key); if (it == _values.end()) { diff --git a/lib/Rest/GeneralRequest.h b/lib/Rest/GeneralRequest.h index be3ebbfb58..d854faef56 100644 --- a/lib/Rest/GeneralRequest.h +++ b/lib/Rest/GeneralRequest.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_GENERAL_REQUEST_H -#define LIB_REST_GENERAL_REQUEST_H 1 +#ifndef ARANGODB_REST_GENERAL_REQUEST_H +#define ARANGODB_REST_GENERAL_REQUEST_H 1 #include "Basics/Common.h" diff --git a/lib/Rest/GeneralResponse.h b/lib/Rest/GeneralResponse.h index 5cd6226013..5f5753e899 100644 --- a/lib/Rest/GeneralResponse.h +++ b/lib/Rest/GeneralResponse.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_GENERAL_RESPONSE_H -#define LIB_REST_GENERAL_RESPONSE_H 1 +#ifndef ARANGODB_REST_GENERAL_RESPONSE_H +#define ARANGODB_REST_GENERAL_RESPONSE_H 1 #include "Basics/Common.h" diff --git a/lib/Rest/HttpRequest.cpp b/lib/Rest/HttpRequest.cpp index 4f7e0c30e5..cad56918fe 100644 --- a/lib/Rest/HttpRequest.cpp +++ b/lib/Rest/HttpRequest.cpp @@ -711,7 +711,7 @@ void HttpRequest::parseCookies(char const* buffer) { std::string const& HttpRequest::cookieValue(std::string const& key) const { static std::string EMPTY_STR = ""; - + auto it = _cookies.find(key); if (it == _cookies.end()) { @@ -723,7 +723,7 @@ std::string const& HttpRequest::cookieValue(std::string const& key) const { std::string const& HttpRequest::cookieValue(std::string const& key, bool& found) const { static std::string EMPTY_STR = ""; - + auto it = _cookies.find(key); if (it == _cookies.end()) { diff --git a/lib/Rest/HttpRequest.h b/lib/Rest/HttpRequest.h index 6dc3ac46ec..feeb8494d6 100644 --- a/lib/Rest/HttpRequest.h +++ b/lib/Rest/HttpRequest.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_HTTP_REQUEST_H -#define LIB_REST_HTTP_REQUEST_H 1 +#ifndef ARANGODB_REST_HTTP_REQUEST_H +#define ARANGODB_REST_HTTP_REQUEST_H 1 #include "Rest/GeneralRequest.h" diff --git a/lib/Rest/HttpResponse.h b/lib/Rest/HttpResponse.h index 472907e81b..261295e4b6 100644 --- a/lib/Rest/HttpResponse.h +++ b/lib/Rest/HttpResponse.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_HTTP_RESPONSE_H -#define LIB_REST_HTTP_RESPONSE_H 1 +#ifndef ARANGODB_REST_HTTP_RESPONSE_H +#define ARANGODB_REST_HTTP_RESPONSE_H 1 #include "Rest/GeneralResponse.h" diff --git a/lib/Rest/InitializeRest.h b/lib/Rest/InitializeRest.h index eda1c59cf6..1719ed9b88 100644 --- a/lib/Rest/InitializeRest.h +++ b/lib/Rest/InitializeRest.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_INITIALIZE_REST_H -#define LIB_REST_INITIALIZE_REST_H 1 +#ifndef ARANGODB_REST_INITIALIZE_REST_H +#define ARANGODB_REST_INITIALIZE_REST_H 1 #include "Basics/Common.h" diff --git a/lib/Rest/RequestContext.h b/lib/Rest/RequestContext.h index 192ef6fd14..d8d343a03d 100644 --- a/lib/Rest/RequestContext.h +++ b/lib/Rest/RequestContext.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_REQUEST_CONTEXT_H -#define LIB_REST_REQUEST_CONTEXT_H 1 +#ifndef ARANGODB_REST_REQUEST_CONTEXT_H +#define ARANGODB_REST_REQUEST_CONTEXT_H 1 #include "Basics/Common.h" #include "Rest/RequestUser.h" diff --git a/lib/Rest/RequestUser.h b/lib/Rest/RequestUser.h index b582d99f2b..891f5f8376 100644 --- a/lib/Rest/RequestUser.h +++ b/lib/Rest/RequestUser.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_REQUEST_USER_H -#define LIB_REST_REQUEST_USER_H 1 +#ifndef ARANGODB_REST_REQUEST_USER_H +#define ARANGODB_REST_REQUEST_USER_H 1 #include "Basics/Common.h" diff --git a/lib/Rest/SslInterface.h b/lib/Rest/SslInterface.h index 251400b68a..19d56737ab 100644 --- a/lib/Rest/SslInterface.h +++ b/lib/Rest/SslInterface.h @@ -21,8 +21,8 @@ /// @author Dr. Oreste Costa-Panaia //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_SSL_INTERFACE_H -#define LIB_REST_SSL_INTERFACE_H 1 +#ifndef ARANGODB_REST_SSL_INTERFACE_H +#define ARANGODB_REST_SSL_INTERFACE_H 1 #include "Basics/Common.h" diff --git a/lib/Rest/Version.h b/lib/Rest/Version.h index 90856ad3cf..e037e683c4 100644 --- a/lib/Rest/Version.h +++ b/lib/Rest/Version.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_REST_VERSION_H -#define LIB_REST_VERSION_H 1 +#ifndef ARANGODB_REST_VERSION_H +#define ARANGODB_REST_VERSION_H 1 #include "Basics/Common.h" diff --git a/lib/SimpleHttpClient/ClientConnection.h b/lib/SimpleHttpClient/ClientConnection.h index 56e8461e2f..9b9b70affa 100644 --- a/lib/SimpleHttpClient/ClientConnection.h +++ b/lib/SimpleHttpClient/ClientConnection.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_SIMPLE_HTTP_CLIENT_CLIENT_CONNECTION_H -#define LIB_SIMPLE_HTTP_CLIENT_CLIENT_CONNECTION_H 1 +#ifndef ARANGODB_SIMPLE_HTTP_CLIENT_CLIENT_CONNECTION_H +#define ARANGODB_SIMPLE_HTTP_CLIENT_CLIENT_CONNECTION_H 1 #include "Basics/Common.h" diff --git a/lib/SimpleHttpClient/ConnectionManager.h b/lib/SimpleHttpClient/ConnectionManager.h index b8680cc7e2..967f690011 100644 --- a/lib/SimpleHttpClient/ConnectionManager.h +++ b/lib/SimpleHttpClient/ConnectionManager.h @@ -21,8 +21,8 @@ /// @author Max Neunhoeffer //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_SIMPLE_HTTP_CLIENT_CONNECTION_MANAGER_H -#define LIB_SIMPLE_HTTP_CLIENT_CONNECTION_MANAGER_H 1 +#ifndef ARANGODB_SIMPLE_HTTP_CLIENT_CONNECTION_MANAGER_H +#define ARANGODB_SIMPLE_HTTP_CLIENT_CONNECTION_MANAGER_H 1 #include "Basics/Common.h" #include "Basics/ReadWriteLock.h" diff --git a/lib/SimpleHttpClient/GeneralClientConnection.h b/lib/SimpleHttpClient/GeneralClientConnection.h index a8247a30e2..7c4732024b 100644 --- a/lib/SimpleHttpClient/GeneralClientConnection.h +++ b/lib/SimpleHttpClient/GeneralClientConnection.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_SIMPLE_HTTP_CLIENT_GENERAL_CLIENT_CONNECTION_H -#define LIB_SIMPLE_HTTP_CLIENT_GENERAL_CLIENT_CONNECTION_H 1 +#ifndef ARANGODB_SIMPLE_HTTP_CLIENT_GENERAL_CLIENT_CONNECTION_H +#define ARANGODB_SIMPLE_HTTP_CLIENT_GENERAL_CLIENT_CONNECTION_H 1 #include "Basics/Common.h" diff --git a/lib/SimpleHttpClient/SimpleHttpClient.cpp b/lib/SimpleHttpClient/SimpleHttpClient.cpp index 6fda5d3ffe..88ae93da35 100644 --- a/lib/SimpleHttpClient/SimpleHttpClient.cpp +++ b/lib/SimpleHttpClient/SimpleHttpClient.cpp @@ -886,9 +886,9 @@ std::string SimpleHttpClient::getHttpErrorMessage(SimpleHttpResult const* result try { std::shared_ptr builder = VPackParser::fromJson(body.c_str(), body.length()); - + VPackSlice slice = builder->slice(); - if (slice.isObject()) { + if (slice.isObject()) { VPackSlice msg = slice.get("errorMessage"); int errorNum = slice.get("errorNum").getNumericValue(); @@ -899,7 +899,7 @@ std::string SimpleHttpClient::getHttpErrorMessage(SimpleHttpResult const* result } catch (...) { // don't rethrow here. we'll response with an error message anyway } - + return "got error from server: HTTP " + std::to_string(result->getHttpReturnCode()) + " (" + result->getHttpReturnMessage() + ")" + details; } diff --git a/lib/SimpleHttpClient/SimpleHttpClient.h b/lib/SimpleHttpClient/SimpleHttpClient.h index 6c875b6886..be86fdf950 100644 --- a/lib/SimpleHttpClient/SimpleHttpClient.h +++ b/lib/SimpleHttpClient/SimpleHttpClient.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_SIMPLE_HTTP_CLIENT_SIMPLE_HTTP_CLIENT_H -#define LIB_SIMPLE_HTTP_CLIENT_SIMPLE_HTTP_CLIENT_H 1 +#ifndef ARANGODB_SIMPLE_HTTP_CLIENT_SIMPLE_HTTP_CLIENT_H +#define ARANGODB_SIMPLE_HTTP_CLIENT_SIMPLE_HTTP_CLIENT_H 1 #include "Basics/Common.h" @@ -69,7 +69,7 @@ class SimpleHttpClient { public: void setInterrupted(bool value); - + ////////////////////////////////////////////////////////////////////////////// /// @brief invalidates the connection used by the client /// this may be called from other objects that are responsible for managing diff --git a/lib/SimpleHttpClient/SimpleHttpResult.h b/lib/SimpleHttpClient/SimpleHttpResult.h index 8b50aac6c5..6eb22194d4 100644 --- a/lib/SimpleHttpClient/SimpleHttpResult.h +++ b/lib/SimpleHttpClient/SimpleHttpResult.h @@ -22,8 +22,8 @@ /// @author Achim Brandt //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_SIMPLE_HTTP_CLIENT_SIMPLE_HTTP_RESULT_H -#define LIB_SIMPLE_HTTP_CLIENT_SIMPLE_HTTP_RESULT_H 1 +#ifndef ARANGODB_SIMPLE_HTTP_CLIENT_SIMPLE_HTTP_RESULT_H +#define ARANGODB_SIMPLE_HTTP_CLIENT_SIMPLE_HTTP_RESULT_H 1 #include "Basics/Common.h" #include "Basics/StringBuffer.h" diff --git a/lib/SimpleHttpClient/SslClientConnection.cpp b/lib/SimpleHttpClient/SslClientConnection.cpp index 351ea91b53..f6b747a2c3 100644 --- a/lib/SimpleHttpClient/SslClientConnection.cpp +++ b/lib/SimpleHttpClient/SslClientConnection.cpp @@ -68,7 +68,7 @@ SslClientConnection::SslClientConnection(Endpoint* endpoint, connectRetries), _ssl(nullptr), _ctx(nullptr) { - + init(sslProtocol); } @@ -101,9 +101,9 @@ SslClientConnection::~SslClientConnection() { } } -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// @brief internal initialization method, called from ctor -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// void SslClientConnection::init(uint64_t sslProtocol) { TRI_invalidatesocket(&_socket); diff --git a/lib/SimpleHttpClient/SslClientConnection.h b/lib/SimpleHttpClient/SslClientConnection.h index 53faf8b478..857a64c42c 100644 --- a/lib/SimpleHttpClient/SslClientConnection.h +++ b/lib/SimpleHttpClient/SslClientConnection.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_SIMPLE_HTTP_CLIENT_SSL_CLIENT_CONNECTION_H -#define LIB_SIMPLE_HTTP_CLIENT_SSL_CLIENT_CONNECTION_H 1 +#ifndef ARANGODB_SIMPLE_HTTP_CLIENT_SSL_CLIENT_CONNECTION_H +#define ARANGODB_SIMPLE_HTTP_CLIENT_SSL_CLIENT_CONNECTION_H 1 #include "Basics/Common.h" @@ -62,7 +62,7 @@ class SslClientConnection final : public GeneralClientConnection { ~SslClientConnection(); protected: - + ////////////////////////////////////////////////////////////////////////////// /// @brief internal initialization method, called from ctor ////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Utilities/Completer.h b/lib/Utilities/Completer.h index e736f34616..05884f63a1 100644 --- a/lib/Utilities/Completer.h +++ b/lib/Utilities/Completer.h @@ -21,8 +21,8 @@ /// @author Esteban Lombeyda //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_UTILITIES_COMPLETER_H -#define LIB_UTILITIES_COMPLETER_H 1 +#ifndef ARANGODB_UTILITIES_COMPLETER_H +#define ARANGODB_UTILITIES_COMPLETER_H 1 #include "Basics/Common.h" diff --git a/lib/Utilities/LineEditor.h b/lib/Utilities/LineEditor.h index 618d25f4f7..e117bcbbf3 100644 --- a/lib/Utilities/LineEditor.h +++ b/lib/Utilities/LineEditor.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_UTILITIES_LINE_EDITOR_H -#define LIB_UTILITIES_LINE_EDITOR_H 1 +#ifndef ARANGODB_UTILITIES_LINE_EDITOR_H +#define ARANGODB_UTILITIES_LINE_EDITOR_H 1 #include "Basics/Common.h" diff --git a/lib/Utilities/LinenoiseShell.h b/lib/Utilities/LinenoiseShell.h index 060c08d382..1efe8036e5 100644 --- a/lib/Utilities/LinenoiseShell.h +++ b/lib/Utilities/LinenoiseShell.h @@ -21,8 +21,8 @@ /// @author Esteban Lombeyda //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_UTILITIES_LINENOISE_SHELL_H -#define LIB_UTILITIES_LINENOISE_SHELL_H 1 +#ifndef ARANGODB_UTILITIES_LINENOISE_SHELL_H +#define ARANGODB_UTILITIES_LINENOISE_SHELL_H 1 #include "ShellBase.h" diff --git a/lib/Utilities/ScriptLoader.h b/lib/Utilities/ScriptLoader.h index 9c6037c1c0..1388133a15 100644 --- a/lib/Utilities/ScriptLoader.h +++ b/lib/Utilities/ScriptLoader.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_UTILITIES_SCRIPT_LOADER_H -#define LIB_UTILITIES_SCRIPT_LOADER_H 1 +#ifndef ARANGODB_UTILITIES_SCRIPT_LOADER_H +#define ARANGODB_UTILITIES_SCRIPT_LOADER_H 1 #include "Basics/Common.h" #include "Basics/Mutex.h" diff --git a/lib/Utilities/ShellBase.h b/lib/Utilities/ShellBase.h index b0f586d01e..ceafe9e353 100644 --- a/lib/Utilities/ShellBase.h +++ b/lib/Utilities/ShellBase.h @@ -22,8 +22,8 @@ /// @author Esteban Lombeyda //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_UTILITIES_SHELL_BASE_H -#define LIB_UTILITIES_SHELL_BASE_H 1 +#ifndef ARANGODB_UTILITIES_SHELL_BASE_H +#define ARANGODB_UTILITIES_SHELL_BASE_H 1 #include "Basics/Common.h" diff --git a/lib/V8/JSLoader.h b/lib/V8/JSLoader.h index c0a5d4f860..40679d406a 100644 --- a/lib/V8/JSLoader.h +++ b/lib/V8/JSLoader.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_JSLOADER_H -#define LIB_V8_JSLOADER_H 1 +#ifndef ARANGODB_V8_JSLOADER_H +#define ARANGODB_V8_JSLOADER_H 1 #include "Basics/Common.h" #include "Utilities/ScriptLoader.h" diff --git a/lib/V8/V8LineEditor.h b/lib/V8/V8LineEditor.h index 745bfdefb9..2fda8a7c08 100644 --- a/lib/V8/V8LineEditor.h +++ b/lib/V8/V8LineEditor.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_V8_LINE_EDITOR_H -#define LIB_V8_V8_LINE_EDITOR_H 1 +#ifndef ARANGODB_V8_V8LINE_EDITOR_H +#define ARANGODB_V8_V8LINE_EDITOR_H 1 #include "Utilities/LineEditor.h" diff --git a/lib/V8/v8-buffer.cpp b/lib/V8/v8-buffer.cpp index 1d44b12a75..c498a7e11e 100644 --- a/lib/V8/v8-buffer.cpp +++ b/lib/V8/v8-buffer.cpp @@ -1591,7 +1591,7 @@ static void MapSetIndexedBuffer( v8::HandleScope scope(isolate); v8::Handle self = args.Holder(); - + if (self->InternalFieldCount() == 0) { // seems object has become a FastBuffer already if (self->Has(TRI_V8_ASCII_STRING("parent"))) { diff --git a/lib/V8/v8-buffer.h b/lib/V8/v8-buffer.h index 6cbeb45bce..d590619ff7 100644 --- a/lib/V8/v8-buffer.h +++ b/lib/V8/v8-buffer.h @@ -46,8 +46,8 @@ /// USE OR OTHER DEALINGS IN THE SOFTWARE. //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_V8_BUFFER_H -#define LIB_V8_V8_BUFFER_H 1 +#ifndef ARANGODB_V8_V8__BUFFER_H +#define ARANGODB_V8_V8__BUFFER_H 1 #include "Basics/Common.h" @@ -108,7 +108,7 @@ class V8Buffer : public V8Wrapper { if (o->InternalFieldCount() == 0) { // seems object has become a FastBuffer already ISOLATE; - + if (o->Has(TRI_V8_ASCII_STRING("offset"))) { v8::Handle offset = o->Get(TRI_V8_ASCII_STRING("offset")); if (offset->IsNumber()) { @@ -130,7 +130,7 @@ class V8Buffer : public V8Wrapper { if (buffer == nullptr || offsetValue < 0) { return nullptr; } - + size_t length = buffer->_length; if (static_cast(offsetValue) >= length) { return nullptr; //OOB @@ -160,7 +160,7 @@ class V8Buffer : public V8Wrapper { if (o->InternalFieldCount() == 0) { // seems object has become a FastBuffer already ISOLATE; - + if (o->Has(TRI_V8_ASCII_STRING("length"))) { v8::Handle length = o->Get(TRI_V8_ASCII_STRING("length")); if (length->IsNumber()) { @@ -177,7 +177,7 @@ class V8Buffer : public V8Wrapper { // fallthrough intentional } } - + V8Buffer* buffer = unwrap(o); if (buffer == nullptr) { return 0; @@ -185,7 +185,7 @@ class V8Buffer : public V8Wrapper { if (lengthValue >= 0) { return static_cast(lengthValue); - } + } return buffer->_length; } diff --git a/lib/V8/v8-conv.h b/lib/V8/v8-conv.h index cc368493be..0adab0f551 100644 --- a/lib/V8/v8-conv.h +++ b/lib/V8/v8-conv.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_V8_CONV_H -#define LIB_V8_V8_CONV_H 1 +#ifndef ARANGODB_V8_V8__CONV_H +#define ARANGODB_V8_V8__CONV_H 1 #include "Basics/Common.h" #include "Basics/json.h" diff --git a/lib/V8/v8-globals.h b/lib/V8/v8-globals.h index 158fa1c347..11847d88e6 100644 --- a/lib/V8/v8-globals.h +++ b/lib/V8/v8-globals.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_V8_GLOBALS_H -#define LIB_V8_V8_GLOBALS_H 1 +#ifndef ARANGODB_V8_V8__GLOBALS_H +#define ARANGODB_V8_V8__GLOBALS_H 1 #include "Basics/Common.h" @@ -891,7 +891,7 @@ typedef struct TRI_v8_global_s { ////////////////////////////////////////////////////////////////////////////// v8::Persistent TimeoutKey; - + ////////////////////////////////////////////////////////////////////////////// /// @brief "toJson" key name ////////////////////////////////////////////////////////////////////////////// diff --git a/lib/V8/v8-json.cpp b/lib/V8/v8-json.cpp index 4dbffea629..8203223118 100644 --- a/lib/V8/v8-json.cpp +++ b/lib/V8/v8-json.cpp @@ -6,7 +6,6 @@ /// /// DISCLAIMER /// -/// Copyright 2011 triagens GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. @@ -20,7 +19,7 @@ /// See the License for the specific language governing permissions and /// limitations under the License. /// -/// Copyright holder is triAGENS GmbH, Cologne, Germany +/// Copyright holder is ArangoDB GmbH, Cologne, Germany /// /// @author Dr. Frank Celler /// @author Copyright 2011, triAGENS GmbH, Cologne, Germany @@ -69,7 +68,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -86,7 +85,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -225,7 +224,7 @@ typedef size_t yy_size_t; #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -282,7 +281,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -882,7 +881,7 @@ case 4: YY_RULE_SETUP { // performance optimisation for all-ASCII strings without escape characters - // this matches the ASCII chars with ordinal numbers 35 (x23) to 127 (x7f), + // this matches the ASCII chars with ordinal numbers 35 (x23) to 127 (x7f), // plus space (32) and ! (33) but no quotation marks (34, x22) and backslashes (92, x5c) return STRING_CONSTANT_ASCII; } @@ -1444,7 +1443,7 @@ static void tri_v8__load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE tri_v8__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) tri_v8_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in tri_v8__create_buffer()" ); @@ -1510,7 +1509,7 @@ static void tri_v8__load_buffer_state (yyscan_t yyscanner) } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } @@ -1616,9 +1615,9 @@ static void tri_v8_ensure_buffer_stack (yyscan_t yyscanner) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in tri_v8_ensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1647,12 +1646,12 @@ static void tri_v8_ensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE tri_v8__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1688,7 +1687,7 @@ YY_BUFFER_STATE tri_v8__scan_buffer (char * base, yy_size_t size , yyscan_t yy */ YY_BUFFER_STATE tri_v8__scan_string (yyconst char * yystr , yyscan_t yyscanner) { - + return tri_v8__scan_bytes(yystr,strlen(yystr) ,yyscanner); } @@ -1705,7 +1704,7 @@ YY_BUFFER_STATE tri_v8__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes char *buf; yy_size_t n; yy_size_t i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) tri_v8_alloc(n ,yyscanner ); @@ -1773,10 +1772,10 @@ YY_EXTRA_TYPE tri_v8_get_extra (yyscan_t yyscanner) int tri_v8_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -1786,10 +1785,10 @@ int tri_v8_get_lineno (yyscan_t yyscanner) int tri_v8_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -1851,7 +1850,7 @@ void tri_v8_set_lineno (int line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "tri_v8_set_lineno called with no buffer" ); - + yylineno = line_number; } @@ -1866,7 +1865,7 @@ void tri_v8_set_column (int column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "tri_v8_set_column called with no buffer" ); - + yycolumn = column_no; } @@ -1949,20 +1948,20 @@ int tri_v8_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) tri_v8_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + tri_v8_set_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -2171,7 +2170,7 @@ static v8::Handle ParseObject (v8::Isolate* isolate, // utf-8 attribute name size_t outLength; char* name = TRI_UnescapeUtf8String(yyextra._memoryZone, yytext + 1, yyleng - 2, &outLength); - + if (name == nullptr) { yyextra._message = "out-of-memory"; return scope.Escape(v8::Undefined(isolate)); @@ -2220,7 +2219,7 @@ static v8::Handle ParseObject (v8::Isolate* isolate, //////////////////////////////////////////////////////////////////////////////// static v8::Handle ParseValue (v8::Isolate* isolate, - yyscan_t scanner, + yyscan_t scanner, int c) { v8::EscapableHandleScope scope(isolate); struct yyguts_t* yyg = (struct yyguts_t*) scanner; @@ -2295,7 +2294,7 @@ static v8::Handle ParseValue (v8::Isolate* isolate, return scope.Escape(str); } - + case STRING_CONSTANT_ASCII: { if (yyleng <= 2) { // string is empty @@ -2390,13 +2389,3 @@ v8::Handle TRI_FromJsonString (v8::Isolate* isolate, return scope.Escape(value); } -// ----------------------------------------------------------------------------- -// --SECTION-- END-OF-FILE -// ----------------------------------------------------------------------------- - -// Local Variables: -// mode: C -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\)" -// End: - diff --git a/lib/V8/v8-shell.h b/lib/V8/v8-shell.h index 6a31c90d2b..a2968f58bf 100644 --- a/lib/V8/v8-shell.h +++ b/lib/V8/v8-shell.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_V8_SHELL_H -#define LIB_V8_V8_SHELL_H 1 +#ifndef ARANGODB_V8_V8__SHELL_H +#define ARANGODB_V8_V8__SHELL_H 1 #include "Basics/Common.h" diff --git a/lib/V8/v8-utils.h b/lib/V8/v8-utils.h index fd3cbe3c13..af91c67470 100644 --- a/lib/V8/v8-utils.h +++ b/lib/V8/v8-utils.h @@ -21,8 +21,8 @@ /// @author Dr. Frank Celler //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_V8_UTILS_H -#define LIB_V8_V8_UTILS_H 1 +#ifndef ARANGODB_V8_V8__UTILS_H +#define ARANGODB_V8_V8__UTILS_H 1 #include "Basics/Common.h" diff --git a/lib/V8/v8-vpack.cpp b/lib/V8/v8-vpack.cpp index 9ab9bfd62c..759f389163 100644 --- a/lib/V8/v8-vpack.cpp +++ b/lib/V8/v8-vpack.cpp @@ -167,7 +167,7 @@ v8::Handle TRI_VPackToV8(v8::Isolate* isolate, } case VPackValueType::External: { // resolve external - return TRI_VPackToV8(isolate, VPackSlice(slice.getExternal()), options, base); + return TRI_VPackToV8(isolate, VPackSlice(slice.getExternal()), options, base); } case VPackValueType::Custom: { if (options == nullptr || options->customTypeHandler == nullptr || base == nullptr) { diff --git a/lib/V8/v8-vpack.h b/lib/V8/v8-vpack.h index 2735138080..a3274eed59 100644 --- a/lib/V8/v8-vpack.h +++ b/lib/V8/v8-vpack.h @@ -21,8 +21,8 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_V8_VPACK_H -#define LIB_V8_V8_VPACK_H 1 +#ifndef ARANGODB_V8_V8__VPACK_H +#define ARANGODB_V8_V8__VPACK_H 1 #include "Basics/Common.h" #include "V8/v8-globals.h" diff --git a/lib/V8/v8-wrapper.h b/lib/V8/v8-wrapper.h index 96c72642dd..3f993f9a30 100644 --- a/lib/V8/v8-wrapper.h +++ b/lib/V8/v8-wrapper.h @@ -46,8 +46,8 @@ /// USE OR OTHER DEALINGS IN THE SOFTWARE. //////////////////////////////////////////////////////////////////////////////// -#ifndef LIB_V8_V8_WRAPPER_H -#define LIB_V8_V8_WRAPPER_H 1 +#ifndef ARANGODB_V8_V8__WRAPPER_H +#define ARANGODB_V8_V8__WRAPPER_H 1 #include "Basics/Common.h" diff --git a/utils/cleanupCFiles b/utils/cleanupCFiles index 44fa430d52..99c812c8a2 100755 --- a/utils/cleanupCFiles +++ b/utils/cleanupCFiles @@ -81,9 +81,6 @@ sub formatFile ($$$) { # set to true, if we handled the DISCLAIMER my $disclaimerDone = 0; - # set to true, if we see a "@author Copyright" - my $copyrightSeen = 0; - # set to true, if we see a "Copyright holder" my $holderSeen = 0; @@ -166,6 +163,7 @@ sub formatFile ($$$) { my $skipGroup = 0; my $foundEOL = 0; my $finalEndif = 0; + my $copyrightLines = ""; while () { chomp; @@ -231,16 +229,6 @@ sub formatFile ($$$) { $line = '/// @author Dr. Oreste Costa-Panaia'; } - if ($line =~ /^[ \t]*(\/\/\/.*)$/) { - $line = "$1"; - } - - if (0) { - if ($line =~ /^[ \t]*(\/\/ --.*)$/) { - $line = "$1"; - } - } - if ($isJavaScript == 0) { if ($line =~ /^#include <((Admin|ApplicationServer|Aql|Basics|Dipatcher|GeneralServer|GeoIndex|Handler|Hpdf|HttpServer|JsonParserX|LineClient|LineServer|Logger|Rest|ResultGenerator|Scheduler|Server|Session|SessionVoc|Snapshot|Variant|VocBase)\/.*)>/) { $line = "#include \"$1\""; @@ -252,38 +240,45 @@ sub formatFile ($$$) { $headerSeen = 1; $fileSeen = 1; } - elsif ($line =~ /^\/\/\/ \@author Copyright (\d\d\d\d).*ArangoDB/) { - my $y = $1; - $headerSeen = 1; - $copyrightSeen = 1; + elsif ($line =~ /^\/\/\/ Copyright (\d\d\d\d) ArangoDB/) { + $headerSeen = 1; - if ($y != $year) { - if ($year != 2014) { - $line = "/// \@author Copyright $y-$year, ArangoDB GmbH, Cologne, Germany\n$line"; - } - else { - $line = "/// \@author Copyright $year, ArangoDB GmbH, Cologne, Germany\n$line"; - } + my $y1 = "$1"; + + if ($y1 != $year) { + $line = "/// Copyright $y1-$year ArangoDB GmbH, Cologne, Germany" } + + $copyrightLines = $copyrightLines . $line . "\n"; + } + elsif ($line =~ /^\/\/\/ Copyright (\d\d\d\d)-(\d\d\d\d) ArangoDB/) { + $headerSeen = 1; + + my $y1 = "$1"; + my $y2 = "$2"; + + if ($y2 != $year) { + $line = "/// Copyright $y1-$year ArangoDB GmbH, Cologne, Germany" + } + + $copyrightLines = $copyrightLines . $line . "\n"; + } + elsif ($line =~ /^\/\/\/ Copyright (\d\d\d\d) triAGENS/) { + $headerSeen = 1; + $copyrightLines = $copyrightLines . $line . "\n"; + } + elsif ($line =~ /^\/\/\/ Copyright (\d\d\d\d)-(\d\d\d\d) triAGENS/) { + $headerSeen = 1; + $copyrightLines = $copyrightLines . $line . "\n"; + } + elsif ($line =~ /^\/\/\/ \@author Copyright (\d\d\d\d).*ArangoDB/) { + $headerSeen = 1; } elsif ($line =~ /^\/\/\/ \@author Copyright (\d\d\d\d)-(\d\d\d\d).*ArangoDB/) { - my $y1 = $1; - my $y2 = $2; $headerSeen = 1; - $copyrightSeen = 1; - - if ($y2 != $year) { - if ($year != 2014) { - $line = "/// \@author Copyright 2014-$year, ArangoDB GmbH, Cologne, Germany"; - } - else { - $line = "/// \@author Copyright 2014, ArangoDB GmbH, Cologne, Germany"; - } - } } elsif ($line =~ /^\/\/\/ \@author Copyright.*triAGENS/) { $headerSeen = 1; - $copyrightSeen = 1; } elsif ($line =~ /^\/\/\/ \@author Copyright/) { die "cannot parse copyright line '$line'"; @@ -312,11 +307,6 @@ sub formatFile ($$$) { } } - if ($authorSeen && ! $copyrightSeen && $breakLine) { - print $out "/// \@author Copyright $year, ArangoDB GmbH, Cologne, Germany\n"; - $copyrightSeen = 1; - } - if ($disclaimerSeen && ! $holderSeen) { next; } @@ -330,12 +320,7 @@ sub formatFile ($$$) { print $out "/// DISCLAIMER\n"; print $out "///\n"; - if ($year != 2014) { - print $out "/// Copyright 2014-$year ArangoDB GmbH, Cologne, Germany\n"; - } - else { - print $out "/// Copyright $year ArangoDB GmbH, Cologne, Germany\n"; - } + print $out "$copyrightLines"; print $out "///\n"; print $out "$disclaimerText"; @@ -373,10 +358,6 @@ sub formatFile ($$$) { print $out "\n"; } - print $out "// -----------------------------------------------------------------------------\n"; - print $out "// --SECTION-- END-OF-FILE\n"; - print $out "// -----------------------------------------------------------------------------\n"; - if (! $dryRun) { close($out) || die "cannot close output file '$file.new'";