Changeset 2567


Ignore:
Timestamp:
Oct 26, 2012, 3:20:58 PM (6 years ago)
Author:
ksherdy
Message:

Updated template buffering.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/PDF/pablo_template_pdf.cpp

    r2566 r2567  
    144144        //////////////////////////////////////////////////////////////////////////////////////////
    145145       
    146 //      padding_read = fread(&src_buffer[chars_read], 1, (chars_read + LOOKAHEAD_SIZE), infile);
     146        padding_read = chars_read - SEGMENT_SIZE;
     147
     148        cout << "padding_read: " << padding_read << endl;
     149       
     150
    147151//      remaining += padding_read;
    148152//      chars_avail += padding_read;
     
    176180
    177181                remaining -= SEGMENT_SIZE;
    178           memmove(src_buffer, &src_buffer[SEGMENT_SIZE], LOOKAHEAD_SIZE);
    179           chars_read = fread(&src_buffer[padding_read], 1, SEGMENT_SIZE + LOOKAHEAD_SIZE, infile);
     182          memmove(src_buffer, &src_buffer[SEGMENT_SIZE], padding_read);
     183          chars_read = fread(&src_buffer[padding_read], 1, (SEGMENT_SIZE + LOOKAHEAD_SIZE - padding_read), infile);
     184
     185                padding_read = SEGMENT_SIZE + LOOKAHEAD_SIZE - padding_read ;//chars_read;
     186
    180187                remaining += chars_read;
    181188                chars_avail = remaining;
Note: See TracChangeset for help on using the changeset viewer.