@@ -375,9 +375,6 @@ int file_source::work(int noutput_items,
375
375
{
376
376
char * o = (char *)output_items[0 ];
377
377
uint64_t size = noutput_items;
378
- #if 0
379
- do_update(); // update d_fp is reqd
380
- #endif
381
378
if (d_fp == NULL )
382
379
throw std::runtime_error (" work with file not open" );
383
380
@@ -394,7 +391,6 @@ int file_source::work(int noutput_items,
394
391
d_buffering = true ;
395
392
if (d_buffering)
396
393
{
397
- // d_reader_ready.wait(guard);
398
394
// output zeroes while we are buffering
399
395
guard.unlock ();
400
396
memset (o, 0 , d_itemsize * noutput_items);
@@ -449,21 +445,6 @@ int file_source::work(int noutput_items,
449
445
}
450
446
else
451
447
d_buffering = true ;
452
- #if 0
453
- // Add stream tag whenever the file starts again
454
-
455
- uint64_t nitems_to_read = std::min(size, d_items_remaining);
456
-
457
- // Since the bounds of the file are known, unexpected nitems is an error
458
- if (nitems_to_read != fread(o, d_itemsize, nitems_to_read, (FILE*)d_fp))
459
- throw std::runtime_error("fread error");
460
-
461
- size -= nitems_to_read;
462
- d_items_remaining -= nitems_to_read;
463
- o += nitems_to_read * d_itemsize;
464
-
465
- // Ran out of items ("EOF")
466
- #endif
467
448
}
468
449
return (noutput_items - size);
469
450
}
0 commit comments