From a5e7009008b1160009a6a5446e05a4bd36d4c7fb Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 11:55:17 -0600 Subject: [PATCH] Replace all occurrences of vdbg with vinfo --- libnxwidgets/src/ccallback.cxx | 10 ++++---- libnxwidgets/src/cgraphicsport.cxx | 4 ++-- libnxwidgets/src/cimage.cxx | 2 +- libnxwidgets/src/cnxserver.cxx | 6 ++--- libnxwidgets/src/cscrollingpanel.cxx | 2 +- nxwm/src/ccalibration.cxx | 34 ++++++++++++++-------------- nxwm/src/ckeyboard.cxx | 14 ++++++------ nxwm/src/cmediaplayer.cxx | 6 ++--- nxwm/src/ctaskbar.cxx | 8 +++---- nxwm/src/ctouchscreen.cxx | 26 ++++++++++----------- 10 files changed, 56 insertions(+), 56 deletions(-) diff --git a/libnxwidgets/src/ccallback.cxx b/libnxwidgets/src/ccallback.cxx index 77714d208..4bc96dbeb 100644 --- a/libnxwidgets/src/ccallback.cxx +++ b/libnxwidgets/src/ccallback.cxx @@ -107,7 +107,7 @@ void CCallback::redraw(NXHANDLE hwnd, FAR const struct nxgl_rect_s *rect, bool bMore, FAR void *arg) { - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} bMore=%s\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} bMore=%s\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, bMore ? "true" : "false"); @@ -140,7 +140,7 @@ void CCallback::position(NXHANDLE hwnd, FAR const struct nxgl_rect_s *bounds, FAR void *arg) { - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)} arg=%p\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)} arg=%p\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y, arg); @@ -170,7 +170,7 @@ void CCallback::newMouseEvent(NXHANDLE hwnd, FAR const struct nxgl_point_s *pos, uint8_t buttons, FAR void *arg) { - gvdbg("hwnd=%p pos=(%d,%d) buttons=%02x arg=%p\n", + ginfo("hwnd=%p pos=(%d,%d) buttons=%02x arg=%p\n", hwnd, pos->x, pos->y, buttons, arg); // The argument must be the CCallback instance @@ -199,7 +199,7 @@ void CCallback::newKeyboardEvent(NXHANDLE hwnd, uint8_t nCh, FAR const uint8_t *str, FAR void *arg) { - gvdbg("hwnd=%p nCh=%d arg=%p\n", hwnd, nCh, arg); + ginfo("hwnd=%p nCh=%d arg=%p\n", hwnd, nCh, arg); // The argument must be the CCallback instance @@ -249,7 +249,7 @@ void CCallback::newKeyboardEvent(NXHANDLE hwnd, uint8_t nCh, #ifdef CONFIG_NX_MULTIUSER void CCallback::windowBlocked(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2) { - gvdbg("hwnd=%p arg1=%p arg2=%p\n", hwnd, arg1, arg2); + ginfo("hwnd=%p arg1=%p arg2=%p\n", hwnd, arg1, arg2); // The first argument must be the CCallback instance diff --git a/libnxwidgets/src/cgraphicsport.cxx b/libnxwidgets/src/cgraphicsport.cxx index 62e3a6eb0..fa1f3f36d 100644 --- a/libnxwidgets/src/cgraphicsport.cxx +++ b/libnxwidgets/src/cgraphicsport.cxx @@ -535,7 +535,7 @@ void CGraphicsPort::drawBitmapGreyScale(nxgl_coord_t x, nxgl_coord_t y, FAR nxwidget_pixel_t *run = new nxwidget_pixel_t[width]; if (!run) { - gvdbg("ERROR: Failed to allocated run buffer\n"); + ginfo("ERROR: Failed to allocated run buffer\n"); return; } @@ -829,7 +829,7 @@ void CGraphicsPort::_drawText(struct nxgl_point_s *pos, CRect *bound, if (!m_pNxWnd->bitmap(&intersection, (FAR const void *)bitmap.data, pos, bitmap.stride)) { - gvdbg("nx_bitmapwindow failed: %d\n", errno); + ginfo("nx_bitmapwindow failed: %d\n", errno); } } } diff --git a/libnxwidgets/src/cimage.cxx b/libnxwidgets/src/cimage.cxx index 291552217..37dcd2707 100644 --- a/libnxwidgets/src/cimage.cxx +++ b/libnxwidgets/src/cimage.cxx @@ -268,7 +268,7 @@ void CImage::drawContents(CGraphicsPort *port, bool selected) if (!m_bitmap->getRun(0, srcRow, nLeftPixels, &buffer[m_origin.x])) { - gvdbg("IBitmap::getRun failed at image row\n", srcRow); + ginfo("IBitmap::getRun failed at image row\n", srcRow); delete buffer; return; } diff --git a/libnxwidgets/src/cnxserver.cxx b/libnxwidgets/src/cnxserver.cxx index 5c70bda57..8736f20a2 100644 --- a/libnxwidgets/src/cnxserver.cxx +++ b/libnxwidgets/src/cnxserver.cxx @@ -247,7 +247,7 @@ bool CNxServer::connect(void) #ifdef CONFIG_NXWIDGET_SERVERINIT // Start the server task - gvdbg("CNxServer::connect: Starting server task\n"); + ginfo("CNxServer::connect: Starting server task\n"); pid_t serverId = task_create("NX Server", CONFIG_NXWIDGETS_SERVERPRIO, CONFIG_NXWIDGETS_SERVERSTACK, server, (FAR char * const *)0); @@ -463,7 +463,7 @@ int CNxServer::server(int argc, char *argv[]) // Then start the server ret = nx_run(dev); - gvdbg("nx_run returned: %d\n", errno); + ginfo("nx_run returned: %d\n", errno); return EXIT_FAILURE; } #endif // CONFIG_NX_MULTIUSER && CONFIG_NXWIDGET_SERVERINIT @@ -507,7 +507,7 @@ FAR void *CNxServer::listener(FAR void *arg) { This->m_connected = true; sem_post(&This->m_connsem); - gvdbg("Connected\n"); + ginfo("Connected\n"); } } diff --git a/libnxwidgets/src/cscrollingpanel.cxx b/libnxwidgets/src/cscrollingpanel.cxx index c93d113a6..59a0c9056 100644 --- a/libnxwidgets/src/cscrollingpanel.cxx +++ b/libnxwidgets/src/cscrollingpanel.cxx @@ -227,7 +227,7 @@ void CScrollingPanel::scroll(int32_t dx, int32_t dy) { CRect &rrect = revealedRects[i]; - gvdbg("Redrawing %d,%d,%d,%d after scroll\n", + ginfo("Redrawing %d,%d,%d,%d after scroll\n", rrect.getX(), rrect.getY(), rrect.getWidth(), rrect.getHeight()); diff --git a/nxwm/src/ccalibration.cxx b/nxwm/src/ccalibration.cxx index 6ef8c4275..cf691b81e 100644 --- a/nxwm/src/ccalibration.cxx +++ b/nxwm/src/ccalibration.cxx @@ -84,8 +84,8 @@ #ifndef CONFIG_DEBUG_INPUT # undef idbg # define idbg gdbg -# undef ivdbg -# define ivdbg gvdbg +# undef iinfo +# define iinfo ginfo #endif /**************************************************************************** @@ -197,7 +197,7 @@ NXWidgets::CNxString CCalibration::getName(void) bool CCalibration::run(void) { - gvdbg("Starting calibration: m_calthread=%d\n", (int)m_calthread); + ginfo("Starting calibration: m_calthread=%d\n", (int)m_calthread); return startCalibration(CALTHREAD_STARTED); } @@ -208,7 +208,7 @@ bool CCalibration::run(void) void CCalibration::stop(void) { - gvdbg("Stopping calibration: m_calthread=%d\n", (int)m_calthread); + ginfo("Stopping calibration: m_calthread=%d\n", (int)m_calthread); // Was the calibration thread created? @@ -227,7 +227,7 @@ void CCalibration::stop(void) // Try to wake up the calibration thread so that it will see our // termination request - gvdbg("Stopping calibration: m_calthread=%d\n", (int)m_calthread); + ginfo("Stopping calibration: m_calthread=%d\n", (int)m_calthread); (void)pthread_kill(m_thread, CONFIG_NXWM_CALIBRATION_SIGNO); // Wait for the calibration thread to exit @@ -265,7 +265,7 @@ void CCalibration::destroy(void) void CCalibration::hide(void) { - gvdbg("Entry\n"); + ginfo("Entry\n"); // Is the calibration thread running? @@ -288,7 +288,7 @@ void CCalibration::redraw(void) { uint8_t waitcount = 0; - gvdbg("Entry\n"); + ginfo("Entry\n"); // Is the calibration thread still running? We might have to restart // it if we have completed the calibration early but are being brought @@ -296,7 +296,7 @@ void CCalibration::redraw(void) if (!isStarted()) { - gvdbg("Starting calibration: m_calthread=%d\n", (int)m_calthread); + ginfo("Starting calibration: m_calthread=%d\n", (int)m_calthread); (void)startCalibration(CALTHREAD_SHOW); } @@ -356,7 +356,7 @@ void CCalibration::touchscreenInput(struct touch_sample_s &sample) m_touchPos.x = sample.point[0].x; m_touchPos.y = sample.point[0].y; - ivdbg("Touch id: %d flags: %02x x: %d y: %d h: %d w: %d pressure: %d\n", + iinfo("Touch id: %d flags: %02x x: %d y: %d h: %d w: %d pressure: %d\n", sample.point[0].id, sample.point[0].flags, sample.point[0].x, sample.point[0].y, sample.point[0].h, sample.point[0].w, sample.point[0].pressure); @@ -394,7 +394,7 @@ void CCalibration::touchscreenInput(struct touch_sample_s &sample) { // Yes.. invoke the state machine. - ivdbg("State: %d Screen x: %d y: %d Touch x: %d y: %d\n", + iinfo("State: %d Screen x: %d y: %d Touch x: %d y: %d\n", m_calphase, m_screenInfo.pos.x, m_screenInfo.pos.y, m_touchPos.x, m_touchPos.y); @@ -567,7 +567,7 @@ bool CCalibration::startCalibration(enum ECalThreadState initialState) return false; } - gvdbg("Calibration thread m_calthread=%d\n", (int)m_calthread); + ginfo("Calibration thread m_calthread=%d\n", (int)m_calthread); return true; } @@ -602,7 +602,7 @@ FAR void *CCalibration::calibration(FAR void *arg) This->m_calthread = CALTHREAD_RUNNING; This->m_calphase = CALPHASE_NOT_STARTED; - gvdbg("Started: m_calthread=%d\n", (int)This->m_calthread); + ginfo("Started: m_calthread=%d\n", (int)This->m_calthread); // Loop until calibration completes or we have been requested to terminate @@ -679,7 +679,7 @@ FAR void *CCalibration::calibration(FAR void *arg) This->destroyWidgets(); #endif - gvdbg("Terminated: m_calthread=%d\n", (int)This->m_calthread); + ginfo("Terminated: m_calthread=%d\n", (int)This->m_calthread); return (FAR void *)0; } @@ -697,7 +697,7 @@ bool CCalibration::averageSamples(struct nxgl_point_s &average) // Save the sample data - ivdbg("Sample %d: Touch x: %d y: %d\n", m_nsamples+1, m_touchPos.x, m_touchPos.y); + iinfo("Sample %d: Touch x: %d y: %d\n", m_nsamples+1, m_touchPos.x, m_touchPos.y); m_sampleData[m_nsamples].x = m_touchPos.x; m_sampleData[m_nsamples].y = m_touchPos.y; @@ -786,7 +786,7 @@ bool CCalibration::averageSamples(struct nxgl_point_s &average) average.y = m_sampleData[0].y; #endif - ivdbg("Average: Touch x: %d y: %d\n", average.x, average.y); + iinfo("Average: Touch x: %d y: %d\n", average.x, average.y); m_nsamples = 0; return true; } @@ -799,7 +799,7 @@ bool CCalibration::averageSamples(struct nxgl_point_s &average) void CCalibration::stateMachine(void) { - gvdbg("Old m_calphase=%d\n", m_calphase); + ginfo("Old m_calphase=%d\n", m_calphase); #ifdef CONFIG_NXWM_CALIBRATION_AVERAGE // Are we collecting samples? @@ -1031,7 +1031,7 @@ void CCalibration::stateMachine(void) break; } - ivdbg("New m_calphase=%d Screen x: %d y: %d\n", + iinfo("New m_calphase=%d Screen x: %d y: %d\n", m_calphase, m_screenInfo.pos.x, m_screenInfo.pos.y); } diff --git a/nxwm/src/ckeyboard.cxx b/nxwm/src/ckeyboard.cxx index f643fbf6b..7ca1d9610 100644 --- a/nxwm/src/ckeyboard.cxx +++ b/nxwm/src/ckeyboard.cxx @@ -113,7 +113,7 @@ bool CKeyboard::start(void) { pthread_attr_t attr; - gvdbg("Starting listener\n"); + ginfo("Starting listener\n"); // Start a separate thread to listen for keyboard events @@ -152,7 +152,7 @@ bool CKeyboard::start(void) // Then return true only if the listener thread reported successful // initialization. - gvdbg("Listener m_state=%d\n", (int)m_state); + ginfo("Listener m_state=%d\n", (int)m_state); return m_state == LISTENER_RUNNING; } @@ -207,7 +207,7 @@ int CKeyboard::open(void) // Sleep a bit and try again - gvdbg("WAITING for a USB device\n"); + ginfo("WAITING for a USB device\n"); std::sleep(2); } @@ -246,7 +246,7 @@ int CKeyboard::open(void) int CKeyboard::session(void) { - gvdbg("Session started\n"); + ginfo("Session started\n"); // Loop, reading and dispatching keyboard data @@ -254,7 +254,7 @@ int CKeyboard::session(void) { // Read one keyboard sample - gvdbg("Listening for keyboard input\n"); + ginfo("Listening for keyboard input\n"); uint8_t rxbuffer[CONFIG_NXWM_KEYBOARD_BUFSIZE]; ssize_t nbytes = read(m_kbdFd, rxbuffer, @@ -326,7 +326,7 @@ FAR void *CKeyboard::listener(FAR void *arg) { CKeyboard *This = (CKeyboard *)arg; - gvdbg("Listener started\n"); + ginfo("Listener started\n"); #ifdef CONFIG_NXWM_KEYBOARD_USBHOST // Indicate that we have successfully started. We might be stuck waiting @@ -389,7 +389,7 @@ FAR void *CKeyboard::listener(FAR void *arg) // m_state = LISTENER_STOPREQUESTED (or perhaps if some irrecoverable // error has occurred). - gvdbg("Listener exiting\n"); + ginfo("Listener exiting\n"); This->m_state = LISTENER_TERMINATED; return (FAR void *)0; } diff --git a/nxwm/src/cmediaplayer.cxx b/nxwm/src/cmediaplayer.cxx index f173fb56f..ad72e383f 100644 --- a/nxwm/src/cmediaplayer.cxx +++ b/nxwm/src/cmediaplayer.cxx @@ -66,13 +66,13 @@ #if !defined(CONFIG_DEBUG_AUDIO) && !defined(CONFIG_DEBUG_GRAPHICS) # undef dbg -# undef vdbg +# undef info # ifdef CONFIG_CPP_HAVE_VARARGS # define dbg(x...) -# define vdbg(x...) +# define info(x...) # else # define dbg (void) -# define vdbg (void) +# define info (void) # endif #endif diff --git a/nxwm/src/ctaskbar.cxx b/nxwm/src/ctaskbar.cxx index 1bc39aebd..6b578109d 100644 --- a/nxwm/src/ctaskbar.cxx +++ b/nxwm/src/ctaskbar.cxx @@ -274,7 +274,7 @@ bool CTaskbar::startWindowManager(void) break; } } - gvdbg("m_topApp=%p topIndex=%d\n", m_topApp, topIndex); + ginfo("m_topApp=%p topIndex=%d\n", m_topApp, topIndex); // Now start each application (whatever that means to the application) @@ -282,7 +282,7 @@ bool CTaskbar::startWindowManager(void) { IApplication *app = m_slots.at(i).app; - gvdbg("Starting app[%d]\n", i); + ginfo("Starting app[%d]\n", i); if (!app->run()) { // Call stopApplication on a failure to start. This will call @@ -309,14 +309,14 @@ bool CTaskbar::startWindowManager(void) // application may or may not be minimized, but it is not // visible now). - gvdbg("Hiding app[%d]\n", i); + ginfo("Hiding app[%d]\n", i); hideApplicationWindow(app); } else { // Bring up the application as the new top application - gvdbg("Showing app[%d]\n", i); + ginfo("Showing app[%d]\n", i); topApplication(app); } diff --git a/nxwm/src/ctouchscreen.cxx b/nxwm/src/ctouchscreen.cxx index b3f71bbb9..ca9a99c2e 100644 --- a/nxwm/src/ctouchscreen.cxx +++ b/nxwm/src/ctouchscreen.cxx @@ -68,13 +68,13 @@ #if !defined(CONFIG_DEBUG_INPUT) && !defined(CONFIG_DEBUG_GRAPHICS) # undef dbg -# undef vdbg +# undef info # ifdef CONFIG_CPP_HAVE_VARARGS # define dbg(x...) -# define vdbg(x...) +# define info(x...) # else # define dbg (void) -# define vdbg (void) +# define info (void) # endif #endif @@ -153,7 +153,7 @@ bool CTouchscreen::start(void) { pthread_attr_t attr; - vdbg("Starting listener\n"); + info("Starting listener\n"); // Start a separate thread to listen for touchscreen events @@ -192,7 +192,7 @@ bool CTouchscreen::start(void) // Then return true only if the listener thread reported successful // initialization. - vdbg("Listener m_state=%d\n", (int)m_state); + info("Listener m_state=%d\n", (int)m_state); return m_state == LISTENER_RUNNING; } @@ -234,7 +234,7 @@ void CTouchscreen::setCalibrationData(const struct SCalibrationData &caldata) bool CTouchscreen::waitRawTouchData(struct touch_sample_s *touch) { - vdbg("Capturing touch input\n"); + info("Capturing touch input\n"); // Setup to cpature raw data into the user provided buffer @@ -260,7 +260,7 @@ bool CTouchscreen::waitRawTouchData(struct touch_sample_s *touch) // And return success. The listener thread will have (1) reset both // m_touch and m_capture and (2) posted m_waitSem - vdbg("Returning touch input: %d\n", ret); + info("Returning touch input: %d\n", ret); return ret == OK; } @@ -277,7 +277,7 @@ FAR void *CTouchscreen::listener(FAR void *arg) { CTouchscreen *This = (CTouchscreen *)arg; - vdbg("Listener started\n"); + info("Listener started\n"); #ifdef CONFIG_NXWM_TOUCHSCREEN_DEVINIT // Initialize the touchscreen device @@ -345,7 +345,7 @@ FAR void *CTouchscreen::listener(FAR void *arg) // Read one touchscreen sample - vdbg("Listening for sample %p\n", sample); + info("Listening for sample %p\n", sample); DEBUGASSERT(sample); ssize_t nbytes = read(This->m_touchFd, sample, sizeof(struct touch_sample_s)); @@ -385,7 +385,7 @@ FAR void *CTouchscreen::listener(FAR void *arg) // We should get here only if we were asked to terminate via // m_state = LISTENER_STOPREQUESTED - vdbg("Listener exiting\n"); + info("Listener exiting\n"); This->m_state = LISTENER_TERMINATED; return (FAR void *)0; } @@ -396,7 +396,7 @@ FAR void *CTouchscreen::listener(FAR void *arg) void CTouchscreen::handleMouseInput(struct touch_sample_s *sample) { - vdbg("Touch id: %d flags: %02x x: %d y: %d h: %d w: %d pressure: %d\n", + info("Touch id: %d flags: %02x x: %d y: %d h: %d w: %d pressure: %d\n", sample->point[0].id, sample->point[0].flags, sample->point[0].x, sample->point[0].y, sample->point[0].h, sample->point[0].w, sample->point[0].pressure); @@ -536,7 +536,7 @@ void CTouchscreen::handleMouseInput(struct touch_sample_s *sample) x = (nxgl_coord_t)scaledX; y = (nxgl_coord_t)scaledY; - vdbg("raw: (%6.2f, %6.2f) scaled: (%6.2f, %6.2f) (%d, %d)\n", + info("raw: (%6.2f, %6.2f) scaled: (%6.2f, %6.2f) (%d, %d)\n", rawX, rawY, scaledX, scaledY, x, y); #else // We have valid coordinates. Get the raw touch @@ -584,7 +584,7 @@ void CTouchscreen::handleMouseInput(struct touch_sample_s *sample) y = (nxgl_coord_t)bigY; } - vdbg("raw: (%d, %d) scaled: (%d, %d)\n", rawX, rawY, x, y); + info("raw: (%d, %d) scaled: (%d, %d)\n", rawX, rawY, x, y); #endif }