Index: trunk/Poubelle/archediab.old/archediab.sources/c/acquisition_archeops.c
===================================================================
--- trunk/Poubelle/archediab.old/archediab.sources/c/acquisition_archeops.c	(revision 656)
+++ trunk/Poubelle/archediab.old/archediab.sources/c/acquisition_archeops.c	(revision 657)
@@ -317,5 +317,5 @@
 jc=0;for(j=0;j<nb_max_bolo;j++)	 // jc = bolo_comprime  //   j=bolo normal
 		{
-		if( (parametr.bolo[j].bolo_code_util==bolo_normal_transmis) &&  (jc<parametr.nb_bolo)  )
+		if( (parametr.bolo[j].bolo_code_util&bolo_transmis_comprime) &&  (jc<parametr.nb_bolo)  )
 			{
 			decompress_7_2((long *)blk->data_bolo[jc],blk2->data_bolo[j],nb_per_block*2);
Index: trunk/Poubelle/archediab.old/archediab.sources/c/arcunit.c
===================================================================
--- trunk/Poubelle/archediab.old/archediab.sources/c/arcunit.c	(revision 656)
+++ trunk/Poubelle/archediab.old/archediab.sources/c/arcunit.c	(revision 657)
@@ -133,5 +133,5 @@
 for(j=0;(j<nb_max_bolo) && (k<4);j++)
 	{
-	if(param_pt->bolo[j].bolo_code_util==bolo_thermo_simplifie)
+	if(param_pt->bolo[j].bolo_code_util&bolo_thermo_simplifie)
 		{
 		if(k==indice_tempe)
@@ -159,5 +159,5 @@
 for(j=0;(j<nb_max_bolo) && (k<4);j++)
 	{
-	if(param_pt->bolo[j].bolo_code_util==bolo_thermo_simplifie)
+	if(param_pt->bolo[j].bolo_code_util&bolo_thermo_simplifie)
 		{
 		if(k==indice_tempe)
Index: trunk/Poubelle/archediab.old/archediab.sources/c/compress.c
===================================================================
--- trunk/Poubelle/archediab.old/archediab.sources/c/compress.c	(revision 656)
+++ trunk/Poubelle/archediab.old/archediab.sources/c/compress.c	(revision 657)
@@ -1,32 +1,43 @@
-#include <manip.h>
+#include "manip.h"
 #include "compress.h"
 
 
 /*******************************************************************************************/
-/****************   			 											****************/
-/****************   			 		compress_3							****************/
-/****************   			 											****************/
-/*******************************************************************************************/
-
-void  com_3(long val,long* in,long*out,int n,int pasin);
-
-
-#define kmax_	15		/*  valeur maximum de l'exposant	*/
-#define	kmak_	0xf		/*	masque pour l'exposant		*/
-#define	emak_	0x7		/*	masque pour l'ecart		*/		
-#define	sgbi_	0x4		/*	bit de signe de l'ecart		*/
-#define	sign_	0xfffffff8	/*	masque de signe de l'ecart	*/
-
-/*  compress un tableau in de n*9 points disposé avec un pas pasin		*/
+/****************   			 					************/
+/****************   			 		compress_3		************/
+/****************   			 					************/
+/*******************************************************************************************/
+
+static int filtre[16]={0xfffffff,0xffffffe,0xffffffc,0xffffff8,
+		0xffffff0,0xfffffe0,0xfffffc0,0xfffff80,
+		0xfffff00,0xffffe00,0xffffc00,0xffff800,
+		0xffff000,0xfffe000,0xfffc000,0xfff8000};
+int test[16]=  {0x00000000,0x00000001,0x00000002,0x00000004,
+		0x00000008,0x00000010,0x00000020,0x00000040,
+		0x00000080,0x00000100,0x00000200,0x00000400,
+		0x00000800,0x00001000,0x00002000,0x00004000};
+
+
+void  com_3(unsigned long val,unsigned long* in,unsigned long*out,int n,int pasin);
+
+#define	data_mask	0xffff	/* masque pour les données en entree	*/
+#define	ecart_(i,n,val)		(( (in[(i*9+n)*pasin]&data_mask) | ecart_bit )-val);
+
+#define	ecart_mask		0x7	/*	masque pour l'ecart		*/		
+
+
+
+/*  compress un tableau in de n*9 points disposé avec un pas pasin	*/
 /*  les data compressées sont ecrites dans le tableau out de n points	*/
-/*  la valeur val est la valeur de reference du point origine			*/
-
-
-/*  comprime	9*n points  : 1er point dans 1er mot, tous les ecarts dans les n mots suivants		*/ 
-/*	9*n	==>	n+1	    pour  72 points :   9 mots			*/
-
-void compress_3_1(long* in,long*out,int n,int pasin)
-{
-long val;
+/*  la valeur val est la valeur de reference du point origine		*/
+
+
+/*  comprime	9*n points  : 1er point dans 1er mot			*/
+/*			      tous les ecarts dans les n mots suivants	*/ 
+/*	9*n	==>	n+1	    pour  72 points :   9 mots		*/
+
+void compress_3_1(unsigned long* in,unsigned long*out,int n,int pasin)
+{
+unsigned long val;
 val=in[0]; out[0]=val;
 com_3(val,in,out+1,n/9,pasin);
@@ -35,18 +46,10 @@
 
 
-void  com_3(long val,long* in,long*out,int n,int pasin)
-{
-int filtre[16]={0xffffffff,0xfffffffe,0xfffffffc,0xfffffff8,
-				0xfffffff0,0xffffffe0,0xffffffc0,0xffffff80,
-				0xffffff00,0xfffffe00,0xfffffc00,0xfffff800,
-				0xfffff000,0xffffe000,0xffffc000,0xffff8000};
-int test[16]=  {0x00000000,0x00000001,0x00000002,0x00000004,
-				0x00000008,0x00000010,0x00000020,0x00000040,
-				0x00000080,0x00000100,0x00000200,0x00000400,
-				0x00000800,0x00001000,0x00002000,0x00004000};
-
-long val1;
-long ec1,ec2,ec3,ec4,ec5,ec6,ec7,ec8,ec9;
-int i,k,k1;long q;
+
+void  com_3(unsigned long val,unsigned long* in,unsigned long*out,int n,int pasin)
+{
+unsigned long val1;
+unsigned long ec1,ec2,ec3,ec4,ec5,ec6,ec7,ec8,ec9;
+int i,k,k1;unsigned long q;
 
 
@@ -55,55 +58,56 @@
 	k=0;q=3;	/* 3 bit = 7 = +-3	*/
 
-	ec1=in[i*9*pasin]-val;
+	ec1=ecart_(i,0,val);
 	shif(ec1,k,q);
-	val1=val + arrondi(ec1,k);
+	val1=new_val(val,ec1,k);
 	
 	k1=k;
-	ec2=in[(i*9+1)*pasin]-val1;
+	ec2=ecart_(i,1,val1);
 	shif(ec2,k,q);
 	
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k);}
-	val1+= arrondi(ec2,k);
-
-	ec3=in[(i*9+2)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=new_val(val,ec1,k);}
+	val1=new_val(val1,ec2,k);
+
+	ec3=ecart_(i,2,val1);
 	shif(ec3,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k);}
-	val1+= arrondi(ec3,k);		
-
-	ec4=in[(i*9+3)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k))&data_mask;}
+	val1=new_val(val1,ec3,k);
+
+	ec4=ecart_(i,3,val1);
 	shif(ec4,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k);}
-	val1+= arrondi(ec4,k);		
-
-	ec5=in[(i*9+4)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k))&data_mask;}
+	val1=new_val(val1,ec4,k);
+
+	ec5=ecart_(i,4,val1);
 	shif(ec5,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k) + arrondi(ec4,k);}
-	val1+= arrondi(ec5,k);		
-	
-	ec6=in[(i*9+5)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k) 
+				+ arrondi(ec4,k))&data_mask;}
+	val1=new_val(val1,ec5,k);
+	
+	ec6=ecart_(i,5,val1);
 	shif(ec6,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k)
-					 + arrondi(ec4,k) + arrondi(ec5,k);}
-	val1+= arrondi(ec6,k);		
-	
-	ec7=in[(i*9+6)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k)
+					+ arrondi(ec4,k) + arrondi(ec5,k))&data_mask;}
+	val1=new_val(val1,ec6,k);
+	
+	ec7=ecart_(i,6,val1);
 	shif(ec7,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k) 
-				+ arrondi(ec3,k) + arrondi(ec4,k) + arrondi(ec5,k) + arrondi(ec6,k);}
-	val1+= arrondi(ec7,k);		
-	
-	ec8=in[(i*9+7)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k) 
+				+ arrondi(ec3,k) + arrondi(ec4,k) + arrondi(ec5,k) + arrondi(ec6,k))&data_mask;}
+	val1=new_val(val1,ec7,k);
+	
+	ec8=ecart_(i,7,val1);
 	shif(ec8,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k)
-					 + arrondi(ec4,k) + arrondi(ec5,k) + arrondi(ec6,k) + arrondi(ec7,k);}
-	val1+= arrondi(ec8,k);		
-	
-	ec9=in[(i*9+8)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k)
+					 + arrondi(ec4,k) + arrondi(ec5,k) + arrondi(ec6,k) + arrondi(ec7,k))&data_mask;}
+	val1=new_val(val1,ec8,k);
+	
+	ec9=ecart_(i,8,val1);
 	shif(ec9,k,q);
 	
@@ -120,12 +124,12 @@
 	ec9 =  arrondi(ec9,k) >> k;
 
-	out[i]= ((ec1&emak_)<<29) | ((ec2&emak_)<<26) | ((ec3&emak_)<<23) 
-				| ((ec4&emak_)<<20) | ((ec5&emak_)<<17) | ((ec6&emak_)<<14)
-				| ((ec7&emak_)<<11)  | ((ec8&emak_)<<8) | ((ec9&emak_)<<5) | k ;
+	out[i]= ((ec1&ecart_mask)<<29) | ((ec2&ecart_mask)<<26) | ((ec3&ecart_mask)<<23) 
+		| ((ec4&ecart_mask)<<20) | ((ec5&ecart_mask)<<17) | ((ec6&ecart_mask)<<14)
+		| ((ec7&ecart_mask)<<11)  | ((ec8&ecart_mask)<<8) | ((ec9&ecart_mask)<<5) | k ;
 
 
 /*	if(i<30)  printf("i=%d  k=%d  ec= %d %d %d \n",i,k,ec1,ec2,ec3,out[(i+8)/7]);*/
 
-	val+= ( (ec1 + ec2 + ec3 + ec4 + ec5 + ec6 + ec7 + ec8 + ec9 ) << k );
+	val=(val + ( (ec1 + ec2 + ec3 + ec4 + ec5 + ec6 + ec7 + ec8 + ec9 ) << k )) & data_mask;
 	}
 }
@@ -139,20 +143,16 @@
 /*******************************************************************************************/
 
-void  com_4(long val,long* in,long*out,int n,int pasin);
-void  com_4_paire(long val1,long val2,long* in,long*out,int n,int pasin);
-
-
-#undef kmax_
-#undef	kmak_
-#undef	emak_		
-#undef	sgbi_
-#undef	sign_
-
-
-#define kmax_	15		/*  valeur maximum de l'exposant	*/
-#define	kmak_	0xf		/*	masque pour l'exposant		*/
-#define	emak_	0xf		/*	masque pour l'ecart		*/		
-#define	sgbi_	0x8		/*	bit de signe de l'ecart		*/
-#define	sign_	0xfffffff0	/*	masque de signe de l'ecart	*/
+void  com_4(unsigned long val,unsigned long* in,unsigned long*out,int n,int pasin);
+void  com_4_paire(unsigned long val1,unsigned long val2,unsigned long* in,unsigned long*out,int n,int pasin);
+
+
+#undef	ecart_mask		
+#define	ecart_mask	0xf		/*	masque pour l'ecart		*/		
+
+#undef	data_mask
+#define	data_mask	0xffff	/* masque pour les données en entree	*/
+#undef	ecart_
+#define	ecart_(i,n,val)		(( (in[(i*7+n)*pasin]&data_mask) | ecart_bit )-val);
+
 
 /*  compress un tableau in de n*7 points disposé avec un pas pasin	*/
@@ -165,7 +165,7 @@
 /*	7*n + 2	==>	n+1	     ==>   pour  72 points :   11 mots  			*/
 
-void compress_4_1(long* in,long*out,int n,int pasin)
-{
-long val1,val2;
+void compress_4_1(unsigned long* in,unsigned long*out,int n,int pasin)
+{
+unsigned long val1,val2;
 val1=in[0];val2=in[1];
 *out=( (val1<<16) & 0xffff0000 )	|	( ( val2 ) & 0xffff ) ;
@@ -176,18 +176,9 @@
 
 
-void  com_4(long val,long* in,long*out,int n,int pasin)
-{
-int filtre[16]={0xffffffff,0xfffffffe,0xfffffffc,0xfffffff8,
-				0xfffffff0,0xffffffe0,0xffffffc0,0xffffff80,
-				0xffffff00,0xfffffe00,0xfffffc00,0xfffff800,
-				0xfffff000,0xffffe000,0xffffc000,0xffff8000};
-int test[16]=  {0x00000000,0x00000001,0x00000002,0x00000004,
-				0x00000008,0x00000010,0x00000020,0x00000040,
-				0x00000080,0x00000100,0x00000200,0x00000400,
-				0x00000800,0x00001000,0x00002000,0x00004000};
-
-long val1;
-long ec1,ec2,ec3,ec4,ec5,ec6,ec7;
-int i,k,k1;long q;
+void  com_4(unsigned long val,unsigned long* in,unsigned long*out,int n,int pasin)
+{
+unsigned long val1;
+unsigned long ec1,ec2,ec3,ec4,ec5,ec6,ec7;
+int i,k,k1;unsigned long q;
 
 
@@ -196,41 +187,41 @@
 	k=0;q=7;	/* 4 bit = 15 = +-7	*/
 
-	ec1=in[i*7*pasin]-val;
+	ec1=ecart_(i,0,val);
 	shif(ec1,k,q);
-	val1=val + arrondi(ec1,k);
+	val1=new_val(val,ec1,k);
 	
 	k1=k;
-	ec2=in[(i*7+1)*pasin]-val1;
+	ec2=ecart_(i,1,val1);
 	shif(ec2,k,q);
 	
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k);}
-	val1+= arrondi(ec2,k);
-
-	ec3=in[(i*7+2)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k))&data_mask;}
+	val1=new_val(val1,ec2,k);
+
+	ec3=ecart_(i,2,val1);
 	shif(ec3,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k);}
-	val1+= arrondi(ec3,k);		
-
-	ec4=in[(i*7+3)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k))&data_mask;}
+	val1=new_val(val1,ec3,k);
+
+	ec4=ecart_(i,3,val1);
 	shif(ec4,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k);}
-	val1+= arrondi(ec4,k);		
-
-	ec5=in[(i*7+4)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k))&data_mask;}
+	val1=new_val(val1,ec4,k);
+
+	ec5=ecart_(i,4,val1);
 	shif(ec5,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k) + arrondi(ec4,k);}
-	val1+= arrondi(ec5,k);		
-	
-	ec6=in[(i*7+5)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k) + arrondi(ec4,k))&data_mask;}
+	val1=new_val(val1,ec5,k);
+	
+	ec6=ecart_(i,5,val1);
 	shif(ec6,k,q);
 
-	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k)
-					 + arrondi(ec4,k) + arrondi(ec5,k);}
-	val1+= arrondi(ec6,k);		
-	
-	ec7=in[(i*7+6)*pasin]-val1;
+	if(k>k1)	{k1=k;val1=(val + arrondi(ec1,k) + arrondi(ec2,k) + arrondi(ec3,k)
+					 + arrondi(ec4,k) + arrondi(ec5,k))&data_mask;}
+	val1=new_val(val1,ec6,k);
+	
+	ec7=ecart_(i,6,val1);
 	shif(ec7,k,q);
 	
@@ -245,11 +236,11 @@
 	ec7 =  arrondi(ec7,k) >> k;
 
-	out[i]= ((ec1&emak_)<<28) | ((ec2&emak_)<<24) | ((ec3&emak_)<<20) 
-				| ((ec4&emak_)<<16) | ((ec5&emak_)<<12) | ((ec6&emak_)<<8) | ((ec7&emak_)<<4) | k ;
+	out[i]= ((ec1&ecart_mask)<<28) | ((ec2&ecart_mask)<<24) | ((ec3&ecart_mask)<<20) 
+				| ((ec4&ecart_mask)<<16) | ((ec5&ecart_mask)<<12) | ((ec6&ecart_mask)<<8) | ((ec7&ecart_mask)<<4) | k ;
 
 
 /*	if(i<30)  printf("i=%d  k=%d  ec= %d %d %d \n",i,k,ec1,ec2,ec3,out[(i+8)/7]);*/
 
-	val+= ( (ec1 + ec2 + ec3 + ec4 + ec5 + ec6 + ec7 ) << k );
+	val=(val+ ( (ec1 + ec2 + ec3 + ec4 + ec5 + ec6 + ec7 ) << k ))&data_mask;
 	}
 }
@@ -264,8 +255,13 @@
 /*	7*n+2	==>	n+2			==>  pour 72 points :		12 mots								*/
 
-void compress_4_2(long* in,long*out,int n,int pasin)
-{
-long val1,val2;
-val1=in[0];		val2=in[1];
+#undef	data_mask
+#define	data_mask	0x1fffff	/* masque pour les données en entree 21 bit	*/
+#undef	ecart_
+#define	ecart_(i,n,val)		(( (in[(i*7+n)*pasin]&data_mask) | ecart_bit )-val);
+
+void compress_4_2(unsigned long* in,unsigned long*out,int n,int pasin)
+{
+unsigned long val1,val2;
+val1=in[0]&data_mask;		val2=in[1]&data_mask;
 out[0]=val1;	out[1]=val2;
 com_4_paire(val1,val2,in+2,out+2,n/7,pasin);
@@ -273,18 +269,9 @@
 
 
-void  com_4_paire(long val1,long val2,long* in,long*out,int n,int pasin)
-{
-int filtre[16]={0xffffffff,0xfffffffe,0xfffffffc,0xfffffff8,
-				0xfffffff0,0xffffffe0,0xffffffc0,0xffffff80,
-				0xffffff00,0xfffffe00,0xfffffc00,0xfffff800,
-				0xfffff000,0xffffe000,0xffffc000,0xffff8000};
-int test[16]=  {0x00000000,0x00000001,0x00000002,0x00000004,
-				0x00000008,0x00000010,0x00000020,0x00000040,
-				0x00000080,0x00000100,0x00000200,0x00000400,
-				0x00000800,0x00001000,0x00002000,0x00004000};
-
-long val1p,val2p;
-long ec1,ec2,ec3,ec4,ec5,ec6,ec7;
-int i,k,k1;long q;
+void  com_4_paire(unsigned long val1,unsigned long val2,unsigned long* in,unsigned long*out,int n,int pasin)
+{
+unsigned long val1p,val2p;
+unsigned long ec1,ec2,ec3,ec4,ec5,ec6,ec7;
+int i,k,k1;unsigned long q;
 
 
@@ -293,45 +280,45 @@
 	k=0;q=7;	/* 4 bit = 15 = +-7	*/
 
-	ec1=in[i*7*pasin]-val1;
+	ec1=ecart_(i,0,val1);
 	shif(ec1,k,q);
 	
-	ec2=in[(i*7+1)*pasin]-val2;
+	ec2=ecart_(i,1,val2);
 	shif(ec2,k,q);
 	
 	k1=k;
-	val1p=val1 + arrondi(ec1,k);
-
-
-	ec3=in[(i*7+2)*pasin]-val1p;
+	val1p=new_val(val1,ec1,k);
+
+
+	ec3=ecart_(i,2,val1p);
 	shif(ec3,k,q);
 
-	val2p=val2 + arrondi(ec2,k);
-
-	ec4=in[(i*7+3)*pasin]-val2p;
+	val2p=new_val(val2,ec2,k);
+
+	ec4=ecart_(i,3,val2p);
 	shif(ec4,k,q);
 
-	if(k>k1)	{k1=k;val1p=val1 + arrondi(ec1,k);val2p = val2 + arrondi(ec2,k);}
-	
-	val1p+= arrondi(ec3,k);		
-
-	ec5=in[(i*7+4)*pasin]-val1p;
+	if(k>k1)	{k1=k;val1p=new_val(val1,ec1,k);val2p=new_val(val2,ec2,k);}
+	
+	val1p=new_val(val1p,ec3,k);		
+
+	ec5=ecart_(i,4,val1p);
 	shif(ec5,k,q);
 
 	if(k>k1)	{	k1=k;
-				val1p=val1 + arrondi(ec1,k) + arrondi(ec3,k);
-				val2p=val2 + arrondi(ec2,k);
+				val1p=(val1 + arrondi(ec1,k) + arrondi(ec3,k))&data_mask;
+				val2p=(val2 + arrondi(ec2,k))&data_mask;
 				}
-	val2p+= arrondi(ec4,k);		
-	
-	ec6=in[(i*7+5)*pasin]-val2p;
+	val2p=new_val(val2p,ec4,k);		
+	
+	ec6=ecart_(i,5,val2p);
 	shif(ec6,k,q);
 
 	if(k>k1)	{	k1=k;
-				val1p=val1 + arrondi(ec1,k) + arrondi(ec3,k);
-				val2p=val2 + arrondi(ec2,k) + arrondi(ec4,k);
+				val1p=(val1 + arrondi(ec1,k) + arrondi(ec3,k))&data_mask;
+				val2p=(val2 + arrondi(ec2,k) + arrondi(ec4,k))&data_mask;
 				}
-	val1p+= arrondi(ec5,k);		
-	
-	ec7=in[(i*7+6)*pasin]-val1p;
+	val1p=new_val(val1p,ec5,k);		
+	
+	ec7=ecart_(i,6,val1p);
 	shif(ec7,k,q);
 	
@@ -346,12 +333,12 @@
 	ec7 =  arrondi(ec7,k) >> k;
 
-	out[i]= ((ec1&emak_)<<28) | ((ec2&emak_)<<24) | ((ec3&emak_)<<20) 
-				| ((ec4&emak_)<<16) | ((ec5&emak_)<<12) | ((ec6&emak_)<<8) | ((ec7&emak_)<<4) | k ;
+	out[i]= ((ec1&ecart_mask)<<28) | ((ec2&ecart_mask)<<24) | ((ec3&ecart_mask)<<20) 
+				| ((ec4&ecart_mask)<<16) | ((ec5&ecart_mask)<<12) | ((ec6&ecart_mask)<<8) | ((ec7&ecart_mask)<<4) | k ;
 
 
 /*	if(i<30)  printf("i=%d  k=%d  ec= %d %d %d \n",i,k,ec1,ec2,ec3,out[(i+8)/7]);*/
 
-	val1p = val1 + ( (ec1 + ec3 + ec5 + ec7 ) << k );
-	val1= val2 + ( (ec2 + ec4	+ ec6 ) << k );
+	val1p = (val1 + ( (ec1 + ec3 + ec5 + ec7 ) << k ))&data_mask;
+	val1= (val2 + ( (ec2 + ec4	+ ec6 ) << k ))&data_mask;
 	val2 = val1p;
 	}
@@ -368,55 +355,44 @@
 /*******************************************************************************************/
 
-
-void  compress_7(long val,long* in,long*out,int n,int pasin);
-void  compress_7_paire(long val1,long val2,long* in,long*out,int n,int pasin);
-
-
-#undef kmax_
-#undef	kmak_
-#undef	emak_		
-#undef	sgbi_
-#undef	sign_
-
-
-
-#define kmax_	15		/*  valeur maximum de l'exposant	*/
-#define	kmak_	0xf		/*	masque pour l'exposant		*/
-#define	emak_	0x7f		/*	masque pour l'ecart		*/		
-#define	sgbi_	0x40		/*	bit de signe de l'ecart		*/
-#define	sign_	0xffffff80	/*	masque de signe de l'ecart	*/
-
-
-/*  comprime	4*n points  : 1er point dans 1er mot, tous les ecarts dans les n mots suivants		*/ 
+/*******************************************************************************************/
+
+/*  compresse en 7 bit mais par paire (pour data provenant de la detection synchrone      */
+
+/* ne prend que les 21 bit de poid faible dans le mot en entree			*/
+/*  comprime	4*n points  : 1er et 2eme point dans 1er mot (16 bit chacun),  suite dans n mots		*/
+/*		différences entre valeures paires  et entre valeures impaires uniquement			*/ 
 /*	4*n	==>	n+1	*/
 
-void compress_7_1(long* in,long*out,int n,int pasin)
-{
-long val;
-val=*in;
-*out=val;
-compress_7(val,in,out+1,n/4,pasin);
-}
-
-
-
-/*  compress un tableau in de n*4 points disposé avec un pas pasin	*/
-/*  les data compressées sont ecrites dans le tableau out de n points	*/
-/*  la valeur val est la valeur de reference du point origine	*/
-
-void  compress_7(long val,long* in,long*out,int n,int pasin)
-{
-int filtre[16]={0xffffffff,0xfffffffe,0xfffffffc,0xfffffff8,
-				0xfffffff0,0xffffffe0,0xffffffc0,0xffffff80,
-				0xffffff00,0xfffffe00,0xfffffc00,0xfffff800,
-				0xfffff000,0xffffe000,0xffffc000,0xffff8000};
-int test[16]=  {0x00000000,0x00000001,0x00000002,0x00000004,
-				0x00000008,0x00000010,0x00000020,0x00000040,
-				0x00000080,0x00000100,0x00000200,0x00000400,
-				0x00000800,0x00001000,0x00002000,0x00004000};
-
-long val1;
-long ec1,ec2,ec3,ec4;
-int i,k,k1;long q;
+
+
+void  compress_7_paire(unsigned long val1,unsigned long val2,unsigned long* in,unsigned long*out,int n,int pasin);
+
+#undef	data_mask
+#define	data_mask	0x1fffff	/* masque pour les données en entree 21 bit	*/
+#undef	ecart_mask		
+#define	ecart_mask		0x7f		/*	masque pour l'ecart 7 bits		*/		
+
+#undef	 ecart_
+#define	ecart_(i,n,val)		(( (in[(i*4+n)*pasin]&data_mask) | ecart_bit )-val);
+
+
+void compress_7_2(unsigned long* in,unsigned long*out,int n,int pasin)
+{
+unsigned long val1,val2;
+val1=in[0]&0x1fffe0;val2=in[pasin]&0x1fffe0;
+*out=( (val1<<11) & 0xffff0000 )	|	( (val2 >> 5) & 0xffff ) ;
+
+/*printf("in[0]=%x  val1=%x        in[1]=%x   val2=%x  \n",in[0],val1,in[1],val2);
+printf("in[2]=%x    in[3]=%x   \n",in[2],in[3]);*/
+compress_7_paire(val1,val2,in,out+1,n/4,pasin);
+}
+
+
+void  compress_7_paire(unsigned long val1,unsigned long val2,unsigned long* in,unsigned long*out,int n,int pasin)
+{
+
+unsigned long val1p,val2p;
+unsigned long ec1,ec2,ec3,ec4;
+int i,k;unsigned long q;
 
 
@@ -425,26 +401,14 @@
 	k=0;q=63;		/* 7 bit ->  127  ->   +-63	*/
 
-	ec1=in[i*4*pasin]-val;
-	shif(ec1,k,q);
-	val1=val + arrondi(ec1,k);
-	
-	k1=k;
-	ec2=in[(i*4+1)*pasin]-val1;
-	shif(ec2,k,q);
-	
-/*	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k);}	*/
-	val1+= arrondi(ec2,k);
-
-	ec3=in[(i*4+2)*pasin]-val1;
-	shif(ec3,k,q);
-
-/*	if(k>k1)	{k1=k;val1=val + arrondi(ec1,k) + arrondi(ec2,k);}	*/
-	val1+= arrondi(ec3,k);		
-
-	ec4=in[(i*4+3)*pasin]-val1;
-	shif(ec4,k,q);
-	
-/*printf("i=%d  k=%d  ec= %d %d %d \n",i,k,ec1,ec2,ec3,out[(i+8)/7]);	*/
-
+	ec1=ecart_(i,0,val1);	shif(ec1,k,q);	
+	
+	ec2=ecart_(i,1,val2);	shif(ec2,k,q);
+	val1p =new_val(val1,ec1,k);
+
+	ec3=ecart_(i,2,val1p);	shif(ec3,k,q);
+	val2p=new_val(val2,ec2,k);
+
+	ec4=ecart_(i,3,val2p);	shif(ec4,k,q);
+	
 	ec1 =  arrondi(ec1,k) >> k;
 	ec2 =  arrondi(ec2,k) >> k;
@@ -452,91 +416,14 @@
 	ec4 =  arrondi(ec4,k) >> k;
 
-	out[i]= ((ec1&emak_)<<25) | ((ec2&emak_)<<18) | ((ec3&emak_)<<11) | ((ec4&emak_)<<4) | k ;
-
-/*	if(i<30)  printf("i=%d  k=%d  ec= %d %d %d \n",i,k,ec1,ec2,ec3,out[(i+8)/7]);	*/
-
-	val+= ( (ec1 + ec2 + ec3 + ec4 ) << k );
+	out[i]= ((ec1&ecart_mask)<<25) | ((ec2&ecart_mask)<<18) | ((ec3&ecart_mask)<<11) | ((ec4&ecart_mask)<<4) | k ;
+
+	/*if(i<5)  printf("i=%d  k=%d  ec= %x %x %x %x  out=%x \n",i,k,ec1,ec2,ec3,ec4,out[i]);	*/
+
+	val1=(val1+ ( (ec1 + ec3 ) << k ))&data_mask;
+	val2=(val2+ ( (ec2 + ec4 ) << k ))&data_mask;
 	}
 }
 
 
-/*******************************************************************************************/
-
-/*  compresse en 7 bit mais par paire (pour data provenant de la detection synchrone      */
-
-/* ne prend que les 21 bit de poid faible dans le mot en entree			*/
-/*  comprime	4*n points  : 1er et 2eme point dans 1er mot (16 bit chacun),  suite dans n mots		*/
-/*		différences entre valeures paires  et entre valeures impaires uniquement			*/ 
-/*	4*n	==>	n+1	*/
-
-#define  point_in(i,pasin,n)  (in[(i*4+n)*pasin]&0x1fffff)
-
-
-void compress_7_2(long* in,long*out,int n,int pasin)
-{
-long val1,val2;
-val1=in[0]&0x1fffe0;val2=in[1]&0x1fffe0;
-*out=( (val1<<11) & 0xffff0000 )	|	( (val2 >> 5) & 0xffff ) ;
-
-/*printf("in[0]=%x  val1=%x   //    in[1]=%x   val2=%x  \n",in[0],val1,in[1],val2);
-printf("in[2]=%x    in[3]=%x   \n",in[2],in[3]);*/
-compress_7_paire(val1,val2,in,out+1,n/4,pasin);
-}
-
-
-void  compress_7_paire(long val1,long val2,long* in,long*out,int n,int pasin)
-{
-int filtre[16]={0xffffffff,0xfffffffe,0xfffffffc,0xfffffff8,
-				0xfffffff0,0xffffffe0,0xffffffc0,0xffffff80,
-				0xffffff00,0xfffffe00,0xfffffc00,0xfffff800,
-				0xfffff000,0xffffe000,0xffffc000,0xffff8000};
-int test[16]=  {0x00000000,0x00000001,0x00000002,0x00000004,
-				0x00000008,0x00000010,0x00000020,0x00000040,
-				0x00000080,0x00000100,0x00000200,0x00000400,
-				0x00000800,0x00001000,0x00002000,0x00004000};
-
-long val1p,val2p;
-long ec1,ec2,ec3,ec4;
-int i,k;long q;
-
-
-for(i=0;i<n;i++)
-	{
-	k=0;q=63;		/* 7 bit ->  127  ->   +-63	*/
-
-	ec1=point_in(i,pasin,0)-val1;
-	shif(ec1,k,q);
-	
-	
-	ec2=point_in(i,pasin,1)-val2;
-	shif(ec2,k,q);
-		
-	val1p =val1 + arrondi(ec1,k);
-
-	ec3=point_in(i,pasin,2)-val1p;
-	shif(ec3,k,q);
-
-	val2p=val2+ arrondi(ec2,k);
-
-	ec4=point_in(i,pasin,3)-val2p;
-	shif(ec4,k,q);
-	
-/*printf("i=%d  k=%d  ec= %d %d %d \n",i,k,ec1,ec2,ec3,out[(i+8)/7]);	*/
-
-	ec1 =  arrondi(ec1,k) >> k;
-	ec2 =  arrondi(ec2,k) >> k;
-	ec3 =  arrondi(ec3,k) >> k;
-	ec4 =  arrondi(ec4,k) >> k;
-
-	out[i]= ((ec1&emak_)<<25) | ((ec2&emak_)<<18) | ((ec3&emak_)<<11) | ((ec4&emak_)<<4) | k ;
-
-/*	if(i<5)  printf("i=%d  k=%d  ec= %x %x %x %x  out=%x \n",i,k,ec1,ec2,ec3,ec4,out[i]);*/	
-
-	val1+= ( (ec1 + ec3 ) << k );
-	val2+= ( (ec2 + ec4 ) << k );
-	}
-}
-
-
-
-
+
+
Index: trunk/Poubelle/archediab.old/archediab.sources/c/decompress.c
===================================================================
--- trunk/Poubelle/archediab.old/archediab.sources/c/decompress.c	(revision 656)
+++ trunk/Poubelle/archediab.old/archediab.sources/c/decompress.c	(revision 657)
@@ -9,9 +9,9 @@
 //*******************************************************************************************
 
+#define	ecart_mask		0x7	/*	masque pour l'ecart		*/		
+
 void  decom_3(long val,long* in,long*out,int n);
 
-#define kmax_	15		/*  valeur maximum de l'exposant	*/
-#define	kmak_	0xf		/*	masque pour l'exposant		*/
-#define	emak_	0x7		/*	masque pour l'ecart		*/		
+#define	k_mask	0xf		/*	masque pour l'exposant		*/
 #define	sgbi_	0x4		/*	bit de signe de l'ecart		*/
 #define	sign_	0xfffffff8	/*	masque de signe de l'ecart	*/
@@ -43,5 +43,5 @@
 	{
 	R=in[i];
-	k=R&kmak_;
+	k=R&k_mask;
 	recup(ec1,29,k); 
 	recup(ec2,26,k); 
@@ -77,7 +77,6 @@
 void  decom_4_paire(long val1,long val2,long* in,long*out,int n);
 
-#undef kmax_
-#undef	kmak_
-#undef	emak_		
+#undef	ecart_mask		
+#define	ecart_mask	0xf		/*	masque pour l'ecart		*/		
 #undef	sgbi_
 #undef	sign_
@@ -85,7 +84,5 @@
 
 
-#define kmax_	15		/*  valeur maximum de l'exposant	*/
-#define	kmak_	0xf		/*	masque pour l'exposant		*/
-#define	emak_	0xf		/*	masque pour l'ecart		*/		
+#define	k_mask	0xf		/*	masque pour l'exposant		*/
 #define	sgbi_	0x8		/*	bit de signe de l'ecart		*/
 #define	sign_	0xfffffff0	/*	masque de signe de l'ecart	*/
@@ -118,5 +115,5 @@
 	{
 	R=in[i];
-	k=R&kmak_;
+	k=R&k_mask;
 	recup(ec1,28,k); 
 	recup(ec2,24,k); 
@@ -165,5 +162,5 @@
 	{
 	R=in[i];
-	k=R&kmak_;
+	k=R&k_mask;
 	recup(ec1,28,k); 
 	recup(ec2,24,k); 
@@ -195,16 +192,10 @@
 //*******************************************************************************************
 
-
-#undef kmax_
-#undef	kmak_
-#undef	emak_		
 #undef	sgbi_
 #undef	sign_
 
 
-
-#define kmax_	15		/*  valeur maximum de l'exposant	*/
-#define	kmak_	0xf		/*	masque pour l'exposant		*/
-#define	emak_	0x7f		/*	masque pour l'ecart		*/		
+#undef	ecart_mask		
+#define	ecart_mask		0x7f		/*	masque pour l'ecart 7 bits		*/		
 #define	sgbi_	0x40		/*	bit de signe de l'ecart		*/
 #define	sign_	0xffffff80	/*	masque de signe de l'ecart	*/
@@ -239,5 +230,5 @@
 	{
 	R=in[i];
-	k=R&kmak_;
+	k=R&k_mask;
 	recup(ec1,25,k); 
 	recup(ec2,18,k); 
@@ -282,5 +273,5 @@
 	{
 	R=in[i];
-	k=R&kmak_;
+	k=R&k_mask;
 	recup(ec1,25,k); 
 	recup(ec2,18,k); 
@@ -293,8 +284,8 @@
 	val2+=ec4;	out[4*i+3]=val2;	 
 
-/*if(i<5)  printf("in=%x  i=%d  k=%d  ec= %x %x %x %x  \n",R,i,k,ec1,ec2,ec3,ec4);	*/
-
-	}
-}
-
-
+/*if(i<5)  printf("in=%x  i=%d  k=%d  ec= %x %x %x %x  \n",R,i,k,ec1,ec2,ec3,ec4);*/	
+
+	}
+}
+
+
Index: trunk/Poubelle/archediab.old/archediab.sources/c/diabolo.c
===================================================================
--- trunk/Poubelle/archediab.old/archediab.sources/c/diabolo.c	(revision 656)
+++ trunk/Poubelle/archediab.old/archediab.sources/c/diabolo.c	(revision 657)
@@ -92,4 +92,5 @@
 #endif
 
+
 #ifdef _archeops
 //nouveauD(fenetre_vitesse_block,config_transputer_id,"config_transputer",exec_config_transputer);
@@ -117,5 +118,5 @@
 			printf(" capa=%g ",capa(j+1));
 			printf(" boloutil = %d  bolonom = %s  \n",parametr.bolo[j].bolo_code_util,parametr.nom_coef[parametr.bolo[j].numero_nom_coef].bolo_nom);
-			if( parametr.bolo[j].bolo_code_util==bolo_normal_transmis)		parametr.nb_bolo++;
+			if( parametr.bolo[j].bolo_code_util&bolo_transmis_comprime)		parametr.nb_bolo++;
 			if(parametr.bolo[j].bolo_code_util)
 				{
Index: trunk/Poubelle/archediab.old/archediab.sources/c/dilution.c
===================================================================
--- trunk/Poubelle/archediab.old/archediab.sources/c/dilution.c	(revision 656)
+++ trunk/Poubelle/archediab.old/archediab.sources/c/dilution.c	(revision 657)
@@ -235,5 +235,5 @@
 for(j=0;(j<nb_max_bolo) && (k<4);j++)
 	{
-	if(parametr.bolo[j].bolo_code_util==bolo_thermo_simplifie)
+	if(parametr.bolo[j].bolo_code_util&bolo_thermo_simplifie)
 		{
 		I = 1e-3 * (double)dac_V(gg->reglage.bolo[j]) * 2441. / parametr.bolo[j].bolo_capa;	//	I en µA
