Browse Source

Compiles and creates bmp in linux

master
suhrke 3 years ago
parent
commit
d7c4476efc
3 changed files with 9 additions and 6 deletions
  1. 2
    2
      src/Printer.cpp
  2. 4
    2
      src/main.cpp
  3. 3
    2
      src/paperbak.h

+ 2
- 2
src/Printer.cpp View File

@@ -28,6 +28,7 @@
// //
////////////////////////////////////////////////////////////////////////////////

#include <stdlib.h>
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
#elif __linux__
@@ -35,7 +36,6 @@
#include "Bitmap.h"
#endif
#include <algorithm>
#include <stdlib.h>
#include "bzlib.h"
#include "aes.h"
#include "FileAttributes.hpp"
@@ -321,7 +321,7 @@ static void Readandcompress(t_printdata *print) {
return;
}; }
else {
Message("Reading file",(print->readsize+size)*100/print->origsize);
Message("Reading file", (print->readsize+size)*100/print->origsize);
memcpy(print->buf+print->readsize,print->readbuf,size);
print->readsize+=size; };
// If all data is read, finish step.

+ 4
- 2
src/main.cpp View File

@@ -181,9 +181,11 @@ int main(int argc, char ** argv) {
strcpy (::pb_outbmp, outfile.c_str());

if (isEncode) {
Printfile(::pb_infile, ::pb_outbmp);
// begin the process to write the bitmap
while (pb_printdata.step != 0) {
Nextdataprintingstep (&pb_printdata);
while (::pb_printdata.step != 0) {
cout << "Step: " << ::pb_printdata.step << endl;
Nextdataprintingstep (&::pb_printdata);
}
}
//else {

+ 3
- 2
src/paperbak.h View File

@@ -18,9 +18,10 @@
#include <time.h>
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
#elif __linux__
#include "Bitmap.h"
#endif
#include "bzlib.h"
#include "Bitmap.h"



@@ -369,7 +370,7 @@ inline void Reporterror(const char *input) {


inline void Message(const char *input, int progress) {
printf("%s @ %s\%", input, progress);
printf("%s @ %d\%", input, progress);
}



Loading…
Cancel
Save