From: billh Date: Thu, 26 Jul 2001 14:58:10 +0000 (+0000) Subject: Bracketed some debugging printouts with #ifdef SPI_DEBUG. X-Git-Tag: AT_SPI2_ATK_2_12_0~1620 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ae1f2194e9c209450a5df907e18b9a7e9af6699;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git Bracketed some debugging printouts with #ifdef SPI_DEBUG. Added use of $(DEBUG_CFLAGS) to Makefiles. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@8 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/libspi/Makefile.am b/libspi/Makefile.am index c9f33a6..f6a626a 100644 --- a/libspi/Makefile.am +++ b/libspi/Makefile.am @@ -8,6 +8,10 @@ INCLUDES = -I $(top_srcdir) \ LDFLAGS = $(LIBSPI_LIBS) @LT_VERSION_INFO@ +DEBUG_CFLAGS=-DSPI_DEBUG + +CFLAGS += $(DEBUG_CFLAGS) + libspiincludedir = $(includedir)/libspi libspiinclude_HEADERS = accessible.h \ diff --git a/libspi/listener.c b/libspi/listener.c index 5e6fb41..d700aeb 100644 --- a/libspi/listener.c +++ b/libspi/listener.c @@ -24,10 +24,11 @@ * listener.c: test for accessibility implementation * */ -#define DEBUG_PRINTSTUFF -#ifdef DEBUG_PRINTSTUFF + +#ifdef SPI_DEBUG #include #endif + #include #include #include @@ -55,8 +56,9 @@ listener_object_finalize (GObject *object) { /* Listener *listener = LISTENER (object); */ - printf("listener_object_finalize called\n"); - +#ifdef SPI_DEBUG + fprintf(stderr, "listener_object_finalize called\n"); +#endif listener_parent_class->finalize (object); } @@ -69,9 +71,11 @@ impl_notify_event (PortableServer_Servant servant, const Accessibility_Event *e, CORBA_Environment *ev) { +#ifdef SPI_DEBUG fprintf (stderr, "notify...\n"); fprintf (stderr, "source name: '%s'\n", Accessibility_Accessible__get_name(e->target, ev)); +#endif } static void diff --git a/libspi/registry.c b/libspi/registry.c index 6ef142f..6063ce2 100644 --- a/libspi/registry.c +++ b/libspi/registry.c @@ -24,8 +24,8 @@ * registry.c: test for accessibility implementation * */ -#define DEBUG_PRINTSTUFF -#ifdef DEBUG_PRINTSTUFF + +#ifdef SPI_DEBUG #include #endif #include @@ -80,7 +80,10 @@ impl_accessibility_registry_register_application (PortableServer_Servant servant { Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); +#ifdef SPI_DEBUG fprintf (stderr, "registering app %p\n", application); +#endif + registry->desktop->applications = g_list_append (registry->desktop->applications, CORBA_Object_duplicate (application, ev)); /* * TODO: change the implementation below to a WM-aware one; @@ -242,8 +245,10 @@ impl_registry_notify_event (PortableServer_Servant servant, for (n=0; ntarget, ev));*/ +#ifdef SPI_DEBUG + fprintf(stderr, "notifying listener #%d\n", n); + fprintf(stderr, "event name %s\n", Accessibility_Accessible__get_name(e->target, ev)); +#endif Accessibility_EventListener_notifyEvent ( (Accessibility_EventListener) g_list_nth_data (registry->listeners, n), e, diff --git a/registryd/registry-main.c b/registryd/registry-main.c index e648f45..f2d4f38 100644 --- a/registryd/registry-main.c +++ b/registryd/registry-main.c @@ -20,7 +20,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef AT_SPI_DEBUG #include +#endif + #include #include "registry.h" @@ -44,7 +47,9 @@ main (int argc, obj_id, bonobo_object_corba_objref (bonobo_object (registry))); +#ifdef AT_SPI_DEBUG fprintf (stderr, "Registry Message: Registry daemon is running.\n"); +#endif bonobo_main (); return 0; diff --git a/registryd/registry.c b/registryd/registry.c index 6ef142f..6063ce2 100644 --- a/registryd/registry.c +++ b/registryd/registry.c @@ -24,8 +24,8 @@ * registry.c: test for accessibility implementation * */ -#define DEBUG_PRINTSTUFF -#ifdef DEBUG_PRINTSTUFF + +#ifdef SPI_DEBUG #include #endif #include @@ -80,7 +80,10 @@ impl_accessibility_registry_register_application (PortableServer_Servant servant { Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); +#ifdef SPI_DEBUG fprintf (stderr, "registering app %p\n", application); +#endif + registry->desktop->applications = g_list_append (registry->desktop->applications, CORBA_Object_duplicate (application, ev)); /* * TODO: change the implementation below to a WM-aware one; @@ -242,8 +245,10 @@ impl_registry_notify_event (PortableServer_Servant servant, for (n=0; ntarget, ev));*/ +#ifdef SPI_DEBUG + fprintf(stderr, "notifying listener #%d\n", n); + fprintf(stderr, "event name %s\n", Accessibility_Accessible__get_name(e->target, ev)); +#endif Accessibility_EventListener_notifyEvent ( (Accessibility_EventListener) g_list_nth_data (registry->listeners, n), e, diff --git a/registryd/registryd.c b/registryd/registryd.c index e648f45..f2d4f38 100644 --- a/registryd/registryd.c +++ b/registryd/registryd.c @@ -20,7 +20,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef AT_SPI_DEBUG #include +#endif + #include #include "registry.h" @@ -44,7 +47,9 @@ main (int argc, obj_id, bonobo_object_corba_objref (bonobo_object (registry))); +#ifdef AT_SPI_DEBUG fprintf (stderr, "Registry Message: Registry daemon is running.\n"); +#endif bonobo_main (); return 0; diff --git a/test/Makefile.am b/test/Makefile.am index 22a35b9..c691761 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -10,6 +10,10 @@ INCLUDES = -I$(top_srcdir) \ -I$(top_builddir) \ -I$(top_srcdir)/libspi \ -I$(top_builddir)/libspi \ - $(TESTS_CFLAGS) + $(TESTS_CFLAGS) + +DEBUG_CFLAGS=-DSPI_DEBUG + +CFLAGS += $(TESTS_CFLAGS) LDADD = ../libspi/libspi.la $(TESTS_LIBS)