summaryrefslogtreecommitdiff
path: root/src/gtksnippet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtksnippet.c')
-rw-r--r--src/gtksnippet.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gtksnippet.c b/src/gtksnippet.c
index 6470fcb..7e5e012 100644
--- a/src/gtksnippet.c
+++ b/src/gtksnippet.c
@@ -90,7 +90,30 @@ void delete_code_line_info(code_line_info *line)
}
+/******************************************************************************
+* *
+* Paramètres : a = premières informations à consulter. *
+* b = secondes informations à consulter. *
+* *
+* Description : Etablit la comparaison entre deux lignes de représentation. *
+* *
+* Retour : Bilan : -1 (a < b), 0 (a == b) ou 1 (a > b). *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+int compare_code_line_info(const code_line_info **a, const code_line_info **b)
+{
+ int result; /* Bilan à renvoyer */
+
+ if ((*a)->offset < (*b)->offset) result = -1;
+ else if((*a)->offset > (*b)->offset) result = 1;
+ else result = 0;
+ return result;
+
+}