mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use std:: qualifier on ::abort, ::exit
- consistent with use of <cstdlib> and makes for a stronger distinct from Foam::abort etc.
This commit is contained in:
committed by
Andrew Heather
parent
dd9b7d3d7e
commit
f3670521cd
@ -1,6 +1,6 @@
|
|||||||
#include "stream.h"
|
#include "stream.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
class Int
|
class Int
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
|||||||
@ -121,14 +121,14 @@ void usage()
|
|||||||
std::cout
|
std::cout
|
||||||
<< "usage: addr2line [-e filename|--exe=filename]"
|
<< "usage: addr2line [-e filename|--exe=filename]"
|
||||||
" address [address...]\n" << std::endl;
|
" address [address...]\n" << std::endl;
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void version()
|
void version()
|
||||||
{
|
{
|
||||||
std::cout<< "OpenFOAM addr2line emulator\n" << std::endl;
|
std::cout<< "OpenFOAM addr2line emulator\n" << std::endl;
|
||||||
::exit(0);
|
std::exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -272,7 +272,7 @@ void Foam::dictionary::checkITstream
|
|||||||
<< " at line " << is.lineNumber() << '.' << nl
|
<< " at line " << is.lineNumber() << '.' << nl
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!is.size())
|
else if (!is.size())
|
||||||
@ -305,7 +305,7 @@ void Foam::dictionary::checkITstream
|
|||||||
<< " at line " << is.lineNumber() << '.' << nl
|
<< " at line " << is.lineNumber() << '.' << nl
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,7 +116,7 @@ void Foam::entry::checkITstream(const ITstream& is) const
|
|||||||
<< " at line " << is.lineNumber() << '.' << nl
|
<< " at line " << is.lineNumber() << '.' << nl
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!is.size())
|
else if (!is.size())
|
||||||
@ -149,7 +149,7 @@ void Foam::entry::checkITstream(const ITstream& is) const
|
|||||||
<< " at line " << is.lineNumber() << '.' << nl
|
<< " at line " << is.lineNumber() << '.' << nl
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,7 +153,7 @@ void Foam::IOerror::SafeFatalIOError
|
|||||||
<< " in file " << sourceFileName
|
<< " in file " << sourceFileName
|
||||||
<< " at line " << sourceFileLineNumber << '.'
|
<< " at line " << sourceFileLineNumber << '.'
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ void Foam::IOerror::exit(const int)
|
|||||||
{
|
{
|
||||||
Perr<< endl << *this << endl
|
Perr<< endl << *this << endl
|
||||||
<< "\nFOAM exiting\n" << endl;
|
<< "\nFOAM exiting\n" << endl;
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ void Foam::IOerror::abort()
|
|||||||
Perr<< endl << *this << endl
|
Perr<< endl << *this << endl
|
||||||
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
|
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
|
||||||
printStack(Perr);
|
printStack(Perr);
|
||||||
::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
@ -256,7 +256,7 @@ void Foam::IOerror::abort()
|
|||||||
Perr<< endl << *this << endl
|
Perr<< endl << *this << endl
|
||||||
<< "\nFOAM aborting\n" << endl;
|
<< "\nFOAM aborting\n" << endl;
|
||||||
printStack(Perr);
|
printStack(Perr);
|
||||||
::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -244,7 +244,7 @@ void Foam::error::exit(const int errNo)
|
|||||||
{
|
{
|
||||||
Perr<< endl << *this << endl
|
Perr<< endl << *this << endl
|
||||||
<< "\nFOAM exiting\n" << endl;
|
<< "\nFOAM exiting\n" << endl;
|
||||||
::exit(errNo);
|
std::exit(errNo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ void Foam::error::abort()
|
|||||||
Perr<< endl << *this << endl
|
Perr<< endl << *this << endl
|
||||||
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
|
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
|
||||||
printStack(Perr);
|
printStack(Perr);
|
||||||
::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (throwExceptions_)
|
if (throwExceptions_)
|
||||||
@ -287,7 +287,7 @@ void Foam::error::abort()
|
|||||||
Perr<< endl << *this << endl
|
Perr<< endl << *this << endl
|
||||||
<< "\nFOAM aborting\n" << endl;
|
<< "\nFOAM aborting\n" << endl;
|
||||||
printStack(Perr);
|
printStack(Perr);
|
||||||
::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -887,7 +887,7 @@ bool Foam::functionObjectList::read()
|
|||||||
catch (const Foam::IOerror& ioErr)
|
catch (const Foam::IOerror& ioErr)
|
||||||
{
|
{
|
||||||
Info<< ioErr << nl << endl;
|
Info<< ioErr << nl << endl;
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
catch (const Foam::error& err)
|
catch (const Foam::error& err)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -906,7 +906,7 @@ void Foam::argList::parse
|
|||||||
|
|
||||||
if (quickExit)
|
if (quickExit)
|
||||||
{
|
{
|
||||||
::exit(0);
|
std::exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -147,7 +147,7 @@ Foam::dictionary& Foam::debug::switchSet
|
|||||||
<< controlDict().name().c_str()
|
<< controlDict().name().c_str()
|
||||||
<< std::endl << std::endl;
|
<< std::endl << std::endl;
|
||||||
|
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
subDictPtr = &(eptr->dict());
|
subDictPtr = &(eptr->dict());
|
||||||
|
|||||||
@ -82,7 +82,7 @@ static inline void errorMandatoryNotFound
|
|||||||
<< locationToString(location) << ")\n '"
|
<< locationToString(location) << ")\n '"
|
||||||
<< name << "'\n"
|
<< name << "'\n"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ void newError()
|
|||||||
"by e.g. bad use of pointers or an out of date shared library"
|
"by e.g. bad use of pointers or an out of date shared library"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*old_new_handler)() = std::set_new_handler(newError);
|
void (*old_new_handler)() = std::set_new_handler(newError);
|
||||||
|
|||||||
@ -58,14 +58,14 @@ bool Foam::UPstream::init(int& argc, char**& argv, const bool needsThread)
|
|||||||
void Foam::UPstream::exit(int errnum)
|
void Foam::UPstream::exit(int errnum)
|
||||||
{
|
{
|
||||||
// No MPI - just exit
|
// No MPI - just exit
|
||||||
::exit(errnum);
|
std::exit(errnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::UPstream::abort()
|
void Foam::UPstream::abort()
|
||||||
{
|
{
|
||||||
// No MPI - just abort
|
// No MPI - just abort
|
||||||
::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -213,7 +213,7 @@ void Foam::UPstream::exit(int errnum)
|
|||||||
if (!flag)
|
if (!flag)
|
||||||
{
|
{
|
||||||
// Not initialized - just exit
|
// Not initialized - just exit
|
||||||
::exit(errnum);
|
std::exit(errnum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ void Foam::UPstream::exit(int errnum)
|
|||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "MPI was already finalized (perhaps by a connected program)"
|
<< "MPI was already finalized (perhaps by a connected program)"
|
||||||
<< endl;
|
<< endl;
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ void Foam::UPstream::exit(int errnum)
|
|||||||
if (errnum == 0)
|
if (errnum == 0)
|
||||||
{
|
{
|
||||||
MPI_Finalize();
|
MPI_Finalize();
|
||||||
::exit(errnum);
|
std::exit(errnum);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -118,7 +118,7 @@ bool Foam::ccm::ccmGlobalState::assertNoError
|
|||||||
<< "\n libccmio reports -> " << errorMsg(err) << " <-\n"
|
<< "\n libccmio reports -> " << errorMsg(err) << " <-\n"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (err == kCCMIONoErr);
|
return (err == kCCMIONoErr);
|
||||||
|
|||||||
@ -3916,7 +3916,7 @@ void Foam::snappyLayerDriver::addLayers
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Perr<< "\nFOAM exiting\n" << endl;
|
Perr<< "\nFOAM exiting\n" << endl;
|
||||||
::exit(0);
|
std::exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user