summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO9
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD15
-rw-r--r--cups.patch22
-rw-r--r--mychanges.patch249
5 files changed, 250 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d856efcdd60..ac97d795fa53 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon May 9 16:19:52 UTC 2016
+# Tue Jan 23 14:41:18 UTC 2024
pkgbase = cnijfilter-common
pkgdesc = Canon IJ Printer Driver (Common Package)
pkgver = 4.10
- pkgrel = 1
+ pkgrel = 5
url = http://www.canon-europe.com/support/pixma_software/
install = cnijfilter-common.install
arch = i686
@@ -14,14 +14,15 @@ pkgbase = cnijfilter-common
makedepends = tar
makedepends = make
conflicts = lib32-cnijfilter320
+ conflicts = canon-pixma-mx920-complete
source = cnijfilter-source-4.10-1.tar.gz::http://pdisp01.c-wss.com/gdl/WWUFORedirectTarget.do?id=MDEwMDAwNTg1ODAx&cmp=ACB&lang=EN
source = cups.patch
source = buildfiles.patch
source = mychanges.patch
sha512sums = 58198e92e360c71c95423bfa8278f449eb645245af1b96770323cb6f4b2b7186e5ab326d58377c20627c750d3d8c253addf637f9d18e085b1c89a81d6239ab51
- sha512sums = 141a78c2353b3864b5a468fb6f4cf74fef5bf53ae75ac8932d6d853adc4044254a5371dcba1d05358b6075b6f38783f580ac7137088b91c10b1e412581144843
+ sha512sums = ce3de5764d47809166c86cc52feeae354f459bdc1db757ee62e8c7793b4886f95d9a04caee5adefc73b3ae1752ce370668d23d9530ebf8be2b7b25066e064210
sha512sums = fb73e2e0653f2654a9c5211b5dc3e06ce24cd2f5bf64a27009f5446e69c7f02d78bb201f15da0f68ad01b1cb4e699c808eccb9df690ffea07b6d5a59ab5629f3
- sha512sums = 210902afe06240def9d6e662f5c21a8e99eeac6104798230f196e269e07b20b265bd360a15aed921ab73e7aff91c4a8e3212585091d86e89bac42e4b32ed1afd
+ sha512sums = 1c70fbe7da493cd44e13149baeda1d90edbbe0d9e52ca9178e70b8dc0e494f544523eefad653e2f2a4c0283f601feb549767f2eb2941cd44dc97ebc8b2b0db9a
depends_i686 = libcups
depends_i686 = popt
depends_i686 = libusb
diff --git a/.gitignore b/.gitignore
index b96695de219c..34460684d8d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@ pkg/
src/
cnijfilter-source-*.tar.gz
*.pkg.tar.xz
+*.pkg.tar.zst
*~
diff --git a/PKGBUILD b/PKGBUILD
index bb42955f8b0b..fe96d3537239 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,11 +4,11 @@
# Contributor: Jeroen Op 't Eynde <jeroen [at the] xprsyrslf [dot] be>
# Contributor: Maxqia <contrib [at the] maxqia [dot] com
-pkgname=('cnijfilter-common')
+pkgname=cnijfilter-common
_pkgname=cnijfilter
pkgver=4.10
-pkgrel=1
+pkgrel=5
_pkgreview=1
pkgdesc="Canon IJ Printer Driver (Common Package)"
@@ -17,7 +17,8 @@ url="http://www.canon-europe.com/support/pixma_software/"
arch=('i686' 'x86_64')
license=('custom')
-conflicts=('lib32-cnijfilter320')
+conflicts=('lib32-cnijfilter320'
+ 'canon-pixma-mx920-complete')
makedepends_x86_64=('gcc-multilib')
depends_x86_64=('lib32-libcups' 'lib32-popt' 'lib32-libusb' 'lib32-libxml2')
@@ -35,9 +36,9 @@ source=("cnijfilter-source-4.10-1.tar.gz::http://pdisp01.c-wss.com/gdl/WWUFORedi
"buildfiles.patch"
"mychanges.patch")
sha512sums=('58198e92e360c71c95423bfa8278f449eb645245af1b96770323cb6f4b2b7186e5ab326d58377c20627c750d3d8c253addf637f9d18e085b1c89a81d6239ab51'
- '141a78c2353b3864b5a468fb6f4cf74fef5bf53ae75ac8932d6d853adc4044254a5371dcba1d05358b6075b6f38783f580ac7137088b91c10b1e412581144843'
+ 'ce3de5764d47809166c86cc52feeae354f459bdc1db757ee62e8c7793b4886f95d9a04caee5adefc73b3ae1752ce370668d23d9530ebf8be2b7b25066e064210'
'fb73e2e0653f2654a9c5211b5dc3e06ce24cd2f5bf64a27009f5446e69c7f02d78bb201f15da0f68ad01b1cb4e699c808eccb9df690ffea07b6d5a59ab5629f3'
- '210902afe06240def9d6e662f5c21a8e99eeac6104798230f196e269e07b20b265bd360a15aed921ab73e7aff91c4a8e3212585091d86e89bac42e4b32ed1afd')
+ '1c70fbe7da493cd44e13149baeda1d90edbbe0d9e52ca9178e70b8dc0e494f544523eefad653e2f2a4c0283f601feb549767f2eb2941cd44dc97ebc8b2b0db9a')
prepare() {
cd "${srcdir}/${_pkgname}-source-${pkgver}-${_pkgreview}/"
@@ -73,6 +74,6 @@ package() {
ln -s /usr/lib32/cups/filter/pstocanonij ${pkgdir}/usr/lib/cups/filter/
fi
- install -d ${pkgdir}/etc/udev/rules.d
- install -m 644 etc/*.rules ${pkgdir}/etc/udev/rules.d
+ install -d ${pkgdir}/usr/lib/udev/rules.d
+ install -m 644 etc/*.rules ${pkgdir}/usr/lib/udev/rules.d
}
diff --git a/cups.patch b/cups.patch
index 19a44b229246..4cbbdd1f6263 100644
--- a/cups.patch
+++ b/cups.patch
@@ -9,25 +9,3 @@ diff -ruN cnijfilter-source-4.10-1.orig/backend/src/cnij_backend_common.c cnijfi
// Header file for CANON
#include "cnij_backend_common.h"
-diff -ruN cnijfilter-source-4.10-1.orig/cngpij/cngpij/bjcups.c cnijfilter-source-4.10-1/cngpij/cngpij/bjcups.c
---- cnijfilter-source-4.10-1.orig/cngpij/cngpij/bjcups.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cngpij/cngpij/bjcups.c 2016-05-09 20:25:06.256620531 +0430
-@@ -20,6 +20,7 @@
- #include <config.h>
- #endif // HAVE_CONFIG_H
-
-+#define _IPP_PRIVATE_STRUCTURES 1
- #include <cups/cups.h>
- #include <cups/language.h>
- #include <cups/ppd.h>
-diff -ruN cnijfilter-source-4.10-1.orig/cngpijmnt/src/main.c cnijfilter-source-4.10-1/cngpijmnt/src/main.c
---- cnijfilter-source-4.10-1.orig/cngpijmnt/src/main.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cngpijmnt/src/main.c 2016-05-09 20:25:06.259953863 +0430
-@@ -20,6 +20,7 @@
- #include <config.h>
- #endif // HAVE_CONFIG_H
-
-+#define _IPP_PRIVATE_STRUCTURES 1
- #include <cups/cups.h>
- #include <cups/language.h>
- #include <cups/ppd.h>
diff --git a/mychanges.patch b/mychanges.patch
index c3d639e0e2e8..436b739492cc 100644
--- a/mychanges.patch
+++ b/mychanges.patch
@@ -1,6 +1,6 @@
diff -ruN cnijfilter-source-4.10-1.orig/backendnet/backend/cnijnetlm.c cnijfilter-source-4.10-1/backendnet/backend/cnijnetlm.c
--- cnijfilter-source-4.10-1.orig/backendnet/backend/cnijnetlm.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/backendnet/backend/cnijnetlm.c 2016-05-09 20:25:06.263287197 +0430
++++ cnijfilter-source-4.10-1/backendnet/backend/cnijnetlm.c 2020-09-17 19:44:53.592370556 +0430
@@ -252,6 +252,7 @@
// waitpid( g_pid, NULL, 0) ; /* child process wait */
@@ -21,7 +21,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/backendnet/backend/cnijnetlm.c cnijfilte
fseek(tempfp, read_position, SEEK_SET);
diff -ruN cnijfilter-source-4.10-1.orig/backendnet/lmonitor/cnijnetchk.c cnijfilter-source-4.10-1/backendnet/lmonitor/cnijnetchk.c
--- cnijfilter-source-4.10-1.orig/backendnet/lmonitor/cnijnetchk.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/backendnet/lmonitor/cnijnetchk.c 2016-05-09 20:25:06.263287197 +0430
++++ cnijfilter-source-4.10-1/backendnet/lmonitor/cnijnetchk.c 2020-09-17 19:44:53.592370556 +0430
@@ -337,7 +337,7 @@
bufsize = (src[0] << 8) + src[1];
buf = (char*)&(src[2]);
@@ -33,7 +33,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/backendnet/lmonitor/cnijnetchk.c cnijfil
keylen = strlen(key);
diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/langmon.c cnijfilter-source-4.10-1/bscc2sts/src/langmon.c
--- cnijfilter-source-4.10-1.orig/bscc2sts/src/langmon.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/bscc2sts/src/langmon.c 2016-05-09 20:25:06.263287197 +0430
++++ cnijfilter-source-4.10-1/bscc2sts/src/langmon.c 2020-09-17 19:44:53.592370556 +0430
@@ -258,7 +258,7 @@
static int print_normal()
@@ -54,7 +54,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/langmon.c cnijfilter-source
ptr += w_size;
diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_print.c cnijfilter-source-4.10-1/bscc2sts/src/lm_print.c
--- cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_print.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/bscc2sts/src/lm_print.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/bscc2sts/src/lm_print.c 2020-09-17 19:44:53.592370556 +0430
@@ -244,13 +244,17 @@
ptr = buf;
/* data print(output) loop */
@@ -75,7 +75,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_print.c cnijfilter-sourc
write(log_hand, ptr, w_size);
diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_status.c cnijfilter-source-4.10-1/bscc2sts/src/lm_status.c
--- cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_status.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/bscc2sts/src/lm_status.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/bscc2sts/src/lm_status.c 2020-09-17 19:44:53.592370556 +0430
@@ -516,7 +516,9 @@
int dev_path = PRNT_PATH;
short cnclerr = -1;
@@ -96,9 +96,115 @@ diff -ruN cnijfilter-source-4.10-1.orig/bscc2sts/src/lm_status.c cnijfilter-sour
while( cnclerr != CNCL_OK ){
#ifdef DEBUG
fprintf(log_path, "CNCL_CHECK_START2:response @ i : %d\n",i);
+diff -ruN cnijfilter-source-4.10-1.orig/cngpij/cngpij/bjcups.c cnijfilter-source-4.10-1/cngpij/cngpij/bjcups.c
+--- cnijfilter-source-4.10-1.orig/cngpij/cngpij/bjcups.c 2013-12-24 07:39:15.000000000 +0330
++++ cnijfilter-source-4.10-1/cngpij/cngpij/bjcups.c 2020-09-17 19:44:53.595703924 +0430
+@@ -660,22 +660,6 @@
+
+
+
+-static cups_lang_t * bjcupsLangDefault( )
+-{
+- cups_lang_t *pLanguage;
+- char *tLang;
+-
+- if( (tLang = getenv("LC_ALL"))==NULL)
+- tLang = getenv("LANG");
+-
+- pLanguage = cupsLangDefault();
+- setlocale(LC_ALL,tLang);
+-
+- return pLanguage;
+-}
+-
+-
+-
+ static short getDeviceURI( const char *pDestName, char *pDeviceURI, short bufSize)
+ {
+ /*** Parameters start ***/
+@@ -683,7 +667,6 @@
+ ipp_t *pRequest, // Pointer to CUPS IPP request.
+ *pResponse; // Pointer to CUPS IPP response.
+ ipp_attribute_t *pAttribute; // Pointer to CUPS attributes.
+- cups_lang_t *pLanguage; // Pointer to language.
+ char *pPrinter = NULL; // Pointer to printer name.
+ char *pDUri = NULL; // Pointer to Device uri.
+ short retVal = -1; // Return value.
+@@ -695,41 +678,34 @@
+ goto onErr;
+ }
+ else {
+- pRequest = ippNew();
+-
+- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+- pRequest->request.op.request_id = 1;
+-
+- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+-
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage));
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language);
++ pRequest = ippNewRequest(CUPS_GET_PRINTERS);
++
+ ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
+
+ if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ fputs("ERROR: IPP ERROR\n", stderr);
+ goto onErr;
+ }
+ else {
+- pAttribute = pResponse->attrs;
++ pAttribute = ippFirstAttribute(pResponse);
+
+ while (pAttribute != NULL) {
+- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
+- pAttribute = pAttribute->next;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ if (pAttribute == NULL) {
+ break;
+ }
+
+- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
+- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
+- pPrinter = pAttribute->values[0].string.text;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
++ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
++ pPrinter = ippGetString(pAttribute, 0, NULL);
+ }
+- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
+- pDUri = pAttribute->values[0].string.text;
++ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
++ pDUri = ippGetString(pAttribute, 0, NULL);
+ }
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+
+ if (strcasecmp(pDestName, pPrinter) == 0) {
+@@ -738,7 +714,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+@@ -748,8 +724,6 @@
+ pDeviceURI = '\0';
+ goto onErr;
+ }
+-
+- cupsLangFree(pLanguage);
+ httpClose(pHTTP);
+ }
+
diff -ruN cnijfilter-source-4.10-1.orig/cngpij/cngpij/getipc.c cnijfilter-source-4.10-1/cngpij/cngpij/getipc.c
--- cnijfilter-source-4.10-1.orig/cngpij/cngpij/getipc.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cngpij/cngpij/getipc.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/cngpij/cngpij/getipc.c 2020-09-17 19:44:53.595703924 +0430
@@ -60,59 +60,57 @@
while( (client_fd = accept(server_fd, (struct sockaddr *)&sun, &len)) >= 0 )
@@ -182,7 +288,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/cngpij/cngpij/getipc.c cnijfilter-source
unlink(sname);
diff -ruN cnijfilter-source-4.10-1.orig/cngpijmnt/src/getipc.c cnijfilter-source-4.10-1/cngpijmnt/src/getipc.c
--- cnijfilter-source-4.10-1.orig/cngpijmnt/src/getipc.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cngpijmnt/src/getipc.c 2016-05-09 20:25:06.266620531 +0430
++++ cnijfilter-source-4.10-1/cngpijmnt/src/getipc.c 2020-09-17 19:44:53.595703924 +0430
@@ -62,59 +62,57 @@
while( (client_fd = accept(server_fd, (struct sockaddr *)&sun, &len)) >= 0 )
@@ -264,18 +370,126 @@ diff -ruN cnijfilter-source-4.10-1.orig/cngpijmnt/src/getipc.c cnijfilter-source
close(server_fd);
unlink(sname);
+diff -ruN cnijfilter-source-4.10-1.orig/cngpijmnt/src/main.c cnijfilter-source-4.10-1/cngpijmnt/src/main.c
+--- cnijfilter-source-4.10-1.orig/cngpijmnt/src/main.c 2013-12-24 07:39:15.000000000 +0330
++++ cnijfilter-source-4.10-1/cngpijmnt/src/main.c 2020-09-17 19:44:53.595703924 +0430
+@@ -283,22 +283,6 @@
+
+
+
+-static cups_lang_t * bjcupsLangDefault( )
+-{
+- cups_lang_t *pLanguage;
+- char *tLang;
+-
+- if( (tLang = getenv("LC_ALL"))==NULL)
+- tLang = getenv("LANG");
+-
+- pLanguage = cupsLangDefault();
+- setlocale(LC_ALL,tLang);
+-
+- return pLanguage;
+-}
+-
+-
+-
+ static short getDeviceURI( const char *pDestName, char *pDeviceURI, short bufSize)
+ {
+ /*** Parameters start ***/
+@@ -306,7 +290,6 @@
+ ipp_t *pRequest, // Pointer to CUPS IPP request.
+ *pResponse; // Pointer to CUPS IPP response.
+ ipp_attribute_t *pAttribute; // Pointer to CUPS attributes.
+- cups_lang_t *pLanguage; // Pointer to language.
+ char *pPrinter = NULL; // Pointer to printer name.
+ char *pDUri = NULL; // Pointer to Device uri.
+ short retVal = -1; // Return value.
+@@ -318,41 +301,34 @@
+ goto onErr;
+ }
+ else {
+- pRequest = ippNew();
+-
+- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+- pRequest->request.op.request_id = 1;
++ pRequest = ippNewRequest(CUPS_GET_PRINTERS);
+
+- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+-
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage));
+- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language);
+ ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
+
+ if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ fputs("ERROR: IPP ERROR\n", stderr);
+ goto onErr;
+ }
+ else {
+- pAttribute = pResponse->attrs;
++ pAttribute = ippFirstAttribute(pResponse);
+
+ while (pAttribute != NULL) {
+- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
+- pAttribute = pAttribute->next;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ if (pAttribute == NULL) {
+ break;
+ }
+
+- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
+- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
+- pPrinter = pAttribute->values[0].string.text;
++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
++ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
++ pPrinter = ippGetString(pAttribute, 0, NULL);
+ }
+- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
+- pDUri = pAttribute->values[0].string.text;
++ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
++ pDUri = ippGetString(pAttribute, 0, NULL);
+ }
+- pAttribute = pAttribute->next;
++ pAttribute =ippNextAttribute(pResponse);
+ }
+
+ if (strcasecmp(pDestName, pPrinter) == 0) {
+@@ -361,7 +337,7 @@
+ }
+
+ if (pAttribute != NULL)
+- pAttribute = pAttribute->next;
++ pAttribute = ippNextAttribute(pResponse);
+ }
+ }
+
+@@ -371,8 +347,6 @@
+ pDeviceURI = '\0';
+ goto onErr;
+ }
+-
+- cupsLangFree(pLanguage);
+ httpClose(pHTTP);
+ }
+
diff -ruN cnijfilter-source-4.10-1.orig/cnijnpr/src/cnijnpr.c cnijfilter-source-4.10-1/cnijnpr/src/cnijnpr.c
--- cnijfilter-source-4.10-1.orig/cnijnpr/src/cnijnpr.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/cnijnpr/src/cnijnpr.c 2016-05-09 20:25:06.266620531 +0430
-@@ -35,6 +35,7 @@
- #include <sys/sysctl.h>
++++ cnijfilter-source-4.10-1/cnijnpr/src/cnijnpr.c 2020-09-17 19:48:19.677933956 +0430
+@@ -32,9 +32,9 @@
+ #include <signal.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+-#include <sys/sysctl.h>
#include <config.h>
#include <fcntl.h>
+#include <unistd.h>
#include <dlfcn.h>
#include "cncl.h"
-@@ -96,7 +97,7 @@
+@@ -96,7 +96,7 @@
/* argv[8]: /dev/usb/lp0 */
/* */
/**********************************************/
@@ -284,7 +498,16 @@ diff -ruN cnijfilter-source-4.10-1.orig/cnijnpr/src/cnijnpr.c cnijfilter-source-
{
int fd;
int rtn = 0 ;
-@@ -583,7 +584,7 @@
+@@ -301,7 +301,7 @@
+ datawrite01:
+ //printf("child :X--- buf[0] ---X = %s\n", &buf[0]);
+ //printf("child :X--- buf[1] ---X = %s\n", &buf[1]);
+- wrtn = write(fd, buf, STATUS_BUF + 1); /* for bug fix Ver.3.20 buf[0] */
++ wrtn = write(fd, buf, STATUS_BUF); /* for bug fix Ver.3.20 buf[0] */
+ //wrtn = write(fd, buf, 4096); /* for bug fix Ver.3.20 buf[0] */
+
+ if( fdusb > 0 ) {
+@@ -583,7 +583,7 @@
/************************************************/
/* get_printer_devid */
/************************************************/
@@ -295,7 +518,7 @@ diff -ruN cnijfilter-source-4.10-1.orig/cnijnpr/src/cnijnpr.c cnijfilter-source-
char *ivec = NULL;
diff -ruN cnijfilter-source-4.10-1.orig/pstocanonij/filter/pstocanonij.c cnijfilter-source-4.10-1/pstocanonij/filter/pstocanonij.c
--- cnijfilter-source-4.10-1.orig/pstocanonij/filter/pstocanonij.c 2013-12-24 07:39:15.000000000 +0330
-+++ cnijfilter-source-4.10-1/pstocanonij/filter/pstocanonij.c 2016-05-09 20:25:06.269953863 +0430
++++ cnijfilter-source-4.10-1/pstocanonij/filter/pstocanonij.c 2020-09-17 19:44:53.595703924 +0430
@@ -387,7 +387,7 @@
{
if( !IS_BLANK(*p_code) )