95 #include "proto_f77.h" 98 int *facto_ini(
int n )
104 static int *table_facto[NMAX] ;
105 static int nwork = 0 ;
106 static int tbn[NMAX] ;
107 static int trois = 3 ;
114 for ( i=0 ; i < nwork ; i++ ) {
115 if ( tbn[i] == n ) indice = i ;
120 if ( nwork >= NMAX ) {
121 cout <<
"facto_ini : nwork >= NMAX !" << endl ;
124 indice = nwork ; nwork++ ; tbn[indice] = n ;
126 table_facto[indice] = (
int *) malloc(
sizeof(
int) * 20 ) ;
128 if ( table_facto[indice] == 0 ) {
129 cout <<
"facto_ini : malloc error !" << endl ;
133 F77_fax( table_facto[indice], &n, &trois ) ;
139 return table_facto[indice] ;