Revision 1176 branches/threaded2merge/src/linad99/gradstak.cpp

gradstak.cpp (revision 1176)
248 248
}
249 249

  
250 250
/**
251
 * Description not yet available.
252
 * \param
253
 */
251
Destructor
252
*/
254 253
grad_stack::~grad_stack()
255 254
{
256
   // this->print();
257

  
258
   int repfs=option_match(ad_comm::argc,ad_comm::argv,"-fsize");
259

  
260
   if (ad_comm::global_logfile && repfs)
261
   {
262
     int pos;
263
     pos=lseek(_GRADFILE_PTR1,0,SEEK_END);
264
     *ad_comm::global_logfile << "size of file " << gradfile_name1
255
  int repfs=option_match(ad_comm::argc, ad_comm::argv, "-fsize");
256
  if (ad_comm::global_logfile && repfs)
257
  {
258
    int pos = lseek(_GRADFILE_PTR1,0,SEEK_END);
259
    *ad_comm::global_logfile << "size of file " << gradfile_name1
265 260
      << " = " << pos << endl;
266 261

  
267
     pos=lseek(_GRADFILE_PTR2,0,SEEK_END);
268
     *ad_comm::global_logfile << "size of file " << gradfile_name2
262
    pos=lseek(_GRADFILE_PTR2,0,SEEK_END);
263
    *ad_comm::global_logfile << "size of file " << gradfile_name2
269 264
      << " = " << pos << endl;
270 265

  
271
     pos=lseek(_VARSSAV_PTR,0,SEEK_END);
272
     *ad_comm::global_logfile << "size of file " << var_store_file_name
266
    pos=lseek(_VARSSAV_PTR,0,SEEK_END);
267
    *ad_comm::global_logfile << "size of file " << var_store_file_name
273 268
      << " = " << pos << endl;
274
   }
269
  }
275 270

  
276
   if (close(_GRADFILE_PTR1))
277
   {
278
     cerr << "Error closing file " << gradfile_name1 << "\n";
279
   }
280
   if (close(_GRADFILE_PTR2))
281
   {
282
     cerr << "Error closing file " << gradfile_name2 << "\n";
283
   }
284
   if (close(_VARSSAV_PTR))
285
   {
286
     cerr << "Error closing file " << var_store_file_name << "\n";
287
   }
271
  if (close(_GRADFILE_PTR1))
272
  {
273
    cerr << "Error closing file " << gradfile_name1 << "\n";
274
  }
275
  if (close(_GRADFILE_PTR2))
276
  {
277
    cerr << "Error closing file " << gradfile_name2 << "\n";
278
  }
279
  if (close(_VARSSAV_PTR))
280
  {
281
    cerr << "Error closing file " << var_store_file_name << "\n";
282
  }
283
#if defined(__SUN__) || defined( __GNU__)
284
  unlink(gradfile_name1);
285
  unlink(gradfile_name2);
286
  unlink(var_store_file_name);
287
#else
288
  remove(gradfile_name1);
289
  remove(gradfile_name2);
290
  remove(var_store_file_name);
291
#endif
288 292

  
289
  #if defined ( __SUN__) ||  defined ( __GNU__)
290
   unlink(gradfile_name1);
291
   unlink(gradfile_name2);
292
   unlink(var_store_file_name);
293
  #else
294
   remove(gradfile_name1);
295
   remove(gradfile_name2);
296
   remove(var_store_file_name);
297
  #endif
298

  
299
   delete[] true_ptr_first;
300
   true_ptr_first = 0;
293
  delete [] true_ptr_first;
294
  true_ptr_first = 0;
301 295
}
302 296

  
303 297
/**

Also available in: Unified diff