diff options
Diffstat (limited to 'src/format/exe_format.c')
-rw-r--r-- | src/format/exe_format.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/format/exe_format.c b/src/format/exe_format.c index 89b0b3b..2b8f893 100644 --- a/src/format/exe_format.c +++ b/src/format/exe_format.c @@ -29,6 +29,9 @@ #include "exe_format-int.h" +#include "elf/e_elf.h" +#include "java/e_java.h" +#include "pe/e_pe.h" #include "../panel/log.h" @@ -57,6 +60,10 @@ static registered_exe_format *exe_formats = NULL; static size_t exe_formats_count = 0; +/* Enregistre la disponibilité d'un nouveau format exécutable. */ +void register_exe_format(const char *, exe_match_fc, exe_load_fc); + + /* ---------------------------------------------------------------------------------- */ @@ -220,6 +227,29 @@ int compare_bin_parts(const bin_part **a, const bin_part **b) /****************************************************************************** * * +* Paramètres : - * +* * +* Description : Procède au chargement des formats d'exécutables reconnus. * +* * +* Retour : true pour indiquer un chargement réussi, false sinon. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool init_all_exe_formats(void) +{ + register_exe_format(_("ELF"), elf_is_matching, load_elf); + register_exe_format(_("Java"), java_is_matching, load_java); + register_exe_format(_("Portable Executable"), pe_is_matching, load_pe); + + return true; + +} + + +/****************************************************************************** +* * * Paramètres : name = désignation humaine associée. * * match = procédure de reconnaissance fournie. * * load = fonction de chargement fournie. * |