From 6cd6e332203b5dc5425be6383bc1f359450e668c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 4 Jul 2024 07:19:24 +0100 Subject: [PATCH] ski: drop all of gtk support code The interfase is stuck on gtk2 gnome libraries. It does not provide much details besides looking at the register values. Let's drop it. --- .gitignore | 3 +- INSTALL | 3 - Makefile.am | 4 - configure.ac | 13 - src/Makefile.am | 28 +- src/gski.glade | 854 ------------------------------------------------ src/main.c | 3 - src/ski.c | 18 - src/ssGtk.c | 632 ----------------------------------- src/ssGtk.h | 41 --- src/ui.c | 74 ----- src/ui.h | 2 +- 12 files changed, 6 insertions(+), 1669 deletions(-) delete mode 100644 src/gski.glade delete mode 100644 src/ssGtk.c delete mode 100644 src/ssGtk.h diff --git a/.gitignore b/.gitignore index 9721b59..299d4e4 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,5 @@ Makefile .dirstamp /src/bski /src/fake-xterm/ski-fake-xterm -/src/gski /src/ski -/ski-bootloader/ski-bootloader \ No newline at end of file +/ski-bootloader/ski-bootloader diff --git a/INSTALL b/INSTALL index 1d2dc79..7735c39 100644 --- a/INSTALL +++ b/INSTALL @@ -16,9 +16,6 @@ Some optional features require extra depepdencies: * DWARF support: * libbfd library (from binutils) * unwind library (like libunwind) - * GTK support: - * libglade - * libgnomeui * Motif support * motif * libX11 diff --git a/Makefile.am b/Makefile.am index 6751e99..6c78778 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,7 +55,3 @@ install-exec-hook: $(LN_S) -f ski.1 $(DESTDIR)/$(mandir)/man1/bski.1; $(LN_S) -f ski $(DESTDIR)/$(bindir)/bskinc; $(LN_S) -f ski.1 $(DESTDIR)/$(mandir)/man1/bskinc.1; -if WITH_GTK_INTERFACE - $(LN_S) -f ski $(DESTDIR)/$(bindir)/gski - $(LN_S) -f ski.1 $(DESTDIR)/$(mandir)/man1/gski.1 -endif diff --git a/configure.ac b/configure.ac index debaaad..72e65a2 100644 --- a/configure.ac +++ b/configure.ac @@ -66,19 +66,6 @@ AC_DEFINE_UNQUOTED([PAGER], ["$PAGER"], [Define to the pager program.]) dnl Initialize maintainer mode AM_MAINTAINER_MODE -dnl See if we build GTK -AC_ARG_WITH([gtk], - AS_HELP_STRING([--with-gtk], - [Enable building the GTK Ski interface default=no])) - -AS_IF([test "x$with_gtk" = "xyes"], [ - PKG_CHECK_MODULES([GSKI], [libglade-2.0 libgnomeui-2.0 >= 1.110.0]) - AC_DEFINE(HAVE_GTK, 1, [define if you have GTK support]) -]) -AC_SUBST(GSKI_CFLAGS) -AC_SUBST(GSKI_LIBS) -AM_CONDITIONAL(WITH_GTK_INTERFACE, test "x$with_gtk" = "xyes") - dnl Check for host endianness AC_CACHE_CHECK([whether host byte ordering is defined in sys/param.h], ski_cv_c_bigendian_compile, diff --git a/src/Makefile.am b/src/Makefile.am index c9ae8c7..fe9b748 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,7 +28,6 @@ AM_CPPFLAGS = \ -I$(srcdir)/encoder \ -I$(top_builddir)/src/encoder \ -I$(top_builddir)/src/decoder \ - $(GSKI_CFLAGS) \ -DSKI_DATA_DIR=\"$(pkgdatadir)\" bin_PROGRAMS = ski @@ -287,8 +286,6 @@ ski_SOURCES = \ cur.h \ firmware.c \ firmware.h \ - ssGtk.c \ - ssGtk.h \ syscall_api.h \ asm.c \ $(EXPR_SCANNER_DERIVED) \ @@ -312,21 +309,13 @@ ski_SOURCES = \ encoder/encoder.h \ $(ENCODER_DERIVED) -if WITH_GTK_INTERFACE -# gski exports some callbacks to gski.glade for -# dynamic discovery. -ski_LDFLAGS=-Wl,--export-dynamic -endif - ski_LDADD = \ - $(DWARF_LIBS) \ - $(GSKI_LIBS) + $(DWARF_LIBS) EXTRA_DIST = \ exec.incl.c \ ia_decoder.tmpl.c \ $(COMBFNS_FILES) \ - $(gski_DATA) \ $(noinst_DATA) \ $(noinst_SCRIPTS) \ $(EXPR_SCANNER_FILES) \ @@ -337,18 +326,9 @@ EXTRA_ski_SOURCES = \ $(EXTRA_hpux_FILES) \ $(EXTRA_freebsd_FILES) -if WITH_GTK_INTERFACE -gskidir= $(datadir)/ski -gski_DATA= \ - gski.glade -GSKI= gski -else -GSKI= -endif - -all-local: bski $(GSKI) +all-local: bski -bski $(GSKI) : ski +bski: ski @rm -f $@; ln ski $@ ## DERIVED sources rules: @@ -499,4 +479,4 @@ eparse.gen.c eparse.gen.h: eparse.y distclean-local: - -rm -f $(GSKI) bski $(BUILT_SOURCES) + -rm -f bski $(BUILT_SOURCES) diff --git a/src/gski.glade b/src/gski.glade deleted file mode 100644 index d503da6..0000000 --- a/src/gski.glade +++ /dev/null @@ -1,854 +0,0 @@ - - - - - - 800 - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Ski - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _File - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-quit - True - True - - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _View - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-cut - True - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-copy - True - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-paste - True - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-delete - True - True - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _Configure - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _Help - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-about - True - True - - - - - - - - - - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_BUTTONBOX_START - - - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Step - 0 - - - - - - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Run - 0 - - - - 1 - - - - - False - False - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - 2 - 2 - <b>Command</b> - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - Command History - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 200 - True - - - - - - - 1 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - - - - - False - 2 - - - - - False - 2 - - - - - False - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - dummy - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - User Registers - - - label_item - - - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - dummy - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - General Registers - - - label_item - - - - - 1 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - dummy - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - System Registers - - - label_item - - - - - 2 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - dummy - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - IA32 Registers - - - label_item - - - - - 3 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - dummy - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Floating Point Registers - - - label_item - - - - - 4 - - - - - False - True - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Program Window - - - label_item - - - - - - - False - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Data - - - label_item - - - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - GTK_SHADOW_NONE - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 12 - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <b>ITLB</b> - True - - - label_item - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - GTK_SHADOW_NONE - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 12 - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <b>DTLB</b> - True - - - label_item - - - - - 1 - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - TLB - - - label_item - - - - - 1 - - - - - True - True - - - - - True - True - - - - - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - False - - - False - 2 - - - - - - - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - About Ski - False - GTK_WIN_POS_CENTER_ON_PARENT - GDK_WINDOW_TYPE_HINT_DIALOG - False - Ski Simulator - 1.3.2 - Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P. - Ski is an instruction simulator designed to execute and test ia64 - code on non-ia64 machines. - http://ski.sourceforge.net/ - Copyright: - Most code is: - Copyright (c) 1995-2007, Hewlett-Packard Development Company, L.P. - - fake-xterm is: - Copyright (c) 2003, Matthew Chapman and Ian Wienand - -Ski Contributors: - Michael Morrell -- original author - Stephane Eranian -- corrections and cleanup - Dan Magenheimer -- corrections and cleanup - David Mosberger -- majority of changes for ia64 - Laurent Morichetti -- corrections and cleanup - Al Stone -- Debian packaging - Peter Chubb -- all sorts of contributions - -Fake-xterm: - Original idea by Matthew Chapman <matthewc@cse.unsw.edu.au> - Implementation by Ian Wienand <ianw@gelato.unsw.edu.au> - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_BUTTONBOX_END - - - False - GTK_PACK_END - - - - - - - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - SKI Running - False - True - False - - - 150 - 100 - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Running... - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - - - 1 - - - - - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Stop - 0 - - - - 2 - - - - - - diff --git a/src/main.c b/src/main.c index af95b2b..1bca31a 100644 --- a/src/main.c +++ b/src/main.c @@ -196,9 +196,6 @@ int main(int argc, char *argv[]) case 'b': interface = BATCH; break; - case 'g': - interface = GTK_INTERFACE; - break; case 's': interface = CURSES_INTERFACE; break; diff --git a/src/ski.c b/src/ski.c index f5ecbde..4d1d16f 100644 --- a/src/ski.c +++ b/src/ski.c @@ -43,7 +43,6 @@ #include "ssDBT.h" #include "syscall_api.h" #include "ssDPrs.h" -#include "ssGtk.h" #include "state.h" #include "trace.h" #include "ui.h" @@ -344,14 +343,6 @@ static void stepIt(CTR cnt) } cmdwSetStatus("Running..."); switch (interface) { - case GTK_INTERFACE: -#ifdef HAVE_GTK - stepIt_setupGtk(cnt); -#else - fprintf (stderr, - "Sorry, GTK support has not been compiled in.\n"); -#endif - break; case CURSES_INTERFACE: case BATCH: (void)stepIt_loop(cnt); @@ -411,15 +402,6 @@ void runIt(BOOL showIrate) } cmdwSetStatus("Running..."); switch (interface) { - case GTK_INTERFACE: -#ifdef HAVE_GTK - runIt_setupGtk(); - break; -#else - fprintf (stderr, - "Sorry, GTK support has not been compiled in.\n"); - exit(-1); -#endif case CURSES_INTERFACE: case BATCH: (void)runIt_loop(); diff --git a/src/ssGtk.c b/src/ssGtk.c deleted file mode 100644 index 81d479a..0000000 --- a/src/ssGtk.c +++ /dev/null @@ -1,632 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- - * - * Gtk Interface to SKI - * - * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ -#include "ssGtk.h" - -#include "std.h" - -#ifdef HAVE_GTK - -#include -#include - -#include -#include - -#include "types.h" -#include "ssDCmd.h" -#include "state.h" -#include "program.h" -#include "data.h" -#include "load.h" -#include "ssDPrs.h" -#include "syscall_api.h" -#include "ui.h" - -/* cycles to do in one background loop */ -#define GTK_REFRESH_RATE 100000 - -/* elements kept in command history combo */ -#define GTK_CMD_HISTORY 10 - -/* file globals */ -static GladeXML *xml; - -/* program window */ -static GtkTextView *prgw_view; -static GtkTextBuffer *prgw_buffer; -static GtkLabel *prgw_label; - -/* data window */ -static GtkTextView *datw_view; -static GtkTextBuffer *datw_buffer; - -/* output list view */ -static GtkTreeView *output_view; -static GtkListStore *output_store; -static GtkTreeIter output_iter; - - -/* for updating the status bar */ -static GtkStatusbar* status_bar_widget; -static guint status_bar_context; - -/* for running */ -static BOOL stopPressed; -static CTR execcnt; - -static GtkLabel* instcount_label; -/* sits in a background loop */ -static gboolean runItGtk(gpointer data) -{ - char label[200]; - if (!stopPressed && runIt_loopX(GTK_REFRESH_RATE)) { - execcnt += GTK_REFRESH_RATE; - sprintf(label, "%llu cycles\n", execcnt); - gtk_label_set_text(instcount_label, label); - // run again - return TRUE; - } - cleanup_execLoop(YES); - return FALSE; -} - - -void runIt_setupGtk(void) -{ - g_idle_add(runItGtk, NULL); - stopPressed = NO; - execcnt = 0; - /* draw the window */ - gtk_widget_show_all(glade_xml_get_widget(xml, "running_window")); -} - -static CTR tostep; - -static int stepItGtk(void *data) -{ - char label[200]; - if (tostep <= GTK_REFRESH_RATE) - { - stepIt_loop(tostep); - goto out; - } - if (!stopPressed && !stepIt_loop(GTK_REFRESH_RATE)) { - execcnt += GTK_REFRESH_RATE; - tostep -= GTK_REFRESH_RATE; - sprintf(label, "%llu cycles\n", execcnt); - gtk_label_set_text(instcount_label, label); - // run again - return TRUE; - } - out: - cleanup_execLoop(YES); - return FALSE; -} - -void stepIt_setupGtk(CTR cnt) -{ - printf("*** stepIt_setupGtk -> step %llu\n", cnt); - tostep = cnt; - g_idle_add(stepItGtk, NULL); - stopPressed = NO; - execcnt = 0; - /* only show the window if we are going to go for a while */ - if (tostep > GTK_REFRESH_RATE) - gtk_widget_show_all(glade_xml_get_widget(xml, "running_window")); -} - -static void stop_simulator(void) -{ - stopPressed = YES; - gtk_widget_hide(glade_xml_get_widget(xml, "running_window")); -} - -/* commands to keep in history */ -static GtkComboBox *cmd_combo_box; -static char *cmd_history[GTK_CMD_HISTORY]; -static int cmd_history_len; -static void add_to_cmd_history(const char *s) -{ - char *new_str = malloc(strlen(s) + 1); - if (!new_str) return; - strcpy(new_str, s); - if (cmd_history_len < GTK_CMD_HISTORY) { - /* To make glade make a combo box suitable for using - the [add|remove]_text functions on you need to put - in a dummy item. This removes the dummy item on the - first command. */ - if (cmd_history_len == 0) - gtk_combo_box_remove_text(cmd_combo_box, 0); - - cmd_history[cmd_history_len] = new_str; - gtk_combo_box_insert_text(cmd_combo_box, cmd_history_len, - new_str); - cmd_history_len++; - return; - } - /* free last, shuffle down others, add new */ - int i; - free(cmd_history[GTK_CMD_HISTORY-1]); - for (i = GTK_CMD_HISTORY-1; i > 0; i--) { - cmd_history[i] = cmd_history[i-1]; - gtk_combo_box_remove_text(cmd_combo_box, i); - gtk_combo_box_insert_text(cmd_combo_box, - i, cmd_history[i]); - } - cmd_history[0] = new_str; - gtk_combo_box_remove_text(cmd_combo_box, 0); - gtk_combo_box_insert_text(cmd_combo_box, - 0, cmd_history[0]); -} - -/* Little helper to fix the font of a newly written to buffer. - * Assumes tag has already been setup */ -static void fixed_font_buffer(GtkTextBuffer *buf) -{ - GtkTextIter start, end; - gtk_text_buffer_get_bounds(buf, &start, &end); - gtk_text_buffer_apply_tag_by_name(buf, "font", &start, &end); -} - -/* Handle a command entry from the combo box */ -void SimComboCmdGtk(void *data) -{ - const char *cmd = gtk_entry_get_text((GtkEntry*)data); - printf("*** SimComboCmdGtk()\n"); - printf(" -> cmd %s\n", cmd); - cmdExLin(cmd); - add_to_cmd_history(cmd); - gtk_entry_set_text((GtkEntry*)data, ""); -} - - -/* Handle a button click. The name of the button is the command to - * run. */ -void SimBtnCmdGtk(void *data) -{ - const gchar *btn = gtk_widget_get_name(GTK_WIDGET(data)); - - // cmd to pass to simulator - const char *cmd = NULL; - printf("*** SimCmdGtk() \n"); - printf(" -> %s\n", btn); - - if (!strcmp(btn, "btnRun")) - cmd = "run"; - else if (!strcmp(btn, "btnStep")) - cmd = "step"; - else if (!strcmp(btn, "btnRunningStop")) { - stop_simulator(); - return; - } - else - printf(" -> bad command %s???\n", btn); - - add_to_cmd_history(cmd); - if (!cmdExLin(cmd)) { - printf(" -> bad command!\n"); - } - -} - -/* Show the about box */ -void SimShowAbout(void *data) -{ - printf("*** SimShowAbout()\n"); - GtkWidget *about = glade_xml_get_widget(xml, "about_dialog"); - assert(about); - - gtk_widget_show_all(about); -} - -static void update_command_status(const char *s) -{ - /* remove whatever was there */ - gtk_statusbar_pop(status_bar_widget, status_bar_context); - gtk_statusbar_push(status_bar_widget, status_bar_context, s); -} - -void msgwPrintGtk(const char *s) -{ - printf("*** msgwPrintGtk (%s)\n", s); - /* this sucks, but we really don't want the newline on the end */ - char *buf; - int len = strlen(s); - buf = malloc(len+1); - assert(buf); - strncpy(buf, s, len); - buf[len-1] = '\0'; - gtk_list_store_append(output_store, &output_iter); - gtk_list_store_set(output_store, &output_iter, 0, buf, -1); - gtk_tree_view_scroll_to_cell(output_view, - gtk_tree_model_get_path(GTK_TREE_MODEL(output_store), &output_iter), - NULL, TRUE, 1, 0); - free(buf); -} - -static void datwInit(void) -{ - unsigned save = cproc; - - for (cproc = 0; cproc < nproc; cproc++) { - datwCVA = dataStart; - datwLVA = 0; - } - - cproc = save; - datInfo.numDataWds = 4; - datInfo.columns = 67; /* 67 to include ASCII */ - datInfo.expr[0] = '\0'; - - datw_view = GTK_TEXT_VIEW(glade_xml_get_widget(xml, "textviewDatw")); - assert(datw_view); - datw_buffer = gtk_text_view_get_buffer(datw_view); - assert(datw_buffer); - gtk_text_buffer_create_tag(datw_buffer, "font", "font", "fixed", NULL); -} - - -static void prgwInit(void) -{ - /* program window stuff */ - for (cproc = 0; cproc < 1; cproc++) { - prgwTop = ipGet(0); - prgwIS = 0; - prgwPrevTop = 0; - prgCmd = PrgUseTop; - } - prgInfo.iofsHex = YES; - prgInfo.iofsSymWidth = 13; - prgInfo.instHex = YES; - prgInfo.instSymWidth = 45; - prgInfo.columns = 88; - - - prgw_label = GTK_LABEL(glade_xml_get_widget(xml, "labelPrgw")); - assert(prgw_label); - prgw_view = GTK_TEXT_VIEW(glade_xml_get_widget(xml, "textviewPrgw")); - assert(prgw_view); - prgw_buffer = gtk_text_view_get_buffer(prgw_view); - assert(prgw_buffer); - gtk_text_buffer_create_tag(prgw_buffer, "font", "font", "fixed", NULL); -} - -void prgwUpdateGtk(void) -{ - printf("*** prgwUpdateGtk()\n"); - ADDR adr; - unsigned i, j, srcrows, asmrows, nbytes; - char *p, *text; - - char *output = malloc(80*20*2); - int output_len = 0; - assert(output); - - prgRows = 20; - switch (prgCmd) { - case PrgUseTop: - adr = prgwTop; - break; - case PrgUseBot: - adr = prgwBot; - break; - default: - adr = prgwCVA; - if (adr >= prgwTop && adr <= prgwBot) /* adr is in view */ - adr = prgwTop; - else if (prgwIS) /* iA */ - adr = iAinstAddr(adr, prgwIAmode, -prgOverlap); - else /* EM */ - adr -= prgOverlap*16; - break; - } - - if (prgwIS) { /* iA */ - for (prgwTop = adr, i = 0; i < prgRows; i++, adr += nbytes) { - text = prgwLineIA(adr, prgwIAmode, YES, &nbytes); - output_len += sprintf(output+output_len, "%s", text); - } - prgBndl = prgRows; - prgwBot = adr - nbytes; - } else { /* EM */ - if (prgCmd != PrgUseBot) { - for (prgwTop = adr, i = prgRows, prgBndl = 0; i > 0; ) { - text = prgwLine(adr, &srcrows, &asmrows); - if (i >= (srcrows + asmrows)) { - i -= srcrows + asmrows; - output_len += sprintf(output+output_len, "%s", text); - adr += 16; - prgBndl++; - } else { /* fill in remaining lines with source */ - for (p = text, j = 0; j < i && j < srcrows; j++) - p = strchr(p, '\n') + 1; - *p = '\0'; - output_len += sprintf(output+output_len, "%s", text); - i = 0; - } - } - prgwBot = adr - 16; - } else { /* PrgUseBot */ - for (i = prgRows, prgBndl = 0; i > 0; ) { - text = prgwLine(adr, &srcrows, &asmrows); - if (i >= (srcrows + asmrows)) { - i -= srcrows + asmrows; - sprintf(output+output_len, "%s", text); - adr -= 16; - prgBndl++; - } else { - if (i >= asmrows) { - for (p = text, j = 0; j < (srcrows+asmrows) - i; j++) - p = strchr(p, '\n') + 1; - output_len += sprintf(output+output_len, "%s", text); - i = 0; - } else - for (; i > 0; i--) - ; // XXX - } - } - prgwTop = adr + 16; - } - } - - if (strlen(p = getSrcName(prgwTop))) { - char buf[200]; - snprintf(buf, 200, "Program : %s", p); - gtk_label_set_text(prgw_label, buf); - } else - gtk_label_set_text(prgw_label, "Program Window"); - - gtk_text_buffer_set_text(prgw_buffer, output, -1); - fixed_font_buffer(prgw_buffer); - - prgCmd = PrgUseTop; -} - -static void fake_tlb_update(void); - -static void regwDrawGtk(void) -{ - int i; - REG size; - static BOOL first_run = YES; - - char name[] = "textXrs"; - for (i = 0; i < topregw; i++) - { - evalExpr(regwtbl[i].size, DECEXP, &size); - - /* this might be a bit fragile, it relies on - regwtbl[i].tag being a certain thing and nobody - changing the textbox names via glade. */ - name[4] = regwtbl[i].tag[0]; - GtkTextView *tvw = - (GtkTextView*)glade_xml_get_widget(xml, name); - assert(tvw); - - GtkTextBuffer* tb = gtk_text_view_get_buffer(tvw); - assert(tb); - - /* size is lines, lines shouldn't be longer than this */ - size_t b_left = size * 100; - char *buf = malloc(b_left); - assert(buf); - - int j,len=0; - for (j = 0; j < size; j++) { - int r = snprintf(buf+len, b_left, "%s\n", regwtbl[i].fcn(j)); - if (r >= b_left) - break; - len += r; - b_left -= r; - } - gtk_text_buffer_set_text(tb, buf, -1); - free(buf); - /* only need to set this tag first time around */ - if (first_run) - gtk_text_buffer_create_tag(tb, "font", "font", "fixed", NULL); - fixed_font_buffer(tb); - } - first_run = NO; - - /* "fake" updates of TLB so we always see fresh windows */ - fake_tlb_update(); -} - -void regwUpdateGtk(void) -{ - printf("*** regwUpdateGtk()\n"); - regwDrawGtk(); -} - -void cmdwPrintGtk(const char *s) -{ - printf("*** cmdwPrintGtk() (%s)\n", s); -} - -void cmdwUpdateGtk(void) -{ - printf("*** cmdwUpdateGtk()\n"); -} - -void cmdwSetStatusGtk(const char *s) -{ - printf("*** cmdwSetStatusGtk() (%s)\n", s); - update_command_status(s); -} - -void prgwDrawGtk(void) -{ - printf("*** prgwDraw()\n"); - prgwUpdateGtk(); -} - -static void tlbwUpdate(char win, const char *hdr, const char *buf); - -/* hack derived from "sit/sdt" in menu.c */ -static void fake_tlb_update(void) -{ - printf("*** fake_tlb_update()\n"); - size_t bufsz; - char *buf, hdr[81]; - - bufsz = instTlbDisplaySize(); - buf = malloc(bufsz+1); - assert(buf); - getInstTlbInfo(hdr, sizeof (hdr), buf, bufsz+1); - tlbwUpdate('I', hdr, buf); - free(buf); - - bufsz = dataTlbDisplaySize(); - buf = malloc(bufsz+1); - assert(buf); - getDataTlbInfo(hdr, sizeof (hdr), buf, bufsz+1); - tlbwUpdate('D', hdr, buf); - free(buf); -} - -static void tlbwUpdate(char win, const char *hdr, const char *buf) -{ - char name[] = "textviewXtlbw"; - name[8] = win; - - printf("%s\n", name); - GtkTextView *tvw = - (GtkTextView*)glade_xml_get_widget(xml, name); - assert(tvw); - - GtkTextBuffer* tb = gtk_text_view_get_buffer(tvw); - assert(tb); - - gtk_text_buffer_set_text(tb, hdr, -1); - gtk_text_buffer_insert_at_cursor(tb, buf, -1); - fixed_font_buffer(tb); -} - -void cmdOutGtk(const char *name, const char *hdr, const char *buf) -{ - if (!strcmp(name, "dtlblist")) { - tlbwUpdate('D', hdr, buf); - return; - } - if (!strcmp(name, "itlblist")) { - tlbwUpdate('I', hdr, buf); - return; - } - printf("*** cmdOutGtk (%s %s %s)\n", name, hdr, buf); -} - -/* data lines to show */ -#define DATW_LINES 15 -void datwUpdateGtk(void) -{ - printf("*** datwUpdateGtk\n"); - char output[80 * DATW_LINES]; /* not actually 80 columns wide, so this should do */ - sprintf(output, "%s", datwtbl[0].bdfcn(DATW_LINES)); - - gtk_text_buffer_set_text(datw_buffer, output, -1); - fixed_font_buffer(datw_buffer); -} - -void scrnEndGtk(void) -{ - printf("*** scrnEndGtk()\n"); -} - -static void tlbwInit() -{ - GtkTextView *w; - - w = GTK_TEXT_VIEW(glade_xml_get_widget(xml, "textviewDtlbw")); - assert(w); - gtk_text_buffer_create_tag(gtk_text_view_get_buffer(w), - "font", "font", "fixed", NULL); - - w = GTK_TEXT_VIEW(glade_xml_get_widget(xml, "textviewItlbw")); - assert(w); - gtk_text_buffer_create_tag(gtk_text_view_get_buffer(w), - "font", "font", "fixed", NULL); -} - -void scrnInitGtk(void) -{ - GtkWidget *window; - - printf("*** srcninitGtk()\n"); - - gtk_init(NULL, NULL); - - xml = glade_xml_new(SKI_DATA_DIR "/gski.glade", NULL, NULL); - - /* connect signal handlers */ - glade_xml_signal_autoconnect(xml); - - /* Set default line in status bar */ - status_bar_widget = - (GtkStatusbar*)glade_xml_get_widget(xml, "statusCmdOutput"); - status_bar_context = gtk_statusbar_get_context_id(status_bar_widget, - "ski"); - gtk_statusbar_push(status_bar_widget, status_bar_context, "Ready"); - - /* setup treeview for command output */ - output_view = GTK_TREE_VIEW(glade_xml_get_widget(xml, "treeviewCmd")); - - output_store = gtk_list_store_new(1, G_TYPE_STRING); - assert(output_store); - - GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(output_view, -1, "Command Output", renderer, - "text", 0, NULL); - gtk_tree_view_set_model(output_view, GTK_TREE_MODEL(output_store)); - - /* setup combo box pointer */ - cmd_combo_box = GTK_COMBO_BOX(glade_xml_get_widget(xml, "comboCmd")); - assert(cmd_combo_box); - - /* instruction count pointer */ - instcount_label = GTK_LABEL(glade_xml_get_widget(xml, "labelInstCount")); - assert(instcount_label); - - /* draw the window */ - window = glade_xml_get_widget(xml, "main_window"); - assert(window); - - gtk_widget_show_all(window); - - tlbwInit(); - datwInit(); - prgwInit(); - - /* get the registers filled out */ - regwDrawGtk(); - - return; -} - - -void cmdLoopGtk(void) -{ - printf("*** cmdLoopGtk\n"); - gtk_main(); -} - -#endif /* !HAVE_GTK */ - diff --git a/src/ssGtk.h b/src/ssGtk.h deleted file mode 100644 index 08ae10f..0000000 --- a/src/ssGtk.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _SKI_SSGTK_H_ -#define _SKI_SSGTK_H_ - -#include "std.h" - -#ifdef HAVE_GTK - -#include "types.h" - -/* Callbacks exported from binary for glade. */ -/* TODO: explicitly expose these symbols via attribute visibility */ -/* TODO: validate if these prototypes have correct expected types. */ -void SimBtnCmdGtk(void *data); -void SimComboCmdGtk(void *data); -void SimShowAbout(void *data); - -void regwUpdateGtk(void); -void datwUpdateGtk(void); - -void prgwDrawGtk(void); -void prgwUpdateGtk(void); - -void cmdwUpdateGtk(void); -void cmdwSetStatusGtk(const char *); -void cmdwPrintGtk(const char *); - -void msgwPrintGtk(const char *); - -void runIt_setupGtk(void); - -void stepIt_setupGtk(CTR cnt); - -void scrnInitGtk(void); -void scrnEndGtk(void); - -void cmdOutGtk(const char *name, const char *hdr, const char *buf); -void cmdLoopGtk(void); - -#endif /* !HAVE_GTK */ - -#endif /* _SKI_SSGTK_H_ */ diff --git a/src/ui.c b/src/ui.c index e61d632..2496c1d 100644 --- a/src/ui.c +++ b/src/ui.c @@ -46,7 +46,6 @@ #include "data.h" #include "libsym.h" #include "iadas_types.gen.h" /* for ADDR4 */ -#include "ssGtk.h" #include "ssDPrs.h" BYTE getIAmode(void); @@ -105,11 +104,6 @@ void cmdOut(const char *name, const char *hdr, const char *buf, FILE *f) case CURSES_INTERFACE: cmdOutCur(hdr, buf); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - cmdOutGtk(name, hdr, buf); -#endif - break; } /* free(buf); */ } @@ -153,11 +147,6 @@ void regwUpdate(void) case CURSES_INTERFACE: regwUpdateCur(); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - regwUpdateGtk(); -#endif - break; case BATCH: break; } @@ -819,11 +808,6 @@ void prgwUpdate(void) case CURSES_INTERFACE: prgwUpdateCur(); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - prgwUpdateGtk(); -#endif - break; case BATCH: break; } @@ -857,11 +841,6 @@ void prgwDraw(void) case CURSES_INTERFACE: prgwDrawCur(); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - prgwDrawGtk(); -#endif - break; case BATCH: break; } @@ -927,11 +906,6 @@ void datwUpdate(void) case CURSES_INTERFACE: datwUpdateCur(); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - datwUpdateGtk(); -#endif - break; case BATCH: break; } @@ -953,11 +927,6 @@ void cmdwPrint(const char *fmt, ...) case BATCH: cmdwPrintBatch(s); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - cmdwPrintGtk(s); -#endif - break; case CURSES_INTERFACE: cmdwPrintCur(s); break; @@ -977,11 +946,6 @@ void msgwPrint(const char *fmt, ...) case BATCH: cmdwPrintBatch(s); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - msgwPrintGtk(s); -#endif - break; case CURSES_INTERFACE: cmdwPrintCur(s); break; @@ -994,11 +958,6 @@ void cmdwSetStatus(const char *msg) case CURSES_INTERFACE: cmdwSetStatusCur(msg); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - cmdwSetStatusGtk(msg); -#endif - break; case BATCH: break; } @@ -1020,11 +979,6 @@ void cmdErr(const char *fmt, ...) case BATCH: cmdwPrintBatch(s); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - msgwPrintGtk(s); -#endif - break; case CURSES_INTERFACE: cmdwPrintCur(s); (void)putchar('\a'); @@ -1048,11 +1002,6 @@ void cmdWarn(const char *fmt, ...) case BATCH: cmdwPrintBatch(s); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - msgwPrintGtk(s); -#endif - break; case CURSES_INTERFACE: cmdwPrintCur(s); break; @@ -1065,11 +1014,6 @@ static void cmdwUpdate(void) case CURSES_INTERFACE: cmdwUpdateCur(); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - cmdwUpdateGtk(); -#endif - break; case BATCH: break; } @@ -1088,14 +1032,6 @@ void scrnInit(void) case CURSES_INTERFACE: scrnInitCur(); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - scrnInitGtk(); -#else - fprintf (stderr, "Error: program was build without GTK support\n"); - exit(EXIT_FAILURE); -#endif - break; } } @@ -1114,11 +1050,6 @@ void scrnEnd(void) case CURSES_INTERFACE: scrnEndCur(); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - scrnEndGtk(); -#endif - break; case BATCH: break; } @@ -1144,11 +1075,6 @@ void cmdLoop(void) case BATCH: cmdLoopBatch(); break; - case GTK_INTERFACE: -#ifdef HAVE_GTK - cmdLoopGtk(); -#endif - break; case CURSES_INTERFACE: cmdLoopCur(); break; diff --git a/src/ui.h b/src/ui.h index 69bc0cb..b767c89 100644 --- a/src/ui.h +++ b/src/ui.h @@ -17,7 +17,7 @@ typedef enum { ASM, MIXED, SRC } PrgwMode; typedef enum { BATCH = 0, CURSES_INTERFACE, - GTK_INTERFACE } Interface; +} Interface; /*--------------------------------------------------------------------------