summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2022-12-29 11:02:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2022-12-29 11:02:46 (GMT)
commit41db261acccf3494aa93b71a181cde9e8605a841 (patch)
tree07a00f88920a8e601268d415131630052ef85988 /src/format
parentc27f884ec1d18d9cff0d19d6ba8de1dd54d991c4 (diff)
Refactor Makefiles to exclude GTK on demand.
Diffstat (limited to 'src/format')
-rw-r--r--src/format/Makefile.am11
-rw-r--r--src/format/format-int.h1
-rw-r--r--src/format/format.h1
-rw-r--r--src/format/known.h1
-rw-r--r--src/format/strsym.c2
-rw-r--r--src/format/symbol.c18
6 files changed, 20 insertions, 14 deletions
diff --git a/src/format/Makefile.am b/src/format/Makefile.am
index 2004f93..305cd92 100644
--- a/src/format/Makefile.am
+++ b/src/format/Makefile.am
@@ -19,18 +19,9 @@ libformat_la_SOURCES = \
symbol-int.h \
symbol.h symbol.c
-libformat_la_LIBADD =
-
-libformat_la_LDFLAGS =
+libformat_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS)
devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
dev_HEADERS = $(libformat_la_SOURCES:%c=)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
-SUBDIRS =
diff --git a/src/format/format-int.h b/src/format/format-int.h
index 3e6ae3e..f18bb24 100644
--- a/src/format/format-int.h
+++ b/src/format/format-int.h
@@ -31,7 +31,6 @@
#include "known-int.h"
#include "preload.h"
#include "../glibext/objhole.h"
-#include "../gtkext/gtkstatusstack.h"
#include "../mangling/demangler.h"
diff --git a/src/format/format.h b/src/format/format.h
index a23782c..f9aa430 100644
--- a/src/format/format.h
+++ b/src/format/format.h
@@ -34,6 +34,7 @@
#include "../analysis/content.h"
#include "../arch/context.h"
#include "../glibext/delayed.h"
+#include "../glibext/notifier.h"
diff --git a/src/format/known.h b/src/format/known.h
index 8319a63..dcc8669 100644
--- a/src/format/known.h
+++ b/src/format/known.h
@@ -31,6 +31,7 @@
#include "../analysis/content.h"
#include "../glibext/delayed.h"
+#include "../glibext/notifier.h"
diff --git a/src/format/strsym.c b/src/format/strsym.c
index d585434..c352a0e 100644
--- a/src/format/strsym.c
+++ b/src/format/strsym.c
@@ -33,7 +33,7 @@
#include "symbol-int.h"
#include "../arch/operands/feeder-int.h"
#include "../common/alloc.h"
-#include "../gtkext/gtkblockdisplay.h"
+#include "../core/columns.h"
diff --git a/src/format/symbol.c b/src/format/symbol.c
index b20426d..934eee3 100644
--- a/src/format/symbol.c
+++ b/src/format/symbol.c
@@ -31,9 +31,11 @@
#include "symbol-int.h"
#include "../analysis/db/misc/rlestr.h"
-#include "../glibext/gbinarycursor.h"
+#include "../core/columns.h"
+#ifdef HAVE_GTK_SUPPORT
+# include "../glibext/gbinarycursor.h"
+#endif
#include "../glibext/linegen-int.h"
-#include "../gtkext/gtkblockdisplay.h"
@@ -66,12 +68,16 @@ static void g_binary_symbol_finalize(GBinSymbol *);
/* Indique le nombre de ligne prêtes à être générées. */
static size_t g_binary_symbol_count_lines(const GBinSymbol *);
+#ifdef HAVE_GTK_SUPPORT
+
/* Retrouve l'emplacement correspondant à une position donnée. */
static void g_binary_symbol_compute_cursor(const GBinSymbol *, gint, size_t, size_t, GLineCursor **);
/* Détermine si le conteneur s'inscrit dans une plage donnée. */
static int g_binary_symbol_contain_cursor(const GBinSymbol *, size_t, size_t, const GLineCursor *);
+#endif
+
/* Renseigne sur les propriétés liées à un générateur. */
static BufferLineFlags g_binary_symbol_get_line_flags(const GBinSymbol *, size_t, size_t);
@@ -177,8 +183,10 @@ static void g_binary_symbol_init(GBinSymbol *symbol)
static void g_binary_symbol_interface_init(GLineGeneratorInterface *iface)
{
iface->count = (linegen_count_lines_fc)g_binary_symbol_count_lines;
+#ifdef HAVE_GTK_SUPPORT
iface->compute = (linegen_compute_fc)g_binary_symbol_compute_cursor;
iface->contain = (linegen_contain_fc)g_binary_symbol_contain_cursor;
+#endif
iface->get_flags = (linegen_get_flags_fc)g_binary_symbol_get_line_flags;
iface->print = (linegen_print_fc)g_binary_symbol_print;
@@ -784,6 +792,9 @@ static size_t g_binary_symbol_count_lines(const GBinSymbol *symbol)
}
+#ifdef HAVE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : symbol = générateur à consulter. *
@@ -851,6 +862,9 @@ static int g_binary_symbol_contain_cursor(const GBinSymbol *symbol, size_t index
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : symbol = générateur à consulter. *