mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
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/
This commit is contained in:
parent
a283edd376
commit
9fe1ed4d68
@ -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<FileName> FileNameSet;
|
||||
/// Helper for public copyTo() to find circular symlink chains
|
||||
bool copyTo(FileName const &, bool, FileNameSet &) const;
|
||||
|
@ -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();
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
///
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -51,7 +51,7 @@ protected:
|
||||
private:
|
||||
///
|
||||
Timeout & owner_;
|
||||
/// timout id
|
||||
/// timeout id
|
||||
int timeout_id;
|
||||
};
|
||||
|
||||
|
@ -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\\");
|
||||
|
@ -315,7 +315,7 @@ namespace lyx {
|
||||
template<class Ios>
|
||||
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<lyx::char_type, char, mbstate_t>::result
|
||||
|
@ -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<lyx::char_type>::~ctype() {}
|
||||
template<> bool
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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<docstring> 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
|
||||
|
@ -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:
|
||||
|
@ -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}"
|
||||
|
@ -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,
|
||||
|
@ -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().
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user