summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-09-30 11:22:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-09-30 11:22:46 (GMT)
commitdb702d1243e6fec187137d48cecb89de17fefc3b (patch)
tree13776b4b75377951d9ebf9a57078ae1aed659cba /src/common
parent6ba73df8224dc2a88fe5f37a331960936758036e (diff)
Handled dependencies when loading plugins.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/bits.c23
-rw-r--r--src/common/bits.h3
2 files changed, 26 insertions, 0 deletions
diff --git a/src/common/bits.c b/src/common/bits.c
index 4d4731a..837e31e 100644
--- a/src/common/bits.c
+++ b/src/common/bits.c
@@ -180,6 +180,29 @@ void copy_bit_field(bitfield_t *dest, const bitfield_t *src)
/******************************************************************************
* *
+* Paramètres : field = champ de bits à consulter. *
+* *
+* Description : Indique la taille d'un champ de bits donné. *
+* *
+* Retour : Taille du champ de bits. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+size_t get_bit_field_size(const bitfield_t *field)
+{
+ size_t result; /* Dimension à retourner */
+
+ result = field->length;
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : a = premier champ à analyser. *
* b = second champ à analyser. *
* *
diff --git a/src/common/bits.h b/src/common/bits.h
index b9fc0e6..72b431e 100644
--- a/src/common/bits.h
+++ b/src/common/bits.h
@@ -45,6 +45,9 @@ void delete_bit_field(bitfield_t *);
/* Copie un champ de bits dans un autre. */
void copy_bit_field(bitfield_t *, const bitfield_t *);
+/* Indique la taille d'un champ de bits donné. */
+size_t get_bit_field_size(const bitfield_t *);
+
/* Compare deux champs de bits entre eux. */
int compare_bit_fields(const bitfield_t *, const bitfield_t *);