diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Makefile.am | 10 | ||||
-rw-r--r-- | src/core/collections.h | 2 | ||||
-rw-r--r-- | src/core/columns.h | 59 | ||||
-rw-r--r-- | src/core/logs.c | 13 |
4 files changed, 73 insertions, 11 deletions
diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 12dcddd..ac1ae14 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -3,6 +3,7 @@ noinst_LTLIBRARIES = libcore.la libcore_la_SOURCES = \ collections.h collections.c \ + columns.h \ core.h core.c \ demanglers.h demanglers.c \ global.h global.c \ @@ -13,16 +14,9 @@ libcore_la_SOURCES = \ processors.h processors.c \ queue.h queue.c -libcore_la_LDFLAGS = $(LIBGTK_LIBS) $(LIBXML_LIBS) +libcore_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libcore_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/core/collections.h b/src/core/collections.h index 69da6f7..87f2435 100644 --- a/src/core/collections.h +++ b/src/core/collections.h @@ -49,4 +49,4 @@ void delete_collections_list(GList **); -#endif /* _ANALYSIS_DB_COLLECTION_H */ +#endif /* _CORE_COLLECTIONS_H */ diff --git a/src/core/columns.h b/src/core/columns.h new file mode 100644 index 0000000..81f78f8 --- /dev/null +++ b/src/core/columns.h @@ -0,0 +1,59 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * columns.h - prototypes pour l'énumération globale des colonnes de rendu + * + * Copyright (C) 2022 Cyrille Bagard + * + * This file is part of Chrysalide. + * + * Chrysalide 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 3 of the License, or + * (at your option) any later version. + * + * Chrysalide 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 Chrysalide. If not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef _CORE_COLUMNS_H +#define _CORE_COLUMNS_H + + + +/* Désignation des colonnes d'une ligne */ +typedef enum _DisassLineColumn +{ + DLC_PHYSICAL, /* Position physique */ + DLC_VIRTUAL, /* Adresse virtuelle */ + DLC_BINARY, /* Contenu sous forme binaire */ + DLC_ASSEMBLY_LABEL, /* Etiquette dans les données */ + DLC_ASSEMBLY_HEAD, /* Instruction pour assembleur */ + DLC_ASSEMBLY, /* Code pour assembleur */ + DLC_COMMENTS, /* Commentaires éventuels */ + + DLC_COUNT, + +} DisassLineColumn; + + +/* Désignation des colonnes d'une ligne */ +typedef enum _HexLineColumn +{ + HLC_PHYSICAL, /* Position physique */ + HLC_BINARY, /* Données binaires brutes */ + HLC_PADDING, /* Espacement forcé */ + HLC_TRANSLATION, /* Traduction de contenu */ + + HLC_COUNT, + +} HexLineColumn; + + + +#endif /* _CORE_COLUMNS_H */ diff --git a/src/core/logs.c b/src/core/logs.c index 2769bd5..9385020 100644 --- a/src/core/logs.c +++ b/src/core/logs.c @@ -29,8 +29,10 @@ #include "../common/extstr.h" -#include "../gui/core/items.h" -#include "../gui/panels/log.h" +#ifdef HAVE_GTK_SUPPORT +# include "../gui/core/items.h" +# include "../gui/panels/log.h" +#endif @@ -107,10 +109,14 @@ void set_log_verbosity(LogMessageType level) void log_simple_message(LogMessageType type, const char *msg) { +#ifdef HAVE_GTK_SUPPORT GEditorItem *item; /* Eventuel affichage présent */ +#endif if (type >= _verbosity) { +#ifdef HAVE_GTK_SUPPORT + item = find_editor_item_by_type(G_TYPE_LOG_PANEL); if (item != NULL) @@ -120,6 +126,9 @@ void log_simple_message(LogMessageType type, const char *msg) } else + +#endif + print_message_without_gui(type, msg); } |