rem: devise -> passage_euro = atoi ( xmlGetProp ( node_detail, "Passage_euro" ));  if ( strlen ( xmlGetProp ( node_detail, "Date_dernier_change" )))
add: devise -> passage_euro = atoi ( latin2utf8(xmlGetProp ( node_detail, "Passage_euro" )));  if ( strlen ( latin2utf8(xmlGetProp ( node_detail, "Date_dernier_change" ))))
context: gboolean charge_operations_version_0_3_2 ( xmlDocPtr doc ){  xmlNodePtr node_1;  gint i;  gchar *nom_sauvegarde;  xmlNodePtr root = xmlDocGetRootElement(doc);  etat.en_train_de_charger = 1;  /* on copie le fichier en ajoutant l'extension 0_3_3 et on met message d'avertissement */  nom_sauvegarde = g_strconcat ( nom_fichier_comptes,				 "_version_0_3_3",				 NULL );  system ( g_strdup_printf ( "cp %s %s",			     nom_fichier_comptes,			     nom_sauvegarde ));  dialogue ( g_strdup_printf ( _("Warning: Grisbi data format has changed. Grisbi made a backup of your file\nnamed %s. \nKeep it for a while just in case."),			       nom_sauvegarde ));  /* on place node_1 sur les gnralits */  node_1 = root -> childs;  /*   on met en place la boucle de node_1, qui va successivement passer */  /*     par les gnralits, les comptes, les chances ... */  while ( node_1 )    {      /* on rcupre ici les gnralits */      if ( !strcmp ( node_1 -> name,		     "Gnralits" ) )	{	  xmlNodePtr node_generalites;	  /* node_generalites va faire le tour des gnralits */	  node_generalites = node_1 -> childs;	  while ( node_generalites )	    {	      /* FIXME: One day, put a non-word there.  Rationale:		 i10nizing this would break things and using French or		 even English is not an option for foreigners.  Btw,		 we should not rely on a French oritented file		 format.  [benj] */	      if ( !strcmp ( node_generalites -> name,			     "Fichier_ouvert" ))		if ( (etat.fichier_deja_ouvert  = atoi ( xmlNodeGetContent ( node_generalites ))))		  {		    if ( etat.force_enregistrement )		      dialogue ( _("Warning: either this file is already opened by another user or it wasn't closed correctly (maybe Grisbi crashed?).\n\nGrisbi will however overwrite the file.  We advise you not to use this option except if you know exactly what you are doing (i.e. nobody else uses this file for the moment).\n\nYou can deactivate this option in the setup.") );		    else		      dialogue ( _("Warning: either this file is already opened by another user or it wasn't closed correctly (maybe Grisbi crashed?).\nGrisbi can't save the file unless you activate the \"Force saving\" \noption in the setup.") );		  }	    	      if ( !strcmp ( node_generalites -> name,			     "Backup" ))		nom_fichier_backup = xmlNodeGetContent ( node_generalites );	      if ( !strcmp ( node_generalites -> name,			     "Titre" ))		titre_fichier = xmlNodeGetContent ( node_generalites );	      if ( !strcmp ( node_generalites -> name,			     "Adresse_commune" ))		adresse_commune	= xmlNodeGetContent ( node_generalites );	      if ( !strcmp ( node_generalites -> name,			     "Utilise_exercices" ))		etat.utilise_exercice = atoi ( xmlNodeGetContent ( node_generalites ));	      if ( !strcmp ( node_generalites -> name,			     "Utilise_IB" ))		etat.utilise_imputation_budgetaire = atoi ( xmlNodeGetContent ( node_generalites ));	      if ( !strcmp ( node_generalites -> name,			     "Utilise_PC" ))		etat.utilise_piece_comptable = atoi ( xmlNodeGetContent ( node_generalites ));	      if ( !strcmp ( node_generalites -> name,			     "Utilise_info_BG" ))		etat.utilise_info_banque_guichet = atoi ( xmlNodeGetContent ( node_generalites ));	      if ( !strcmp ( node_generalites -> name,			     "Numro_devise_totaux_tiers" ))		no_devise_totaux_tiers = atoi ( xmlNodeGetContent ( node_generalites ));	      if ( !strcmp ( node_generalites -> name,			     "Type_affichage_des_chances" ))		affichage_echeances = atoi ( xmlNodeGetContent ( node_generalites ));	      if ( !strcmp ( node_generalites -> name,			     "Affichage_echeances_perso_nb_libre" ))		affichage_echeances_perso_nb_libre = atoi ( xmlNodeGetContent ( node_generalites ));	      if ( !strcmp ( node_generalites -> name,			     "Type_affichage_perso_echeances" ))		affichage_echeances_perso_j_m_a = atoi ( xmlNodeGetContent ( node_generalites ));	      if ( !strcmp ( node_generalites -> name,			     "Numro_derniere_operation" ))		no_derniere_operation= atoi ( xmlNodeGetContent ( node_generalites ));	      node_generalites = node_generalites -> next;	    }	}      /* on rcupre ici les comptes et oprations */      if ( !strcmp ( node_1 -> name,		     "Comptes" ))	{	  xmlNodePtr node_comptes;	  /* node_comptes va faire le tour de l'arborescence des comptes */	  node_comptes = node_1 -> childs;	  while ( node_comptes )	    {	      /* on va rcuprer ici les gnralits des comptes */	      	      if ( !strcmp ( node_comptes -> name,			     "Gnralits" ))		{		xmlNodePtr node_generalites;		node_generalites = node_comptes -> childs;		while ( node_generalites )		  {		    /* rcupre l'ordre des comptes */		    if ( !strcmp ( node_generalites -> name,				   "Ordre_des_comptes" ))		      {			gchar **pointeur_char;			pointeur_char = g_strsplit ( xmlNodeGetContent ( node_generalites ),						     "-",						     0 );			i = 0;			ordre_comptes = NULL;			while ( pointeur_char[i] )			  {			    ordre_comptes = g_slist_append ( ordre_comptes,							     GINT_TO_POINTER ( atoi ( pointeur_char[i] )));			    i++;			  }			g_strfreev ( pointeur_char );			/* calcule le nb de comptes */			nb_comptes = g_slist_length ( ordre_comptes );			/* Cration du tableau de pointeur vers les structures de comptes */			p_tab_nom_de_compte = malloc ( nb_comptes * sizeof ( gpointer ));			p_tab_nom_de_compte_variable = p_tab_nom_de_compte;		      }		    /* rcupre le compte courant */		    if ( !strcmp ( node_generalites -> name,				   "Compte_courant" ))		      {			compte_courant = atoi ( xmlNodeGetContent ( node_generalites ));			p_tab_nom_de_compte_courant = p_tab_nom_de_compte + compte_courant;		      }		    node_generalites = node_generalites -> next;		  }	      }	    		/* on rcupre les dtails de chaque compte */	      if ( !strcmp ( node_comptes -> name,			     "Compte" ))	      {		xmlNodePtr node_nom_comptes;		/* normalement p_tab_nom_de_compte_variable est dj plac */		/* on cre la structure du compte */		*p_tab_nom_de_compte_variable = calloc ( 1,							 sizeof (struct donnees_compte));		/* les valeurs AFFICHAGE_R et NB_LIGNES_OPE par dfaut */		AFFICHAGE_R = 0;		NB_LIGNES_OPE = 3;		/* on fait le tour dans l'arbre nom, cad : les dtails, dtails de type et dtails des oprations */		node_nom_comptes = node_comptes -> childs;		while ( node_nom_comptes )		  {		    /* on rcupre les dtails du compte */		    if ( !strcmp ( node_nom_comptes -> name,				   "Dtails" ))		    {		      xmlNodePtr node_detail;		      node_detail = node_nom_comptes -> childs;		      while ( node_detail )			{			  if ( !strcmp ( node_detail -> name,					 "Nom" ))			       NOM_DU_COMPTE = xmlNodeGetContent ( node_detail );			  if ( !strcmp ( node_detail -> name,					 "No_de_compte" ))			    NO_COMPTE = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Titulaire" ))			   TITULAIRE = xmlNodeGetContent ( node_detail );			  if ( !strcmp ( node_detail -> name,					 "Type_de_compte" ))			   TYPE_DE_COMPTE = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Nb_oprations" ))			   NB_OPE_COMPTE = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Devise" ))			   DEVISE = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Banque" ))			   BANQUE = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Guichet" ))			   NO_GUICHET = xmlNodeGetContent ( node_detail );			  if ( !strcmp ( node_detail -> name,					 "No_compte_banque" ))			   NO_COMPTE_BANQUE = xmlNodeGetContent ( node_detail );			  if ( !strcmp ( node_detail -> name,					 "Cl_du_compte" ))			   CLE_COMPTE = xmlNodeGetContent ( node_detail );			  if ( !strcmp ( node_detail -> name,					 "Solde_initial" ))			   SOLDE_INIT = g_strtod ( xmlNodeGetContent ( node_detail ),						   NULL );			  if ( !strcmp ( node_detail -> name,					 "Solde_mini_voulu" ))			   SOLDE_MINI_VOULU = g_strtod ( xmlNodeGetContent ( node_detail ),							 NULL );			  if ( !strcmp ( node_detail -> name,					 "Solde_mini_autoris" ))			   SOLDE_MINI = g_strtod ( xmlNodeGetContent ( node_detail ),						   NULL );			  if ( !strcmp ( node_detail -> name,					 "Solde_courant" ))			   SOLDE_COURANT = g_strtod ( xmlNodeGetContent ( node_detail ),						      NULL );			  if ( !strcmp ( node_detail -> name,					 "Date_dernier_relev" ))			    {			      gchar **pointeur_char;			      if ( xmlNodeGetContent ( node_detail ))				{				  pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail ),							       "/",							       3 );				  DATE_DERNIER_RELEVE = g_date_new_dmy ( atoi ( pointeur_char [0] ),									 atoi ( pointeur_char [1] ),									 atoi ( pointeur_char [2] ));				  g_strfreev ( pointeur_char );				}			    }			  if ( !strcmp ( node_detail -> name,					 "Solde_dernier_relev" ))			   SOLDE_DERNIER_RELEVE = g_strtod ( xmlNodeGetContent ( node_detail ),							     NULL );			  if ( !strcmp ( node_detail -> name,					 "Dernier_no_de_rapprochement" ))			   DERNIER_NO_RAPPROCHEMENT = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Compte_clotur" ))			   COMPTE_CLOTURE = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Commentaires" ))			   COMMENTAIRE = xmlNodeGetContent ( node_detail );			  if ( !strcmp ( node_detail -> name,					 "Adresse_du_titulaire" ))			   ADRESSE_TITULAIRE = xmlNodeGetContent ( node_detail );			  if ( !strcmp ( node_detail -> name,					 "Type_dfaut_dbit" ))			   TYPE_DEFAUT_DEBIT = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Type_dfaut_crdit" ))			   TYPE_DEFAUT_CREDIT = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Tri_par_type" ))			   TRI = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Neutres_inclus" ))			   NEUTRES_INCLUS = atoi ( xmlNodeGetContent ( node_detail ));			  if ( !strcmp ( node_detail -> name,					 "Ordre_du_tri" ))			    {			      LISTE_TRI = NULL;			      if ( xmlNodeGetContent ( node_detail ))				{				  gchar **pointeur_char;				  pointeur_char = g_strsplit ( xmlNodeGetContent ( node_detail ),							       "/",							       0 );				  i = 0;				  while ( pointeur_char[i] )				    {				      LISTE_TRI = g_slist_append ( LISTE_TRI,								   GINT_TO_POINTER ( atoi ( pointeur_char[i] )));				      i++;				    }				  g_strfreev ( pointeur_char );				}			    }			  node_detail = node_detail -> next;			}		    }		  		    /* dans certains cas d'import qif, le nom du compte peut tre nul */		    /* dans ce cas le met  "" */		    if ( !NOM_DU_COMPTE )		      NOM_DU_COMPTE = g_strdup ( "" );		    /* on rcupre ici le dtail des types */		    if ( !strcmp ( node_nom_comptes -> name,				   "Dtail_de_Types" ))		    {		      xmlNodePtr node_type;		      node_type = node_nom_comptes -> childs;		      TYPES_OPES = NULL;		      while ( node_type )			{			  struct struct_type_ope *type;			  type = calloc ( 1,					  sizeof ( struct struct_type_ope ));			  type -> no_type = atoi ( xmlGetProp ( node_type,								"No" ));			  type -> nom_type = xmlGetProp ( node_type,							  "Nom" );			  type -> signe_type = atoi ( xmlGetProp ( node_type,								   "Signe" ));			  type -> affiche_entree = atoi ( xmlGetProp ( node_type,								       "Affiche_entree" ));			  type -> numerotation_auto = atoi ( xmlGetProp ( node_type,									  "Numrotation_auto" ));			  type -> no_en_cours = atoi ( xmlGetProp ( node_type,								    "No_en_cours" ));			  type -> no_compte = NO_COMPTE;			  TYPES_OPES = g_slist_append ( TYPES_OPES,							type );			  node_type = node_type -> next;			}		    }		    /* on rcupre ici le dtail des ops */		    if ( !strcmp ( node_nom_comptes -> name,				   "Dtail_des_oprations" ))		      {		      xmlNodePtr node_ope;		      node_ope = node_nom_comptes -> childs;		      LISTE_OPERATIONS = NULL;		      while ( node_ope )			{			  struct structure_operation *operation;			  gchar **pointeur_char;			  gchar *pointeur;			  operation = calloc ( 1,					       sizeof (struct structure_operation ));			  operation -> no_operation = atoi ( xmlGetProp ( node_ope,							      "No" ));			  pointeur_char = g_strsplit ( xmlGetProp ( node_ope ,								    "D" ),						       "/",						       3 );			  operation -> jour = atoi ( pointeur_char[0] );			  operation -> mois = atoi ( pointeur_char[1] );			  operation -> annee = atoi ( pointeur_char[2] );			  operation -> date = g_date_new_dmy ( operation -> jour,							       operation -> mois,							       operation -> annee );			  g_strfreev ( pointeur_char );			  /* GDC prise en compte de la lecture de la date bancaire */			  pointeur = xmlGetProp ( node_ope,						  "Db" );			  if ( pointeur )			    {			      pointeur_char = g_strsplit ( pointeur,							   "/",							   3 );			      operation -> jour_bancaire = atoi ( pointeur_char[0] );			      operation -> mois_bancaire = atoi ( pointeur_char[1] );			      operation -> annee_bancaire = atoi ( pointeur_char[2] );			      if ( operation -> jour_bancaire )				operation -> date_bancaire = g_date_new_dmy ( operation -> jour_bancaire,									      operation -> mois_bancaire,									      operation -> annee_bancaire );			      else				operation -> date_bancaire = NULL;			      g_strfreev ( pointeur_char );			    }			  else			    {			      operation -> jour_bancaire = 0;			      operation -> mois_bancaire = 0;			      operation -> annee_bancaire = 0;			      operation -> date_bancaire = NULL;			    }			  			  /* GDCFin */			  operation -> montant = g_strtod ( xmlGetProp ( node_ope,									 "M" ),							    NULL );			  operation -> devise = atoi ( xmlGetProp ( node_ope,								    "De" ));			  operation -> une_devise_compte_egale_x_devise_ope = atoi ( xmlGetProp ( node_ope,												  "Rdc" ));			  operation -> taux_change = g_strtod ( xmlGetProp ( node_ope,									     "Tc" ),								NULL );			  operation -> frais_change = g_strtod ( xmlGetProp ( node_ope,									      "Fc" ),								 NULL );			  operation -> tiers = atoi ( xmlGetProp ( node_ope,								   "T" ));			  operation -> categorie = atoi ( xmlGetProp ( node_ope,								       "C" ));			  operation -> sous_categorie = atoi ( xmlGetProp ( node_ope,									    "Sc" ));			  operation -> operation_ventilee = atoi ( xmlGetProp ( node_ope,										"Ov" ));			  operation -> notes = xmlGetProp ( node_ope,							    "N" );			  if ( !strlen ( operation -> notes ))			    operation -> notes = NULL;			  operation -> type_ope = atoi ( xmlGetProp ( node_ope,								      "Ty" ));			  operation -> contenu_type = xmlGetProp ( node_ope,								   "Ct" );			  if ( !strlen ( operation -> contenu_type ))			    operation -> contenu_type = NULL;			  operation -> pointe = atoi ( xmlGetProp ( node_ope,								    "P" ));			  operation -> auto_man = atoi ( xmlGetProp ( node_ope,								      "A" ));			  operation -> no_rapprochement = atoi ( xmlGetProp ( node_ope,									      "R" ));			  operation -> no_exercice = atoi ( xmlGetProp ( node_ope,									 "E" ));			  operation -> imputation = atoi ( xmlGetProp ( node_ope,									"I" ));			  operation -> sous_imputation = atoi ( xmlGetProp ( node_ope,									     "Si" ));			  operation -> no_piece_comptable = xmlGetProp ( node_ope,									 "Pc" );			  if ( !strlen ( operation -> no_piece_comptable ))			    operation -> no_piece_comptable = NULL;			  operation -> info_banque_guichet = xmlGetProp ( node_ope,									  "Ibg" );			  if ( !strlen ( operation -> info_banque_guichet ))			    operation -> info_banque_guichet = NULL;			  operation -> relation_no_operation = atoi ( xmlGetProp ( node_ope,										   "Ro" ));			  operation -> relation_no_compte = atoi ( xmlGetProp ( node_ope,										"Rc" ));			  operation -> no_operation_ventilee_associee = atoi ( xmlGetProp ( node_ope,											    "Va" ));			  /* on met le compte associ */			  			  operation -> no_compte = NO_COMPTE;			  LISTE_OPERATIONS = g_slist_append ( LISTE_OPERATIONS,							      operation);			  node_ope = node_ope -> next;			}		    }		    node_nom_comptes = node_nom_comptes -> next;		  }		/* 		    le compte est fini, on peut mettre  jour qques variables */		if ( SOLDE_COURANT < SOLDE_MINI_VOULU )		  MESSAGE_SOUS_MINI_VOULU = 1;		else		  MESSAGE_SOUS_MINI_VOULU = 0;		if ( SOLDE_COURANT < SOLDE_MINI )		  MESSAGE_SOUS_MINI = 1;		else		  MESSAGE_SOUS_MINI = 0;		/*       la slection au dpart est en bas de la liste */		OPERATION_SELECTIONNEE = GINT_TO_POINTER ( -1 );		/* on incrmente p_tab_nom_de_compte_variable pour le compte suivant */		p_tab_nom_de_compte_variable++;	      }	      	      node_comptes = node_comptes -> next;	    }	}	      /* on rcupre ici les chances */      if ( !strcmp ( node_1 -> name,		     "chances" ))	{	  xmlNodePtr node_echeances;	  /* node_echeances va faire le tour de l'arborescence des chances */	  node_echeances = node_1 -> childs;	  while ( node_echeances )	    {	      /* on va rcuprer ici les gnralits des chances */	      if ( !strcmp ( node_echeances -> name,			     "Gnralits" ))		{		  xmlNodePtr node_generalites;		  node_generalites = node_echeances -> childs;		  while ( node_generalites )		    {		      if ( !strcmp ( node_generalites -> name,				     "Nb_chances" ))			nb_echeances = atoi ( xmlNodeGetContent ( node_generalites ));		      if ( !strcmp ( node_generalites -> name,				     "No_dernire_chance" ))			no_derniere_echeance = atoi ( xmlNodeGetContent ( node_generalites ));			node_generalites = node_generalites -> next;		    }		}	      /* on va rcuprer ici les chances */	      	      if ( !strcmp ( node_echeances -> name,			     "Dtail_des_chances" ))		{		  xmlNodePtr node_detail;		  gsliste_echeances = NULL;		  node_detail = node_echeances -> childs;		  while ( node_detail )		    {		      struct operation_echeance *operation_echeance;		      gchar **pointeur_char;		      operation_echeance = calloc ( 1,						    sizeof (struct operation_echeance ));		      operation_echeance -> no_operation = atoi ( xmlGetProp ( node_detail,								      "No" ));		      pointeur_char = g_strsplit ( xmlGetProp ( node_detail ,								"Date" ),						   "/",						   3 );		      operation_echeance -> jour = atoi ( pointeur_char[0] );		      operation_echeance -> mois = atoi ( pointeur_char[1] );		      operation_echeance -> annee = atoi ( pointeur_char[2] );		      operation_echeance -> date = g_date_new_dmy ( operation_echeance -> jour,								    operation_echeance -> mois,								    operation_echeance -> annee );		      g_strfreev ( pointeur_char );		      operation_echeance -> compte = atoi ( xmlGetProp ( node_detail,								      "Compte" ));		      operation_echeance -> montant = g_strtod ( xmlGetProp ( node_detail,									      "Montant" ),								 NULL );		      operation_echeance -> devise = atoi ( xmlGetProp ( node_detail,									 "Devise" ));		      operation_echeance -> tiers = atoi ( xmlGetProp ( node_detail,									"Tiers" ));		      operation_echeance -> categorie = atoi ( xmlGetProp ( node_detail,								      "Catgorie" ));		      operation_echeance -> sous_categorie = atoi ( xmlGetProp ( node_detail,								      "Sous-catgorie" ));		      operation_echeance -> compte_virement = atoi ( xmlGetProp ( node_detail,								      "Virement_compte" ));		      operation_echeance -> type_ope = atoi ( xmlGetProp ( node_detail,								      "Type" ));		      operation_echeance -> contenu_type = xmlGetProp ( node_detail,							    "Contenu_du_type" );		      if ( !strlen ( operation_echeance -> contenu_type ))			operation_echeance -> contenu_type = NULL;		      operation_echeance -> no_exercice = atoi ( xmlGetProp ( node_detail,								      "Exercice" ));		      operation_echeance -> imputation = atoi ( xmlGetProp ( node_detail,								      "Imputation" ));		      operation_echeance -> sous_imputation = atoi ( xmlGetProp ( node_detail,								      "Sous-imputation" ));		      operation_echeance -> notes = xmlGetProp ( node_detail,								      "Notes" );		      if ( !strlen ( operation_echeance -> notes ))			operation_echeance -> notes = NULL;		      operation_echeance -> auto_man = atoi ( xmlGetProp ( node_detail,								      "Automatique" ));		      operation_echeance -> periodicite = atoi ( xmlGetProp ( node_detail,								      "Priodicit" ));		      operation_echeance -> intervalle_periodicite_personnalisee = atoi ( xmlGetProp ( node_detail,								      "Intervalle_priodicit" ));		      operation_echeance -> periodicite_personnalisee = atoi ( xmlGetProp ( node_detail,								      "Priodicit_personnalise" ));		      if ( strlen ( xmlGetProp ( node_detail ,						 "Date_limite" )))			{			  pointeur_char = g_strsplit ( xmlGetProp ( node_detail ,								    "Date_limite" ),						       "/",						       3 );			  operation_echeance -> jour_limite = atoi ( pointeur_char[0] );			  operation_echeance -> mois_limite = atoi ( pointeur_char[1] );			  operation_echeance -> annee_limite = atoi ( pointeur_char[2] );			  operation_echeance -> date_limite = g_date_new_dmy ( operation_echeance -> jour_limite,									       operation_echeance -> mois_limite,									       operation_echeance -> annee_limite );			  g_strfreev ( pointeur_char );			}		      else			{			  operation_echeance -> jour_limite = 0;			  operation_echeance -> mois_limite = 0;			  operation_echeance -> annee_limite = 0;			  operation_echeance -> date_limite = NULL;			}		      gsliste_echeances = g_slist_append ( gsliste_echeances,							   operation_echeance);		      node_detail = node_detail -> next;		    }		}	      node_echeances = node_echeances -> next;	    }	}	      /* on rcupre ici les tiers */      if ( !strcmp ( node_1 -> name,		     "Tiers" ))	{	  xmlNodePtr node_tiers;	  /* node_tiers va faire le tour de l'arborescence des tiers */	  node_tiers = node_1 -> childs;	  while ( node_tiers )	    {	      /* on va rcuprer ici les gnralits des tiers */	      	      if ( !strcmp ( node_tiers -> name,			     "Gnralits" ))		{		  xmlNodePtr node_generalites;		  node_generalites = node_tiers -> childs;		  while ( node_generalites )		    {		      if ( !strcmp ( node_generalites -> name,				     "Nb_tiers" ))			nb_enregistrements_tiers = atoi ( xmlNodeGetContent ( node_generalites ));		      if ( !strcmp ( node_generalites -> name,				     "No_dernier_tiers" ))			no_dernier_tiers = atoi ( xmlNodeGetContent ( node_generalites ));			node_generalites = node_generalites -> next;		    }		}	      /* on va rcuprer ici les tiers */	      	      if ( !strcmp ( node_tiers -> name,			     "Dtail_des_tiers" ))		{		  xmlNodePtr node_detail;		  liste_struct_tiers = NULL;		  node_detail = node_tiers -> childs;		  while ( node_detail )		    {		      struct struct_tiers *tiers;		      tiers = calloc ( 1,				       sizeof ( struct struct_tiers ) );		      tiers -> no_tiers = atoi ( xmlGetProp ( node_detail,							      "No" ));		      tiers -> nom_tiers = xmlGetProp ( node_detail,							"Nom" );		      tiers -> texte = xmlGetProp ( node_detail,						    "Informations" );		      if ( !strlen ( tiers -> texte ))			tiers -> texte = NULL;		      tiers -> liaison = atoi ( xmlGetProp ( node_detail,							     "Liaison" ));		      		      liste_struct_tiers = g_slist_append ( liste_struct_tiers,							    tiers );		      node_detail = node_detail -> next;		    }		}	      node_tiers = node_tiers -> next;	    }	}	      /* on rcupre ici les catgories */      if ( !strcmp ( node_1 -> name,		     "Catgories" ))	{	  xmlNodePtr node_categories;	  /* node_categories va faire le tour de l'arborescence des catgories */	  node_categories = node_1 -> childs;	  while ( node_categories )	    {	      /* on va rcuprer ici les gnralits des catgories */	      	      if ( !strcmp ( node_categories -> name,			     "Gnralits" ))		{		  xmlNodePtr node_generalites;		  node_generalites = node_categories -> childs;		  while ( node_generalites )		    {		      if ( !strcmp ( node_generalites -> name,				     "Nb_catgories" ))			nb_enregistrements_categories = atoi ( xmlNodeGetContent ( node_generalites ));		      if ( !strcmp ( node_generalites -> name,				     "No_dernire_catgorie" ))			no_derniere_categorie = atoi ( xmlNodeGetContent ( node_generalites ));			node_generalites = node_generalites -> next;		    }		}	      /* on va rcuprer ici les catgories */	      	      if ( !strcmp ( node_categories -> name,			     "Dtail_des_catgories" ))		{		  xmlNodePtr node_detail;		  liste_struct_categories = NULL;		  node_detail = node_categories -> childs;		  while ( node_detail )		    {		      struct struct_categ *categorie;		      xmlNodePtr node_sous_categ;		      		      categorie = calloc ( 1,					   sizeof ( struct struct_categ ) );		      categorie -> no_categ = atoi ( xmlGetProp ( node_detail,								  "No" ));		      categorie -> nom_categ = xmlGetProp ( node_detail,							    "Nom" );		      categorie -> type_categ = atoi ( xmlGetProp ( node_detail,								    "Type" ));		      categorie -> no_derniere_sous_categ = atoi ( xmlGetProp ( node_detail,										"No_dernire_sous_caggorie" ));		      /*  pour chaque catgorie, on rcupre les sous-catgories */		      categorie -> liste_sous_categ = NULL;		      node_sous_categ = node_detail -> childs;		      while ( node_sous_categ )			{			  struct struct_sous_categ *sous_categ;			  sous_categ = calloc ( 1,						sizeof ( struct struct_sous_categ ) );			  sous_categ -> no_sous_categ = atoi ( xmlGetProp ( node_sous_categ,									    "No" ));			  sous_categ -> nom_sous_categ = xmlGetProp ( node_sous_categ,									     "Nom" );			  categorie -> liste_sous_categ = g_slist_append ( categorie -> liste_sous_categ,									   sous_categ );			  node_sous_categ = node_sous_categ -> next;			}		      liste_struct_categories = g_slist_append ( liste_struct_categories,								 categorie );		      node_detail = node_detail -> next;		    }		}	      node_categories = node_categories -> next;	    }	  /* cration de la liste des catg pour le combofix */	  creation_liste_categ_combofix ();	}	      /* on rcupre ici les imputations */      if ( !strcmp ( node_1 -> name,		     "Imputations" ))	{	  xmlNodePtr node_imputations;	  /* node_imputations va faire le tour de l'arborescence des imputations */	  node_imputations = node_1 -> childs;	  while ( node_imputations )	    {	      /* on va rcuprer ici les gnralits des imputations */	      	      if ( !strcmp ( node_imputations -> name,			     "Gnralits" ))		{		  xmlNodePtr node_generalites;		  node_generalites = node_imputations -> childs;		  while ( node_generalites )		    {		      if ( !strcmp ( node_generalites -> name,				     "Nb_imputations" ))			nb_enregistrements_imputations = atoi ( xmlNodeGetContent ( node_generalites ));		      if ( !strcmp ( node_generalites -> name,				     "No_dernire_imputation" ))			no_derniere_imputation = atoi ( xmlNodeGetContent ( node_generalites ));			node_generalites = node_generalites -> next;		    }		}	      /* on va rcuprer ici les imputations */	      	      if ( !strcmp ( node_imputations -> name,			     "Dtail_des_imputations" ))		{		  xmlNodePtr node_detail;		  liste_struct_imputation = NULL;		  node_detail = node_imputations -> childs;		  while ( node_detail )		    {		      struct struct_imputation *imputation;		      xmlNodePtr node_sous_imputation;		      		      imputation = calloc ( 1,					    sizeof ( struct struct_imputation ) );		      imputation -> no_imputation = atoi ( xmlGetProp ( node_detail,								  "No" ));		      imputation -> nom_imputation = xmlGetProp ( node_detail,							    "Nom" );		      imputation -> type_imputation = atoi ( xmlGetProp ( node_detail,								    "Type" ));		      imputation -> no_derniere_sous_imputation = atoi ( xmlGetProp ( node_detail,										"No_dernire_sous_imputation" ));		      /*  pour chaque catgorie, on rcupre les sous-catgories */		      imputation -> liste_sous_imputation = NULL;		      node_sous_imputation = node_detail -> childs;		      while ( node_sous_imputation )			{			  struct struct_sous_imputation *sous_imputation;			  sous_imputation = calloc ( 1,						     sizeof ( struct struct_sous_imputation ) );			  sous_imputation -> no_sous_imputation = atoi ( xmlGetProp ( node_sous_imputation,									    "No" ));			  sous_imputation -> nom_sous_imputation = xmlGetProp ( node_sous_imputation,									     "Nom" );			  imputation -> liste_sous_imputation = g_slist_append ( imputation -> liste_sous_imputation,									   sous_imputation );			  node_sous_imputation = node_sous_imputation -> next;			}		      liste_struct_imputation = g_slist_append ( liste_struct_imputation,								 imputation );		      node_detail = node_detail -> next;		    }		}	      node_imputations = node_imputations -> next;	    }	  /* cration de la liste des imputations pour le combofix */	  creation_liste_imputation_combofix ();	}	      /* on rcupre ici les devises */      if ( !strcmp ( node_1 -> name,		     "Devises" ))	{	  xmlNodePtr node_devises;	  /* node_devises va faire le tour de l'arborescence des devises */	  node_devises = node_1 -> childs;	  while ( node_devises )	    {	      /* on va rcuprer ici les gnralits des devises */	      	      if ( !strcmp ( node_devises -> name,			     "Gnralits" ))		{		  xmlNodePtr node_generalites;		  node_generalites = node_devises -> childs;		  while ( node_generalites )		    {		      if ( !strcmp ( node_generalites -> name,				     "Nb_devises" ))			nb_devises = atoi ( xmlNodeGetContent ( node_generalites ));		      if ( !strcmp ( node_generalites -> name,				     "No_dernire_devise" ))			no_derniere_devise = atoi ( xmlNodeGetContent ( node_generalites ));			node_generalites = node_generalites -> next;		    }		}	      /* on va rcuprer ici les devises */	      if ( !strcmp ( node_devises -> name,			     "Dtail_des_devises" ))		{		  xmlNodePtr node_detail;		  liste_struct_devises = NULL;		  node_detail = node_devises -> childs;		  while ( node_detail )		    {		      struct struct_devise *devise;		      		      devise = calloc ( 1,						     sizeof ( struct struct_devise ));		      devise -> no_devise = atoi ( xmlGetProp ( node_detail,						 "No" ));		      devise -> nom_devise = xmlGetProp ( node_detail,						 "Nom" );		      devise -> code_devise = xmlGetProp ( node_detail,						 "Code" );		      if ( !strlen ( devise -> code_devise ))			devise -> code_devise = NULL;		      /* Handle Euro nicely */		      if (! strcmp (devise -> code_devise, "E"))			{			  devise -> code_devise = "€";			}		      devise -> passage_euro = atoi ( xmlGetProp ( node_detail,						 "Passage_euro" ));		      if ( strlen ( xmlGetProp ( node_detail,						 "Date_dernier_change" )))			{			  gchar **pointeur_char;			  pointeur_char = g_strsplit ( xmlGetProp ( node_detail,								    "Date_dernier_change" ),						       "/",						       3 );			  devise -> date_dernier_change = g_date_new_dmy ( atoi ( pointeur_char[0] ),									   atoi ( pointeur_char[1] ),									   atoi ( pointeur_char[2] ));			  g_strfreev ( pointeur_char );			}		      else			devise -> date_dernier_change = NULL;		      devise -> une_devise_1_egale_x_devise_2 = atoi ( xmlGetProp ( node_detail,						 "Rapport_entre_devises" ));		      devise -> no_devise_en_rapport = atoi ( xmlGetProp ( node_detail,						 "Devise_en_rapport" ));		      devise -> change = g_strtod ( xmlGetProp ( node_detail,								 "Change" ),						    NULL );		      liste_struct_devises = g_slist_append ( liste_struct_devises,							      devise );		      node_detail = node_detail -> next;		    }		}	      node_devises = node_devises -> next;	    }	}	      /* on rcupre ici les banques */      if ( !strcmp ( node_1 -> name,		     "Banques" ))	{	  xmlNodePtr node_banques;	  /* node_banques va faire le tour de l'arborescence des banques */	  node_banques = node_1 -> childs;	  while ( node_banques )	    {	      /* on va rcuprer ici les gnralits des banques */	      	      if ( !strcmp ( node_banques -> name,			     "Gnralits" ))		{		  xmlNodePtr node_generalites;		  node_generalites = node_banques -> childs;		  while ( node_generalites )		    {		      if ( !strcmp ( node_generalites -> name,				     "Nb_banques" ))			nb_banques = atoi ( xmlNodeGetContent ( node_generalites ));		      if ( !strcmp ( node_generalites -> name,				     "No_dernire_banque" ))			no_derniere_banque = atoi ( xmlNodeGetContent ( node_generalites ));			node_generalites = node_generalites -> next;		    }		}	      /* on va rcuprer ici les banques */	      	      if ( !strcmp ( node_banques -> name,			     "Dtail_des_banques" ))		{		  xmlNodePtr node_detail;		  liste_struct_banques = NULL;		  node_detail = node_banques -> childs;		  while ( node_detail )		    {		      struct struct_banque *banque;		      		      banque = calloc ( 1,						     sizeof ( struct struct_banque ));		      banque -> no_banque = atoi ( xmlGetProp ( node_detail,						 "No" ));		      banque -> nom_banque = xmlGetProp ( node_detail,						 "Nom" );		      banque -> code_banque = xmlGetProp ( node_detail,						 "Code" );		      if ( !strlen ( banque -> code_banque ))			banque -> code_banque = NULL;		      banque -> adr_banque = xmlGetProp ( node_detail,						 "Adresse" );		      if ( !strlen ( banque -> adr_banque ))			banque -> adr_banque = NULL;		      banque -> tel_banque = xmlGetProp ( node_detail,						 "Tl" );		      if ( !strlen ( banque -> tel_banque ))			banque -> tel_banque = NULL;		      banque -> email_banque = xmlGetProp ( node_detail,						 "Mail" );		      if ( !strlen ( banque -> email_banque ))			banque -> email_banque = NULL;		      banque -> web_banque = xmlGetProp ( node_detail,						 "Web" );		      if ( !strlen ( banque -> web_banque ))			banque -> web_banque = NULL;		      banque -> nom_correspondant = xmlGetProp ( node_detail,						 "Nom_correspondant" );		      if ( !strlen ( banque -> nom_correspondant ))			banque -> nom_correspondant = NULL;		      banque -> fax_correspondant = xmlGetProp ( node_detail,						 "Fax_correspondant" );		      if ( !strlen ( banque -> fax_correspondant ))			banque -> fax_correspondant = NULL;		      banque -> tel_correspondant = xmlGetProp ( node_detail,						 "Tl_correspondant" );		      if ( !strlen ( banque -> tel_correspondant ))			banque -> tel_correspondant = NULL;		      banque -> email_correspondant = xmlGetProp ( node_detail,						 "Mail_correspondant" );		      if ( !strlen ( banque -> email_correspondant ))			banque -> email_correspondant = NULL;		      banque -> remarque_banque = xmlGetProp ( node_detail,						 "Remarques" );		      if ( !strlen ( banque -> remarque_banque ))			banque -> remarque_banque = NULL;		      liste_struct_banques = g_slist_append ( liste_struct_banques,							      banque );		      node_detail = node_detail -> next;		    }		}	      node_banques = node_banques -> next;	    }	}	      /* on rcupre ici les exercices */      if ( !strcmp ( node_1 -> name,		     "Exercices" ))	{	  xmlNodePtr node_exercices;	  /* node_exercices va faire le tour de l'arborescence des exercices */	  node_exercices = node_1 -> childs;	  while ( node_exercices )	    {	      /* on va rcuprer ici les gnralits des exercices */	      	      if ( !strcmp ( node_exercices -> name,			     "Gnralits" ))		{		  xmlNodePtr node_generalites;		  node_generalites = node_exercices -> childs;		  while ( node_generalites )		    {		      if ( !strcmp ( node_generalites -> name,				     "Nb_exercices" ))			nb_exercices = atoi ( xmlNodeGetContent ( node_generalites ));		      if ( !strcmp ( node_generalites -> name,				     "No_dernier_exercice" ))			no_derniere_exercice = atoi ( xmlNodeGetContent ( node_generalites ));			node_generalites = node_generalites -> next;		    }		}	 	      /* on va rcuprer ici les exercices */	      	      if ( !strcmp ( node_exercices -> name,			     "Dtail_des_exercices" ))		{		  xmlNodePtr node_detail;		  liste_struct_exercices = NULL;		  node_detail = node_exercices -> childs;		  while ( node_detail )		    {		      struct struct_exercice *exercice;		      		      exercice = calloc ( 1,						     sizeof ( struct struct_exercice ));		      exercice -> no_exercice = atoi ( xmlGetProp ( node_detail,						 "No" ));		      exercice -> nom_exercice = xmlGetProp ( node_detail,						 "Nom" );		      if ( strlen ( xmlGetProp ( node_detail,						 "Date_dbut" )))			{			  gchar **pointeur_char;			  pointeur_char = g_strsplit ( xmlGetProp ( node_detail,								    "Date_dbut" ),						       "/",						       3 );			  exercice -> date_debut = g_date_new_dmy ( atoi ( pointeur_char[0] ),								    atoi ( pointeur_char[1] ),								    atoi ( pointeur_char[2] ));			  g_strfreev ( pointeur_char );			}		      else			exercice -> date_debut = NULL;		      if ( strlen ( xmlGetProp ( node_detail,						 "Date_fin" )))			{			  gchar **pointeur_char;			  pointeur_char = g_strsplit ( xmlGetProp ( node_detail,								    "Date_fin" ),						       "/",						       3 );			  exercice -> date_fin = g_date_new_dmy ( atoi ( pointeur_char[0] ),								  atoi ( pointeur_char[1] ),								  atoi ( pointeur_char[2] ));			  g_strfreev ( pointeur_char );			}		      else			exercice -> date_fin = NULL;		      exercice -> affiche_dans_formulaire = atoi ( xmlGetProp ( node_detail,										"Affich" ));		      liste_struct_exercices = g_slist_append ( liste_struct_exercices,								exercice );		      node_detail = node_detail -> next;		    }		}	      node_exercices = node_exercices -> next;	    }	}	      /* on rcupre ici les rapprochements */      if ( !strcmp ( node_1 -> name,		     "Rapprochements" ))	{	  xmlNodePtr node_rapprochements;	  /* node_rapprochements va faire le tour de l'arborescence des rapprochements */	  node_rapprochements = node_1 -> childs;	  while ( node_rapprochements )	    {	      /* il n'y a pas de gnralits ... */	      /* on va rcuprer ici les rapprochements */	      	      if ( !strcmp ( node_rapprochements -> name,			     "Dtail_des_rapprochements" ))		{		  xmlNodePtr node_detail;		  liste_no_rapprochements = NULL;		  node_detail = node_rapprochements -> childs;		  while ( node_detail )		    {		      struct struct_no_rapprochement *rapprochement;		      rapprochement = calloc ( 1,						     sizeof ( struct struct_no_rapprochement ));		      rapprochement -> no_rapprochement = atoi ( xmlGetProp ( node_detail,						 "No" ));		      rapprochement -> nom_rapprochement = xmlGetProp ( node_detail,									"Nom" );		      		      rapprochement -> nom_rapprochement = g_strstrip ( rapprochement -> nom_rapprochement);		      liste_no_rapprochements = g_slist_append ( liste_no_rapprochements,								 rapprochement );		      node_detail = node_detail -> next;		    }		}	      node_rapprochements = node_rapprochements -> next;	    }	}      node_1 = node_1 -> next;    }  /* on libre la mmoire */  xmlFreeDoc ( doc );  supprime_operations_orphelines ();  /*   on applique la modif des ventils : si une op ventile est < 0, les ops de ventil ont le mme signe */  /* que l'op ventile */  /*   pour a, on fait le tour de toutes les ops, et si on a une op de ventil, on vrifie le signe de la ventil */  /*     associe, si elle est ngative, on inverse le signe */  for ( i=0 ; i<nb_comptes ; i++ )    {      GSList *pointeur_tmp;      struct structure_operation *operation_associee;      p_tab_nom_de_compte_variable = p_tab_nom_de_compte + i;      operation_associee = NULL;      pointeur_tmp = LISTE_OPERATIONS;      while ( pointeur_tmp )	{	  struct structure_operation *operation;	  operation = pointeur_tmp -> data;	  if ( operation -> montant	       &&	       operation -> no_operation_ventilee_associee )	    {	      if ( !operation_associee		   ||		   operation -> no_operation_ventilee_associee != operation_associee -> no_operation )		{		  GSList *pointeur_2;		  pointeur_2 = g_slist_find_custom ( LISTE_OPERATIONS,						     GINT_TO_POINTER ( operation -> no_operation_ventilee_associee ),						     (GCompareFunc) recherche_operation_par_no );		  if ( pointeur_2 )		    operation_associee = pointeur_2 -> data;		}	      if ( operation_associee		   &&		   operation_associee -> montant < 0 )		operation -> montant = -operation -> montant;	    }	  pointeur_tmp = pointeur_tmp -> next;	}    }  /*   rcupre le chemin du logo, qui est dans le fichier  partir de la 0.4.0 */  chemin_logo = gnome_config_get_string ( g_strconcat ( "/", FICHIER_CONF, "/Affichage/Chemin_du_logo", NULL ));  if ( !chemin_logo       ||       !strlen ( chemin_logo ))    chemin_logo = CHEMIN_LOGO;  /* met l'affichage des ops comme il l'tait avant */  initialise_tab_affichage_ope();  /*   la taille des colonnes est automatique, on y met les anciens rapports */  etat.largeur_auto_colonnes = 1;  rapport_largeur_colonnes[0] = 11;  rapport_largeur_colonnes[1] = 13;  rapport_largeur_colonnes[2] = 30;  rapport_largeur_colonnes[3] = 3;  rapport_largeur_colonnes[4] = 11;  rapport_largeur_colonnes[5] = 11;  rapport_largeur_colonnes[6] = 11;  /* on marque le fichier comme ouvert */  fichier_marque_ouvert ( TRUE );  modification_fichier ( TRUE );  return ( TRUE );}