Patch: std::ify pooma.cpp
Jeffrey Oldham
oldham at codesourcery.com
Thu May 24 17:20:13 UTC 2001
2001 May 24 Jeffrey D. Oldham <oldham at codesourcery.com>
* pooma.cpp: Prepend "cerr" and "endl" with "std::".
Tested on sequential Linux using gcc 3.0 by compiling the program
Approved by Stephen Smith
Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: pooma.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/tests/pooma.cpp,v
retrieving revision 1.3
diff -c -p -r1.3 pooma.cpp
*** pooma.cpp 2000/07/21 00:10:19 1.3
--- pooma.cpp 2001/05/23 23:49:49
***************
*** 50,56 ****
void newAbortHandler()
{
! cerr << "Running newly installed abort handler." << endl;
}
--- 50,56 ----
void newAbortHandler()
{
! std::cerr << "Running newly installed abort handler." << std::endl;
}
*************** int main(int argc, char *argv[])
*** 60,111 ****
// Print out argc, argv before initialization.
! cerr << "Before initialize: argc = " << argc << ", " << endl;
for (i=0; i < argc; ++i)
! cerr << " argv[" << i << "] = '" << argv[i] << "'" << endl;
// Initialize POOMA
! cerr << "Initializing POOMA ..." << endl;
Pooma::initialize(argc, argv);
! cerr << "After initialize: argc = " << argc << ", " << endl;
for (i=0; i < argc; ++i)
! cerr << " argv[" << i << "] = '" << argv[i] << "'" << endl;
// Print out some results of POOMA calls to the different POOMA streams
! POOMA_PRINT(Pooma::pinfo, "POOMA version = " << Pooma::version() << endl);
! POOMA_PRINT(Pooma::pwarn, "POOMA build date = " << Pooma::buildDate()<<endl);
! POOMA_PRINT(Pooma::perr, "POOMA major ver = "<< Pooma::majorVersion()<<endl);
! POOMA_PRINT(Pooma::perr, "POOMA minor ver = "<< Pooma::minorVersion()<<endl);
// Start logging output to a file
Pooma::logMessages("pooma.out");
! POOMA_PRINT(Pooma::pinfo, "Now logging messages to file 'pooma.out'."<<endl);
! POOMA_PRINT(Pooma::pwarn, "My context = " << Pooma::context() << endl);
! POOMA_PRINT(Pooma::perr, "Total contexts = " << Pooma::contexts() << endl);
// Do some debugging statements
! POOMA_PRINT(Pooma::pinfo, "About to start printing debug messages." << endl);
! POOMA_DEBUG(0, "This is a level-0 debug message." << endl);
! POOMA_DEBUG(1, "This is a level-1 debug message." << endl);
! POOMA_DEBUG(3, "This is a level-3 debug message." << endl);
! POOMA_DEBUG(5, "This is a level-5 debug message." << endl);
// Shut down POOMA
! Pooma::pinfo << "Shutting down POOMA with abort()..." << endl;
Pooma::abortHandler(newAbortHandler);
Pooma::pAbort("This is the abort message.", 2);
--- 60,111 ----
// Print out argc, argv before initialization.
! std::cerr << "Before initialize: argc = " << argc << ", " << std::endl;
for (i=0; i < argc; ++i)
! std::cerr << " argv[" << i << "] = '" << argv[i] << "'" << std::endl;
// Initialize POOMA
! std::cerr << "Initializing POOMA ..." << std::endl;
Pooma::initialize(argc, argv);
! std::cerr << "After initialize: argc = " << argc << ", " << std::endl;
for (i=0; i < argc; ++i)
! std::cerr << " argv[" << i << "] = '" << argv[i] << "'" << std::endl;
// Print out some results of POOMA calls to the different POOMA streams
! POOMA_PRINT(Pooma::pinfo, "POOMA version = " << Pooma::version() << std::endl);
! POOMA_PRINT(Pooma::pwarn, "POOMA build date = " << Pooma::buildDate()<<std::endl);
! POOMA_PRINT(Pooma::perr, "POOMA major ver = "<< Pooma::majorVersion()<<std::endl);
! POOMA_PRINT(Pooma::perr, "POOMA minor ver = "<< Pooma::minorVersion()<<std::endl);
// Start logging output to a file
Pooma::logMessages("pooma.out");
! POOMA_PRINT(Pooma::pinfo, "Now logging messages to file 'pooma.out'."<<std::endl);
! POOMA_PRINT(Pooma::pwarn, "My context = " << Pooma::context() << std::endl);
! POOMA_PRINT(Pooma::perr, "Total contexts = " << Pooma::contexts() << std::endl);
// Do some debugging statements
! POOMA_PRINT(Pooma::pinfo, "About to start printing debug messages." << std::endl);
! POOMA_DEBUG(0, "This is a level-0 debug message." << std::endl);
! POOMA_DEBUG(1, "This is a level-1 debug message." << std::endl);
! POOMA_DEBUG(3, "This is a level-3 debug message." << std::endl);
! POOMA_DEBUG(5, "This is a level-5 debug message." << std::endl);
// Shut down POOMA
! Pooma::pinfo << "Shutting down POOMA with abort()..." << std::endl;
Pooma::abortHandler(newAbortHandler);
Pooma::pAbort("This is the abort message.", 2);
More information about the pooma-dev
mailing list