Browse Source

Fixed ported WriteFile issue (multi-purpose variables)

refactor
suhrke 5 years ago
parent
commit
4e555fd2da
  1. 4
      source/Printer.cpp
  2. 3
      source/main.cpp

4
source/Printer.cpp

@ -853,7 +853,9 @@ void Printnextpage(t_printdata *print) { @@ -853,7 +853,9 @@ void Printnextpage(t_printdata *print) {
pbmi->bmiHeader.biHeight=height;
pbmi->bmiHeader.biXPelsPerMeter=(print->ppix*10000)/254;
pbmi->bmiHeader.biYPelsPerMeter=(print->ppiy*10000)/254;
if ((fwrite(pbmi, sizeof(char), n, f) == 0) || (u!=(ulong)n)) {
u = fwrite(pbmi, sizeof(char), n, f);
if ( u != (ulong)n ) {
success=0;
}
};

3
source/main.cpp

@ -172,12 +172,9 @@ int main(int argc, char ** argv) { @@ -172,12 +172,9 @@ int main(int argc, char ** argv) {
// Construct superblock
if ( Initializeprinting( &printdata, WIDTH_A4, HEIGHT_A4 ) == 0 ) {
//Create BMPs until all data has been written to BMP
int bmpNo = 1;
int currStep = printdata.step;
while ( printdata.step == currStep ) {
cout << "Creating BMP #" << bmpNo << " " << outfile << endl;
Printnextpage( &printdata );
++bmpNo;
}
}
}

Loading…
Cancel
Save