diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 15:50:31 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 15:50:31 -0600 |
commit | aca1565e0ad3dada18d391ec89eaf7a6ccb6fad5 (patch) | |
tree | a20873d6e499e66f41342ddde0fceff716738028 /NxWidgets/UnitTests/CProgressBar | |
parent | bd93ed3ae33f1e24467a4edd91e81d5e337cf3cb (diff) | |
download | nuttx-aca1565e0ad3dada18d391ec89eaf7a6ccb6fad5.tar.gz nuttx-aca1565e0ad3dada18d391ec89eaf7a6ccb6fad5.tar.bz2 nuttx-aca1565e0ad3dada18d391ec89eaf7a6ccb6fad5.zip |
Fix files under NxWidgets to use the corrected syslog interfaces
Diffstat (limited to 'NxWidgets/UnitTests/CProgressBar')
-rw-r--r-- | NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx | 32 | ||||
-rw-r--r-- | NxWidgets/UnitTests/CProgressBar/cprogressbartest.cxx | 6 | ||||
-rw-r--r-- | NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx | 9 |
3 files changed, 19 insertions, 28 deletions
diff --git a/NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx b/NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx index 4343d887c..746866ee5 100644 --- a/NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx +++ b/NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx @@ -98,9 +98,9 @@ static void updateMemoryUsage(unsigned int previous, /* Show the change from the previous time */ - message("\n%s:\n", msg); - message(" Before: %8d After: %8d Change: %8d\n\n", - previous, mmcurrent.uordblks, mmcurrent.uordblks - previous); + printf("\n%s:\n", msg); + printf(" Before: %8d After: %8d Change: %8d\n\n", + previous, mmcurrent.uordblks, mmcurrent.uordblks - previous); /* Set up for the next test */ @@ -143,16 +143,16 @@ int cprogressbar_main(int argc, char *argv[]) // Create an instance of the checkbox test - message("cprogressbar_main: Create CProgressBarTest instance\n"); + printf("cprogressbar_main: Create CProgressBarTest instance\n"); CProgressBarTest *test = new CProgressBarTest(); updateMemoryUsage(g_mmprevious, "After creating CProgressBarTest"); // Connect the NX server - message("cprogressbar_main: Connect the CProgressBarTest instance to the NX server\n"); + printf("cprogressbar_main: Connect the CProgressBarTest instance to the NX server\n"); if (!test->connect()) { - message("cprogressbar_main: Failed to connect the CProgressBarTest instance to the NX server\n"); + printf("cprogressbar_main: Failed to connect the CProgressBarTest instance to the NX server\n"); delete test; return 1; } @@ -160,10 +160,10 @@ int cprogressbar_main(int argc, char *argv[]) // Create a window to draw into - message("cprogressbar_main: Create a Window\n"); + printf("cprogressbar_main: Create a Window\n"); if (!test->createWindow()) { - message("cprogressbar_main: Failed to create a window\n"); + printf("cprogressbar_main: Failed to create a window\n"); delete test; return 1; } @@ -171,11 +171,11 @@ int cprogressbar_main(int argc, char *argv[]) // Create a progress bar - message("cprogressbar_main: Create a ProgressBar\n"); + printf("cprogressbar_main: Create a ProgressBar\n"); CProgressBar *bar = test->createProgressBar(); if (!bar) { - message("cprogressbar_main: Failed to create a progress bar\n"); + printf("cprogressbar_main: Failed to create a progress bar\n"); delete test; return 1; } @@ -187,9 +187,9 @@ int cprogressbar_main(int argc, char *argv[]) bar->setMaximumValue(MAX_PROGRESSBAR); bar->setValue(0); bar->hidePercentageText(); - message("cprogressbar_main: ProgressBar range %d->%d Initial value %d\n", - bar->getMinimumValue(), bar->getMaximumValue(), - bar->getValue()); + printf("cprogressbar_main: ProgressBar range %d->%d Initial value %d\n", + bar->getMinimumValue(), bar->getMaximumValue(), + bar->getValue()); // Show the initial state of the checkbox @@ -202,7 +202,7 @@ int cprogressbar_main(int argc, char *argv[]) { bar->setValue(i); test->showProgressBar(bar); - message("cprogressbar_main: %d. New value %d\n", i, bar->getValue()); + printf("cprogressbar_main: %d. New value %d\n", i, bar->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } updateMemoryUsage(g_mmprevious, "cprogressbar_main: After moving the progress bar up #1"); @@ -219,7 +219,7 @@ int cprogressbar_main(int argc, char *argv[]) { bar->setValue(i); test->showProgressBar(bar); - message("cprogressbar_main: %d. New value %d\n", i, bar->getValue()); + printf("cprogressbar_main: %d. New value %d\n", i, bar->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } updateMemoryUsage(g_mmprevious, "cprogressbar_main: After moving the progress bar up #2"); @@ -227,7 +227,7 @@ int cprogressbar_main(int argc, char *argv[]) // Clean up and exit - message("cprogressbar_main: Clean-up and exit\n"); + printf("cprogressbar_main: Clean-up and exit\n"); delete bar; updateMemoryUsage(g_mmprevious, "After deleting the progress bar"); delete test; diff --git a/NxWidgets/UnitTests/CProgressBar/cprogressbartest.cxx b/NxWidgets/UnitTests/CProgressBar/cprogressbartest.cxx index 60821d751..2e1108fd9 100644 --- a/NxWidgets/UnitTests/CProgressBar/cprogressbartest.cxx +++ b/NxWidgets/UnitTests/CProgressBar/cprogressbartest.cxx @@ -105,7 +105,7 @@ bool CProgressBarTest::connect(void) if (!setBackgroundColor(CONFIG_CPROGRESSBARTEST_BGCOLOR)) { - message("CProgressBarTest::connect: setBackgroundColor failed\n"); + printf("CProgressBarTest::connect: setBackgroundColor failed\n"); } } @@ -161,7 +161,7 @@ bool CProgressBarTest::createWindow(void) m_bgWindow = getBgWindow(m_widgetControl); if (!m_bgWindow) { - message("CProgressBarTest::createWindow: Failed to create CBgWindow instance\n"); + printf("CProgressBarTest::createWindow: Failed to create CBgWindow instance\n"); disconnect(); return false; } @@ -171,7 +171,7 @@ bool CProgressBarTest::createWindow(void) bool success = m_bgWindow->open(); if (!success) { - message("CProgressBarTest::createWindow: Failed to open background window\n"); + printf("CProgressBarTest::createWindow: Failed to open background window\n"); disconnect(); return false; } diff --git a/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx b/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx index 2223d8081..3d1f3c527 100644 --- a/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx +++ b/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx @@ -69,15 +69,6 @@ # define CONFIG_CPROGRESSBARTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// If debug is enabled, use the debug function, syslog() instead -// of printf() so that the output is synchronized. - -#ifdef CONFIG_DEBUG -# define message lowsyslog -#else -# define message printf -#endif - ///////////////////////////////////////////////////////////////////////////// // Public Classes ///////////////////////////////////////////////////////////////////////////// |