rem: 3 );
add: 0 );
context: gboolean recuperation_etats_xml ( xmlNodePtr node_etats ){        while ( node_etats )    {	/* on va recuperer ici les generalites des etats */	if ( node_etats -> type != XML_TEXT_NODE )	{	    if ( !strcmp ( node_etats -> name,			   "Generalites" ))	    {		xmlNodePtr node_generalites;		node_generalites = node_etats -> children;		while ( node_generalites )		{		    if ( !strcmp ( node_generalites -> name,				   "No_dernier_etat" ))			no_dernier_etat = my_atoi ( xmlNodeGetContent ( node_generalites ));		    node_generalites = node_generalites -> next;		}	    }	    /* on va recuperer ici les etats */	    if ( !strcmp ( node_etats -> name,			   "Detail_des_etats" ))	    {		xmlNodePtr node_detail;		liste_struct_etats = NULL;		node_detail = node_etats -> children;		/* on fait maintenant le tour de tous les états */		while ( node_detail )		{		    struct struct_etat *etat;		    xmlNodePtr node_detail_etat;		    /* création du nouvel état */		    if ( node_detail -> type != XML_TEXT_NODE &&			 !strcmp ( node_detail -> name, "Etat") )		    {			etat = calloc ( 1, sizeof ( struct struct_etat ));			node_detail_etat = node_detail -> children;			/* on récupère les données de l'état */			while ( node_detail_etat )			{			    if ( node_detail_etat -> type != XML_TEXT_NODE )			    {				if ( !strcmp ( node_detail_etat -> name,					       "No" ))				    etat -> no_etat = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Nom" ))				    etat -> nom_etat = xmlNodeGetContent ( node_detail_etat );				if ( !strcmp ( node_detail_etat -> name,					       "Type_classement" )				     &&				     xmlNodeGetContent ( node_detail_etat ))				{				    gchar **pointeur_char;				    gint i;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 0 );				    i=0;				    while ( pointeur_char[i] )				    {					etat -> type_classement = g_list_append ( etat -> type_classement,										  GINT_TO_POINTER ( my_atoi ( pointeur_char[i] )));					i++;				    }				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name,					       "Aff_r" ))				    etat -> afficher_r = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_ope" ))				    etat -> afficher_opes = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_nb_ope" ))				    etat -> afficher_nb_opes = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_no_ope" ))				    etat -> afficher_no_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_date_ope" ))				    etat -> afficher_date_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_tiers_ope" ))				    etat -> afficher_tiers_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_categ_ope" ))				    etat -> afficher_categ_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_ss_categ_ope" ))				    etat -> afficher_sous_categ_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_type_ope" ))				    etat -> afficher_type_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_ib_ope" ))				    etat -> afficher_ib_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_ss_ib_ope" ))				    etat ->afficher_sous_ib_ope  = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_cheque_ope" ))				    etat -> afficher_cheque_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_notes_ope" ))				    etat -> afficher_notes_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_pc_ope" ))				    etat -> afficher_pc_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_rappr_ope" ))				    etat -> afficher_rappr_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_infobd_ope" ))				    etat -> afficher_infobd_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_exo_ope" ))				    etat -> afficher_exo_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Class_ope" ))				    etat -> type_classement_ope = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_titres_col" ))				    etat -> afficher_titre_colonnes = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_titres_chgt" ))				    etat -> type_affichage_titres = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Pas_detail_ventil" ))				    etat -> pas_detailler_ventilation = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Sep_rev_dep" ))				    etat -> separer_revenus_depenses = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Devise_gen" ))				    etat -> devise_de_calcul_general = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Incl_tiers" ))				    etat -> inclure_dans_tiers = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Ope_click" ))				    etat -> ope_clickables = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Exo_date" ))				    etat -> exo_date = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Detail_exo" ))				    etat -> utilise_detail_exo = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "No_exo" )				     &&				     xmlNodeGetContent ( node_detail_etat ))				{				    gchar **pointeur_char;				    gint i;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 0 );				    i=0;				    while ( pointeur_char[i] )				    {					etat -> no_exercices = g_slist_append ( etat -> no_exercices,										GINT_TO_POINTER ( my_atoi ( pointeur_char[i] )));					i++;				    }				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name,					       "Plage_date" ))				    etat -> no_plage_date = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Date_debut" ) &&				     xmlNodeGetContent ( node_detail_etat ) &&				     (strlen(xmlNodeGetContent(node_detail_etat)) > 0 ))				{				    gchar **pointeur_char;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 3 );				    etat -> date_perso_debut = g_date_new_dmy ( my_atoi ( pointeur_char[0] ),										my_atoi ( pointeur_char[1] ),										my_atoi ( pointeur_char[2] ));				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name, "Date_fin" ) &&				     xmlNodeGetContent ( node_detail_etat ) &&				     (strlen(xmlNodeGetContent(node_detail_etat)) > 0 ))				{				    gchar **pointeur_char;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 3 );				    etat -> date_perso_fin = g_date_new_dmy ( my_atoi ( pointeur_char[0] ),									      my_atoi ( pointeur_char[1] ),									      my_atoi ( pointeur_char[2] ));				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name,					       "Utilise_plages" ))				    etat -> separation_par_plage = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Sep_plages" ))				    etat -> type_separation_plage = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Sep_exo" ))				    etat -> separation_par_exo = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Deb_sem_plages" ))				    etat -> jour_debut_semaine = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Detail_comptes" ))				    etat -> utilise_detail_comptes = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "No_comptes" )				     &&				     xmlNodeGetContent ( node_detail_etat ))				{				    gchar **pointeur_char;				    gint i;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 0 );				    i=0;				    while ( pointeur_char[i] )				    {					etat ->no_comptes  = g_slist_append ( etat -> no_comptes,									      GINT_TO_POINTER ( my_atoi ( pointeur_char[i] )));					i++;				    }				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name,					       "Grp_ope_compte" ))				    etat -> regroupe_ope_par_compte = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Total_compte" ))				    etat -> affiche_sous_total_compte = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_nom_compte" ))				    etat -> afficher_nom_compte = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Type_vir" ))				    etat -> type_virement = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "No_comptes_virements" )				     &&				     xmlNodeGetContent ( node_detail_etat ))				{				    gchar **pointeur_char;				    gint i;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 0 );				    i=0;				    while ( pointeur_char[i] )				    {					etat ->no_comptes_virements  = g_slist_append ( etat -> no_comptes_virements,											GINT_TO_POINTER ( my_atoi ( pointeur_char[i] )));					i++;				    }				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name,					       "Exclure_non_vir" ))				    etat -> exclure_ope_non_virement = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Categ" ))				    etat -> utilise_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Detail_categ" ))				    etat -> utilise_detail_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "No_categ" )				     &&				     xmlNodeGetContent ( node_detail_etat ))				{				    gchar **pointeur_char;				    gint i;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 0 );				    i=0;				    while ( pointeur_char[i] )				    {					etat -> no_categ = g_slist_append ( etat -> no_categ,									    GINT_TO_POINTER ( my_atoi ( pointeur_char[i] )));					i++;				    }				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name,					       "Exclut_categ" ))				    etat -> exclure_ope_sans_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Total_categ" ))				    etat -> affiche_sous_total_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_ss_categ" ))				    etat -> afficher_sous_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_pas_ss_categ" ))				    etat -> afficher_pas_de_sous_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Total_ss_categ" ))				    etat -> affiche_sous_total_sous_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Devise_categ" ))				    etat -> devise_de_calcul_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_nom_categ" ))				    etat -> afficher_nom_categ = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "IB" ))				    etat -> utilise_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Detail_ib" ))				    etat -> utilise_detail_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "No_ib" )				     &&				     xmlNodeGetContent ( node_detail_etat ))				{				    gchar **pointeur_char;				    gint i;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 0 );				    i=0;				    while ( pointeur_char[i] )				    {					etat -> no_ib = g_slist_append ( etat -> no_ib,									 GINT_TO_POINTER ( my_atoi ( pointeur_char[i] )));					i++;				    }				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name,					       "Exclut_ib" ))				    etat -> exclure_ope_sans_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Total_ib" ))				    etat -> affiche_sous_total_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_ss_ib" ))				    etat -> afficher_sous_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_pas_ss_ib" ))				    etat -> afficher_pas_de_sous_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Total_ss_ib" ))				    etat -> affiche_sous_total_sous_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Devise_ib" ))				    etat -> devise_de_calcul_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_nom_ib" ))				    etat -> afficher_nom_ib = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Tiers" ))				    etat -> utilise_tiers = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Detail_tiers" ))				    etat -> utilise_detail_tiers = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "No_tiers" )				     &&				     xmlNodeGetContent ( node_detail_etat ))				{				    gchar **pointeur_char;				    gint i;				    pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail_etat ),								 "/",								 0 );				    i=0;				    while ( pointeur_char[i] )				    {					etat -> no_tiers = g_slist_append ( etat -> no_tiers,									    GINT_TO_POINTER ( my_atoi ( pointeur_char[i] )));					i++;				    }				    g_strfreev ( pointeur_char );				}				if ( !strcmp ( node_detail_etat -> name,					       "Total_tiers" ))				    etat -> affiche_sous_total_tiers = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Devise_tiers" ))				    etat -> devise_de_calcul_tiers = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Aff_nom_tiers" ))				    etat -> afficher_nom_tiers = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Texte" ))				    etat -> utilise_texte = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Texte_comp" ))				{				    xmlNodePtr node_comp_textes;				    node_comp_textes = node_detail_etat -> children;				    /*  on fait le tour des comparaisons */				    while ( node_comp_textes )				    {					struct struct_comparaison_textes_etat *comp_textes;					comp_textes = calloc ( 1,							       sizeof ( struct struct_comparaison_textes_etat ));					if ( node_comp_textes -> type != XML_TEXT_NODE )					{					    comp_textes -> lien_struct_precedente = my_atoi ( xmlGetProp ( node_comp_textes,													   "Lien_struct" ));					    comp_textes -> champ = my_atoi ( xmlGetProp ( node_comp_textes,											  "Champ" ));					    comp_textes -> operateur = my_atoi ( xmlGetProp ( node_comp_textes,											      "Op" ));					    comp_textes -> texte = xmlGetProp ( node_comp_textes,										"Txt" );					    comp_textes -> utilise_txt = my_atoi ( xmlGetProp ( node_comp_textes,												"Util_txt" ));					    comp_textes -> comparateur_1 = my_atoi ( xmlGetProp ( node_comp_textes,												  "Comp_1" ));					    comp_textes -> lien_1_2 = my_atoi ( xmlGetProp ( node_comp_textes,											     "Lien_1_2" ));					    comp_textes -> comparateur_2 = my_atoi ( xmlGetProp ( node_comp_textes,												  "Comp_2" ));					    comp_textes -> montant_1 = my_atoi ( xmlGetProp ( node_comp_textes,											      "Mont_1" ));					    comp_textes -> montant_2 = my_atoi ( xmlGetProp ( node_comp_textes,											      "Mont_2" ));					    /* on a fini de remplir le détail de la comparaison, on l'ajoute à la liste */					    etat -> liste_struct_comparaison_textes = g_slist_append ( etat -> liste_struct_comparaison_textes,												       comp_textes );					}					node_comp_textes = node_comp_textes -> next;				    }				}				if ( !strcmp ( node_detail_etat -> name,					       "Montant" ))				    etat -> utilise_montant = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Montant_devise" ))				    etat -> choix_devise_montant = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Montant_comp" ))				{				    xmlNodePtr node_comp_montants;				    node_comp_montants = node_detail_etat -> children;				    /*  on fait le tour des comparaisons */				    while ( node_comp_montants )				    {					struct struct_comparaison_montants_etat *comp_montants;					comp_montants = calloc ( 1,								 sizeof ( struct struct_comparaison_montants_etat ));					if ( node_comp_montants -> type != XML_TEXT_NODE )					{					    comp_montants -> lien_struct_precedente = my_atoi ( xmlGetProp ( node_comp_montants,													     "Lien_struct" ));					    comp_montants -> comparateur_1 = my_atoi ( xmlGetProp ( node_comp_montants,												    "Comp_1" ));					    comp_montants -> lien_1_2 = my_atoi ( xmlGetProp ( node_comp_montants,											       "Lien_1_2" ));					    comp_montants -> comparateur_2 = my_atoi ( xmlGetProp ( node_comp_montants,												    "Comp_2" ));					    comp_montants -> montant_1 = my_strtod ( xmlGetProp ( node_comp_montants,												  "Mont_1" ),										     NULL );					    comp_montants -> montant_2 = my_strtod ( xmlGetProp ( node_comp_montants,												  "Mont_2" ),										     NULL );					    /* on a fini de remplir le détail de la comparaison, on l'ajoute à la liste */					    etat -> liste_struct_comparaison_montants = g_slist_append ( etat -> liste_struct_comparaison_montants,													 comp_montants );					}					node_comp_montants = node_comp_montants -> next;				    }				}				if ( !strcmp ( node_detail_etat -> name,					       "Excl_nul" ))				    etat -> exclure_montants_nuls = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Detail_mod_paie" ))				    etat -> utilise_mode_paiement = my_atoi ( xmlNodeGetContent ( node_detail_etat ));				if ( !strcmp ( node_detail_etat -> name,					       "Liste_mod_paie" ))				{				    xmlNodePtr node_mode_paiement;				    node_mode_paiement = node_detail_etat -> children;				    /*  on fait le tour des modes de paiement */				    while ( node_mode_paiement )				    {					if ( node_mode_paiement -> type != XML_TEXT_NODE )					    etat -> noms_modes_paiement = g_slist_append ( etat -> noms_modes_paiement,											   xmlGetProp ( node_mode_paiement,													"Nom" ));					node_mode_paiement = node_mode_paiement -> next;				    }				}			    }			    node_detail_etat = node_detail_etat -> next;			}			/* on a fini de remplir l'état, on l'ajoute à la liste */			liste_struct_etats = g_slist_append ( liste_struct_etats, etat );		    }		    node_detail = node_detail -> next;		}	    }	}	node_etats = node_etats -> next;    }    return TRUE;}