Browse Source

[master] spelling & wrap lines

Francis Dupont 10 years ago
parent
commit
eacf3d8c54

+ 6 - 6
src/lib/util/csv_file.cc

@@ -141,7 +141,7 @@ CSVFile::append(const CSVRow& row) const {
                   " columns in the CSV file '" << getColumnCount() << "'");
                   " columns in the CSV file '" << getColumnCount() << "'");
     }
     }
 
 
-    /// @todo Apparently, seekp and seekg are interchangable. A call to seekp
+    /// @todo Apparently, seekp and seekg are interchangeable. A call to seekp
     /// results in moving the input pointer too. This is ok for now. It means
     /// results in moving the input pointer too. This is ok for now. It means
     /// that when the append() is called, the read pointer is moved to the EOF.
     /// that when the append() is called, the read pointer is moved to the EOF.
     /// For the current use cases we only read a file and then append a new
     /// For the current use cases we only read a file and then append a new
@@ -223,7 +223,7 @@ CSVFile::getColumnName(const size_t col_index) const {
 
 
 bool
 bool
 CSVFile::next(CSVRow& row, const bool skip_validation) {
 CSVFile::next(CSVRow& row, const bool skip_validation) {
-    // Set somethings as row validation error. Although, we haven't started
+    // Set something as row validation error. Although, we haven't started
     // actual row validation we should get rid of any previously recorded
     // actual row validation we should get rid of any previously recorded
     // errors so as the caller doesn't interpret them as the current one.
     // errors so as the caller doesn't interpret them as the current one.
     setReadMsg("validation not started");
     setReadMsg("validation not started");
@@ -273,13 +273,13 @@ CSVFile::open(const bool seek_to_end) {
         // Catch exceptions so as we can close the file if error occurs.
         // Catch exceptions so as we can close the file if error occurs.
         try {
         try {
             // The file may fail to open. For example, because of insufficient
             // The file may fail to open. For example, because of insufficient
-            // persmissions. Although the file is not open we should call close
+            // permissions. Although the file is not open we should call close
             // to reset our internal pointer.
             // to reset our internal pointer.
             if (!fs_->is_open()) {
             if (!fs_->is_open()) {
                 isc_throw(CSVFileError, "unable to open '" << filename_ << "'");
                 isc_throw(CSVFileError, "unable to open '" << filename_ << "'");
             }
             }
-            // Make sure we are on the beginning of the file, so as we can parse
-            // the header.
+            // Make sure we are on the beginning of the file, so as we
+            // can parse the header.
             fs_->seekg(0);
             fs_->seekg(0);
             if (!fs_->good()) {
             if (!fs_->good()) {
                 isc_throw(CSVFileError, "unable to set read pointer in the file '"
                 isc_throw(CSVFileError, "unable to set read pointer in the file '"
@@ -344,7 +344,7 @@ CSVFile::recreate() {
         close();
         close();
         isc_throw(CSVFileError, "unable to open '" << filename_ << "'");
         isc_throw(CSVFileError, "unable to open '" << filename_ << "'");
     }
     }
-    // Opened successfuly. Write a header to it.
+    // Opened successfully. Write a header to it.
     try {
     try {
         CSVRow header(getColumnCount());
         CSVRow header(getColumnCount());
         for (int i = 0; i < getColumnCount(); ++i) {
         for (int i = 0; i < getColumnCount(); ++i) {

+ 5 - 5
src/lib/util/csv_file.h

@@ -238,13 +238,13 @@ private:
 
 
     /// @brief Check if the specified index of the value is in range.
     /// @brief Check if the specified index of the value is in range.
     ///
     ///
-    /// This function is used interally by other functions.
+    /// This function is used internally by other functions.
     ///
     ///
     /// @param at Value index.
     /// @param at Value index.
     /// @throw CSVFileError if specified index is not in range.
     /// @throw CSVFileError if specified index is not in range.
     void checkIndex(const size_t at) const;
     void checkIndex(const size_t at) const;
 
 
-    /// @brief Separator character specifed in the constructor.
+    /// @brief Separator character specified in the constructor.
     ///
     ///
     /// @note Separator is held as a string object (one character long),
     /// @note Separator is held as a string object (one character long),
     /// because the boost::is_any_of algorithm requires a string, not a
     /// because the boost::is_any_of algorithm requires a string, not a
@@ -277,7 +277,7 @@ std::ostream& operator<<(std::ostream& os, const CSVRow& row);
 /// - @c recreate - removes existing file and creates a new one.
 /// - @c recreate - removes existing file and creates a new one.
 ///
 ///
 /// When the file is opened its header file is parsed and column names are
 /// When the file is opened its header file is parsed and column names are
-/// idenetified. At this point it is already possible to get the list of the
+/// identified. At this point it is already possible to get the list of the
 /// column names using appropriate accessors. The data rows are not parsed
 /// column names using appropriate accessors. The data rows are not parsed
 /// at this time. The row parsing is triggered by calling @c next function.
 /// at this time. The row parsing is triggered by calling @c next function.
 /// The result of parsing a row is stored in the @c CSVRow object passed as
 /// The result of parsing a row is stored in the @c CSVRow object passed as
@@ -313,7 +313,7 @@ public:
     ///
     ///
     /// @param Object representing a CSV file row.
     /// @param Object representing a CSV file row.
     ///
     ///
-    /// @throw CSVFileError When error occured during IO operation or if the
+    /// @throw CSVFileError When error occurred during IO operation or if the
     /// size of the row doesn't match the number of columns.
     /// size of the row doesn't match the number of columns.
     void append(const CSVRow& row) const;
     void append(const CSVRow& row) const;
 
 
@@ -388,7 +388,7 @@ public:
     /// By default, the data pointer in the file is set to the beginning of
     /// By default, the data pointer in the file is set to the beginning of
     /// the first row. In order to retrieve the row contents the @c next
     /// the first row. In order to retrieve the row contents the @c next
     /// function should be called. If a @c seek_to_end parameter is set to
     /// function should be called. If a @c seek_to_end parameter is set to
-    /// true, the file will be opened and the interal pointer will be set
+    /// true, the file will be opened and the internal pointer will be set
     /// to the end of file.
     /// to the end of file.
     ///
     ///
     /// @param seek_to_end A boolean value which indicates if the intput and
     /// @param seek_to_end A boolean value which indicates if the intput and

+ 2 - 2
src/lib/util/io/fd.h

@@ -29,10 +29,10 @@ namespace io {
 /*
 /*
  * \short write() that writes everything.
  * \short write() that writes everything.
  * Wrapper around write(). The difference is, it never writes less data
  * Wrapper around write(). The difference is, it never writes less data
- * and looks successfull (eg. it blocks until all data are written).
+ * and looks successful (eg. it blocks until all data are written).
  * Retries on signals.
  * Retries on signals.
  *
  *
- * \return True if sucessfull, false otherwise. The errno variable is left
+ * \return True if successful, false otherwise. The errno variable is left
  *     intact.
  *     intact.
  * \param fd Where to write.
  * \param fd Where to write.
  * \param data The buffer to write.
  * \param data The buffer to write.

+ 1 - 1
src/lib/util/io/socketsession.h

@@ -452,7 +452,7 @@ public:
     ///
     ///
     /// The returned SocketSession object is valid only until the next time
     /// The returned SocketSession object is valid only until the next time
     /// this method is called or until the \c SocketSessionReceiver object is
     /// this method is called or until the \c SocketSessionReceiver object is
-    /// destructed.
+    /// destroyed.
     ///
     ///
     /// The caller is responsible for closing the received socket (whose
     /// The caller is responsible for closing the received socket (whose
     /// file descriptor is accessible via \c SocketSession::getSocket()).
     /// file descriptor is accessible via \c SocketSession::getSocket()).

+ 2 - 2
src/lib/util/io_utilities.h

@@ -48,7 +48,7 @@ readUint16(const void* buffer, size_t length) {
     return (result);
     return (result);
 }
 }
 
 
-/// \brief Write Unisgned 16-Bit Integer to Buffer
+/// \brief Write Unsigned 16-Bit Integer to Buffer
 ///
 ///
 /// This is essentially a copy of isc::util::OutputBuffer::writeUint16.  It
 /// This is essentially a copy of isc::util::OutputBuffer::writeUint16.  It
 /// should really be moved into a separate library.
 /// should really be moved into a separate library.
@@ -101,7 +101,7 @@ readUint32(const uint8_t* buffer, size_t length) {
     return (result);
     return (result);
 }
 }
 
 
-/// \brief Write Unisgned 32-Bit Integer to Buffer
+/// \brief Write Unsigned 32-Bit Integer to Buffer
 ///
 ///
 /// \param value 32-bit value to convert
 /// \param value 32-bit value to convert
 /// \param buffer Data buffer at least four bytes long into which the 32-bit
 /// \param buffer Data buffer at least four bytes long into which the 32-bit

+ 1 - 1
src/lib/util/optional_value.h

@@ -47,7 +47,7 @@ struct OptionalValueState {
 /// in the configuration file, but is not mandatory. The value of the
 /// in the configuration file, but is not mandatory. The value of the
 /// @c OptionalValue may be initialized to "unspecified" initially. When the
 /// @c OptionalValue may be initialized to "unspecified" initially. When the
 /// configuration parser finds that the appropriate parameter exists in the
 /// configuration parser finds that the appropriate parameter exists in the
-/// configuration file, the default value can be overriden and the value may
+/// configuration file, the default value can be overridden and the value may
 /// be marked as "specified". If the parameter is not found, the value remains
 /// be marked as "specified". If the parameter is not found, the value remains
 /// "unspecified" and the appropriate actions may be taken, e.g. the default
 /// "unspecified" and the appropriate actions may be taken, e.g. the default
 /// value may be used.
 /// value may be used.

+ 1 - 1
src/lib/util/pid_file.cc

@@ -45,7 +45,7 @@ PIDFile::check() const {
     good = fs.good();
     good = fs.good();
     fs.close();
     fs.close();
 
 
-    // If we weren't able to read a pid send back an execption
+    // If we weren't able to read a pid send back an exception
     if (!good) {
     if (!good) {
         isc_throw(PIDCantReadPID, "Unable to read PID from file '"
         isc_throw(PIDCantReadPID, "Unable to read PID from file '"
                   << filename_ << "'");
                   << filename_ << "'");

+ 2 - 2
src/lib/util/random/random_number_generator.h

@@ -97,7 +97,7 @@ class WeightedRandomIntegerGenerator {
 public:
 public:
     /// \brief Constructor
     /// \brief Constructor
     ///
     ///
-    /// \param probabilities The probabies for all the integers, the probability must be 
+    /// \param probabilities The probabilities for all the integers, the probability must be 
     /// between 0 and 1.0, the sum of probabilities must be equal to 1.
     /// between 0 and 1.0, the sum of probabilities must be equal to 1.
     /// For example, if the probabilities contains the following values:
     /// For example, if the probabilities contains the following values:
     /// 0.5 0.3 0.2, the 1st integer will be generated more frequently than the
     /// 0.5 0.3 0.2, the 1st integer will be generated more frequently than the
@@ -129,7 +129,7 @@ public:
     /// \brief Reset the probabilities
     /// \brief Reset the probabilities
     ///
     ///
     /// Change the weights of each integers
     /// Change the weights of each integers
-    /// \param probabilities The probabies for all the integers
+    /// \param probabilities The probabilities for all the integers
     /// \param min The minimum integer that generated
     /// \param min The minimum integer that generated
     void reset(const std::vector<double>& probabilities, size_t min = 0)
     void reset(const std::vector<double>& probabilities, size_t min = 0)
     {
     {

+ 1 - 1
src/lib/util/range_utilities.h

@@ -47,7 +47,7 @@ isRangeZero(Iterator begin, Iterator end) {
 /// after every start of your process.  Calling srand() is enough. This
 /// after every start of your process.  Calling srand() is enough. This
 /// method uses default rand(), which is usually a LCG pseudo-random
 /// method uses default rand(), which is usually a LCG pseudo-random
 /// number generator, so it is not suitable for security
 /// number generator, so it is not suitable for security
-/// purposes. Please get a decent PRNG implementation, like mersene
+/// purposes. Please get a decent PRNG implementation, like Mersene
 /// twister, if you are doing anything related with security.
 /// twister, if you are doing anything related with security.
 ///
 ///
 /// PRNG initialization is left out of this function on purpose. It may
 /// PRNG initialization is left out of this function on purpose. It may

+ 1 - 1
src/lib/util/signal_set.cc

@@ -126,7 +126,7 @@ SignalSet::invokeOnReceiptHandler(int sig) {
                   << sig << ": " << ex.what());
                   << sig << ": " << ex.what());
     }
     }
 
 
-    // Restore the sig action to reenable handling this signal.
+    // Restore the sig action to re-enable handling this signal.
     if (sigaction(sig, &prev_sa, 0) < 0) {
     if (sigaction(sig, &prev_sa, 0) < 0) {
         // Highly unlikely we can get here.
         // Highly unlikely we can get here.
         const char* errmsg = strerror(errno);
         const char* errmsg = strerror(errno);

+ 5 - 5
src/lib/util/signal_set.h

@@ -180,11 +180,11 @@ public:
     /// invoke the registered handler (if one) immediately upon receipt of
     /// invoke the registered handler (if one) immediately upon receipt of
     /// a registered signal.
     /// a registered signal.
     ///
     ///
-    /// Prior to invoking the handler, it sets signal action for the given
-    /// signal to SIG_IGN which prevents any repeat signal occurrences from
-    /// queuing while the handler is executing.  Upon completion of the handler,
-    /// the signal action is restored which reenables receipt and handling of
-    /// the signal.
+    /// Prior to invoking the handler, it sets signal action for the
+    /// given signal to SIG_IGN which prevents any repeat signal
+    /// occurrences from queuing while the handler is executing.  Upon
+    /// completion of the handler, the signal action is restored which
+    /// re-enables receipt and handling of the signal.
     ///
     ///
     /// @param sig Signal number.
     /// @param sig Signal number.
     /// @return Boolean false if no on-receipt handler was registered,
     /// @return Boolean false if no on-receipt handler was registered,

+ 1 - 1
src/lib/util/strutil.cc

@@ -58,7 +58,7 @@ trim(const string& instring) {
     return (retstring);
     return (retstring);
 }
 }
 
 
-// Tokenise string.  As noted in the header, this is locally written to avoid
+// Tokenize string.  As noted in the header, this is locally written to avoid
 // another dependency on a Boost library.
 // another dependency on a Boost library.
 
 
 vector<string>
 vector<string>

+ 4 - 4
src/lib/util/strutil.h

@@ -41,10 +41,10 @@ public:
 
 
 /// \brief Normalize Backslash
 /// \brief Normalize Backslash
 ///
 ///
-/// Only relevant to Windows, this replaces all "\" in a string with "/" and
-/// returns the result.  On other systems it is a no-op.  Note that Windows does
-/// recognise file names with the "\" replaced by "/" (at least in system calls,
-/// if not the command line).
+/// Only relevant to Windows, this replaces all "\" in a string with "/"
+/// and returns the result.  On other systems it is a no-op.  Note
+/// that Windows does recognize file names with the "\" replaced by "/"
+/// (at least in system calls, if not the command line).
 ///
 ///
 /// \param name Name to be substituted
 /// \param name Name to be substituted
 void normalizeSlash(std::string& name);
 void normalizeSlash(std::string& name);

+ 4 - 4
src/lib/util/threads/sync.h

@@ -28,7 +28,7 @@ class CondVar;
 
 
 /// \brief Mutex with very simple interface
 /// \brief Mutex with very simple interface
 ///
 ///
-/// Since mutexes are very system dependant, we create our own wrapper around
+/// Since mutexes are very system dependent, we create our own wrapper around
 /// whatever is available on the system and hide it.
 /// whatever is available on the system and hide it.
 ///
 ///
 /// To use this mutex, create it and then lock and unlock it by creating the
 /// To use this mutex, create it and then lock and unlock it by creating the
@@ -38,11 +38,11 @@ class CondVar;
 /// operation with it. We convert many errors to the isc::InvalidOperation,
 /// operation with it. We convert many errors to the isc::InvalidOperation,
 /// since the errors usually happen only when used in a wrong way. Any methods
 /// since the errors usually happen only when used in a wrong way. Any methods
 /// or constructors in this class can throw. Allocation errors are converted
 /// or constructors in this class can throw. Allocation errors are converted
-/// to std::bad_alloc (for example when OS-dependant limit of mutexes is
+/// to std::bad_alloc (for example when OS-dependent limit of mutexes is
 /// exceeded). Some errors which usually mean a programmer error abort the
 /// exceeded). Some errors which usually mean a programmer error abort the
 /// program, since there could be no safe way to recover from them.
 /// program, since there could be no safe way to recover from them.
 ///
 ///
-/// The current interface is somewhat minimalistic. If we ever need more, we
+/// The current interface is somewhat minimalist. If we ever need more, we
 /// can add it later.
 /// can add it later.
 class Mutex : boost::noncopyable {
 class Mutex : boost::noncopyable {
 public:
 public:
@@ -121,7 +121,7 @@ public:
     /// \brief If the mutex is currently locked
     /// \brief If the mutex is currently locked
     ///
     ///
     /// This is debug aiding method only. And it might be unavailable in
     /// This is debug aiding method only. And it might be unavailable in
-    /// non-debug build (because keeping the state might be needlesly
+    /// non-debug build (because keeping the state might be needlessly
     /// slow).
     /// slow).
     ///
     ///
     /// \todo Disable in non-debug build
     /// \todo Disable in non-debug build

+ 1 - 1
src/lib/util/threads/thread.cc

@@ -74,7 +74,7 @@ public:
             impl->exception_text_ = e.what();
             impl->exception_text_ = e.what();
         } catch (...) {
         } catch (...) {
             impl->exception_ = true;
             impl->exception_ = true;
-            impl->exception_text_ = "Uknown exception";
+            impl->exception_text_ = "Unknown exception";
         }
         }
         done(impl);
         done(impl);
         return (NULL);
         return (NULL);

+ 1 - 1
src/lib/util/threads/thread.h

@@ -35,7 +35,7 @@ namespace thread {
 /// You can wait for it then or just forget it ever existed and leave it
 /// You can wait for it then or just forget it ever existed and leave it
 /// live peacefully.
 /// live peacefully.
 ///
 ///
-/// The interface is minimalistic for now. We may need to extend it later.
+/// The interface is minimalist for now. We may need to extend it later.
 ///
 ///
 /// \note While the objects of this class represent another thread, they
 /// \note While the objects of this class represent another thread, they
 ///     are not thread-safe. You're not supposed to call wait() on the same
 ///     are not thread-safe. You're not supposed to call wait() on the same