Index: trunk/SophyaLib/NTools/datime.c
===================================================================
--- trunk/SophyaLib/NTools/datime.c	(revision 679)
+++ trunk/SophyaLib/NTools/datime.c	(revision 682)
@@ -6,6 +6,5 @@
 #include <math.h>
 #ifdef __MWERKS__
-   #include "mwerksmath.h"
-//   #include "unixmac.h"
+#include "unixmac.h"
 #endif
 
Index: trunk/SophyaLib/NTools/generalfit.cc
===================================================================
--- trunk/SophyaLib/NTools/generalfit.cc	(revision 679)
+++ trunk/SophyaLib/NTools/generalfit.cc	(revision 682)
@@ -5,6 +5,5 @@
 #include <math.h>
 #ifdef __MWERKS__
-   #include "mwerksmath.h"
- //  #include "unixmac.h"
+#include "unixmac.h"
 #endif
 #include <string.h>
Index: trunk/SophyaLib/NTools/histos.cc
===================================================================
--- trunk/SophyaLib/NTools/histos.cc	(revision 679)
+++ trunk/SophyaLib/NTools/histos.cc	(revision 682)
@@ -1,4 +1,4 @@
 //
-// $Id: histos.cc,v 1.6 1999-10-25 16:39:57 ansari Exp $
+// $Id: histos.cc,v 1.7 1999-12-10 16:55:51 ansari Exp $
 //
 
@@ -1781,5 +1781,5 @@
 
 // Que faut-il ecrire?
-int errok = (dobj->err2) ? 1 : 0;
+int_4 errok = (dobj->err2) ? 1 : 0;
 
 // Ecriture entete pour identifier facilement
Index: trunk/SophyaLib/NTools/matxop.c
===================================================================
--- trunk/SophyaLib/NTools/matxop.c	(revision 679)
+++ trunk/SophyaLib/NTools/matxop.c	(revision 682)
@@ -393,10 +393,10 @@
 if (szv < 25) szv = 25;
 
-if ( (FVeci = malloc(nvarmx*sizeof(float *))) == NULL )
+if ( (FVeci = (float**) malloc(nvarmx*sizeof(float *))) == NULL )
   { printf("InitRFitLin_Erreur: (Pb malloc(Veci)) \n");
   return(1);
   }
 
-if ( (FVSpace = malloc(nvarmx*szv*sizeof(float))) == NULL )
+if ( (FVSpace = (float*)  malloc(nvarmx*szv*sizeof(float))) == NULL )
   { printf("InitRFitLin_Erreur: (Pb malloc(VSpace)) \n");
   free(FVeci);
@@ -407,5 +407,5 @@
 
 
-if ( (FVecf = malloc(3*sizeof(float *))) == NULL )
+if ( (FVecf = (float**) malloc(3*sizeof(float *))) == NULL )
   { printf("InitRFitLin_Erreur: (Pb malloc(Vecf)) \n");
   free(FVeci);
@@ -414,5 +414,5 @@
   }
 
-if ( (FVSpacef = malloc(3*szv*sizeof(float))) == NULL )
+if ( (FVSpacef = (float*) malloc(3*szv*sizeof(float))) == NULL )
   { printf("InitRFitLin_Erreur: (Pb malloc(VSpacef)) \n");
   free(FVeci);
@@ -425,5 +425,5 @@
 
 
-if ( (FFMtx = malloc(nvarmx*nvarmx*sizeof(double))) == NULL )
+if ( (FFMtx = (double*) malloc(nvarmx*nvarmx*sizeof(double))) == NULL )
   { printf("InitRFitLin_Erreur: (Pb malloc(FMtx)) \n");
   free(FVeci);
@@ -434,5 +434,5 @@
   }
 
-if ( (FFMtx2 = malloc(nvarmx*nvarmx*sizeof(double))) == NULL )
+if ( (FFMtx2 = (double*) malloc(nvarmx*nvarmx*sizeof(double))) == NULL )
   { printf("InitRFitLin_Erreur: (Pb malloc(FMtx2)) \n");
   free(FVeci);
@@ -444,5 +444,5 @@
   }
 
-if ( (FFSort = malloc((nvarmx+1)*nvarmx*sizeof(double))) == NULL )
+if ( (FFSort = (double*) malloc((nvarmx+1)*nvarmx*sizeof(double))) == NULL )
   { printf("InitRFitLin_Erreur: (Pb malloc(FFSort)) \n");
   free(FVeci);
@@ -705,10 +705,10 @@
 if (szv < 25) szv = 25;
 
-if ( (DVeci = malloc(nvarmx*sizeof(double *))) == NULL )
+if ( (DVeci = (double**) malloc(nvarmx*sizeof(double *))) == NULL )
   { printf("InitDFitLin_Erreur: (Pb malloc(Veci)) \n");
   return(1);
   }
 
-if ( (DVSpace = malloc(nvarmx*szv*sizeof(double))) == NULL )
+if ( (DVSpace = (double*) malloc(nvarmx*szv*sizeof(double))) == NULL )
   { printf("InitDFitLin_Erreur: (Pb malloc(VSpace)) \n");
   free(DVeci);
@@ -719,5 +719,5 @@
 
 
-if ( (DVecf = malloc(3*sizeof(double *))) == NULL )
+if ( (DVecf = (double**) malloc(3*sizeof(double *))) == NULL )
   { printf("InitDFitLin_Erreur: (Pb malloc(Vecf)) \n");
   free(DVeci);
@@ -726,5 +726,5 @@
   }
 
-if ( (DVSpacef = malloc(3*szv*sizeof(double))) == NULL )
+if ( (DVSpacef = (double*) malloc(3*szv*sizeof(double))) == NULL )
   { printf("InitDFitLin_Erreur: (Pb malloc(VSpacef)) \n");
   free(DVeci);
@@ -737,5 +737,5 @@
 
 
-if ( (DFMtx = malloc(nvarmx*nvarmx*sizeof(double))) == NULL )
+if ( (DFMtx = (double*) malloc(nvarmx*nvarmx*sizeof(double))) == NULL )
   { printf("InitDFitLin_Erreur: (Pb malloc(FMtx)) \n");
   free(DVeci);
@@ -746,5 +746,5 @@
   }
 
-if ( (DFMtx2 = malloc(nvarmx*nvarmx*sizeof(double))) == NULL )
+if ( (DFMtx2 = (double*) malloc(nvarmx*nvarmx*sizeof(double))) == NULL )
   { printf("InitDFitLin_Erreur: (Pb malloc(FMtx2)) \n");
   free(DVeci);
Index: trunk/SophyaLib/NTools/nbmath.c
===================================================================
--- trunk/SophyaLib/NTools/nbmath.c	(revision 679)
+++ trunk/SophyaLib/NTools/nbmath.c	(revision 682)
@@ -1643,5 +1643,5 @@
 {
 int npt,k,i,nclass;
-double *class,aa1,c2,cut;
+double *clas,aa1,c2,cut;
 
 *a1 =0.;
@@ -1654,6 +1654,6 @@
 /* printf("pass 1: %g*x c2=%g/%d\n",*a1,c2,npt); */
 
-class = malloc( *n * sizeof(double) );
-if( class == NULL ) {*n=npt; return(-3.);}
+clas = (double*) malloc( *n * sizeof(double) );
+if( clas == NULL ) {*n=npt; return(-3.);}
 
 /* elimination des mauvais points */
@@ -1662,18 +1662,18 @@
   if(ey[i]<=0.) continue;
   c2 = (y[i]-aa1*x[i])/ey[i];
-  class[nclass] = c2*c2;
+  clas[nclass] = c2*c2;
   nclass++;
 }
-qsort(class,(size_t) nclass,(size_t) sizeof(double),qSort_Dble);
+qsort(clas,(size_t) nclass,(size_t) sizeof(double),qSort_Dble);
 k = (int) ( (1. - per_clean ) * (double) nclass );
 if(k<0) k=0;
 if(k>=nclass) k = nclass-1;
-cut = class[k];
+cut = clas[k];
 k = 0;
 for(i=0;i<*n;i++) {
-  class[i] = ey[i];
+  clas[i] = ey[i];
   c2 = (y[i]-aa1*x[i])/ey[i];
   c2 *= c2;
-  if(ey[i]>0. && c2>cut) {class[i] = -1.; k++;}
+  if(ey[i]>0. && c2>cut) {clas[i] = -1.; k++;}
 }
 /* printf("nombre pt tues %d cut=%g\n",k,cut); */
@@ -1681,11 +1681,11 @@
 /* 2sd passe */
 npt = *n;
-c2 = FitProp(x,y,class,&npt,&aa1);
-if(c2<0.) {*n = npt; free(class); return(-2.);}
+c2 = FitProp(x,y,clas,&npt,&aa1);
+if(c2<0.) {*n = npt; free(clas); return(-2.);}
 *a1 = aa1;
 *n = npt;
 /* printf("pass 2: %g*x c2=%g/%d\n",*a1,c2,npt); */
 
-free(class);
+free(clas);
 return(c2);
 }
@@ -1730,5 +1730,5 @@
 {
 int npt,k,i,nclass;
-double *class,aa0,aa1,c2,cut;
+double *clas,aa0,aa1,c2,cut;
 
 *a0 = *a1 =0.;
@@ -1742,6 +1742,6 @@
 /* printf("pass 1: %g + %g*x c2=%g/%d\n",*a0,*a1,c2,npt); */
 
-class = malloc( *n * sizeof(double) );
-if( class == NULL ) {*n=npt; return(-3.);}
+clas = (double*) malloc( *n * sizeof(double) );
+if( clas == NULL ) {*n=npt; return(-3.);}
 
 /* elimination des mauvais points */
@@ -1750,18 +1750,18 @@
   if(ey[i]<=0.) continue;
   c2 = (y[i]-(aa0+aa1*x[i]))/ey[i];
-  class[nclass] = c2*c2;
+  clas[nclass] = c2*c2;
   nclass++;
 }
-qsort(class,(size_t) nclass,(size_t) sizeof(double),qSort_Dble);
+qsort(clas,(size_t) nclass,(size_t) sizeof(double),qSort_Dble);
 k = (int) ( (1. - per_clean ) * (double) nclass );
 if(k<0) k=0;
 if(k>=nclass) k = nclass-1;
-cut = class[k];
+cut = clas[k];
 k = 0;
 for(i=0;i<*n;i++) {
-  class[i] = ey[i];
+  clas[i] = ey[i];
   c2 = (y[i]-(aa0+aa1*x[i]))/ey[i];
   c2 *= c2;
-  if(ey[i]>0. && c2>cut) {class[i] = -1.; k++;}
+  if(ey[i]>0. && c2>cut) {clas[i] = -1.; k++;}
 }
 /* printf("nombre pt tues %d cut=%g\n",k,cut); */
@@ -1769,6 +1769,6 @@
 /* 2sd passe */
 npt = *n;
-c2 = FitLin(x,y,class,&npt,&aa0,&aa1);
-if(c2<0.) {*n = npt; free(class); return(-2.);}
+c2 = FitLin(x,y,clas,&npt,&aa0,&aa1);
+if(c2<0.) {*n = npt; free(clas); return(-2.);}
 *a0 = aa0;
 *a1 = aa1;
@@ -1776,5 +1776,5 @@
 /* printf("pass 2: %g + %g*x c2=%g/%d\n",*a0,*a1,c2,npt); */
 
-free(class);
+free(clas);
 return(c2);
 }
@@ -1815,5 +1815,5 @@
 {
 int npt,k,i,nclass;
-double *class,aa0,aa1,aa2,c2,cut;
+double *clas,aa0,aa1,aa2,c2,cut;
 
 *a0 = *a1 = *a2 =0.;
@@ -1828,6 +1828,6 @@
 /* printf("pass 1: %g + %g*x + %g*x**2 c2=%g/%d\n",*a0,*a1,*a2,c2,npt); */
 
-class = malloc( *n * sizeof(double) );
-if( class == NULL ) {*n=npt; return(-3.);}
+clas = (double*) malloc( *n * sizeof(double) );
+if( clas == NULL ) {*n=npt; return(-3.);}
 
 /* elimination des mauvais points */
@@ -1836,18 +1836,18 @@
   if(ey[i]<=0.) continue;
   c2 = (y[i]-(aa0+aa1*x[i]+aa2*x[i]*x[i]))/ey[i];
-  class[nclass] = c2*c2;
+  clas[nclass] = c2*c2;
   nclass++;
 }
-qsort(class,(size_t) nclass,(size_t) sizeof(double),qSort_Dble);
+qsort(clas,(size_t) nclass,(size_t) sizeof(double),qSort_Dble);
 k = (int) ( (1. - per_clean ) * (double) nclass );
 if(k<0) k=0;
 if(k>=nclass) k = nclass-1;
-cut = class[k];
+cut = clas[k];
 k = 0;
 for(i=0;i<*n;i++) {
-  class[i] = ey[i];
+  clas[i] = ey[i];
   c2 = (y[i]-(aa0+aa1*x[i]+aa2*x[i]*x[i]))/ey[i];
   c2 *= c2;
-  if(ey[i]>0. && c2>cut) {class[i] = -1.; k++;}
+  if(ey[i]>0. && c2>cut) {clas[i] = -1.; k++;}
 }
 /* printf("nombre pt tues %d cut=%g\n",k,cut); */
@@ -1855,6 +1855,6 @@
 /* 2sd passe */
 npt = *n;
-c2 = FitPar(x,y,class,&npt,&aa0,&aa1,&aa2);
-if(c2<0.) {*n = npt; free(class); return(-2.);}
+c2 = FitPar(x,y,clas,&npt,&aa0,&aa1,&aa2);
+if(c2<0.) {*n = npt; free(clas); return(-2.);}
 *a0 = aa0;
 *a1 = aa1;
@@ -1863,5 +1863,5 @@
 /* printf("pass 2: %g + %g*x + %g*x**2 c2=%g/%d\n",*a0,*a1,*a2,c2,npt); */
 
-free(class);
+free(clas);
 return(c2);
 }
Index: trunk/SophyaLib/NTools/nbrandom.c
===================================================================
--- trunk/SophyaLib/NTools/nbrandom.c	(revision 679)
+++ trunk/SophyaLib/NTools/nbrandom.c	(revision 682)
@@ -495,5 +495,5 @@
 
 sof = sizeof(struct tirage_alea);
-if( (t = malloc(sof) ) == NULL ) {
+if( (t = (struct tirage_alea*)malloc(sof) ) == NULL ) {
   printf("impossible d'allouer *tirage_alea par malloc \n");
   return(NULL);
@@ -503,5 +503,5 @@
 
 sof = nbin * sizeof(double);
-if( (t->Tab = malloc(sof) ) == NULL ) {
+if( (t->Tab = (double*)malloc(sof) ) == NULL ) {
   printf("impossible d'allouer *tirage_alea.Tab par malloc \n");
   return(NULL);
Index: trunk/SophyaLib/NTools/nbrandom.h
===================================================================
--- trunk/SophyaLib/NTools/nbrandom.h	(revision 679)
+++ trunk/SophyaLib/NTools/nbrandom.h	(revision 682)
@@ -8,6 +8,5 @@
 #include <stdlib.h>
 #ifdef __MWERKS__
-   #include "mwerksmath.h"
-   #include "unixmac.h"
+#include "unixmac.h"
 #endif
 
