A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We can only include tag: include|cluster|peer|AS|trace|trace_connect
[simgrid.git]
/
src
/
xbt
/
automaton.c
diff --git
a/src/xbt/automaton.c
b/src/xbt/automaton.c
index
b2e3ae3
..
8f189a8
100644
(file)
--- a/
src/xbt/automaton.c
+++ b/
src/xbt/automaton.c
@@
-341,12
+341,18
@@
int automaton_label_transition_compare(xbt_exp_label_t l1, xbt_exp_label_t l2){
}
}
-int propositional_symbols_compare_value(
const void *s1, const void *
s2){
+int propositional_symbols_compare_value(
xbt_dynar_t s1, xbt_dynar_t
s2){
-
const int *ps1 = s1
;
-
const int *ps2 = s2
;
-
printf("ps 1 = %d, ps2 = %d", *ps1, *ps2
);
+
int *iptr1, *iptr2
;
+
unsigned int cursor
;
+
unsigned int nb_elem = xbt_dynar_length(s1
);
- return (!(*ps1 == *ps2));
+ for(cursor=0;cursor<nb_elem;cursor++){
+ iptr1 = xbt_dynar_get_ptr(s1, cursor);
+ iptr2 = xbt_dynar_get_ptr(s2, cursor);
+ if(*iptr1 != *iptr2)
+ return 1;
+ }
+ return 0;
}
}