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/CSliderHorizonal | |
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/CSliderHorizonal')
3 files changed, 19 insertions, 28 deletions
diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx index fc57ab98c..0d63ed20a 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx +++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_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 csliderhorizontal_main(int argc, char *argv[]) // Create an instance of the checkbox test - message("csliderhorizontal_main: Create CSliderHorizontalTest instance\n"); + printf("csliderhorizontal_main: Create CSliderHorizontalTest instance\n"); CSliderHorizontalTest *test = new CSliderHorizontalTest(); updateMemoryUsage(g_mmprevious, "After creating CSliderHorizontalTest"); // Connect the NX server - message("csliderhorizontal_main: Connect the CSliderHorizontalTest instance to the NX server\n"); + printf("csliderhorizontal_main: Connect the CSliderHorizontalTest instance to the NX server\n"); if (!test->connect()) { - message("csliderhorizontal_main: Failed to connect the CSliderHorizontalTest instance to the NX server\n"); + printf("csliderhorizontal_main: Failed to connect the CSliderHorizontalTest instance to the NX server\n"); delete test; return 1; } @@ -160,10 +160,10 @@ int csliderhorizontal_main(int argc, char *argv[]) // Create a window to draw into - message("csliderhorizontal_main: Create a Window\n"); + printf("csliderhorizontal_main: Create a Window\n"); if (!test->createWindow()) { - message("csliderhorizontal_main: Failed to create a window\n"); + printf("csliderhorizontal_main: Failed to create a window\n"); delete test; return 1; } @@ -171,11 +171,11 @@ int csliderhorizontal_main(int argc, char *argv[]) // Create a slider - message("csliderhorizontal_main: Create a Slider\n"); + printf("csliderhorizontal_main: Create a Slider\n"); CSliderHorizontal *slider = test->createSlider(); if (!slider) { - message("csliderhorizontal_main: Failed to create a slider\n"); + printf("csliderhorizontal_main: Failed to create a slider\n"); delete test; return 1; } @@ -186,9 +186,9 @@ int csliderhorizontal_main(int argc, char *argv[]) slider->setMinimumValue(0); slider->setMaximumValue(MAX_SLIDER); slider->setValue(0); - message("csliderhorizontal_main: Slider range %d->%d Initial value %d\n", - slider->getMinimumValue(), slider->getMaximumValue(), - slider->getValue()); + printf("csliderhorizontal_main: Slider range %d->%d Initial value %d\n", + slider->getMinimumValue(), slider->getMaximumValue(), + slider->getValue()); // Show the initial state of the checkbox @@ -201,7 +201,7 @@ int csliderhorizontal_main(int argc, char *argv[]) { slider->setValue(i); test->showSlider(slider); - message("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue()); + printf("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After moving the slider up"); @@ -212,7 +212,7 @@ int csliderhorizontal_main(int argc, char *argv[]) { slider->setValue(i); test->showSlider(slider); - message("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue()); + printf("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After moving the slider down"); @@ -220,7 +220,7 @@ int csliderhorizontal_main(int argc, char *argv[]) // Clean up and exit - message("csliderhorizontal_main: Clean-up and exit\n"); + printf("csliderhorizontal_main: Clean-up and exit\n"); delete slider; updateMemoryUsage(g_mmprevious, "After deleting the slider"); delete test; diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx index 1687448db..581478841 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx +++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx @@ -105,7 +105,7 @@ bool CSliderHorizontalTest::connect(void) if (!setBackgroundColor(CONFIG_CSLIDERHORIZONTALTEST_BGCOLOR)) { - message("CSliderHorizontalTest::connect: setBackgroundColor failed\n"); + printf("CSliderHorizontalTest::connect: setBackgroundColor failed\n"); } } @@ -161,7 +161,7 @@ bool CSliderHorizontalTest::createWindow(void) m_bgWindow = getBgWindow(m_widgetControl); if (!m_bgWindow) { - message("CSliderHorizontalTest::createWindow: Failed to create CBgWindow instance\n"); + printf("CSliderHorizontalTest::createWindow: Failed to create CBgWindow instance\n"); disconnect(); return false; } @@ -171,7 +171,7 @@ bool CSliderHorizontalTest::createWindow(void) bool success = m_bgWindow->open(); if (!success) { - message("CSliderHorizontalTest::createWindow: Failed to open background window\n"); + printf("CSliderHorizontalTest::createWindow: Failed to open background window\n"); disconnect(); return false; } diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx index fd333af5c..8d5db0772 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx +++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx @@ -69,15 +69,6 @@ # define CONFIG_CSLIDERHORIZONTALTEST_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 ///////////////////////////////////////////////////////////////////////////// |