-void init(){
- automaton = xbt_automaton_new_automaton();
-}
-
-void new_state(char* id, int src){
-
- char* id_state = strdup(id);
- char* first_part = strtok(id,"_");
- int type = 0 ; // -1=état initial, 0=état intermédiaire, 1=état final
+static void new_state(char* id, int src){
+ char* saveptr = NULL; // for strtok_r()
+ char* id_copy = xbt_strdup(id);
+ char* first_part = strtok_r(id_copy, "_", &saveptr);
+ int type = 0 ; // -1=initial state; 0=intermediate state; 1=final state