Whitespace cleanup in src/database
[sxemacs] / src / events / events.c
index c7b3a72..727f37e 100644 (file)
@@ -26,14 +26,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 #include "lisp.h"
 #include "buffer.h"
 #include "ui/console.h"
-#include "ui/TTY/console-tty.h"        /* for stuff in
+#include "ui/TTY/console-tty.h"        /* for stuff in
                                           character_to_event. needs
                                           refactoring */
 #include "ui/device.h"
-#include "ui/X11/console-x.h"  /* for x_event_name prototype in
+#include "ui/X11/console-x.h"  /* for x_event_name prototype in
                                   format_event_object. Needs refactoring */
-#include "ui/Gtk/console-gtk.h"        /* for gtk_event_name prototype. Same
-                                  as above */
 #include "extents.h"           /* Just for the EXTENTP abort check... */
 #define INCLUDE_EVENTS_H_PRIVATE_SPHERE
 #include "events.h"
@@ -256,15 +254,13 @@ print_event(Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
                print_event_1("#<magic-event ", obj, printcharfun);
                break;
        case pointer_motion_event: {
-               char buf[64];
                Lisp_Object Vx, Vy;
                Vx = Fevent_x_pixel(obj);
                assert(INTP(Vx));
                Vy = Fevent_y_pixel(obj);
                assert(INTP(Vy));
-               sprintf(buf, "#<motion-event %ld, %ld", (long)XINT(Vx),
-                       (long)XINT(Vy));
-               write_c_string(buf, printcharfun);
+               write_fmt_str(printcharfun, "#<motion-event %ld, %ld", (long)XINT(Vx),
+                             (long)XINT(Vy));
                break;
        }
        case process_event:
@@ -331,6 +327,7 @@ event_equal(Lisp_Object obj1, Lisp_Object obj2, int depth)
        switch (e1->event_type) {
        default:
                abort();
+               break;
 
        case process_event:
                return EQ(e1->event.process.process, e2->event.process.process);
@@ -381,13 +378,6 @@ event_equal(Lisp_Object obj1, Lisp_Object obj2, int depth)
                struct console *con =
                        XCONSOLE(CDFW_CONSOLE(e1->channel));
 
-#ifdef HAVE_GTK
-               if (CONSOLE_GTK_P(con))
-                       return (!memcmp
-                               (&e1->event.magic.underlying_gdk_event,
-                                &e2->event.magic.underlying_gdk_event,
-                                sizeof(GdkEvent)));
-#endif
 #ifdef HAVE_X_WINDOWS
                if (CONSOLE_X_P(con))
                        return (e1->event.magic.underlying_x_event.xany.
@@ -469,12 +459,6 @@ event_hash(Lisp_Object obj, int depth)
        case magic_event: {
                struct console *con =
                        XCONSOLE(CDFW_CONSOLE(EVENT_CHANNEL(e)));
-#ifdef HAVE_GTK
-               if (CONSOLE_GTK_P(con))
-                       return HASH2(hash,
-                                    e->event.magic.
-                                    underlying_gdk_event.type);
-#endif
 #ifdef HAVE_X_WINDOWS
                if (CONSOLE_X_P(con))
                        return HASH2(hash,
@@ -1598,14 +1582,6 @@ void format_event_object(char *buf, Lisp_Event * event, int brief)
        case magic_event: {
                const char *name = NULL;
 
-#ifdef HAVE_GTK
-               Lisp_Object console = CDFW_CONSOLE(EVENT_CHANNEL(event));
-               if (CONSOLE_GTK_P(XCONSOLE(console))) {
-                       name = gtk_event_name(event->event.magic.
-                                             underlying_gdk_event.
-                                             type);
-               }
-#endif
 #ifdef HAVE_X_WINDOWS
                Lisp_Object console = CDFW_CONSOLE(EVENT_CHANNEL(event));
                if (CONSOLE_X_P(XCONSOLE(console))) {
@@ -2647,6 +2623,7 @@ This is in the form of a property list (alternating keyword/value pairs).
        switch (e->event_type) {
        default:
                abort();
+               break;
 
        case process_event:
                props = cons3(Qprocess, e->event.process.process, props);
@@ -2692,7 +2669,7 @@ This is in the form of a property list (alternating keyword/value pairs).
                break;
 
 #ifdef EF_USE_ASYNEQ
-                /* are these right here? */
+               /* are these right here? */
        case eaten_myself_event:
        case work_started_event:
        case work_finished_event: