]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 730: expands Class1JBIGSupport definition
authorLee Howard <faxguy@howardsilvan.com>
Fri, 17 Mar 2006 16:47:05 +0000 (16:47 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Fri, 17 Mar 2006 16:47:05 +0000 (16:47 +0000)
22 files changed:
config.h.in
configure
faxd/Class0.c++
faxd/Class0.h
faxd/Class1.c++
faxd/Class1.h
faxd/Class2.c++
faxd/Class2.h
faxd/ClassModem.h
faxd/FaxModem.h
faxd/FaxServer.c++
faxd/FaxServer.h
faxd/ModemConfig.c++
faxd/ModemConfig.h
faxd/ModemServer.c++
faxd/ModemServer.h
faxd/faxGettyApp.c++
faxd/faxGettyApp.h
faxd/pageSendApp.c++
faxd/pageSendApp.h
man/hylafax-config.4f
misc/jbig.tif [new file with mode: 0644]

index f9749c8e754b4770084d32b914e7e7fe6f7a0bba..fe37392888a8c8938ee2f9fe45d348a3f0796360 100644 (file)
  * JBIG library support
  */
 @HAVE_JBIG@
+@HAVE_JBIGTIFF@
 
 #endif
index fe447bbd1e4c5876c359ab435834f04664bba66a..7db55e47e73bb46b7ceb4a8ccc92ed51485c316c 100755 (executable)
--- a/configure
+++ b/configure
@@ -184,6 +184,7 @@ LN_S
 HAVE_PAM
 PAMLIBS
 HAVE_JBIG
+HAVE_JBIGTIFF
 LIBJBIG"
 
 VAR2="MACHDEPLIBS
@@ -3248,6 +3249,23 @@ else
     Note "Using TIFF binary files from $TIFFBIN"
 fi
 
+HAVE_JBIGTIFF="/*#define HAVE_JBIGTIFF 1*/"
+if [ "$DISABLE_JBIG" != "yes" ]; then
+    Note "Checking JBIG-in-TIFF conversion support."
+    if [ -z "`$TIFFBIN/tiffcp -c g4 misc/jbig.tif misc/foo.tif 2>&1`" ]; then
+       $TIFFBIN/tiffcp misc/jbig.tif misc/foo.tif
+       if [ -n "`$TIFFBIN/tiffinfo misc/foo.tif | grep 'Fax DCS'`" ]; then
+           HAVE_JBIGTIFF="#define HAVE_JBIGTIFF 1"
+           Note "JBIG-in-TIFF conversion support found."
+       else
+           Note "JBIG-in-TIFF fax support not found."
+       fi
+    else
+       Note "JBIG-in-TIFF conversion support not found."
+    fi
+    rm -f misc/foo.tif
+fi
+
 Note "Done checking TIFF support."
 
 # NB: only check if we have the MLA tools
index eb5d316197cc83a8ef12fed8e823153c9bbecbe6..e422e5d917c79ecfc072d040f561f5771943ff5e 100644 (file)
@@ -41,7 +41,7 @@ Class0Modem::~Class0Modem()
 }
 
 bool
-Class0Modem::setupModem()
+Class0Modem::setupModem(bool isSetup)
 {
     if (!selectBaudRate(conf.maxRate, conf.flowControl, conf.flowControl))
        return (false);
index d15de3cd8cab51a0aac20091189c6b82c33ce63d..5ffa44fc9378bd6ab37a9963deff4089ef7480cc 100644 (file)
@@ -35,7 +35,7 @@ public:
     Class0Modem(ModemServer&, const ModemConfig&);
     ~Class0Modem();
 
-    bool setupModem();
+    bool setupModem(bool isSend = true);
     virtual bool setupFlowControl(FlowControl fc);
     CallStatus dial(const char* number, fxStr& emsg);
     CallStatus dialResponse(fxStr& emsg);
index 97af9b8f53dc59f30a85a6b5ac70c1f3ffdba632..debac8b266eea19eb355e0dc9f499627b4768407 100644 (file)
@@ -117,7 +117,7 @@ Class1Modem::~Class1Modem()
  * if so, configure it for use.
  */
 bool
-Class1Modem::setupModem()
+Class1Modem::setupModem(bool isSend)
 {
     if (!selectBaudRate(conf.maxRate, conf.flowControl, conf.flowControl))
        return (false);
@@ -177,7 +177,7 @@ Class1Modem::setupModem()
     modemParams.df = BIT(DF_1DMH) | BIT(DF_2DMR);
     modemParams.bf = BF_DISABLE;
     modemParams.st = ST_ALL;
-    pokeConfig();
+    pokeConfig(isSend);
     traceModemParams();
     /*
      * Receive capabilities are maintained separately from
@@ -233,13 +233,27 @@ Class1Modem::setupModem()
  * These are potentially dynamic modem settings that can be altered on-the-fly.
  */
 void
-Class1Modem::pokeConfig()
+Class1Modem::pokeConfig(bool isSend)
 {
     modemParams.vr = conf.class1Resolutions;   // bitmapped by configuration
     if (conf.class1ECMSupport) {
        modemParams.ec = BIT(EC_DISABLE) | BIT(EC_ENABLE64) | BIT(EC_ENABLE256);
        modemParams.df |= BIT(DF_2DMMR);
-       if (conf.class1JBIGSupport) modemParams.df |= BIT(DF_JBIG);
+       switch (conf.class1JBIGSupport) {
+           case FaxModem::JBIG_FULL:
+               jbigSupported = true; 
+               break;
+           case FaxModem::JBIG_SEND:
+               jbigSupported = isSend;
+               break;
+           case FaxModem::JBIG_RECV:
+               jbigSupported = !isSend;
+               break;
+           default:
+               jbigSupported = false;
+               break;
+       }
+       if (jbigSupported) modemParams.df |= BIT(DF_JBIG);
     } else
        modemParams.ec = BIT(EC_DISABLE);
 }
@@ -297,7 +311,7 @@ Class1Modem::setupFlowControl(FlowControl fc)
 
 /*
  * Place the modem into the appropriate state
- * for sending/received facsimile.
+ * for sending facsimile.
  */
 bool
 Class1Modem::faxService(bool enableV34)
@@ -1571,7 +1585,7 @@ Class1Modem::modemDIS() const
 
     if (conf.class1ECMSupport) {
        // JBIG
-       if (conf.class1JBIGSupport) {
+       if (jbigSupported) {
            dis_caps.setBit(FaxParams::BITNUM_JBIG_BASIC, true);
            dis_caps.setBit(FaxParams::BITNUM_JBIG_L0, true);   // JBIG library can handle L0 = 1-Yd
        }
index 3ee573190ef001bd59bf25094359a9a39a80b4e8..dca8e2db2379b672680664dbc4555596e13a947e 100644 (file)
@@ -62,6 +62,7 @@ protected:
     bool       hadV34Trouble;          // indicates failure due to V.34 restrictions
     bool       hadV17Trouble;          // indicates failure due to V.17 problems
     bool       batchingError;          // indicates failure due to batching protocol
+    bool       jbigSupported;          // whether or not JBIG is supported in this mode
     const u_char* frameRev;            // HDLC frame bit reversal table
     fxStr      lid;                    // encoded local id string
     fxStr      pwd;                    // transmit password
@@ -116,7 +117,7 @@ protected:
     fxStr      ctrlFrameRcvd;  // unexpected control channel frame received
 
 // modem setup stuff
-    virtual bool setupModem();
+    virtual bool setupModem(bool isSend = true);
     virtual bool setupClass1Parameters();
     virtual bool setupFlowControl(FlowControl fc);
 // transmission support
@@ -220,7 +221,7 @@ public:
     bool       recvPage(TIFF*, u_int& ppm, fxStr& emsg, const fxStr& id);
     bool       recvEnd(fxStr& emsg);
     void       recvAbort();
-    void       pokeConfig();
+    void       pokeConfig(bool isSend);
 
 // polling support
     bool       requestToPoll(fxStr&);
@@ -228,9 +229,9 @@ public:
                    fxStr& emsg);
 
 // miscellaneous
-    bool       faxService(bool enableV34);     // switch to fax mode
+    bool       faxService(bool enableV34);     // switch to fax mode (send)
     bool       reset(long ms);                 // reset modem
-    bool       ready(long ms);                 // ready modem
+    bool       ready(long ms);                 // ready modem for receive
     void       setLID(const fxStr& number);    // set local id string
     bool       supportsPolling() const;        // modem capability
 };
index 821f8f7a5660b06f3235373d6c4dcdbc2e048809..b5c71243737172182edf7fc9994323ed769c1470 100644 (file)
@@ -45,7 +45,7 @@ Class2Modem::~Class2Modem()
  * the remainder of the Class 2 support fairly generic.
  */
 bool
-Class2Modem::setupModem()
+Class2Modem::setupModem(bool isSend)
 {
     if (!selectBaudRate(conf.maxRate, conf.flowControl, conf.flowControl))
        return (false);
@@ -266,7 +266,7 @@ Class2Modem::setupModem()
 }
 
 void
-Class2Modem::pokeConfig()
+Class2Modem::pokeConfig(bool isSend)
 {
 }
 
@@ -425,7 +425,7 @@ Class2Modem::parseClass2Capabilities(const char* cap, Class2Params& params)
 
 /*
  * Place the modem into the appropriate state
- * for sending/received facsimile.
+ * for sending facsimile.
  */
 bool
 Class2Modem::faxService(bool enableV34)
index 77335b18a32f5620dc83b8c649a84332b4c27747..04f0df8b931326e1f561fed444b99ec4c0a45ec6 100644 (file)
@@ -72,7 +72,7 @@ protected:
     fxStr      lid;                    // prepared local identifier string
 
 // modem setup stuff
-    virtual bool setupModem();
+    virtual bool setupModem(bool isSend = true);
     virtual bool setupModel(fxStr& model);
     virtual bool setupRevision(fxStr& rev);
     virtual bool setupDCC();
@@ -150,7 +150,7 @@ public:
     bool       recvPage(TIFF*, u_int& ppm, fxStr& emsg, const fxStr& id);
     bool       recvEnd(fxStr& emsg);
     void       recvAbort();
-    void       pokeConfig();
+    void       pokeConfig(bool isSend);
 
 // polling support
     bool       requestToPoll(fxStr& emsg);
@@ -158,7 +158,7 @@ public:
                    fxStr& emsg);
 
 // miscellaneous
-    bool       faxService(bool enableV34);     // switch to fax mode
+    bool       faxService(bool enableV34);     // switch to fax mode (send)
     bool       reset(long ms);                 // reset modem
     void       setLID(const fxStr& number);    // set local id string
     bool       supportsPolling() const;        // modem capability
index 2dd507dfc9f4e0755d3aa0e88cd394475b1620d7..7e6ba161b3cd28fa6186eb40aaa58c5d14a07c53 100644 (file)
@@ -228,7 +228,7 @@ protected:
 public:
     virtual ~ClassModem();
 
-    virtual bool setupModem() = 0;
+    virtual bool setupModem(bool isSend = true) = 0;
     virtual bool isFaxModem() const = 0;       // XXX safe to cast
 
     virtual bool sync(long ms = 0);            // synchronize (wait for "OK")
index 6351a88226357db86dbafaa66b1a927398e1c1a5..3119f21bb01a672ea4c9cac857be1e63622c679e 100644 (file)
@@ -44,6 +44,7 @@ class FaxServer;
 // NB: these would be enums in the FaxModem class
 //     if there were a portable way to refer to them!
 typedef unsigned int RTNHandling;       // RTN signal handling method 
+typedef unsigned int JBIGSupport;      // JBIG support available
 
 /*
  * This is an abstract class that defines the interface to
@@ -174,6 +175,12 @@ public:
         RTN_IGNORE     = 2,         // ignore error and send next page
         RTN_RETRANSMITIGNORE = 3    // retransmit but ignore error instead of hanging up
     };
+    enum {                     // FaxModem::JBIGSupport
+       JBIG_NONE = 0,              // no JBIG support
+       JBIG_RECV = 1,              // receive-only JBIG support
+       JBIG_SEND = 2,              // send-only JBIG support
+       JBIG_FULL = 3               // full JBIG support
+    };
 
     virtual ~FaxModem();
 
@@ -276,7 +283,7 @@ public:
     virtual bool recvEnd(fxStr& emsg) = 0;
     virtual void recvAbort() = 0;
     virtual void recvSucceeded();
-    virtual void pokeConfig() = 0;
+    virtual void pokeConfig(bool isSend) = 0;
     // query interfaces for optional state
     virtual bool getRecvPWD(fxStr&);
     virtual bool getRecvTSI(fxStr&);
index cedcbfde17327c8334a451b405dd9e7c07e1b631..2cba399ee17a5b773312d7001ec09d668acecc75 100644 (file)
@@ -96,10 +96,10 @@ void FaxServer::notifyConnected(const FaxRequest&) {}
  * config file before hooking up the new modem.
  */
 bool
-FaxServer::setupModem()
+FaxServer::setupModem(bool isSend)
 {
     modem = NULL;
-    if (!ModemServer::setupModem())
+    if (!ModemServer::setupModem(isSend))
        return (false);
     if (getModem()->isFaxModem()) {
        modem = (FaxModem*) ModemServer::getModem();
@@ -121,7 +121,7 @@ FaxServer::discardModem(bool dropDTR)
  * driver class.
  */
 ClassModem*
-FaxServer::deduceModem()
+FaxServer::deduceModem(bool isSend)
 {
     fxStr h(type);
     h.raisecase();
@@ -134,7 +134,7 @@ FaxServer::deduceModem()
     if (h == "UNKNOWN"){
        modem = new Class0Modem(*this, *this);
        if (modem) {
-           if (modem->setupModem()){
+           if (modem->setupModem(isSend)){
                 modemServices = modem->getModemServices();
                 fxStr mfr = modem->getManufacturer();
                 mfr.raisecase();
@@ -165,7 +165,7 @@ FaxServer::deduceModem()
     if (modemServices & SERVICE_CLASS21) {
        modem = new Class21Modem(*this, *this);
        if (modem) {
-           if (modem->setupModem())
+           if (modem->setupModem(isSend))
                return modem;
            delete modem;
        }
@@ -173,7 +173,7 @@ FaxServer::deduceModem()
     if (modemServices & SERVICE_CLASS20) {
        modem = new Class20Modem(*this, *this);
        if (modem) {
-           if (modem->setupModem())
+           if (modem->setupModem(isSend))
                return modem;
            delete modem;
        }
@@ -181,7 +181,7 @@ FaxServer::deduceModem()
     if (modemServices & SERVICE_CLASS2) {
        modem = new Class2ErsatzModem(*this, *this);
        if (modem) {
-           if (modem->setupModem())
+           if (modem->setupModem(isSend))
                return modem;
            delete modem;
        }
@@ -189,7 +189,7 @@ FaxServer::deduceModem()
     if (modemServices & SERVICE_CLASS10) {
        modem = new Class10Modem(*this, *this);
        if (modem) {
-           if (modem->setupModem())
+           if (modem->setupModem(isSend))
                return modem;
            delete modem;
        }
@@ -197,7 +197,7 @@ FaxServer::deduceModem()
     if (modemServices & SERVICE_CLASS1) {
        modem = new Class1ErsatzModem(*this, *this);
        if (modem) {
-           if (modem->setupModem())
+           if (modem->setupModem(isSend))
                return modem;
            delete modem;
        }
index 67236bf40db740f57253ced718c023b4d3e93c77..2b0478006aa00976cb2ad277d5214bf1d105d437 100644 (file)
@@ -85,8 +85,8 @@ private:
 protected:
     FaxServer(const fxStr& deviceName, const fxStr& devID);
 
-    bool       setupModem();
-    ClassModem*        deduceModem();
+    bool       setupModem(bool isSend = true);
+    ClassModem*        deduceModem(bool isSend = true);
     void       discardModem(bool dropDTR);
     fxStr      getModemCapabilities() const;
 
index fa922c630bb49c8c463c6943cd4d7aa624021f32..266360e80adcb4842cb53b338360a22cd71efb4c 100644 (file)
@@ -247,9 +247,17 @@ ModemConfig::setupConfig()
     class1GreyJPEGSupport = false;             // support for greyscale JPEG
     class1ColorJPEGSupport = false;            // support for full color JPEG
 #ifdef HAVE_JBIG
-    class1JBIGSupport  = true;                 // support for monochrome JBIG
+#ifdef HAVE_JBIGTIFF
+    class1JBIGSupport  = FaxModem::JBIG_FULL;  // full support for monochrome JBIG
 #else
-    class1JBIGSupport  = false;                // support for monochrome JBIG
+    class1JBIGSupport  = FaxModem::JBIG_SEND;  // send support for monochrome JBIG
+#endif
+#else
+#ifdef HAVE_JBIGTIFF
+    class1JBIGSupport  = FaxModem::JBIG_RECV;  // receive support for monochrome JBIG
+#else
+    class1JBIGSupport  = FaxModem::JBIG_NONE;  // no support for monochrome JBIG
+#endif
 #endif
     class1Resolutions  = VR_ALL;               // resolutions support
     class1PersistentECM        = true;                 // continue to correct
@@ -564,6 +572,46 @@ ModemConfig::getRTNHandling(const char* cp)
     return (rh);
 }
 
+u_int
+ModemConfig::getJBIGSupport(const char* cp)
+{
+    JBIGSupport js;
+    if (valeq(cp, "FULL")) {
+       js = FaxModem::JBIG_FULL;
+    } else if (valeq(cp, "YES")) {
+       js = FaxModem::JBIG_FULL;
+    } else if (valeq(cp, "TRUE")) {
+       js = FaxModem::JBIG_FULL;
+    } else if (valeq(cp, "NONE")) {
+       js = FaxModem::JBIG_NONE;
+    } else if (valeq(cp, "NO")) {
+       js = FaxModem::JBIG_NONE;
+    } else if (valeq(cp, "FALSE")) {
+       js = FaxModem::JBIG_NONE;
+    } else if (valeq(cp, "SEND")) {
+       js = FaxModem::JBIG_SEND;
+    } else if (valeq(cp, "RECEIVE")) {
+       js = FaxModem::JBIG_RECV;
+    } else if (valeq(cp, "RECV")) {
+       js = FaxModem::JBIG_RECV;
+    } else {
+#ifdef HAVE_JBIG
+#ifdef HAVE_JBIGTIFF
+       js = FaxModem::JBIG_FULL;
+#else
+       js = FaxModem::JBIG_SEND;
+#endif
+#else
+#ifdef HAVE_JBIGTIFF
+       js = FaxModem::JBIG_RECV;
+#else
+       js = FaxModem::JBIG_NONE;
+#endif
+#endif
+    }
+    return (js);
+}
+
 void
 ModemConfig::parseCallID(const char* rbuf, CallID& callid) const
 {
@@ -657,10 +705,8 @@ ModemConfig::setConfigItem(const char* tag, const char* value)
        class1GreyJPEGSupport = getBoolean(value);
     else if (streq(tag, "class1colorjpegsupport"))
        class1ColorJPEGSupport = getBoolean(value);
-#ifdef HAVE_JBIG
     else if (streq(tag, "class1jbigsupport"))
-       class1JBIGSupport = getBoolean(value);
-#endif
+        class1JBIGSupport = getJBIGSupport(value);
     else if (streq(tag, "class1persistentecm"))
        class1PersistentECM = getBoolean(value);
     else if (streq(tag, "class1extendedres"))
index 54f8a2f5dfe4f513ab3da8cee5f3b795bc6c40fb..5054fd129c50fb042e98278aa79ea1683c5d41cd 100644 (file)
@@ -57,6 +57,7 @@ private:
     u_int      getSpeed(const char* value);
     u_int      getDataFormat(const char* value);
     u_int       getRTNHandling(const char* cp);
+    u_int       getJBIGSupport(const char* cp);
     ECMType    getECMType(const char* cp);
 
     static bool findRate(const char*, BaudRate&);
@@ -163,7 +164,6 @@ public:
     u_int      class1ECMFrameSize;     // ECM frame size for transmission
     bool       class1GreyJPEGSupport;  // Greyscale JPEG support
     bool       class1ColorJPEGSupport; // Full-color JPEG support
-    bool       class1JBIGSupport;      // monochrome JBIG support
     bool       class1ECMSupport;       // support T.30-A ECM
     bool       class1PersistentECM;    // continue to correct
     bool       class1TCFRecvHack;      // deliberately look for V.21 disconnect
@@ -229,6 +229,7 @@ public:
     u_int      recvDataFormat;         // received facsimile data format
 
     RTNHandling rtnHandling;            // RTN signal handling method
+    JBIGSupport        class1JBIGSupport;      // monochrome JBIG support
     bool       saveUnconfirmedPages;   // don't delete unconfirmed pages
     
                                        // Distinctive ring data as sequences of DRON/DROF intervals
index d4d5a96c358c38a4ff99e73e24193e74793ffe06..ce9cc2f29548f725088cf3034d777aa52489b2a9 100644 (file)
@@ -448,7 +448,7 @@ const fxStr& ModemServer::getConfigFile() const { return configFile; }
  * Setup the modem; if needed.
  */
 bool
-ModemServer::setupModem()
+ModemServer::setupModem(bool isSend)
 {
     if (!modem) {
        const char* dev = modemDevice;
@@ -459,7 +459,7 @@ ModemServer::setupModem()
         * The deduceComplain cruft is just to reduce the
         * noise in the log file when probing for a modem.
         */
-       modem = deduceModem();
+       modem = deduceModem(isSend);
        if (!modem) {
            discardModem(true);
            if (deduceComplain) {
@@ -507,11 +507,11 @@ ModemServer::readyModem()
  * driver class.
  */
 ClassModem*
-ModemServer::deduceModem()
+ModemServer::deduceModem(bool isSend)
 {
     ClassModem* modem = new Class0Modem(*this, *this);
     if (modem) {
-       if (modem->setupModem())
+       if (modem->setupModem(isSend))
            return modem;
        delete modem;
     }
index c22e5771ee41d923e86a8af463b33e311eb310e2..ca06b490f066aee437d9a7963fac63cb2a43f921 100644 (file)
@@ -127,10 +127,10 @@ protected:
     ModemServer(const fxStr& deviceName, const fxStr& devID);
 
 // modem driver setup+teardown interfaces
-    virtual bool setupModem();
+    virtual bool setupModem(bool isSend = true);
     virtual bool readyModem();
     virtual void discardModem(bool dropDTR);
-    virtual ClassModem* deduceModem();
+    virtual ClassModem* deduceModem(bool isSend = true);
 // low-level modem interfaces
     int                getModemFd();                           // XXX
     BaudRate   getModemRate() const;
index feb92d8b24fe1b96ee6cd85b3fa73027b8a54278..85af67f2e3ed64427e6f2d0e8b2385314e02fdb7 100644 (file)
@@ -130,7 +130,7 @@ bool faxGettyApp::canLockModem()    { return modemLock->check(); }
 bool faxGettyApp::isModemLocked()      { return modemLock->isLocked(); }
 
 bool
-faxGettyApp::setupModem()
+faxGettyApp::setupModem(bool isSend)
 {
     /*
      * Reread the configuration file if it has been
@@ -141,7 +141,7 @@ faxGettyApp::setupModem()
      */
     if (updateConfig(getConfigFile()))
        sendModemStatus("N" | getModemNumber());
-    if (FaxServer::setupModem() && ModemServer::readyModem()) {
+    if (FaxServer::setupModem(false) && ModemServer::readyModem()) {
        /*
         * Setup modem for receiving.
         */
@@ -379,7 +379,7 @@ faxGettyApp::answerPhone(AnswerType atype, CallType ctype, const CallID& callid,
                    }
                    // modem settings may have changed...
                    FaxModem* modem = (FaxModem*) ModemServer::getModem();
-                   modem->pokeConfig();
+                   modem->pokeConfig(false);
                }
                Sys::close(pipefd[0]);
                break;
@@ -495,7 +495,7 @@ faxGettyApp::answerCleanup()
 
     bool isSetup;
     if (isModemLocked() || lockModem()) {
-       isSetup = setupModem();
+       isSetup = setupModem(false);
        unlockModem();
     } else
        isSetup = false;
index 96751446d66bf2e847a48907c75d77baa347e0b7..c083e5753f920c52017c4e7e0d418afff2be46ae 100644 (file)
@@ -103,7 +103,7 @@ private:
     bool       canLockModem();
     bool       lockModem();
     void       unlockModem();
-    bool       setupModem();
+    bool       setupModem(bool isSend);
     void       discardModem(bool dropDTR);
 // inbound call handling
     bool       processCall(CallType ctype, fxStr& emsg, const CallID& callid);
index 6939d225fc83fbe99a21ee55ebbd5f1984d3cf29..b9b93472d0fd30cc8d756e342264152765b4d3f9 100644 (file)
@@ -259,7 +259,7 @@ pageSendApp::sendPage(FaxRequest& req, FaxMachineInfo& info, u_int& batched)
        if (info.getPagerTTYParity() != "")
            pagerTTYParity = info.getPagerTTYParity();
        // NB: may need to set tty baud rate here XXX
-    if (!(batched & BATCH_FIRST) || setupModem()) {
+    if (!(batched & BATCH_FIRST) || setupModem(true)) {
            changeState(SENDING);
            setServerStatus("Sending page " | req.jobid);
            /*
@@ -1330,9 +1330,9 @@ pageSendApp::getConfigParity(const char* value) const
  * Modem and TTY setup
  */
 bool 
-pageSendApp::setupModem()
+pageSendApp::setupModem(bool isSend)
 {
-    return (ModemServer::setupModem() &&
+    return (ModemServer::setupModem(isSend) &&
        setParity((Parity) getConfigParity(pagerTTYParity)));
 }
 
index 368500c0ea1ca458498b95026104dfc2a2caa1a4..175e1f647e253079b0cb528f3f03016772411447 100644 (file)
@@ -104,7 +104,7 @@ private:
     bool       canLockModem();
     bool       lockModem();
     void       unlockModem();
-    bool       setupModem();
+    bool       setupModem(bool isSend);
 // notification interfaces used by ModemServer
     void       notifyModemReady();
     void       notifyModemWedged();
index 55e14954e9960bc53a9f6245e84f265d41658c3b..016a1343bfd2163d62bfa0e2d72cc01c50fe4b08 100644 (file)
@@ -289,7 +289,7 @@ Class1ExtendedRes   boolean \-      Class 1/1.0: enable extended resolution support
 Class1HFLOCmd  string  \-      Class 1/1.0: command to set hardware flow control
 Class1FrameOverhead    integer \s-14\s+1       Class 1/1.0: extra bytes in a received \s-1HDLC\s+1 frame
 Class1GreyJPEGSupport  boolean \s-1No\s+1      Class 1/1.0: to enable grey JPEG fax support
-Class1JBIGSupport      boolean \s-1\fIsee below\fP\s+1 Class 1/1.0: to enable monochrome JBIG fax support
+Class1JBIGSupport      string  \s-1\fIsee below\fP\s+1 Class 1/1.0: to enable monochrome JBIG fax support
 Class1NFLOCmd  string  \-      Class 1/1.0: command to set no flow control
 Class1RecvAbortOK      integer \s-1200\s+1     Class 1/1.0: max wait (ms) for ``\s-1OK\s+1'' after recv abort
 Class1RecvIdentTimer   integer \s-140000\s+1   Class 1/1.0: max wait (ms) for initial ident frame
@@ -2282,10 +2282,13 @@ is enabled.
 .TP
 .B Class1JBIGSupport
 Whether or not to enable support for T.85 monochrome facsimile
-with JBIG compression.  This defaults to true if, during the build process
-a compatible JBIG library was found; otherwise
-.B Class1JBIGSupport
-defaults to false.
+with JBIG compression.  Options are ``true'' for support in both
+sending and receiving, ``false'' for no support, ``send'' for 
+support only in sending, and ``receive'' for support only in 
+receiving.  If, during the build process a compatible JBIG library 
+was found then send support is enabled by default.  If, during
+the build process the TIFF tools are found to support JBIG then
+receive support is enabled by default.
 .TP
 .B Class1HFLOCmd
 The command to setup hardware (\s-1RTS/CTS\s+1)
diff --git a/misc/jbig.tif b/misc/jbig.tif
new file mode 100644 (file)
index 0000000..c004f4a
Binary files /dev/null and b/misc/jbig.tif differ