Commit f3670521 authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

STYLE: use std:: qualifier on ::abort, ::exit

- consistent with use of <cstdlib> and makes for a stronger distinct
  from Foam::abort etc.
parent dd9b7d3d
#include "stream.h"
#include <unistd.h>
#include <stdlib.h>
#include <cstdlib>
main()
{
......
#include <stdlib.h>
#include <cstdlib>
class Int
{
......
#include <iostream>
#include <stdlib.h>
#include <cstdlib>
using namespace std;
int main(int argc, char *argv[])
......
......@@ -121,14 +121,14 @@ void usage()
std::cout
<< "usage: addr2line [-e filename|--exe=filename]"
" address [address...]\n" << std::endl;
::exit(1);
std::exit(1);
}
void version()
{
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
<< std::endl;
::exit(1);
std::exit(1);
}
}
else if (!is.size())
......@@ -305,7 +305,7 @@ void Foam::dictionary::checkITstream
<< " at line " << is.lineNumber() << '.' << nl
<< std::endl;
::exit(1);
std::exit(1);
}
}
}
......
......@@ -116,7 +116,7 @@ void Foam::entry::checkITstream(const ITstream& is) const
<< " at line " << is.lineNumber() << '.' << nl
<< std::endl;
::exit(1);
std::exit(1);
}
}
else if (!is.size())
......@@ -149,7 +149,7 @@ void Foam::entry::checkITstream(const ITstream& is) const
<< " at line " << is.lineNumber() << '.' << nl
<< std::endl;
::exit(1);
std::exit(1);
}
}
}
......
......@@ -153,7 +153,7 @@ void Foam::IOerror::SafeFatalIOError
<< " in file " << sourceFileName
<< " at line " << sourceFileLineNumber << '.'
<< std::endl;
::exit(1);
std::exit(1);
}
}
......@@ -210,7 +210,7 @@ void Foam::IOerror::exit(const int)
{
Perr<< endl << *this << endl
<< "\nFOAM exiting\n" << endl;
::exit(1);
std::exit(1);
}
}
}
......@@ -229,7 +229,7 @@ void Foam::IOerror::abort()
Perr<< endl << *this << endl
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
printStack(Perr);
::abort();
std::abort();
}
if (Pstream::parRun())
......@@ -256,7 +256,7 @@ void Foam::IOerror::abort()
Perr<< endl << *this << endl
<< "\nFOAM aborting\n" << endl;
printStack(Perr);
::abort();
std::abort();
}
}
}
......
......@@ -244,7 +244,7 @@ void Foam::error::exit(const int errNo)
{
Perr<< endl << *this << endl
<< "\nFOAM exiting\n" << endl;
::exit(errNo);
std::exit(errNo);
}
}
......@@ -262,7 +262,7 @@ void Foam::error::abort()
Perr<< endl << *this << endl
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
printStack(Perr);
::abort();
std::abort();
}
if (throwExceptions_)
......@@ -287,7 +287,7 @@ void Foam::error::abort()
Perr<< endl << *this << endl
<< "\nFOAM aborting\n" << endl;
printStack(Perr);
::abort();
std::abort();
}
}
......
......@@ -887,7 +887,7 @@ bool Foam::functionObjectList::read()
catch (const Foam::IOerror& ioErr)
{
Info<< ioErr << nl << endl;
::exit(1);
std::exit(1);
}
catch (const Foam::error& err)
{
......
......@@ -906,7 +906,7 @@ void Foam::argList::parse
if (quickExit)
{
::exit(0);
std::exit(0);
}
}
......
......@@ -147,7 +147,7 @@ Foam::dictionary& Foam::debug::switchSet
<< controlDict().name().c_str()
<< std::endl << std::endl;
::exit(1);
std::exit(1);
}
subDictPtr = &(eptr->dict());
......
......@@ -82,7 +82,7 @@ static inline void errorMandatoryNotFound
<< locationToString(location) << ")\n '"
<< name << "'\n"
<< 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"
<< std::endl;
::abort();
std::abort();
}
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)
{
// No MPI - just exit
::exit(errnum);
std::exit(errnum);
}
void Foam::UPstream::abort()
{
// No MPI - just abort
::abort();
std::abort();
}
......
......@@ -213,7 +213,7 @@ void Foam::UPstream::exit(int errnum)
if (!flag)
{
// Not initialized - just exit
::exit(errnum);
std::exit(errnum);
return;
}
......@@ -224,7 +224,7 @@ void Foam::UPstream::exit(int errnum)
WarningInFunction
<< "MPI was already finalized (perhaps by a connected program)"
<< endl;
::exit(1);
std::exit(1);
return;
}
......@@ -271,7 +271,7 @@ void Foam::UPstream::exit(int errnum)
if (errnum == 0)
{
MPI_Finalize();
::exit(errnum);
std::exit(errnum);
}
else
{
......
......@@ -118,7 +118,7 @@ bool Foam::ccm::ccmGlobalState::assertNoError
<< "\n libccmio reports -> " << errorMsg(err) << " <-\n"
<< endl;
::exit(1);
std::exit(1);
}
return (err == kCCMIONoErr);
......
......@@ -3916,7 +3916,7 @@ void Foam::snappyLayerDriver::addLayers
else
{
Perr<< "\nFOAM exiting\n" << endl;
::exit(0);
std::exit(0);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment