[hylafax-commits] hylafax/faxd Class2.c++, 1.22, 1.23 ModemConfig.c++, 1.31, 1.32 ModemConfig.h, 1.
Brought to you by:
faxguy
From: Lee H. <fa...@us...> - 2008-04-28 12:00:17
|
Update of /cvsroot/hylafax/hylafax/faxd In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv31508/faxd Modified Files: Class2.c++ ModemConfig.c++ ModemConfig.h Log Message: Adds Class2JBIGSupport modem configuration option. Index: ModemConfig.c++ =================================================================== RCS file: /cvsroot/hylafax/hylafax/faxd/ModemConfig.c++,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ModemConfig.c++ 8 Feb 2008 18:35:56 -0000 1.31 --- ModemConfig.c++ 28 Apr 2008 12:00:03 -0000 1.32 *************** *** 273,284 **** --- 273,288 ---- #ifdef HAVE_JBIGTIFF class1JBIGSupport = FaxModem::JBIG_FULL; // full support for monochrome JBIG + class2JBIGSupport = FaxModem::JBIG_FULL; // full support for monochrome JBIG #else class1JBIGSupport = FaxModem::JBIG_SEND; // send support for monochrome JBIG + class2JBIGSupport = FaxModem::JBIG_SEND; // send support for monochrome JBIG #endif #else #ifdef HAVE_JBIGTIFF class1JBIGSupport = FaxModem::JBIG_RECV; // receive support for monochrome JBIG + class2JBIGSupport = FaxModem::JBIG_RECV; // receive support for monochrome JBIG #else class1JBIGSupport = FaxModem::JBIG_NONE; // no support for monochrome JBIG + class2JBIGSupport = FaxModem::JBIG_NONE; // no support for monochrome JBIG #endif #endif *************** *** 763,766 **** --- 767,772 ---- else if (streq(tag, "class1jbigsupport")) class1JBIGSupport = getJBIGSupport(value); + else if (streq(tag, "class2jbigsupport")) + class2JBIGSupport = getJBIGSupport(value); else if (streq(tag, "class1persistentecm")) class1PersistentECM = getBoolean(value); Index: ModemConfig.h =================================================================== RCS file: /cvsroot/hylafax/hylafax/faxd/ModemConfig.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ModemConfig.h 8 Feb 2008 18:35:56 -0000 1.28 --- ModemConfig.h 28 Apr 2008 12:00:03 -0000 1.29 *************** *** 253,256 **** --- 253,257 ---- BadPageHandling badPageHandling; // bad page (received) handling method JBIGSupport class1JBIGSupport; // monochrome JBIG support + JBIGSupport class2JBIGSupport; // monochrome JBIG support bool saveUnconfirmedPages; // don't delete unconfirmed pages fxStr tiff2faxCmd; // for intelligent RTFCC in comparing compression rates Index: Class2.c++ =================================================================== RCS file: /cvsroot/hylafax/hylafax/faxd/Class2.c++,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Class2.c++ 26 Apr 2008 22:34:28 -0000 1.22 --- Class2.c++ 28 Apr 2008 12:00:03 -0000 1.23 *************** *** 120,123 **** --- 120,138 ---- modemParams.ec |= BIT(EC_ENABLE64); } + bool jbigsupported = false; + switch (conf.class2JBIGSupport) { + case FaxModem::JBIG_FULL: + jbigsupported = true; + break; + case FaxModem::JBIG_SEND: + jbigsupported = isSend; + break; + case FaxModem::JBIG_RECV: + jbigsupported = !isSend; + break; + } + if (!jbigsupported) { + modemParams.df ^= BIT(DF_JBIG); + } traceModemParams(); /* |