summaryrefslogtreecommitdiff
path: root/src/analysis/scan/patterns/tokens/offset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/scan/patterns/tokens/offset.h')
-rw-r--r--src/analysis/scan/patterns/tokens/offset.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/analysis/scan/patterns/tokens/offset.h b/src/analysis/scan/patterns/tokens/offset.h
index b458717..130aaea 100644
--- a/src/analysis/scan/patterns/tokens/offset.h
+++ b/src/analysis/scan/patterns/tokens/offset.h
@@ -36,7 +36,7 @@ typedef struct _node_offset_range_t
{
/**
* Les deux champs ci-après font bien référence à des positions absolues,
- * et non à des bornes d'espace, lors que les résultats de correspondances
+ * et non à des bornes d'espace, lorsque les résultats de correspondances
* sont encore non initialisés.
*
* Ensuite ces bornes représentent bien un espace séparant les résultats
@@ -44,6 +44,7 @@ typedef struct _node_offset_range_t
*/
phys_t min; /* Position minimale */
phys_t max; /* Position maximale */
+ bool has_max; /* Quantité définie ? */
} node_offset_range_t;
@@ -53,6 +54,7 @@ bool get_node_offset_range(const node_offset_range_t *, phys_t, phys_t, phys_t *
+#define MAX_RANGE_FOR_MANUAL_CHECK 5
@@ -83,13 +85,21 @@ void merge_node_search_offset(node_search_offset_t *, const node_search_offset_t
/* Met fin à une mémorisation d'intervales de tolérance. */
void exit_node_search_offset(node_search_offset_t *);
+#define offsets_exist(off) \
+ ((off)->used > 0)
+
+
/* Fournit la liste des tolérances bornées établies à présent. */
/* TODO : supprimer un niveau d'indirection */
node_offset_range_t * const *get_node_search_offset_ranges(const node_search_offset_t *, size_t *);
+const node_offset_range_t * const get_node_search_offset_ranges_2(const node_search_offset_t *, size_t *);
/* Ajoute un nouvel espace borné aux décalages tolérés. */
void add_range_to_node_search_offset(node_search_offset_t *, phys_t, phys_t, const phys_t *);
+/* Etend les décalages tolérés avec un nouvel espace. */
+void extend_node_search_offset(node_search_offset_t *, phys_t, phys_t, bool);
+
#define disable_all_ranges_in_node_search_offset(off) \
(off)->used = 0