Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Patch for aur/epson-inkjet-printer-escpr2
diff -ruN epson-inkjet-printer-escpr2-1.0.9-orig/src/filter.c epson-inkjet-printer-escpr2-1.0.9/src/filter.c
--- epson-inkjet-printer-escpr2-1.0.9-orig/src/filter.c 2017-03-14 04:53:00.000000000 +0100
+++ epson-inkjet-printer-escpr2-1.0.9/src/filter.c 2017-12-29 15:48:57.825604394 +0100
@@ -40,6 +40,8 @@
#include "epson-escpr-api.h"
#include "epson-escpr-services.h"
#include "epson-escpr-mem.h"
+#include "epson-escpr-services.h"
+//#include "epson-escpage.h"
#include "err.h"
#include "mem.h"
@@ -48,6 +50,11 @@
#include "libprtX.h"
#include "optBase.h"
#include "linux_cmn.h"
+#include "xfifo.h"
+
+extern EPS_ERR_CODE SetupJobAttrib (const EPS_JOB_ATTRIB*);
+extern EPS_ERR_CODE SendStartJob ();
+extern EPS_ERR_CODE PrintBand (const EPS_UINT8*, EPS_UINT32, EPS_UINT32*);
#define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4)
@@ -429,10 +436,10 @@
}else{
debug_msg("pageStartJob() success");
}
-
+
printJob.jobStatus = EPS_STATUS_ESTABLISHED;
- int printHeight = 0;
-///////////////////////////////////////////////////////////////////////////////////////////////////////////
+ EPS_UINT32 printHeight = 0;
+///////////////////////////////////////////////////////////////////////////////////////////////////////////
print_area_x = printJob.printableAreaWidth;
print_area_y = printJob.printableAreaHeight;
@@ -605,7 +612,7 @@
memcpy(rever_buf + k*3, startpage + pos + (bandBmp.widthBytes - 6) - k*3, 3);
}
}
- PrintBand (rever_buf, bandBmp.widthBytes, &printHeight);
+ PrintBand ((const EPS_UINT8 *)rever_buf, bandBmp.widthBytes, &printHeight);
pos -= bandBmp.widthBytes;
}
@@ -898,7 +905,7 @@
/* Get number of pages */
char page_num;
- read (STDIN_FILENO, &page_num, 1);
+ (void)read (STDIN_FILENO, &page_num, 1);
debug_msg("total pages = %d\n", page_num);
/* Others */
@@ -949,7 +956,7 @@
// fwrite (pBuf, cbBuf, 1, outfp);
- XFIFOWrite(context, pBuf, cbBuf);
+ XFIFOWrite(context, (char *)pBuf, cbBuf);
return 1;
}
diff -ruN epson-inkjet-printer-escpr2-1.0.9-orig/src/mem.c epson-inkjet-printer-escpr2-1.0.9/src/mem.c
--- epson-inkjet-printer-escpr2-1.0.9-orig/src/mem.c 2017-03-14 04:53:00.000000000 +0100
+++ epson-inkjet-printer-escpr2-1.0.9/src/mem.c 2017-12-29 15:49:19.692523065 +0100
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include "mem.h"
+#include "err.h"
void *
mem_malloc (unsigned int size, bool_t crit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.