Revision 1247 trunk/src/linad99/df_file.cpp

df_file.cpp (revision 1247)
217 217

  
218 218

  
219 219
/**
220
 * Description not yet available.
221
 * \param
222
 */
223
  DF_FILE::~DF_FILE()
224
  {
225
    delete [] buff;
226
    buff=0;
227
    buff_end=0;
220
Destructor
221
*/
222
DF_FILE::~DF_FILE()
223
{
224
  delete [] buff;
225
  buff=0;
226
  buff_end=0;
228 227

  
229
    int repfs=option_match(ad_comm::argc,ad_comm::argv,"-fsize");
228
  int repfs=option_match(ad_comm::argc,ad_comm::argv,"-fsize");
230 229

  
231
    if (ad_comm::global_logfile && repfs)
232
    {
233
      my_off_t pos;
234
      pos=lseek(file_ptr,0,SEEK_END);
235
      *ad_comm::global_logfile << "size of file " << cmpdif_file_name
230
  if (ad_comm::global_logfile && repfs)
231
  {
232
    my_off_t pos;
233
    pos=lseek(file_ptr,0,SEEK_END);
234
    *ad_comm::global_logfile << "size of file " << cmpdif_file_name
236 235
        << " = " << pos << endl;
237
    }
238

  
239
    if (close(file_ptr))
240
    {
241
      cerr << "Error closing file " << cmpdif_file_name << "\n";
242
    }
243
#   if defined ( __SUN__) ||  defined ( __GNU__)
244
      unlink(cmpdif_file_name);
236
  }
237
  if (close(file_ptr))
238
  {
239
    cerr << "Error closing file " << cmpdif_file_name << "\n";
240
  }
241
#if defined ( __SUN__) ||  defined ( __GNU__)
242
  unlink(cmpdif_file_name);
245 243
#else
246
      adstring currentdir;
247
      ad_getcd(currentdir);
248
      int xxx=remove(cmpdif_file_name);
249
      if (xxx) {
250
        cerr << "Error trying to delete file " << cmpdif_file_name << endl;
251
        xxx=unlink(cmpdif_file_name);
252
        cout << xxx << endl;
253
      }
254
#endif
244
  adstring currentdir;
245
  ad_getcd(currentdir);
246
  int xxx=remove(cmpdif_file_name);
247
  if (xxx)
248
  {
249
    cerr << "Error trying to delete file " << cmpdif_file_name << endl;
250
    xxx=unlink(cmpdif_file_name);
251
    cout << xxx << endl;
255 252
  }
253
#endif
254
}
256 255

  
257 256

  
258 257
/**

Also available in: Unified diff