Skip to content

Commit

Permalink
Fixed some spelling mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
vBm committed Dec 15, 2010
1 parent f15539d commit 46a1118
Show file tree
Hide file tree
Showing 38 changed files with 106 additions and 105 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Nicolas Le Cam
Reijo Tomperi
Robert Reif
Slava Semushin
vBm
Vesa Pikki
Zachary Blair

Expand Down
2 changes: 1 addition & 1 deletion cli/cmdlineparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CmdLineParser
public:
/**
* The constructor.
* @param settings Settings instance that will be modified accoding to
* @param settings Settings instance that will be modified according to
* options user has given.
*/
CmdLineParser(Settings *settings);
Expand Down
4 changes: 2 additions & 2 deletions gui/applicationlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* (message) - Error message
* (severity) - Error severity
*
* Example opening a file with Kate and make Kate scroll to the corret line:
* Example opening a file with Kate and make Kate scroll to the correct line:
* kate -l(line) (file)
*
*/
Expand Down Expand Up @@ -91,7 +91,7 @@ class ApplicationList : public QObject
int GetApplicationCount() const;

/**
* @brief Get spesific application's name
* @brief Get specific application's name
*
* @param index Index of the application whose name to get
* @return Name of the application
Expand Down
2 changes: 1 addition & 1 deletion gui/checkstatistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ unsigned CheckStatistics::GetCount(ShowTypes type) const
break;
case SHOW_NONE:
default:
qDebug() << "Unknown error type - returning zero statistices.";
qDebug() << "Unknown error type - returning zero statistics.";
break;
}
return count;
Expand Down
2 changes: 1 addition & 1 deletion gui/checkthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CheckThread : public QThread
* Whole purpose of these states is to allow stopping of the checking. When
* stopping we say for the thread (Stopping) that stop when current check
* has been completed. Thread must be stopped cleanly, just terminating thread
* likely causes unpredictable side-effedts.
* likely causes unpredictable side-effects.
*/
enum State
{
Expand Down
2 changes: 1 addition & 1 deletion gui/filelist.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class FileList

/**
* @brief Test if filename matches the filename extensions filtering.
* @param true if filename matches filterin.
* @param true if filename matches filtering.
*/
bool FilterMatches(const QFileInfo &inf);

Expand Down
2 changes: 1 addition & 1 deletion gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void MainWindow::CheckDirectory()

bool MainWindow::GetCheckProject()
{
// We have succesfully loaded project earlier and use that project
// We have successfully loaded project earlier and use that project
if (mProject)
return true;

Expand Down
2 changes: 1 addition & 1 deletion gui/resultsview.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public slots:
bool mErrorsFound;

/**
* @brief Should we show a "No errors found dialog" everytime no errors were found?
* @brief Should we show a "No errors found dialog" every time no errors were found?
*/
bool mShowNoErrorsMessage;

Expand Down
2 changes: 1 addition & 1 deletion gui/threadhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ThreadHandler : public QObject
* @brief Start the threads to check the files
*
* @param settings Settings for checking
* @param recheck Should we reuse the files we checked earleir
* @param recheck Should we reuse the files we checked earlier
*/
void Check(const Settings &settings, bool recheck);

Expand Down
4 changes: 2 additions & 2 deletions gui/threadresult.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class ThreadResult : public QObject, public ErrorLogger
public slots:

/**
* @brief Slot threads use to signal this class that a spesific file is checked
* @param file File taht is checked
* @brief Slot threads use to signal this class that a specific file is checked
* @param file File that is checked
*/
void FileChecked(const QString &file);
signals:
Expand Down
6 changes: 3 additions & 3 deletions gui/translationhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TranslationHandler::TranslationHandler(QObject *parent) :
<< "cppcheck_ja"
<< "cppcheck_sr";

//Load english as a fallback language
//Load English as a fallback language
QTranslator *english = new QTranslator();
if (english->load("cppcheck_en"))
{
Expand Down Expand Up @@ -78,7 +78,7 @@ const QStringList TranslationHandler::GetFiles() const

bool TranslationHandler::SetLanguage(const int index, QString &error)
{
//If english is the language
//If English is the language
if (index == 0)
{
//Just remove all extra translators
Expand Down Expand Up @@ -147,7 +147,7 @@ int TranslationHandler::SuggestLanguage() const
//And see if we can find it from our list of language files
int index = mFiles.indexOf(file);

//If nothing found, return english
//If nothing found, return English
if (index < 0)
{
return 0;
Expand Down
2 changes: 1 addition & 1 deletion gui/xmlreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void XmlReport::WriteError(const ErrorItem &error)
/*
Error example from the core program in xml
<error file="gui/test.cpp" line="14" id="mismatchAllocDealloc" severity="error" msg="Mismatching allocation and deallocation: k"/>
The callstack seems to be ignored here aswell, instead last item of the stack is used
The callstack seems to be ignored here as well, instead last item of the stack is used
*/

mXmlWriter->writeStartElement(ErrorElementName);
Expand Down
4 changes: 2 additions & 2 deletions htmlreport/README.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cppcheck-htmlreport

This is a little utility to generate a html report of a xml file produced by
This is a little utility to generate a html report of a XML file produced by
cppcheck.

The utility is implemented in python and require the pygments module to be
The utility is implemented in Python and require the pygments module to be
able to generate syntax highlighted source code.
4 changes: 2 additions & 2 deletions lib/checkbufferoverrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ void CheckBufferOverrun::checkScope(const Token *tok, const std::vector<std::str
if (Token::Match(tok2->tokAt(4), "%var% =|+=|-=") && MathLib::toLongNumber(max_counter_value) <= size)
condition_out_of_bounds = false;

// Goto the end paranthesis of the for-statement: "for (x; y; z)" ..
// Goto the end parenthesis of the for-statement: "for (x; y; z)" ..
tok2 = tok->next()->link();
if (!tok2 || !tok2->tokAt(5))
break;
Expand Down Expand Up @@ -922,7 +922,7 @@ void CheckBufferOverrun::checkScope(const Token *tok, const ArrayInfo &arrayInfo
if (Token::Match(tok2->tokAt(4), "%var% =|+=|-=") && MathLib::toLongNumber(max_counter_value) <= (int)arrayInfo.num[0])
condition_out_of_bounds = false;

// Goto the end paranthesis of the for-statement: "for (x; y; z)" ..
// Goto the end parenthesis of the for-statement: "for (x; y; z)" ..
tok2 = tok->next()->link();
if (!tok2 || !tok2->tokAt(5))
break;
Expand Down
2 changes: 1 addition & 1 deletion lib/checkclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void CheckClass::privateFunctions()
if (!info->isClassOrStruct())
continue;

// dont check derived classes
// don’t check derived classes
if (!info->derivedFrom.empty())
continue;

Expand Down
4 changes: 2 additions & 2 deletions lib/checkmemoryleak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::list<const Toke

// Inside class function.. if the var is passed as a parameter then
// just add a "::use"
// The "::use" means that a member function was probably called but it wasn't analyzed further
// The "::use" means that a member function was probably called but it wasn't analysed further
else if (classmember)
{
if (noreturn.find(tok->str()) != noreturn.end())
Expand Down Expand Up @@ -2225,7 +2225,7 @@ const Token *CheckMemoryLeakInFunction::findleak(const Token *tokens)
while (last->next())
last = last->next();

// not a leak if exit is called before the end of the funcion
// not a leak if exit is called before the end of the function
if (!Token::Match(last->tokAt(-2), "exit|callfunc ; }"))
return last;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/checknullpointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ void CheckNullPointer::nullPointerLinkedList()
if (!Token::simpleMatch(tok1->next()->link(), ") {"))
continue;

// is there any dereferencing occuring in the for statement..
// is there any dereferencing occurring in the for statement..
unsigned int parlevel2 = 1;
for (const Token *tok2 = tok1->tokAt(2); tok2; tok2 = tok2->next())
{
// Parantheses..
// Parentheses..
if (tok2->str() == "(")
++parlevel2;
else if (tok2->str() == ")")
Expand All @@ -230,7 +230,7 @@ void CheckNullPointer::nullPointerLinkedList()
--parlevel2;
}

// Dereferencing a variable inside the "for" parantheses..
// Dereferencing a variable inside the "for" parentheses..
else if (Token::Match(tok2, "%var% . %var%"))
{
const unsigned int varid(tok2->varId());
Expand Down Expand Up @@ -532,7 +532,7 @@ void CheckNullPointer::nullPointer()
nullPointerByCheckAndDeRef();
}

/** Derefencing null constant (simplified token list) */
/** Dereferencing null constant (simplified token list) */
void CheckNullPointer::nullConstantDereference()
{
// this is kept at 0 for all scopes that are not executing
Expand Down
6 changes: 3 additions & 3 deletions lib/checkother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
if (scope == var1->_scope)
replace = true;

// not in same scope as decelaration
// not in same scope as declaration
else
{
std::set<Scope *>::iterator assignment;
Expand Down Expand Up @@ -1070,7 +1070,7 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
// assignment in this scope
else
{
// replace when only one other assingnment
// replace when only one other assignment
if (var1->_assignments.size() == 1)
replace = true;

Expand Down Expand Up @@ -1107,7 +1107,7 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
{
if (var1->_type == Variables::pointer && !dereference)
{
// check if variable decelaration is in this scope
// check if variable declaration is in this scope
if (var1->_scope == scope)
variables.clearAliases(varid1);
else
Expand Down
2 changes: 1 addition & 1 deletion lib/checkunusedfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer)
else
continue;

// funcname ( => Assert that the end paranthesis isn't followed by {
// funcname ( => Assert that the end parenthesis isn't followed by {
if (Token::Match(funcname, "%var% ("))
{
int parlevel = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/cppcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class CppCheck : public ErrorLogger

/**
* @brief Call all "getErrorMessages" in all registered Check classes.
* Also print out xml header and footer.
* Also print out XML header and footer.
*/
void getErrorMessages();

Expand Down
4 changes: 2 additions & 2 deletions lib/errorlogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ErrorLogger
/**
* Format the error message in XML format
* @param verbose use verbose message
* @param ver xml version
* @param ver XML version
*/
std::string toXML(bool verbose, int ver) const;

Expand Down Expand Up @@ -170,7 +170,7 @@ class ErrorLogger

private:
/**
* Replace all occurances of searchFor with replaceWith in the
* Replace all occurrences of searchFor with replaceWith in the
* given source.
* @param source The string to modify
* @param searchFor What should be searched for
Expand Down
20 changes: 10 additions & 10 deletions lib/preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ std::string Preprocessor::removeComments(const std::string &str, const std::stri
{
std::ostringstream errmsg;
errmsg << "The code contains characters that are unhandled. "
<< "Neither unicode nor extended ascii are supported. "
<< "Neither unicode nor extended ASCII are supported. "
<< "(line=" << lineno << ", character code=" << std::hex << (int(ch) & 0xff) << ")";
writeError(filename, lineno, _errorLogger, "syntaxError", errmsg.str());
}
Expand Down Expand Up @@ -1546,7 +1546,7 @@ void Preprocessor::handleIncludes(std::string &code,
(headerType == SystemHeader && systemIncludes.find(tempFile) != systemIncludes.end()))
{
// We have processed this file already once, skip
// it this time to avoid ethernal loop.
// it this time to avoid eternal loop.
fin.close();
continue;
}
Expand Down Expand Up @@ -1645,7 +1645,7 @@ static void skipstring(const std::string &line, std::string::size_type &pos)
* @param pos in: Position to the '('. out: Position to the ')'
* @param params out: The extracted parameters
* @param numberOfNewlines out: number of newlines in the macro call
* @param endFound out: was the end paranthesis found?
* @param endFound out: was the end parenthesis found?
*/
static void getparams(const std::string &line,
std::string::size_type &pos,
Expand All @@ -1663,7 +1663,7 @@ static void getparams(const std::string &line,
if (line[pos] != '(')
return;

// parantheses level
// parentheses level
int parlevel = 0;

// current parameter data
Expand All @@ -1672,15 +1672,15 @@ static void getparams(const std::string &line,
// scan for parameters..
for (; pos < line.length(); ++pos)
{
// increase paranthesis level
// increase parenthesis level
if (line[pos] == '(')
{
++parlevel;
if (parlevel == 1)
continue;
}

// decrease paranthesis level
// decrease parenthesis level
else if (line[pos] == ')')
{
--parlevel;
Expand Down Expand Up @@ -1759,7 +1759,7 @@ class PreprocessorMacro
/** prefix that is used by cppcheck to separate macro parameters. Always "__cppcheck__" */
const std::string _prefix;

/** The macro has parantheses but no parameters.. "AAA()" */
/** The macro has parentheses but no parameters.. "AAA()" */
bool _nopar;

/** disabled assignment operator */
Expand Down Expand Up @@ -1892,7 +1892,7 @@ class PreprocessorMacro
return _variadic;
}

/** Check if this macro has parantheses but no parameters */
/** Check if this macro has parentheses but no parameters */
bool nopar() const
{
return _nopar;
Expand Down Expand Up @@ -2301,10 +2301,10 @@ std::string Preprocessor::expandMacros(const std::string &code, std::string file
// number of newlines within macro use
unsigned int numberOfNewlines = 0;

// if the macro has parantheses, get parameters
// if the macro has parentheses, get parameters
if (macro->variadic() || macro->nopar() || macro->params().size())
{
// is the end paranthesis found?
// is the end parenthesis found?
bool endFound = false;

getparams(line,pos2,params,numberOfNewlines,endFound);
Expand Down
6 changes: 3 additions & 3 deletions lib/preprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Preprocessor
* @param srcCodeStream The (file/string) stream to read from.
* @param processedFile Give reference to empty string as a parameter,
* function will fill processed file here. Use this also as a filedata parameter
* to getcode() if you recieved more than once configurations.
* to getcode() if you received more than once configurations.
* @param resultConfigurations List of configurations. Pass these one by one
* to getcode() with processedFile.
* @param filename The name of the file to check e.g. "src/main.cpp"
Expand Down Expand Up @@ -147,9 +147,9 @@ class Preprocessor
std::string removeComments(const std::string &str, const std::string &filename, Settings *settings);

/**
* Remove redundant parantheses from preprocessor commands. This should only be called from read().
* Remove redundant parentheses from preprocessor commands. This should only be called from read().
* @param str Code processed by read().
* @return code with reduced parantheses
* @return code with reduced parentheses
*/
static std::string removeParantheses(const std::string &str);

Expand Down
Loading

0 comments on commit 46a1118

Please sign in to comment.