diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-01-28 23:32:25 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-01-28 23:32:25 (GMT) |
commit | 16e0fd9d89ef433848678dfc8dd20426844a2868 (patch) | |
tree | 79075ae02c133cea21ffb555b1086aae833b3aac /tools/d2c/bits.h | |
parent | 66c99d59d6a6d533de0bb65488de8243213bcdea (diff) |
Cleaned, rewritten and improved the whole code of the compiler.
Diffstat (limited to 'tools/d2c/bits.h')
-rw-r--r-- | tools/d2c/bits.h | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/tools/d2c/bits.h b/tools/d2c/bits.h deleted file mode 100644 index aa4b7aa..0000000 --- a/tools/d2c/bits.h +++ /dev/null @@ -1,87 +0,0 @@ - -/* Chrysalide - Outil d'analyse de fichiers binaires - * bits.h - prototypes pour la compréhension et la manipulation des champs de bits - * - * Copyright (C) 2014 Cyrille Bagard - * - * This file is part of Chrysalide. - * - * OpenIDA 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. - * - * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>. - */ - - -#ifndef _TOOLS_BITS_H -#define _TOOLS_BITS_H - - -#include <stdbool.h> - - - - -/* --------------------------- GESTION DES CHAMPS DE BITS --------------------------- */ - - -/* Elément d'un mot décodé */ -typedef struct _raw_bitfield raw_bitfield; - - - -/* Indique le nombre de bits utilisés par le champ. */ -unsigned int get_raw_bitfield_length(const raw_bitfield *); - -/* Marque un champ de bits comme étant utile. */ -void mark_raw_bitfield_as_used(raw_bitfield *); - - - - - -/* Représentation de l'ensemble des bits de codage */ -typedef struct _coding_bits coding_bits; - - - -/* Crée un nouveau gestionnaire des bits d'encodage brut. */ -coding_bits *create_coding_bits(void); - -/* Supprime de la mémoire un gestionnaire de bits d'encodage. */ -void delete_coding_bits(coding_bits *); - - - -/* Note la présence d'un champ remarquable dans une définition. */ -void register_named_field_in_bits(coding_bits *, char *, unsigned int); - -/* Note la présence d'un bit invariable dans une définition. */ -void register_bit_in_bits(coding_bits *, int); - -/* Indique le nombre de bits traités. */ -unsigned int count_coded_bits(const coding_bits *); - -/* Recherche un champ donné dans un ensemble de champs de bits. */ -raw_bitfield *find_named_field_in_bits(const coding_bits *, const char *); - -/* Déclare les variables C associées aux champs de bits. */ -bool declare_used_bits_fields(const coding_bits *, int, unsigned int); - -/* Vérifie que les bits fixes correspondent au masque attendu. */ -bool check_bits_correctness(const coding_bits *, int); - -/* Définit les variables C associées aux champs de bits. */ -bool define_used_bits_fields(const coding_bits *, int); - - - -#endif /* _TOOLS_BITS_H */ |