Ignore:
Timestamp:
Apr 13, 2000, 7:34:37 PM (25 years ago)
Author:
ansari
Message:

Compil SGI-CC , Probleme avec for(int i) repete - Reza 13/4/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitsioserver.cc

    r854 r923  
    329329  long repeat;
    330330  int ntest= 0;
    331   for(int ii = 0; ii < ncols; ii++)
     331  int ii;
     332  for(ii = 0; ii < ncols; ii++)
    332333    {
    333334      int DTYPE;
     
    354355  char **clname;
    355356  clname= new char*[tfields.size()];
    356   for(int ii = 0; ii < tfields.size(); ii++)
     357  for(ii = 0; ii < tfields.size(); ii++)
    357358    {
    358359      //  ostringstream ne passe pas sur tous les compilos .. Reza 23/12/99
     
    367368  // create a NTuple
    368369  NTuple nt0(tfields.size(),clname);
    369   for(int ii = 0; ii < tfields.size(); ii++)
     370  for(ii = 0; ii < tfields.size(); ii++)
    370371    delete [] clname[ii];
    371372  delete [] clname;
     
    615616        }
    616617    }
    617  
    618   for(int j = 0; j < sph1.NbPixels(); j++) sph1(j)= (double)r_8tab_[j];
    619   for(int j = 0; j < sph2.NbPixels(); j++) sph2(j)= (double)r_8tab_[j+npixels];
    620   for(int j = 0; j < sph3.NbPixels(); j++) sph3(j)= (double)r_8tab_[j+2*npixels];
     618  int j;
     619  for(j = 0; j < sph1.NbPixels(); j++) sph1(j)= (double)r_8tab_[j];
     620  for(j = 0; j < sph2.NbPixels(); j++) sph2(j)= (double)r_8tab_[j+npixels];
     621  for(j = 0; j < sph3.NbPixels(); j++) sph3(j)= (double)r_8tab_[j+2*npixels];
    621622}
    622623
     
    656657        }
    657658    }
    658  
    659   for(int j = 0; j < sph1.NbPixels(); j++) sph1(j)= (float)r_4tab_[j];
    660   for(int j = 0; j < sph2.NbPixels(); j++) sph2(j)= (float)r_4tab_[j+npixels];
    661   for(int j = 0; j < sph3.NbPixels(); j++) sph3(j)= (float)r_4tab_[j+2*npixels];
     659  int j; 
     660  for(j = 0; j < sph1.NbPixels(); j++) sph1(j)= (float)r_4tab_[j];
     661  for(j = 0; j < sph2.NbPixels(); j++) sph2(j)= (float)r_4tab_[j+npixels];
     662  for(j = 0; j < sph3.NbPixels(); j++) sph3(j)= (float)r_4tab_[j+2*npixels];
    662663}
    663664
     
    950951    printerror( status );
    951952
    952   for( int ii = 0; ii < tfields; ii++)
     953  for(int ii = 0; ii < tfields; ii++)
    953954    {
    954955      delete [] ttype[ii];
     
    11191120  r_8tab_=new r_8[3*npixels];
    11201121
    1121 
    1122   for (int j = 0; j < npixels; j++) r_8tab_[j]= (r_8)sph1(j);
    1123   for (int j = 0; j < npixels; j++) r_8tab_[j+npixels]= (r_8)sph2(j);
    1124   for (int j = 0; j < npixels; j++) r_8tab_[j+2*npixels]= (r_8)sph3(j);
     1122  int j;
     1123  for (j = 0; j < npixels; j++) r_8tab_[j]= (r_8)sph1(j);
     1124  for (j = 0; j < npixels; j++) r_8tab_[j+npixels]= (r_8)sph2(j);
     1125  for (j = 0; j < npixels; j++) r_8tab_[j+2*npixels]= (r_8)sph3(j);
    11251126  DVList dvl;
    11261127  dvl.SetS("PIXTYPE","HEALPIX ");
     
    11501151  if (r_4tab_ != NULL ) { delete[] r_4tab_;  r_4tab_ = NULL; }
    11511152  r_4tab_=new r_4[3*npixels];
    1152 
    1153   for (int j = 0; j < npixels; j++) r_4tab_[j]= (r_4)sph1(j);
    1154   for (int j = 0; j < npixels; j++) r_4tab_[j+npixels]= (r_4)sph2(j);
    1155   for (int j = 0; j < npixels; j++) r_4tab_[j+2*npixels]= (r_4)sph3(j);
     1153 
     1154  int j;
     1155  for (j = 0; j < npixels; j++) r_4tab_[j]= (r_4)sph1(j);
     1156  for (j = 0; j < npixels; j++) r_4tab_[j+npixels]= (r_4)sph2(j);
     1157  for (j = 0; j < npixels; j++) r_4tab_[j+2*npixels]= (r_4)sph3(j);
    11561158
    11571159  DVList dvl;
     
    15341536  delete [] tform;
    15351537  long nelements= npixels;
     1538  int k;
    15361539  switch (FITS_tab_typ_)
    15371540    {
    15381541    case TDOUBLE :
    1539       for (int k=1; k<=tfields; k++)
     1542      for (k=1; k<=tfields; k++)
    15401543        {
    15411544          fits_write_col(fptr, TDOUBLE, k, 1, 1, nelements, r_8tab_+(k-1)*nelements, &status);
     
    15471550    case TFLOAT :
    15481551 //DBG!!! $CHECK$ Reza      for (int kk=0; kk<10; kk++) cout << r_4tab_[kk] << endl;
    1549       for (int k=1; k<=tfields; k++)
     1552      for (k=1; k<=tfields; k++)
    15501553        {
    15511554          fits_write_col(fptr, TFLOAT, k, 1, 1, nelements, r_4tab_+(k-1)*nelements, &status);
     
    15541557      break;
    15551558    case TINT :
    1556       for (int k=1; k<=tfields; k++)
     1559      for (k=1; k<=tfields; k++)
    15571560        {
    15581561          fits_write_col(fptr, TINT, k, 1, 1, nelements, i_4tab_+(k-1)*nelements, &status);
     
    18691872  // le type suppose par l'utilisateur de fitsioserver
    18701873  //
     1874  int k;
    18711875  switch ( FITS_tab_typ_)
    18721876    {
     
    18791883      if (r_8tab_ != NULL) { delete [] r_8tab_;  r_8tab_ = NULL; }
    18801884      r_8tab_=new r_8[ tfields*npixels];
    1881       for (int k=1; k<=tfields; k++)
     1885      for (k=1; k<=tfields; k++)
    18821886        {
    18831887          fits_read_col(fptr, TDOUBLE, k, 1, 1, npixels,  &dnullval,
     
    18961900      if (r_4tab_ != NULL) { delete [] r_4tab_;  r_4tab_ = NULL; }
    18971901      r_4tab_=new r_4[ tfields*npixels];
    1898       for (int k=1; k<=tfields; k++)
     1902      for (k=1; k<=tfields; k++)
    18991903        {
    19001904          fits_read_col(fptr, TFLOAT, k, 1, 1, npixels,  &fnullval,
     
    19131917      if (i_4tab_ != NULL) { delete [] i_4tab_;  i_4tab_ = NULL; }
    19141918      i_4tab_=new int_4[ tfields*npixels];
    1915       for (int k=1; k<=tfields; k++)
     1919      for (k=1; k<=tfields; k++)
    19161920        {
    19171921          fits_read_col(fptr, TLONG, k, 1, 1, npixels,  &inullval,
Note: See TracChangeset for help on using the changeset viewer.