bug_x86_64.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. diff --git a/src/filter.c b/src/filter.c
  2. index d13f10e..105eae9 100755
  3. --- a/src/filter.c
  4. +++ b/src/filter.c
  5. @@ -40,6 +40,8 @@
  6. #include "epson-escpr-api.h"
  7. #include "epson-escpr-services.h"
  8. #include "epson-escpr-mem.h"
  9. +#include "epson-escpr-services.h"
  10. +//#include "epson-escpage.h"
  11. #include "err.h"
  12. #include "mem.h"
  13. @@ -48,6 +50,11 @@
  14. #include "libprtX.h"
  15. #include "optBase.h"
  16. #include "linux_cmn.h"
  17. +#include "xfifo.h"
  18. +
  19. +extern EPS_ERR_CODE SetupJobAttrib (const EPS_JOB_ATTRIB*);
  20. +extern EPS_ERR_CODE SendStartJob ();
  21. +extern EPS_ERR_CODE PrintBand (const EPS_UINT8*, EPS_UINT32, EPS_UINT32*);
  22. #define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4)
  23. @@ -431,7 +438,7 @@ main (int argc, char *argv[])
  24. }
  25. printJob.jobStatus = EPS_STATUS_ESTABLISHED;
  26. - int printHeight = 0;
  27. + EPS_UINT32 printHeight = 0;
  28. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  29. print_area_x = printJob.printableAreaWidth;
  30. @@ -605,7 +612,7 @@ main (int argc, char *argv[])
  31. memcpy(rever_buf + k*3, startpage + pos + (bandBmp.widthBytes - 6) - k*3, 3);
  32. }
  33. }
  34. - PrintBand (rever_buf, bandBmp.widthBytes, &printHeight);
  35. + PrintBand ((const EPS_UINT8 *)rever_buf, bandBmp.widthBytes, &printHeight);
  36. pos -= bandBmp.widthBytes;
  37. }
  38. @@ -898,7 +905,7 @@ set_pips_parameter (filter_option_t *filter_opt_p, EPS_OPT *printOpt)
  39. /* Get number of pages */
  40. char page_num;
  41. - read (STDIN_FILENO, &page_num, 1);
  42. + (void)read (STDIN_FILENO, &page_num, 1);
  43. debug_msg("total pages = %d\n", page_num);
  44. /* Others */
  45. @@ -949,7 +956,7 @@ EPS_INT32 print_spool_fnc(void* hParam, const EPS_UINT8* pBuf, EPS_UINT32 cbBuf)
  46. // fwrite (pBuf, cbBuf, 1, outfp);
  47. - XFIFOWrite(context, pBuf, cbBuf);
  48. + XFIFOWrite(context, (char *)pBuf, cbBuf);
  49. return 1;
  50. }
  51. diff --git a/src/mem.c b/src/mem.c
  52. index 4b4b118..420eaf5 100755
  53. --- a/src/mem.c
  54. +++ b/src/mem.c
  55. @@ -24,6 +24,7 @@
  56. #include <stdlib.h>
  57. #include "mem.h"
  58. +#include "err.h"
  59. void *
  60. mem_malloc (unsigned int size, bool_t crit)
  61. --
  62. 2.15.1