Renamed SpiAccessibleEventListener to (just) SpiEventListener.
[platform/core/uifw/at-spi2-atk.git] / cspi / spi-util.c
1 void
2 spi_freeString (char *s)
3 {
4   CORBA_free (s);
5 }
6
7 boolean
8 spi_warn_ev (CORBA_Environment *c_ev, char *error_string) {
9
10   if (c_ev->_major != CORBA_NO_EXCEPTION) {
11     fprintf (stderr,
12             "Warning: AT-SPI error: %s: %s\n",
13              error_string,
14              CORBA_exception_id(c_ev));
15         CORBA_exception_init (c_ev);
16         return FALSE;
17   }
18   else
19   {
20         return TRUE;
21   }
22 }
23
24 void
25 spi_check_ev (CORBA_Environment *c_ev, char *error_string) {
26
27   if (c_ev->_major != CORBA_NO_EXCEPTION) {
28     fprintf (stderr,
29             ("AT-SPI error: %s: %s\n"),
30              error_string,
31             CORBA_exception_id(c_ev));
32     CORBA_exception_free(c_ev);
33     exit(-1);
34   }
35 }