From f296244b848665bc4e9bff59ae712a14b52fa560 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 19 Jul 2017 15:19:46 +0300 Subject: [PATCH] core: Spellcheck --- src/core/model/attribute-accessor-helper.h | 6 +++--- src/core/model/callback.cc | 2 +- src/core/model/des-metrics.h | 2 +- src/core/model/heap-scheduler.h | 2 +- src/core/model/int64x64-128.h | 2 +- src/core/model/log-macros-enabled.h | 2 +- src/core/model/names.cc | 8 ++++---- src/core/model/object.cc | 2 +- src/core/model/object.h | 2 +- src/core/model/random-variable-stream.h | 4 ++-- src/core/model/realtime-simulator-impl.cc | 6 +++--- src/core/model/rng-seed-manager.h | 2 +- src/core/model/simulator-impl.h | 2 +- src/core/model/synchronizer.h | 2 +- src/core/model/system-mutex.h | 2 +- src/core/model/system-thread.h | 2 +- src/core/model/test.h | 12 ++++++------ src/core/model/traced-value.h | 2 +- src/core/model/wall-clock-synchronizer.h | 4 ++-- src/core/model/win32-system-wall-clock-ms.cc | 2 +- 20 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/core/model/attribute-accessor-helper.h b/src/core/model/attribute-accessor-helper.h index 7487e9898..434781534 100644 --- a/src/core/model/attribute-accessor-helper.h +++ b/src/core/model/attribute-accessor-helper.h @@ -361,7 +361,7 @@ inline Ptr DoMakeAccessorHelperOne (void (T::*setter)(U)) { - /* AttributeAccessor implemenation with a class set method returning void. */ + /* AttributeAccessor implementation with a class set method returning void. */ class MemberMethod : public AccessorHelper { public: @@ -423,7 +423,7 @@ DoMakeAccessorHelperTwo (void (T::*setter)(U), V (T::*getter)(void) const) { /* - * AttributeAccessor implemenation with class get functor and set method, + * AttributeAccessor implementation with class get functor and set method, * returning void. */ class MemberMethod : public AccessorHelper @@ -506,7 +506,7 @@ DoMakeAccessorHelperTwo (bool (T::*setter)(U), V (T::*getter)(void) const) { /* - * AttributeAccessor implemenation with class get functor and + * AttributeAccessor implementation with class get functor and * set method, returning bool. */ class MemberMethod : public AccessorHelper diff --git a/src/core/model/callback.cc b/src/core/model/callback.cc index bc4148920..dc96bdf74 100644 --- a/src/core/model/callback.cc +++ b/src/core/model/callback.cc @@ -99,7 +99,7 @@ CallbackImplBase::Demangle (const std::string& mangled) ret = demangled; } else if (status == -1) { - NS_LOG_UNCOND ("Callback demangling failed: Memory allocation failure occured."); + NS_LOG_UNCOND ("Callback demangling failed: Memory allocation failure occurred."); ret = mangled; } else if (status == -2) { diff --git a/src/core/model/des-metrics.h b/src/core/model/des-metrics.h index b63e0b186..46c0ec749 100644 --- a/src/core/model/des-metrics.h +++ b/src/core/model/des-metrics.h @@ -156,7 +156,7 @@ private: static std::string m_outputDir; bool m_initialized; //!< Have we been initialized. - std::ofstream m_os; //!< The output json trace file stream. + std::ofstream m_os; //!< The output JSON trace file stream. char m_separator; //!< The separator between event records. /** Mutex to control access to the output file. */ diff --git a/src/core/model/heap-scheduler.h b/src/core/model/heap-scheduler.h index 0d506b816..1968e16c1 100644 --- a/src/core/model/heap-scheduler.h +++ b/src/core/model/heap-scheduler.h @@ -37,7 +37,7 @@ namespace ns3 { * \ingroup scheduler * \brief a binary heap event scheduler * - * This code started as a c++ translation of a java-based code written in 2005 + * This code started as a c++ translation of a Java-based code written in 2005 * to implement a heap sort. So, this binary heap is really a pretty * straightforward implementation of the classic data structure. Not much to say * about it. diff --git a/src/core/model/int64x64-128.h b/src/core/model/int64x64-128.h index cc7146d5f..676ec6cde 100644 --- a/src/core/model/int64x64-128.h +++ b/src/core/model/int64x64-128.h @@ -245,7 +245,7 @@ public: /** * Compute the inverse of an integer value. * - * Ordinary division by an integer would be limited to 64 bits of precsion. + * Ordinary division by an integer would be limited to 64 bits of precision. * Instead, we multiply by the 128-bit inverse of the divisor. * This function computes the inverse to 128-bit precision. * MulByInvert() then completes the division. diff --git a/src/core/model/log-macros-enabled.h b/src/core/model/log-macros-enabled.h index f8f9b111f..b0a3337ee 100644 --- a/src/core/model/log-macros-enabled.h +++ b/src/core/model/log-macros-enabled.h @@ -93,7 +93,7 @@ #ifndef NS_LOG_APPEND_CONTEXT /** * \ingroup logging - * Append the node id (or other file-local programatic context, such as + * Append the node id (or other file-local programmatic context, such as * MPI rank) to a log message. * * This is implemented locally in `.cc` files because diff --git a/src/core/model/names.cc b/src/core/model/names.cc index 20cb98354..a13a6590a 100644 --- a/src/core/model/names.cc +++ b/src/core/model/names.cc @@ -254,7 +254,7 @@ NamesPriv::Add (std::string name, Ptr object) // // If we are given a name that begins with "/Names/" we assume that this is a // fully qualified path name to the object we want to create. We split the name - // into a path string and and a final segment (name) and then call the "Real" Add. + // into a path string and a final segment (name) and then call the "Real" Add. // std::string namespaceName = "/Names"; std::string::size_type offset = name.find (namespaceName); @@ -363,7 +363,7 @@ NamesPriv::Rename (std::string oldpath, std::string newname) // // If we are given a name that begins with "/Names/" we assume that this is a // fully qualified path to the object we want to change. We split the path into - // path string (cf directory) and and a final segment (cf filename) and then call + // path string (cf directory) and a final segment (cf filename) and then call // the "Real" Rename. // std::string namespaceName = "/Names"; @@ -454,7 +454,7 @@ NamesPriv::Rename (Ptr context, std::string oldname, std::string newname // // The rename process consists of: - // 1. Geting the pointer to the name node from the map and remembering it; + // 1. Getting the pointer to the name node from the map and remembering it; // 2. Removing the map entry corresponding to oldname from the map; // 3. Changing the name string in the name node; // 4. Adding the name node back in the map under the newname. @@ -522,7 +522,7 @@ NamesPriv::Find (std::string path) // // If we are provided a path that doesn't begin with "/Names", we assume // that the caller has simply given us a path starting with a name that - // is in the root namespace. This allows peole to omit the "/Names" prefix. + // is in the root namespace. This allows people to omit the "/Names" prefix. // and simply do a Find ("Client/eth0") instead of having to always do a // Find ("/Names/Client/eth0"); // diff --git a/src/core/model/object.cc b/src/core/model/object.cc index c08246fac..72822d13e 100644 --- a/src/core/model/object.cc +++ b/src/core/model/object.cc @@ -298,7 +298,7 @@ Object::AggregateObject (Ptr o) } // Finally, call NotifyNewAggregate on all the objects aggregates together. - // We purposedly use the old aggregate buffers to iterate over the objects + // We purposely use the old aggregate buffers to iterate over the objects // because this allows us to assume that they will not change from under // our feet, even if our users call AggregateObject from within their // NotifyNewAggregate method. diff --git a/src/core/model/object.h b/src/core/model/object.h index 0e6c49faa..70fbe559b 100644 --- a/src/core/model/object.h +++ b/src/core/model/object.h @@ -133,7 +133,7 @@ private: */ AggregateIterator (Ptr object); Ptr m_object; //!< Parent Object. - uint32_t m_current; //!< Current position in parent's aggegrates. + uint32_t m_current; //!< Current position in parent's aggregates. }; /** Constructor. */ diff --git a/src/core/model/random-variable-stream.h b/src/core/model/random-variable-stream.h index 739bb5a99..446e932b8 100644 --- a/src/core/model/random-variable-stream.h +++ b/src/core/model/random-variable-stream.h @@ -81,7 +81,7 @@ class RngStream; * * ns-3 has a rich set of random number generators that allow stream * numbers to be set deterministically if desired. Class - * RandomVariableStream defines the base class functionalty required + * RandomVariableStream defines the base class functionality required * for all such random number generators. * * By default, the underlying generator is seeded all the time with @@ -166,7 +166,7 @@ private: */ RandomVariableStream (const RandomVariableStream &o); /** - * Assignment operator. These objects can't be copied by assignement. + * Assignment operator. These objects can't be copied by assignment. * * \param [in] o The RandomVariableStream to copy. * \return lvalue RandomVariableStream. diff --git a/src/core/model/realtime-simulator-impl.cc b/src/core/model/realtime-simulator-impl.cc index b0baa8116..3d72f36fe 100644 --- a/src/core/model/realtime-simulator-impl.cc +++ b/src/core/model/realtime-simulator-impl.cc @@ -177,7 +177,7 @@ RealtimeSimulatorImpl::ProcessOneEvent (void) // cause us to re-evaluate our state. The way this works is that the synchronizer // gets interrupted and returns. So, there is a possibility that things may change // out from under us dynamically. In this case, we need to re-evaluate how long to - // wait in a for-loop until we have waited sucessfully (until a timeout) for the + // wait in a for-loop until we have waited successfully (until a timeout) for the // event at the head of the event list. // // m_synchronizer->Synchronize will return true if the wait was completed without @@ -196,7 +196,7 @@ RealtimeSimulatorImpl::ProcessOneEvent (void) // It is important to understand that m_currentTs is interpreted only as the // timestamp of the last event we executed. Current time can a bit of a // slippery concept in realtime mode. What we have here is a discrete event - // simulator, so the last event is, by defintion, executed entirely at a single + // simulator, so the last event is, by definition, executed entirely at a single // discrete time. This is the definition of m_currentTs. It really has // nothing to do with the current real time, except that we are trying to arrange // that at the instant of the beginning of event execution, the current real time @@ -517,7 +517,7 @@ RealtimeSimulatorImpl::Schedule (Time const &delay, EventImpl *impl) { CriticalSection cs (m_mutex); // - // This is the reason we had to bring the absolute time calcualtion in from the + // This is the reason we had to bring the absolute time calculation in from the // simulator.h into the implementation. Since the implementations may be // multi-threaded, we need this calculation to be atomic. You can see it is // here since we are running in a CriticalSection. diff --git a/src/core/model/rng-seed-manager.h b/src/core/model/rng-seed-manager.h index c0848f967..5b9473fb8 100644 --- a/src/core/model/rng-seed-manager.h +++ b/src/core/model/rng-seed-manager.h @@ -78,7 +78,7 @@ public: * UniformVariable x(0,10); * ExponentialVariable y(2902); * \endcode - * In this example, \c N could successivly be equal to 1,2,3, _etc._ + * In this example, \c N could successively be equal to 1,2,3, _etc._ * and the user would continue to get independent runs out of the * single simulation. For this simple example, the following might work: * \code diff --git a/src/core/model/simulator-impl.h b/src/core/model/simulator-impl.h index a60af1d97..c7ab841b0 100644 --- a/src/core/model/simulator-impl.h +++ b/src/core/model/simulator-impl.h @@ -91,7 +91,7 @@ public: * \param [in] schedulerFactory A new event scheduler factory. * * The event scheduler can be set at any time: the events scheduled - * in the previous scheduler will be transfered to the new scheduler + * in the previous scheduler will be transferred to the new scheduler * before we start to use it. */ virtual void SetScheduler (ObjectFactory schedulerFactory) = 0; diff --git a/src/core/model/synchronizer.h b/src/core/model/synchronizer.h index 4b6bfaa90..2bab776f5 100644 --- a/src/core/model/synchronizer.h +++ b/src/core/model/synchronizer.h @@ -125,7 +125,7 @@ public: /** * @brief Wait until the real time is in sync with the specified simulation - * time or until the synchronizer is Sigalled. + * time or until the synchronizer is Signalled. * * This is where the real work of synchronization is done. The @c tsCurrent * argument is the simulation time. The job of Synchronize is to diff --git a/src/core/model/system-mutex.h b/src/core/model/system-mutex.h index f6abf4b42..41224f344 100644 --- a/src/core/model/system-mutex.h +++ b/src/core/model/system-mutex.h @@ -42,7 +42,7 @@ class SystemMutexPrivate; * When more than one thread needs to access a shared resource (data structure * or device), the system needs to provide a way to serialize access to the * resource. An operating system will typically provide a Mutual Exclusion - * primitive to provide that capability. We provide plattorm-independent + * primitive to provide that capability. We provide platform-independent * access to the OS-dependent capability with the SystemMutex class. * * There are two operations: Lock and Unlock. Lock allows an executing diff --git a/src/core/model/system-thread.h b/src/core/model/system-thread.h index 2e3f315e4..359c8d030 100644 --- a/src/core/model/system-thread.h +++ b/src/core/model/system-thread.h @@ -43,7 +43,7 @@ namespace ns3 { * This class allows for creation of multiple threads of execution in a * process. The exact implementation of the thread functionality is * operating system dependent, but typically in ns-3 one is using an - * environment in which Posix Threads are supported (either navively or + * environment in which Posix Threads are supported (either natively or * in the case of Windows via Cygwin's implementation of pthreads on the * Win32 API. In either case we expect that these will be kernel-level * threads and therefore a system with multiple CPUs will see truly concurrent diff --git a/src/core/model/test.h b/src/core/model/test.h index 87f444f6e..450056641 100644 --- a/src/core/model/test.h +++ b/src/core/model/test.h @@ -214,7 +214,7 @@ * numbers (float or double) as it is unlikely to do what you expect. * Use NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL_TOL instead. * - * This function returns a boolean value. + * This function returns a Boolean value. * */ #define NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(actual, limit, msg) \ @@ -336,7 +336,7 @@ * because of floating point rounding errors. We provide a floating * point comparison function ns3::TestDoubleIsEqual() but you will * probably quickly find that is not what you want either. It may - * turn out to be the case that when you measured an snr that printed + * turn out to be the case that when you measured an SNR that printed * as 1128.93, what was actually measured was something more like * 1128.9287653857625442 for example. Given that the double epsilon * is on the order of 0.0000000000000009, you would need to provide @@ -426,7 +426,7 @@ * because of floating point rounding errors. We provide a floating * point comparison function ns3::TestDoubleIsEqual() but you will * probably quickly find that is not what you want either. It may - * turn out to be the case that when you measured an snr that printed + * turn out to be the case that when you measured an SNR that printed * as 1128.93, what was actually measured was something more like * 1128.9287653857625442 for example. Given that the double epsilon * is on the order of 0.0000000000000009, you would need to provide @@ -460,7 +460,7 @@ * \param [in] tol Tolerance of the test. * \param [in] msg Message that is output if the test does not pass. * - * This function returns a boolean value. + * This function returns a Boolean value. * */ #define NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL(actual, limit, tol, msg) \ @@ -521,7 +521,7 @@ * because of floating point rounding errors. We provide a floating * point comparison function ns3::TestDoubleIsEqual() but you will * probably quickly find that is not what you want either. It may - * turn out to be the case that when you measured an snr that printed + * turn out to be the case that when you measured an SNR that printed * as 1128.93, what was actually measured was something more like * 1128.9287653857625442 for example. Given that the double epsilon * is on the order of 0.0000000000000009, you would need to provide @@ -669,7 +669,7 @@ * \warning Do not use this macro if you are comparing floating point * numbers (float or double). Use NS_TEST_ASSERT_MSG_FLNE instead. * - * This function returns a boolean value. + * This function returns a Boolean value. * */ #define NS_TEST_ASSERT_MSG_NE_RETURNS_BOOL(actual, limit, msg) \ diff --git a/src/core/model/traced-value.h b/src/core/model/traced-value.h index d1bc9dede..152b7f3c2 100644 --- a/src/core/model/traced-value.h +++ b/src/core/model/traced-value.h @@ -295,7 +295,7 @@ std::ostream& operator << (std::ostream& os, const TracedValue& rhs) * \tparam U \deduced The underlying type held by the right-hand argument. * \param [in] lhs The left-hand argument. * \param [in] rhs The right-hand argument. - * \returns The boolean result of comparing the underlying values. + * \returns The Boolean result of comparing the underlying values. */ template bool operator == (const TracedValue &lhs, const TracedValue &rhs) diff --git a/src/core/model/wall-clock-synchronizer.h b/src/core/model/wall-clock-synchronizer.h index b9dc9abdd..984010814 100644 --- a/src/core/model/wall-clock-synchronizer.h +++ b/src/core/model/wall-clock-synchronizer.h @@ -99,7 +99,7 @@ protected: * * @param [in] ns The target normalized real time we should wait for. * @returns @c true if we reached the target time, - * @c false if we retured because the condition was set. + * @c false if we returned because the condition was set. */ bool SpinWait (uint64_t ns); /** @@ -123,7 +123,7 @@ protected: * * @param [in] ns The target normalized real time we should wait for. * @returns @c true if we reached the target time, - * @c false if we retured because the condition was set. + * @c false if we returned because the condition was set. */ bool SleepWait (uint64_t ns); diff --git a/src/core/model/win32-system-wall-clock-ms.cc b/src/core/model/win32-system-wall-clock-ms.cc index 38096d50b..aa2355a78 100644 --- a/src/core/model/win32-system-wall-clock-ms.cc +++ b/src/core/model/win32-system-wall-clock-ms.cc @@ -87,7 +87,7 @@ SystemWallClockMsPrivate::End (void) // internally? Works fine, lasts a long time. // // If millisecondsPerTick becomes fractional, and an elapsed time greater than - // a milliscond is measured, the function will work as expected. If an elapsed + // a millisecond is measured, the function will work as expected. If an elapsed // time is measured that turns out to be less than a millisecond, we'll just // return zero which would, I think, also will be expected. //