Skip to content

Commit

Permalink
source typo fixes pt5
Browse files Browse the repository at this point in the history
+ cleaning up some more non-short-URLs
Issue #2914
  • Loading branch information
luzpaz authored and yorikvanhavre committed Mar 4, 2017
1 parent d751423 commit 19f8fd4
Show file tree
Hide file tree
Showing 58 changed files with 147 additions and 148 deletions.
2 changes: 1 addition & 1 deletion src/Base/BaseClass.cpp
Expand Up @@ -89,7 +89,7 @@ Type BaseClass::getTypeId(void) const
void BaseClass::initSubclass(Base::Type &toInit,const char* ClassName, const char *ParentName,
Type::instantiationMethod method)
{
// dont't init twice!
// don't init twice!
assert(toInit == Base::Type::badType());
// get the parent class
Base::Type parentType(Base::Type::fromName(ParentName));
Expand Down
53 changes: 26 additions & 27 deletions src/Base/Console.cpp
Expand Up @@ -153,13 +153,13 @@ bool ConsoleSingleton::IsMsgTypeEnabled(const char* sObs, FreeCAD_ConsoleMsgType

/** Prints a Message
* This method issues a Message.
* Messages are used show some non vital information. That means in the
* case FreeCAD running with GUI a Message in the status Bar apear. In console
* mode a message comes out.
* Messages are used to show some non vital information. That means when
* FreeCAD is running in GUI mode a Message appears on the status bar.
* In console mode a message is printed to the console.
* \par
* You can use a printf like interface like:
* \code
* Console().Message("Doing somthing important %d times\n",i);
* Console().Message("Doing something important %d times\n",i);
* \endcode
* @see Warning
* @see Error
Expand All @@ -179,10 +179,10 @@ void ConsoleSingleton::Message( const char *pMsg, ... )

/** Prints a Message
* This method issues a Warning.
* Messages are used to get the users attantion. That means in the
* case FreeCAD running with GUI a Message Box is poping up. In console
* mode a colored message comes out! So dont use careless. For information
* purpose the Log or Message method is more aprobiated.
* Messages are used to get the users attention. That means when
* FreeCAD is in GUI mode a Message Box pops up. In console
* mode a colored message is returned to the console! Don't use this carelessly.
* For information purposes the 'Log' or 'Message' methods are more appropriate.
* \par
* You can use a printf like interface like:
* \code
Expand All @@ -205,15 +205,15 @@ void ConsoleSingleton::Warning( const char *pMsg, ... )
}

/** Prints a Message
* This method issues an Error which makes some execution imposible.
* Errors are used to get the users attantion. That means in the
* case FreeCAD running with GUI a Error Message Box is poping up. In console
* mode a colored message comes out! So dont use this careless. For information
* purpose the Log or Message method is more aprobiated.
* This method issues an Error which makes some execution impossible.
* Errors are used to get the users attention. That means when FreeCAD
* is running in GUI mode an Error Message Box pops up. In console
* mode a colored message is printed to the console! Don't use this carelessly.
* For information purposes the 'Log' or 'Message' methods are more appropriate.
* \par
* You can use a printf like interface like:
* \code
* Console().Error("Somthing realy bad in %s happend\n",str);
* Console().Error("Something really bad in %s happened\n",str);
* \endcode
* @see Message
* @see Warning
Expand All @@ -233,15 +233,14 @@ void ConsoleSingleton::Error( const char *pMsg, ... )


/** Prints a Message
* this method is more for devlopment and tracking purpos.
* It can be used to track execution of algorithms and functions
* and put it in files. The normal user dont need to see it, its more
* for developers and experinced users. So in normal user modes the
* logging is switched of.
* This method is appropriate for development and tracking purposes.
* It can be used to track execution of algorithms and functions.
* The normal user doesn't need to see it, it's more for developers
* and experienced users. So in normal user mode the logging is switched off.
* \par
* You can use a printf like interface like:
* You can use a printf-like interface for example:
* \code
* Console().Log("Exectue part %d in algorithem %s\n",i,str);
* Console().Log("Execute part %d in algorithm %s\n",i,str);
* \endcode
* @see Message
* @see Warning
Expand All @@ -266,8 +265,8 @@ void ConsoleSingleton::Log( const char *pMsg, ... )


/** Delivers the time/date
* this method give you a string with the actual time/date. You can
* use that for Log() calls to make time stamps.
* This method gives you a string with the actual time/date. You can
* use that for Log() calls to make timestamps.
* @return Const string with the date/time
*/
const char* ConsoleSingleton::Time(void)
Expand All @@ -289,7 +288,7 @@ const char* ConsoleSingleton::Time(void)
/** Attaches an Observer to Console
* Use this method to attach a ConsoleObserver derived class to
* the Console. After the observer is attached all messages will also
* forwardet to it.
* be forwarded to it.
* @see ConsoleObserver
*/
void ConsoleSingleton::AttachObserver(ConsoleObserver *pcObserver)
Expand Down Expand Up @@ -391,9 +390,9 @@ PyMethodDef ConsoleSingleton::Methods[] = {
{"PrintWarning", (PyCFunction) ConsoleSingleton::sPyWarning, 1,
"PrintWarning -- Print a warning to the output"},
{"SetStatus", (PyCFunction) ConsoleSingleton::sPySetStatus, 1,
"Set the status for either Log, Msg, Wrn or Error for an observer"},
"Set the status for either Log, Msg, Wrn, or Error for an observer"},
{"GetStatus", (PyCFunction) ConsoleSingleton::sPyGetStatus, 1,
"Get the status for either Log, Msg, Wrn or Error for an observer"},
"Get the status for either Log, Msg, Wrn, or Error for an observer"},
{NULL, NULL, 0, NULL} /* Sentinel */
};

Expand Down Expand Up @@ -580,7 +579,7 @@ PyObject *ConsoleSingleton::sPySetStatus(PyObject * /*self*/, PyObject *args, Py
else if(strcmp(pstr2,"Err") == 0)
pObs->bErr = (Bool==0)?false:true;
else
Py_Error(Base::BaseExceptionFreeCADError,"Unknown Message Type (use Log,Err,Msg or Wrn)");
Py_Error(Base::BaseExceptionFreeCADError,"Unknown Message Type (use Log, Err, Msg, or Wrn)");

Py_INCREF(Py_None);
return Py_None;
Expand Down
10 changes: 5 additions & 5 deletions src/Base/Console.h
Expand Up @@ -87,7 +87,7 @@ class BaseExport ConsoleObserver

/** The console class
* This class manage all the stdio stuff. This includes
* Messages, Warnings, Log entries and Errors. The incomming
* Messages, Warnings, Log entries and Errors. The incoming
* Messages are distributed with the FCConsoleObserver. The
* FCConsole class itself makes no IO, it's more like a manager.
* \par
Expand All @@ -98,7 +98,7 @@ class BaseExport ConsoleObserver
* Base::Console().Log("Stage: %d",i);
* \endcode
* \par
* ConsoleSingleton is abel to switch between several modes to, e.g. switch
* ConsoleSingleton is able to switch between several modes to, e.g. switch
* the logging on or off, or treat Warnings as Errors, and so on...
* @see ConsoleObserver
*/
Expand All @@ -125,7 +125,7 @@ class BaseExport ConsoleSingleton
void DetachObserver(ConsoleObserver *pcObserver);
/// enumaration for the console modes
enum ConsoleMode{
Verbose = 1, // supress Log messages
Verbose = 1, // suppress Log messages
};

enum FreeCAD_ConsoleMsgType {
Expand All @@ -139,9 +139,9 @@ class BaseExport ConsoleSingleton
void SetMode(ConsoleMode m);
/// Change mode
void UnsetMode(ConsoleMode m);
/// Enables or disables message types of a cetain console observer
/// Enables or disables message types of a certain console observer
ConsoleMsgFlags SetEnabledMsgType(const char* sObs, ConsoleMsgFlags type, bool b);
/// Enables or disables message types of a cetain console observer
/// Enables or disables message types of a certain console observer
bool IsMsgTypeEnabled(const char* sObs, FreeCAD_ConsoleMsgType type) const;

/// singleton
Expand Down
6 changes: 3 additions & 3 deletions src/Base/Interpreter.h
Expand Up @@ -185,7 +185,7 @@ class BaseExport InterpreterSingleton
/* Loads a module
*/
bool loadModule(const char* psModName);
/// Add an addtional pyhton path
/// Add an additional python path
void addPythonPath(const char* Path);
static void addType(PyTypeObject* Type,PyObject* Module, const char * Name);
//@}
Expand All @@ -194,9 +194,9 @@ class BaseExport InterpreterSingleton
*/
//@{
/** Register a cleanup function to be called by finalize(). The cleanup function will be called with no
* arguments and should return no value. At most 32 cleanup functions can be registered.When the registration
* arguments and should return no value. At most 32 cleanup functions can be registered. When the registration
* is successful 0 is returned; on failure -1 is returned. The cleanup function registered last is called
* first. Each cleanup function will be called at most once. Since Python's internal finallization will have
* first. Each cleanup function will be called at most once. Since Python's internal finalization will have
* completed before the cleanup function, no Python APIs should be called by \a func.
*/
int cleanup(void (*func)(void));
Expand Down
17 changes: 8 additions & 9 deletions src/Base/MemDebug.cpp
Expand Up @@ -28,8 +28,8 @@
* \section Overview
* In C++ applications there are a lot of ways to handle memory allocation and deallocation.
* As many ways to do it wrong or simply forget to free memory. One way to overcome
* this problem is e.g. usage of handle classes (like OpenCASCADE it does) or use a lot of factories.
* But all of them has drawbacks or performance penalties. One good way to get memory
* this problem is e.g. usage of handle classes (like OpenCASCADE does) or use a lot of factories.
* But all of them have drawbacks or performance penalties. One good way to get memory
* problems hunted down is the MSCRT Heap debugging facility. This set of functions
* opens the possibility to track and locate all kind of memory problems, e.g.
* memory leaks.
Expand Down Expand Up @@ -61,11 +61,10 @@ using namespace Base;
/** Memory debugging class
* This class is an interface to the Windows CRT debugging
* facility. If the define MemDebugOn in the src/FCConfig.h is
* set the class get intatiated
* globally and tracks all memory allocations on the heap. The
* result get written in the MemLog.txt in the active directory.
* set the class gets instantiated globally and tracks all memory allocations on the heap.
* The result gets written in the MemLog.txt in the active directory.
* \par
* NOTE: you must not instaciate this class!
* NOTE: you must not instantiate this class!
*
*
* \author Juergen Riegel
Expand Down Expand Up @@ -124,17 +123,17 @@ MemDebug::MemDebug()

// Open a log file for the hook functions to use
if ( logFile != NULL )
throw "Base::MemDebug::MemDebug():38: Dont call the constructor by your self!";
throw "Base::MemDebug::MemDebug():38: Don't call the constructor by your self!";
#if (_MSC_VER >= 1400)
fopen_s( &logFile, "MemLog.txt", "w" );
if ( logFile == NULL )
throw "Base::MemDebug::MemDebug():41: File IO Error. Canot open log file...";
throw "Base::MemDebug::MemDebug():41: File IO Error. Can't open log file...";
_strtime_s( timeStr, 15 );
_strdate_s( dateStr, 15 );
#elif (_MSC_VER >= 1200)
logFile = fopen( "MemLog.txt", "w" );
if ( logFile == NULL )
throw "Base::MemDebug::MemDebug():41: File IO Error. Canot open log file...";
throw "Base::MemDebug::MemDebug():41: File IO Error. Can't open log file...";
_strtime( timeStr );
_strdate( dateStr );
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/Base/Parameter.cpp
Expand Up @@ -1019,8 +1019,8 @@ ParameterManager::ParameterManager()
// Indicates whether full schema constraint checking should be done.
//
// gDoCreate
// Indicates whether entity reference nodes needs to be created or not
// Defaults to false
// Indicates whether entity reference nodes needs to be created or not.
// Defaults to false.
//
// gOutputEncoding
// The encoding we are to output in. If not set on the command line,
Expand Down Expand Up @@ -1191,7 +1191,7 @@ int ParameterManager::LoadDocument(const XERCES_CPP_NAMESPACE_QUALIFIER InputSou
parser->setErrorHandler(errReporter);

//
// Parse the XML file, catching any XML exceptions that might propogate
// Parse the XML file, catching any XML exceptions that might propagate
// out of it.
//
bool errorsOccured = false;
Expand Down Expand Up @@ -1444,9 +1444,9 @@ short DOMPrintFilter::acceptNode(const DOMNode* node) const
// The DOMWriter shall call getWhatToShow() before calling
// acceptNode(), to show nodes which are supposed to be
// shown to this filter.
//
// TODO:
// REVISIT: In case the DOMWriter does not follow the protocol,
// Shall the filter honour, or NOT, what it claimes
// Shall the filter honor, or NOT, what it claims
// (when it is constructed/setWhatToShow())
// it is interested in ?
//
Expand Down
2 changes: 1 addition & 1 deletion src/Base/Persistence.h
Expand Up @@ -85,7 +85,7 @@ class BaseExport Persistence : public BaseClass
/** This method is used to save large amounts of data to a binary file.
* Sometimes it makes no sense to write property data as XML. In case the
* amount of data is too big or the data type has a more effective way to
* save itself. In this cases it is possible to write the data in a seperate file
* save itself. In this cases it is possible to write the data in a separate file
* inside the document archive. In case you want do so you have to re-implement
* SaveDocFile(). First, you have to inform the framework in Save() that you want do so.
* Here an example from the Mesh module which can save a (pontetionaly big) triangle mesh:
Expand Down
18 changes: 9 additions & 9 deletions src/Base/PyExport.h
Expand Up @@ -41,13 +41,13 @@

#include <Python.h>
#ifdef FC_OS_MACOSX
#undef toupper
#undef tolower
#undef isupper
#undef islower
#undef isspace
#undef isalpha
#undef isalnum
#undef toupper
#undef tolower
#undef isupper
#undef islower
#undef isspace
#undef isalpha
#undef isalnum
#endif

namespace Base
Expand All @@ -74,7 +74,7 @@ class PyObjectBase;
* The other case is that we have a member variable in our C++ class that holds the Python object
* then we either can create this Python in the constructor or create it the first time when GetPyObject()
* gets called. In the destructor then we must decrement the Python object to avoid a memory leak while
* GetPyObject() then increments the Python object everytime it gets called.
* GetPyObject() then increments the Python object every time it gets called.
*
* @remark One big consequence of this specification is that the programmer must know whether the Python interpreter
* gets the Python object or not. If the interpreter gets the object then it decrements the counter later on when
Expand Down Expand Up @@ -232,4 +232,4 @@ class PyHandle

} // namespace Base

#endif // BASE_PYEXPORT_H
#endif // BASE_PYEXPORT_H
2 changes: 1 addition & 1 deletion src/Base/Quantity.h
Expand Up @@ -105,7 +105,7 @@ class BaseExport Quantity
void setFormat(const QuantityFormat& f) {
_Format = f;
}
/// transfer to user prefered unit/potence
/// transfer to user preferred unit/potence
QString getUserString(double &factor, QString &unitString)const;
QString getUserString(void) const { // to satisfy GCC
double dummy1;
Expand Down
4 changes: 2 additions & 2 deletions src/Base/Type.cpp
Expand Up @@ -90,15 +90,15 @@ void *Type::createInstance(void)

void *Type::createInstanceByName(const char* TypeName, bool bLoadModule)
{
// if not allready, load the module
// if not already, load the module
if(bLoadModule)
{
// cut out the module name
string Mod = getModuleName(TypeName);
// ignore base modules
if(Mod != "App" && Mod != "Gui" && Mod != "Base")
{
// remember allready loaded modules
// remember already loaded modules
set<string>::const_iterator pos = loadModuleSet.find(Mod);
if(pos == loadModuleSet.end())
{
Expand Down
4 changes: 2 additions & 2 deletions src/Base/UnitsApi.h
Expand Up @@ -62,9 +62,9 @@ class BaseExport UnitsApi
QString dummy2;
return UnitsApi::schemaTranslate(quant, dummy1, dummy2);
}
/// generate a value for a quantity with default user prefered system
/// generate a value for a quantity with default user preferred system
static double toDbl(PyObject *ArgObj,const Base::Unit &u=Base::Unit());
/// generate a value for a quantity with default user prefered system
/// generate a value for a quantity with default user preferred system
static Quantity toQuantity(PyObject *ArgObj,const Base::Unit &u=Base::Unit());

// set the number of decimals
Expand Down
6 changes: 3 additions & 3 deletions src/Base/XMLTools.h
Expand Up @@ -86,7 +86,7 @@ inline StrX::StrX(const XMLCh* const toTranscode)

inline StrX::~StrX()
{
//delete [] fLocalForm; // dont work on VC7.1
//delete [] fLocalForm; // don't work on VC7.1
XERCES_CPP_NAMESPACE_QUALIFIER XMLString::release(&fLocalForm);
}

Expand Down Expand Up @@ -134,7 +134,7 @@ inline StrXUTF8::StrXUTF8(const XMLCh* const toTranscode)
XMLTransService::Codes res;
transcoder.reset(XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgTransService->makeNewTranscoderFor(XERCES_CPP_NAMESPACE_QUALIFIER XMLRecognizer::UTF_8, res, 4096, XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager));
if (res != XMLTransService::Ok)
throw Base::Exception("Cant create UTF-8 encoder in StrXUTF8::StrXUTF8()");
throw Base::Exception("Can't create UTF-8 encoder in StrXUTF8::StrXUTF8()");
}

//char outBuff[128];
Expand Down Expand Up @@ -250,7 +250,7 @@ inline XUTF8Str::XUTF8Str(const char* const fromTranscode)
XMLTransService::Codes res;
transcoder.reset(XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgTransService->makeNewTranscoderFor(XERCES_CPP_NAMESPACE_QUALIFIER XMLRecognizer::UTF_8, res, 4096, XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager));
if (res != XMLTransService::Ok)
throw Base::Exception("Cant create UTF-8 decoder in XUTF8Str::XUTF8Str()");
throw Base::Exception("Can't create UTF-8 decoder in XUTF8Str::XUTF8Str()");
}

static XMLCh outBuff[128];
Expand Down
Expand Up @@ -354,7 +354,7 @@ bool Gui::GUIApplicationNativeEventAware::Is3dmouseAttached()


/*!
Initialize the window to recieve raw-input messages
Initialize the window to receive raw-input messages
This needs to be called initially so that Windows will send the messages from the 3D mouse to the window.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Action.cpp
Expand Up @@ -649,7 +649,7 @@ void RecentFilesAction::appendFile(const QString& filename)
files.prepend(filename);
setFiles(files);

// update the XML structure and save the user paramter to disk (#0001989)
// update the XML structure and save the user parameter to disk (#0001989)
bool saveParameter = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/General")->GetBool("SaveUserParameter", true);
if (saveParameter) {
Expand Down

0 comments on commit 19f8fd4

Please sign in to comment.