From 9fe1ed4d686d6f959f3c0d8bbe4f05281b8e6fac Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 25 Jun 2020 23:16:08 +0200 Subject: [PATCH] Run codespell on src/support Codespell is run with command line codespell -w -S Makefile.in -L mathed,afe,tthe,ue,fro,uint,larg,alph,te,thes,alle,Claus -i 3 src/support/ --- src/support/FileName.h | 2 +- src/support/ForkedCalls.cpp | 2 +- src/support/ForkedCalls.h | 2 +- src/support/Messages.h | 2 +- src/support/Package.h | 2 +- src/support/Timeout.cpp | 2 +- src/support/debug.cpp | 2 +- src/support/docstream.cpp | 4 ++-- src/support/docstring.cpp | 2 +- src/support/filetools.cpp | 2 +- src/support/filetools.h | 6 +++--- src/support/lstrings.cpp | 14 +++++++------- src/support/lstrings.h | 4 ++-- src/support/os_win32.h | 2 +- src/support/tests/supporttest.cmake | 2 +- src/support/types.h | 2 +- src/support/unicode.h | 2 +- 17 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/support/FileName.h b/src/support/FileName.h index 3bfdf13f26..ac351c2386 100644 --- a/src/support/FileName.h +++ b/src/support/FileName.h @@ -213,7 +213,7 @@ private: friend bool equivalent(FileName const &, FileName const &); /// Set for tracking of already visited file names. /// Uses operator==() (which may be case insensitive), and not - /// equvalent(), so that symlinks are not resolved. + /// equivalent(), so that symlinks are not resolved. typedef std::set FileNameSet; /// Helper for public copyTo() to find circular symlink chains bool copyTo(FileName const &, bool, FileNameSet &) const; diff --git a/src/support/ForkedCalls.cpp b/src/support/ForkedCalls.cpp index 1318bd3ec2..eb07314fe5 100644 --- a/src/support/ForkedCalls.cpp +++ b/src/support/ForkedCalls.cpp @@ -661,7 +661,7 @@ void handleCompletedProcesses() forkedCalls.erase(it); actCall->emitSignal(); - /* start all over: emiting the signal can result + /* start all over: emitting the signal can result * in changing the list (Ab) */ it = forkedCalls.begin(); diff --git a/src/support/ForkedCalls.h b/src/support/ForkedCalls.h index 8a4bf1d4aa..51cacd6d79 100644 --- a/src/support/ForkedCalls.h +++ b/src/support/ForkedCalls.h @@ -141,7 +141,7 @@ private: /** * An instance of class ForkedCall represents a single child process. * - * Class ForkedCall uses fork() and execvp() to lauch the child process. + * Class ForkedCall uses fork() and execvp() to launch the child process. * * Once launched, control is returned immediately to the parent process * but a Signal can be emitted upon completion of the child. diff --git a/src/support/Messages.h b/src/support/Messages.h index eb14aacac5..9f33d45e6f 100644 --- a/src/support/Messages.h +++ b/src/support/Messages.h @@ -25,7 +25,7 @@ public: Messages() {} /// messages in the language \p l. Messages(std::string const & l); - /// Return the tranlation of message \c msg, or the original + /// Return the translation of message \c msg, or the original /// string if no context was found. Context is always removed. docstring const get(std::string const & msg) const; /// diff --git a/src/support/Package.h b/src/support/Package.h index 4e5c6fa3f4..62db5d2b17 100644 --- a/src/support/Package.h +++ b/src/support/Package.h @@ -8,7 +8,7 @@ * * Full author contact details are available in file CREDITS. * - * A store of the paths to the various different directoies used + * A store of the paths to the various different directories used * by LyX. These paths differ markedly from one OS to another, * following the local Windows, MacOS X or Posix conventions. */ diff --git a/src/support/Timeout.cpp b/src/support/Timeout.cpp index 449fee033b..06571197e4 100644 --- a/src/support/Timeout.cpp +++ b/src/support/Timeout.cpp @@ -51,7 +51,7 @@ protected: private: /// Timeout & owner_; - /// timout id + /// timeout id int timeout_id; }; diff --git a/src/support/debug.cpp b/src/support/debug.cpp index e72a43dbd1..8bcd2e8103 100644 --- a/src/support/debug.cpp +++ b/src/support/debug.cpp @@ -200,7 +200,7 @@ void LyXErr::endl() char const * LyXErr::stripName(char const * n) { string const name = n; - // find the last occurence of /src/ in name + // find the last occurrence of /src/ in name size_t pos = name.rfind("/src/"); if (pos == string::npos) pos = name.rfind("\\src\\"); diff --git a/src/support/docstream.cpp b/src/support/docstream.cpp index eef5b0361e..c2d2d7e867 100644 --- a/src/support/docstream.cpp +++ b/src/support/docstream.cpp @@ -315,7 +315,7 @@ namespace lyx { template void setEncoding(Ios & ios, string const & encoding, ios_base::openmode mode) { - // We must imbue the stream before openening the file + // We must imbue the stream before opening the file locale global; locale locale(global, new iconv_codecvt_facet(encoding, mode)); ios.imbue(locale); @@ -453,7 +453,7 @@ odocstream & operator<<(odocstream & os, char c) #if ! defined(USE_WCHAR_T) && defined(__GNUC__) // We get undefined references to these virtual methods. This looks like // a bug in gcc. The implementation here does not do anything useful, since -// it is overriden in iconv_codecvt_facet. +// it is overridden in iconv_codecvt_facet. namespace std { template<> codecvt::result diff --git a/src/support/docstring.cpp b/src/support/docstring.cpp index c53222da6d..6d69915a89 100644 --- a/src/support/docstring.cpp +++ b/src/support/docstring.cpp @@ -251,7 +251,7 @@ lyx::docstring & operator+=(lyx::docstring & l, char r) // We get undefined references to these virtual methods. This looks like // a bug in gcc. The implementation here does not do anything useful, since -// it is overriden in ascii_ctype_facet. +// it is overridden in ascii_ctype_facet. namespace std { template<> ctype::~ctype() {} template<> bool diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index d17d04cc5e..d6b27856cb 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -1159,7 +1159,7 @@ FileName const findtexfile(string const & fil, string const & /*format*/, // is used." // However, we want to take advantage of the format sine almost all // the different formats has environment variables that can be used - // to controll which paths to search. f.ex. bib looks in + // to control which paths to search. f.ex. bib looks in // BIBINPUTS and TEXBIB. Small list follows: // bib - BIBINPUTS, TEXBIB // bst - BSTINPUTS diff --git a/src/support/filetools.h b/src/support/filetools.h index 1ac0edf15b..b0f5f7f379 100644 --- a/src/support/filetools.h +++ b/src/support/filetools.h @@ -144,10 +144,10 @@ imageLibFileSearch(std::string & dir, std::string const & name, /// How to quote a filename enum quote_style { - /** Quote for the (OS dependant) shell. This is needed for command + /** Quote for the (OS dependent) shell. This is needed for command line arguments of subprocesses. */ quote_shell, - /** Quote a file name for the (OS dependant) shell. This is needed + /** Quote a file name for the (OS dependent) shell. This is needed for file names as command line arguments of subprocesses. */ quote_shell_filename, /** Quote for python. Use this if you want to store a filename in a @@ -185,7 +185,7 @@ enum latex_path_dots { * If @c path contains LaTeX special characters, these are escaped. * Eg, '~' -> '\\string~' * If @c path contains spaces, then the returned path is enclosed in - * "-quotes. This last fix will lead to successful compiliation of the + * "-quotes. This last fix will lead to successful compilation of the * LaTeX file only if a sufficiently modern LaTeX compiler is used. * If @c ext == EXCLUDE_EXTENSION the extension is left outside the quotes. * This is needed for pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index 88aa1e0de0..377645ac09 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -146,7 +146,7 @@ bool isSpace(char_type c) { if (!is_utf16(c)) { // assume that no non-utf16 character is a space - // c outside the UCS4 range is catched as well + // c outside the UCS4 range is caught as well return false; } QChar const qc = ucs4_to_qchar(c); @@ -158,7 +158,7 @@ bool isNumber(char_type c) { if (!is_utf16(c)) // assume that no non-utf16 character is a numeral - // c outside the UCS4 range is catched as well + // c outside the UCS4 range is caught as well return false; return ucs4_to_qchar(c).isNumber(); } @@ -168,7 +168,7 @@ bool isEuropeanNumberSeparator(char_type c) { if (!is_utf16(c)) // assume that no non-utf16 character is a numeral - // c outside the UCS4 range is catched as well + // c outside the UCS4 range is caught as well return false; return ucs4_to_qchar(c).direction() == QChar::DirES; } @@ -178,7 +178,7 @@ bool isEuropeanNumberTerminator(char_type c) { if (!is_utf16(c)) // assume that no non-utf16 character is a numeral - // c outside the UCS4 range is catched as well + // c outside the UCS4 range is caught as well return false; return ucs4_to_qchar(c).direction() == QChar::DirET; } @@ -206,7 +206,7 @@ bool isOpenPunctuation(char_type c) { if (!is_utf16(c)) { // assume that no non-utf16 character is an op - // c outside the UCS4 range is catched as well + // c outside the UCS4 range is caught as well return false; } QChar const qc = ucs4_to_qchar(c); @@ -890,7 +890,7 @@ String const subst_string(String const & a, size_t const olen = oldstr.length(); while ((i = lstr.find(oldstr, i)) != string::npos) { lstr.replace(i, olen, newstr); - i += newstr.length(); // We need to be sure that we dont + i += newstr.length(); // We need to be sure that we don't // use the same i over and over again. } return lstr; @@ -906,7 +906,7 @@ docstring const subst_string(docstring const & a, size_t const olen = oldstr.length(); while ((i = lstr.find(oldstr, i)) != string::npos) { lstr.replace(i, olen, newstr); - i += newstr.length(); // We need to be sure that we dont + i += newstr.length(); // We need to be sure that we don't // use the same i over and over again. } return lstr; diff --git a/src/support/lstrings.h b/src/support/lstrings.h index f661fc5b85..937196855c 100644 --- a/src/support/lstrings.h +++ b/src/support/lstrings.h @@ -241,7 +241,7 @@ docstring const rtrim(docstring const & a, char const * p = " "); std::string const ltrim(std::string const & a, char const * p = " "); docstring const ltrim(docstring const & a, char const * p = " "); -/** Splits the string given in the first argument at the first occurence +/** Splits the string given in the first argument at the first occurrence of the third argument, delim. What precedes delim is returned in the second argument, piece; this will be the whole of the string if no delimiter is found. @@ -349,7 +349,7 @@ docstring const getStringFromVector(std::vector const & vec, int findToken(char const * const str[], std::string const & search_token); -/// Format a floating point number with at least 6 siginificant digits, but +/// Format a floating point number with at least 6 significant digits, but /// without scientific notation. /// Scientific notation would be invalid in some contexts, such as lengths for /// LaTeX. Simply using std::ostream with std::fixed would produce results diff --git a/src/support/os_win32.h b/src/support/os_win32.h index 6f92b90abb..3f278c3bd0 100644 --- a/src/support/os_win32.h +++ b/src/support/os_win32.h @@ -79,7 +79,7 @@ public: ~GetFolderPath(); /** Wrapper for SHGetFolderPathA, returning - * the path asscociated with @c id in utf8 encoding. + * the path associated with @c id in utf8 encoding. */ std::string const operator()(folder_id id) const; private: diff --git a/src/support/tests/supporttest.cmake b/src/support/tests/supporttest.cmake index 829f588158..6581182c87 100644 --- a/src/support/tests/supporttest.cmake +++ b/src/support/tests/supporttest.cmake @@ -13,7 +13,7 @@ # # Command: The executable, whose output is to be examined # Input: The file name of expected data -# Output: The file name for data catched from output of the executable +# Output: The file name for data caught from output of the executable execute_process(COMMAND "${Command}" OUTPUT_FILE "${Output}" diff --git a/src/support/types.h b/src/support/types.h index c9cf349592..d8b1bc2b21 100644 --- a/src/support/types.h +++ b/src/support/types.h @@ -78,7 +78,7 @@ namespace lyx { WHOLE_WORD_STRICT, // the word around the cursor WHOLE_WORD, - /// the word begining from the cursor position + /// the word beginning from the cursor position PARTIAL_WORD, /// the word around the cursor or before the cursor PREVIOUS_WORD, diff --git a/src/support/unicode.h b/src/support/unicode.h index 6559cf60b6..74c37bdf4a 100644 --- a/src/support/unicode.h +++ b/src/support/unicode.h @@ -41,7 +41,7 @@ namespace lyx { * per thread for each in/out encoding pair. This can e.g. be achieved by * using helpers for thread-local storage such as QThreadStorage or * boost::thread_specific_ptr. A single static instance protected by a mutex - * would work as well, and might be preferrable for exotic encoding pairs. + * would work as well, and might be preferable for exotic encoding pairs. * Creating local IconvProcessor instances should be avoided because of the * overhead in iconv_open(). */ -- 2.39.5