Hello community, here is the log from the commit of package hylafax+ for openSUSE:Factory checked in at 2017-04-06 11:02:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hylafax+ (Old) and /work/SRC/openSUSE:Factory/.hylafax+.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hylafax+" Thu Apr 6 11:02:58 2017 rev:14 rq:485027 version:5.5.9 Changes: -------- --- /work/SRC/openSUSE:Factory/hylafax+/hylafax+.changes 2016-04-03 23:07:37.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.hylafax+.new/hylafax+.changes 2017-04-06 11:02:59.572437704 +0200 @@ -1,0 +2,13 @@ +Mon Apr 3 11:40:04 UTC 2017 - axel.br...@gmx.de + +- hylafax+ 5.5.9 +* fix a handful of compiler warnings for gcc v7 (13, 17 Feb 2017) +* fix job rescheduling if the proxy connection attempt fails (13 Jul 2016) +* increase the maximum number of triggers from 1024 to 4096 (13 Jul 2016) +* eliminate faxq job priority "bounding" (13 Jul 2016) +* attempt to detect premature non-ECM Phase C carrier loss (15 Jun 2016) +* add missing recvq error message indications (6 May 2016) +* fix tagtest support for multi-strip images (25 Mar 2016) +* enhance textfmt wrapping to occur on word boundaries (24 Feb 2016) + +------------------------------------------------------------------- Old: ---- hylafax-5.5.8.tar.gz New: ---- hylafax-5.5.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hylafax+.spec ++++++ --- /var/tmp/diff_new_pack.7P2wLB/_old 2017-04-06 11:03:00.700278300 +0200 +++ /var/tmp/diff_new_pack.7P2wLB/_new 2017-04-06 11:03:00.708277170 +0200 @@ -19,7 +19,7 @@ %global faxspool %{_localstatedir}/spool/hylafax %define lib_version %(echo %{version} | tr \. _) Name: hylafax+ -Version: 5.5.8 +Version: 5.5.9 Release: 0 Summary: An enterprise-strength fax server License: BSD-3-Clause ++++++ hylafax-5.5.8.tar.gz -> hylafax-5.5.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/CHANGES new/hylafax-5.5.9/CHANGES --- old/hylafax-5.5.8/CHANGES 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/CHANGES 2017-02-18 02:03:09.000000000 +0100 @@ -2,6 +2,17 @@ New Changes +* fix a handful of compiler warnings for gcc v7 (13, 17 Feb 2017) +* fix job rescheduling if the proxy connection attempt fails (13 Jul 2016) +* increase the maximum number of triggers from 1024 to 4096 (13 Jul 2016) +* eliminate faxq job priority "bounding" (13 Jul 2016) +* attempt to detect premature non-ECM Phase C carrier loss (15 Jun 2016) +* add missing recvq error message indications (6 May 2016) +* fix tagtest support for multi-strip images (25 Mar 2016) +* enhance textfmt wrapping to occur on word boundaries (24 Feb 2016) + +(5.5.8) + * stop using mktemp() (5 Feb 2016) * fix LDAP authentication broken in 5.5.4 (24-26 Jan 2016) * reset senderinfo properly when receiving faxes (22 Jan 2016) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/CONTRIBUTORS new/hylafax-5.5.9/CONTRIBUTORS --- old/hylafax-5.5.8/CONTRIBUTORS 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/CONTRIBUTORS 2017-02-18 02:03:08.000000000 +0100 @@ -194,7 +194,7 @@ Joseph E. Sacco Giuseppe Sacco Michael Salzmann - Travis Schafer LogSend and LogRecv modem config options + Travis Schafer LogSend and LogRecv modem config options, documentation fixes Sven Schmidt Steven Schoch faxrcvd faxinfo text parsing John Sellens diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/VERSION new/hylafax-5.5.9/VERSION --- old/hylafax-5.5.8/VERSION 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/VERSION 2017-02-18 02:03:08.000000000 +0100 @@ -1 +1 @@ -5.5.8 +5.5.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/Class1Recv.c++ new/hylafax-5.5.9/faxd/Class1Recv.c++ --- old/hylafax-5.5.8/faxd/Class1Recv.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/Class1Recv.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -797,6 +797,7 @@ } else { gotCONNECT = false; u_short recvFrameCount = 0; + time_t ppmstart = Sys::now(); do { /* * Some modems will report CONNECT erroniously on high-speed Phase C data. @@ -807,6 +808,16 @@ ppmrcvd = recvFrame(frame, FCF_RCVR, timer); } while (!ppmrcvd && gotCONNECT && wasTimeout() && !gotEOT && ++recvFrameCount < 3); if (ppmrcvd) lastPPM = frame.getFCF(); + /* + * To combat premature carrier loss leading to MCF instead of RTN on short/partial pages, + * We started a timer above and measured the time it took to receive PPM. If longer + * longer than 5 seconds, and if we did not see RTC, then we assume that premature + * carrier loss occurred and set pageGood to false. + */ + if (Sys::now() - ppmstart > 5 && !getSeenRTC()) { + protoTrace("RECV detected premature Phase C carrier loss."); + pageGood = false; + } } /* * Do command received logic. @@ -1999,6 +2010,7 @@ bool Class1Modem::recvPageData(TIFF* tif, fxStr& emsg) { + bool ret = false; /* * T.30-A ECM mode requires a substantially different protocol than non-ECM faxes. */ @@ -2013,13 +2025,11 @@ if (prevPage) recvEndPage(tif, params); } - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, getRecvEOLCount()); - return (true); // no RTN with ECM + ret = true; // no RTN with ECM } else { (void) recvPageDLEData(tif, checkQuality(), params, emsg); dataSent += getRecvEOLCount(); dataMissed += getRecvBadLineCount(); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, getRecvEOLCount()); TIFFSetField(tif, TIFFTAG_CLEANFAXDATA, getRecvBadLineCount() ? CLEANFAXDATA_REGENERATED : CLEANFAXDATA_CLEAN); if (getRecvBadLineCount()) { @@ -2027,8 +2037,10 @@ TIFFSetField(tif, TIFFTAG_CONSECUTIVEBADFAXLINES, getRecvConsecutiveBadLineCount()); } - return (isQualityOK(params)); + ret = isQualityOK(params); } + TIFFSetField(tif, TIFFTAG_IMAGELENGTH, getRecvEOLCount()); + return (ret); } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/CopyQuality.c++ new/hylafax-5.5.9/faxd/CopyQuality.c++ --- old/hylafax-5.5.8/faxd/CopyQuality.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/CopyQuality.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -513,6 +513,7 @@ TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); TIFFSetField(tif, TIFFTAG_SOFTWARE, HYLAFAX_VERSION); TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, (const char*) id); + TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, TIFFFileName(tif)); char dateTime[24]; time_t now = Sys::now(); strftime(dateTime, sizeof (dateTime), "%Y:%m:%d %H:%M:%S", localtime(&now)); @@ -588,6 +589,24 @@ } } +/* + * Write an error message into the TIFF tags. + */ +void +FaxModem::recvRecordEmsg(TIFF* tif, fxStr& emsg) +{ + fxStr dn = fxStr::format("%s: %s", TIFFFileName(tif), (const char*) emsg); + TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, (const char*) dn); + uint16 cd = TIFFCurrentDirectory(tif); + if (cd > 0) { + // mark the previous directory, too, in-case this directory doesn't have any valid image data + TIFFCheckpointDirectory(tif); + TIFFSetDirectory(tif, cd-1); + TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, (const char*) dn); + TIFFRewriteDirectory(tif); + } +} + void FaxModem::clearSDNORMCount() { @@ -1221,6 +1240,15 @@ } /* + * Was RTC seen? + */ +bool +FaxModem::getSeenRTC() +{ + return seenRTC(); +} + +/* * Note an invalid G3 code word. */ void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/FaxModem.c++ new/hylafax-5.5.9/faxd/FaxModem.c++ --- old/hylafax-5.5.8/faxd/FaxModem.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/FaxModem.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -118,7 +118,7 @@ } void FaxModem::sendSetupPhaseB(const fxStr&, const fxStr&){} void FaxModem::sendEnd() {} -void FaxModem::getDataStats(FaxSetup*) {}; +void FaxModem::getDataStats(FaxSetup*) {} bool FaxModem::recvBegin(FaxSetup*, fxStr&) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/FaxModem.h new/hylafax-5.5.9/faxd/FaxModem.h --- old/hylafax-5.5.8/faxd/FaxModem.h 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/FaxModem.h 2017-02-18 02:03:08.000000000 +0100 @@ -127,6 +127,7 @@ FaxModem(FaxServer&, const ModemConfig&); // miscellaneous + bool getSeenRTC(); void countPage(); int getPageNumberOfCall(); void recvTrace(const char* fmt, ...); @@ -186,6 +187,7 @@ u_char* convertPhaseCData(u_char* buf, u_long& totdata, u_int fillorder, const Class2Params& params, const Class2Params& newparams, uint32& rows); public: + void recvRecordEmsg(TIFF* tif, fxStr& emsg); enum { // FaxModem::RTNHandling RTN_RETRANSMIT = 0, // retransmit page after RTN until MCF/MPS RTN_GIVEUP = 1, // immediately abort diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/FaxRecv.c++ new/hylafax-5.5.9/faxd/FaxRecv.c++ --- old/hylafax-5.5.8/faxd/FaxRecv.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/FaxRecv.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -243,6 +243,7 @@ } setServerStatus((const char*) statusmsg); recvOK = recvFaxPhaseD(tif, info, ppm, emsg); + if (emsg != "") modem->recvRecordEmsg(tif, emsg); TIFFClose(tif); info.time = (u_int) getFileTransferTime(); info.reason = emsg; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/FaxRequest.c++ new/hylafax-5.5.9/faxd/FaxRequest.c++ --- old/hylafax-5.5.8/faxd/FaxRequest.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/FaxRequest.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -667,7 +667,7 @@ if (*cp == ':') // address info *cp++ = '\0'; else - cp = tag, tag = '\0'; + cp = tag, *tag = '\0'; items.append(FaxItem(op, dirnum, tag, cp)); } @@ -691,7 +691,7 @@ if (*cp == ':') // address info *cp++ = '\0'; else - cp = tag, tag = '\0'; + cp = tag, *tag = '\0'; if (*cp == '\0' || !checkDocument(cp)) { error("Rejected document in corrupt job request"); rejectJob = true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/ModemConfig.c++ new/hylafax-5.5.9/faxd/ModemConfig.c++ --- old/hylafax-5.5.8/faxd/ModemConfig.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/ModemConfig.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -852,4 +852,4 @@ } #undef N -fxIMPLEMENT_ObjArray(IDConfArray, id_config); +fxIMPLEMENT_ObjArray(IDConfArray, id_config) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/ModemConfig.h new/hylafax-5.5.9/faxd/ModemConfig.h --- old/hylafax-5.5.8/faxd/ModemConfig.h 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/ModemConfig.h 2017-02-18 02:03:08.000000000 +0100 @@ -50,7 +50,7 @@ }; -fxDECLARE_ObjArray(IDConfArray, id_config); +fxDECLARE_ObjArray(IDConfArray, id_config) struct ModemConfig : public FaxConfig { private: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/Trigger.h new/hylafax-5.5.9/faxd/Trigger.h --- old/hylafax-5.5.8/faxd/Trigger.h 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/Trigger.h 2017-02-18 02:03:08.000000000 +0100 @@ -32,7 +32,7 @@ #include "Dictionary.h" #include "QLink.h" -#define TRIGGER_MAXTID 1024 // at most 1024 triggers can exist at one time +#define TRIGGER_MAXTID 4096 // maximum triggers that can exist at one time #define TRIGGER_BPW 32 // we assume 8*sizeof (u_int) >= 32 #define TRIGGER_MAXWDS ((TRIGGER_MAXTID+TRIGGER_BPW-1)/TRIGGER_BPW) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/cqtest.c++ new/hylafax-5.5.9/faxd/cqtest.c++ --- old/hylafax-5.5.8/faxd/cqtest.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/cqtest.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -118,6 +118,7 @@ TIFFSetField(tif, TIFFTAG_YRESOLUTION, (float) params.verticalRes()); TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); TIFFSetField(tif, TIFFTAG_SOFTWARE, HYLAFAX_VERSION); + TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, TIFFFileName(tif)); #ifdef notdef TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, (const char*) tsi); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/faxQueueApp.c++ new/hylafax-5.5.9/faxd/faxQueueApp.c++ --- old/hylafax-5.5.8/faxd/faxQueueApp.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/faxQueueApp.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -1770,14 +1770,10 @@ * any that could not complete on the first attempt. This * aids in timely delivery of bulk faxes as a group rather than * preoccupation with individual jobs as is the case with - * non-bulk style jobs. We bound the priority to keep it - * within a fixed "range" around it's starting priority. This - * is intended to keep "normal" and "high" priority jobs - * from conflicting. + * non-bulk style jobs. */ if (job.pri != 255 && job.pri > 190) job.pri++; - else if (JOBHASH(job.pri-1) == JOBHASH(req->usrpri)) - job.pri--; + else job.pri--; job.state = (req->tts > now) ? FaxRequest::state_sleeping : FaxRequest::state_ready; updateRequest(*req, job); // update on-disk status @@ -2457,8 +2453,8 @@ */ fxStr filename(FAX_SENDDIR "/" FAX_QFILEPREF | jobid); if (!Sys::isRegularFile(filename)) { - logError("JOB %s: qfile %s is not a regular file.", - (const char*) jobid, (const char*) filename); + logError("JOB %s: qfile %s is not a regular file: %s", + (const char*) jobid, (const char*) filename, strerror(errno)); return (false); } bool status = false; @@ -2882,7 +2878,12 @@ } client->hangupServer(); } - if (!status) logError("PROXY SEND: %s", (const char*) emsg); + if (!status) { + // some error occurred in callServer() or login() + logError("PROXY SEND: %s", (const char*) emsg); + job.state = FaxRequest::state_failed; + req.status = send_retry; + } updateRequest(req, job); req.npages -= prevPages; // queueAccounting() only wants the pages sent by the proxy queueAccounting(job, req, "PROXY"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/itufaxicc.c++ new/hylafax-5.5.9/faxd/itufaxicc.c++ --- old/hylafax-5.5.8/faxd/itufaxicc.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/itufaxicc.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -42,7 +42,7 @@ #define XMD_H extern "C" { #include "jpeglib.h" -}; +} // This is the error catcher static char ErrorMessage[JMSG_LENGTH_MAX]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/faxd/tagtest.c++ new/hylafax-5.5.9/faxd/tagtest.c++ --- old/hylafax-5.5.8/faxd/tagtest.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/faxd/tagtest.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -535,7 +535,6 @@ TIFFSetField(otif, TIFFTAG_BITSPERSAMPLE, 1); TIFFSetField(otif, TIFFTAG_SAMPLESPERPIXEL, 1); TIFFSetField(otif, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB); - TIFFSetField(otif, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB); uint32 r; TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &r); TIFFSetField(otif, TIFFTAG_ROWSPERSTRIP, r); @@ -583,7 +582,7 @@ totbytes = (params.df == DF_2DMMR) ? totdata : totbytes+ts - (dp-data); firstStrip = false; } else - dp = data; + dp = data+ts; if (fillorder != FILLORDER_LSB2MSB) TIFFReverseBits(dp, totbytes); if (TIFFWriteRawStrip(otif, strip, dp, totbytes) == -1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/hfaxd/RecvQueue.c++ new/hylafax-5.5.9/hfaxd/RecvQueue.c++ --- old/hylafax-5.5.8/hfaxd/RecvQueue.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/hfaxd/RecvQueue.c++ 2017-02-18 02:03:09.000000000 +0100 @@ -162,6 +162,12 @@ ri.params.br = brhold; } #endif + if (TIFFGetField(tif, TIFFTAG_DOCUMENTNAME, &cp)) { + cp = strchr(cp, ':'); + if (cp && cp[1] != '\0') { + ri.reason = cp+2; + } + } ri.sender = ""; CallID empty_callid; ri.callid = empty_callid; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/man/faxmail.1 new/hylafax-5.5.9/man/faxmail.1 --- old/hylafax-5.5.8/man/faxmail.1 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/man/faxmail.1 2017-02-18 02:03:09.000000000 +0100 @@ -314,7 +314,7 @@ The default bold font is Helvetica-Bold. .TP 10 .B \-c -Clip long text lines instead of wrapping them at page margins. +Clip long text lines instead of wrapping them at word boundaries near page margins. .TP 10 .BI \-C " cover" Use the cover page template file specified by @@ -598,7 +598,7 @@ string to the right of the ``:''). .TP 15 .B LineWrap -Control whether long text lines are wrapper or truncated at the +Control whether long text lines are wrapped or truncated at the right hand margin. (Equivalent to the .B \-c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/man/faxrcvd.1m new/hylafax-5.5.9/man/faxrcvd.1m --- old/hylafax-5.5.8/man/faxrcvd.1m 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/man/faxrcvd.1m 2017-02-18 02:03:09.000000000 +0100 @@ -171,9 +171,9 @@ .I RECV_DATA_CONVERSION Indicates whether TIFF files saved to disk by HylaFAX should be converted in place to another compression data format. -At this time the only available option is ``JBIG:2D-MMR'' which causes +At this time the only available option is ``JBIG:MMR'' which causes TIFF files using JBIG compression to be converted to 2D-MMR (G4) -compression. Since the majority of TIFF file viewers lacks JBIG support, +compression. Since the majority of TIFF file viewers lack JBIG support, this setting may be useful if JBIG-compressed fax receiving is enabled (see ``Class1JBIGSupport'' config option) and the received fax files are to be directly accessed by users, either through HylaFAX clients such as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/man/jobcontrol.1m new/hylafax-5.5.9/man/jobcontrol.1m --- old/hylafax-5.5.8/man/jobcontrol.1m 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/man/jobcontrol.1m 2017-02-18 02:03:09.000000000 +0100 @@ -104,14 +104,21 @@ .B Modem parameter controls which .B ModemGroup -is used in sending faxes to the destination. If the user -assigns a -.B ModemGroup -for a specific job where all modems are outside of this -.B ModemGroup -matching a destination, then the value of -.B Modem -is overridden by the user's assignment. Likewise, if the user +is used in sending faxes to the destination. If the user assigns a +.B ModemGroup +for a job where there are no common modems between that +.B ModemGroup +and the +.B ModemGroup +assigned here by +.B JobControlCmd, +then the +.B JobControlCmd +value of +.B Modem +is overridden by the user's +.B ModemGroup. +Likewise, if the user assigns a .B ModemGroup for a specific job where some, but not all, of the modems are diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/man/textfmt.1 new/hylafax-5.5.9/man/textfmt.1 --- old/hylafax-5.5.8/man/textfmt.1 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/man/textfmt.1 2017-02-18 02:03:09.000000000 +0100 @@ -84,7 +84,7 @@ Suppress page headers. .TP .B \-c -Clip long text lines instead of wrapping them at page margins. +Clip long text lines instead of wrapping them at word boundaries near page margins. .TP .B \-D Do not use @@ -274,8 +274,8 @@ option.) .TP 15 .B LineWrap -Control whether long text lines are wrapper or truncated at the -right hand margin. +Control whether long text lines are wrapped or truncated at word +boundaries near the right hand margin. (Equivalent to the .B \-c option.) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/util/DialRules.c++ new/hylafax-5.5.9/util/DialRules.c++ --- old/hylafax-5.5.8/util/DialRules.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/util/DialRules.c++ 2017-02-18 02:03:07.000000000 +0100 @@ -370,7 +370,7 @@ return s; } fxStr prefix; - for (int i = 0; i < level; i++) + for (u_int i = 0; i < level; i++) prefix.insert(" "); if (verbose) traceRules(prefix | "Apply %s rules to \"%s\"", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/util/FaxRecvInfo.c++ new/hylafax-5.5.9/util/FaxRecvInfo.c++ --- old/hylafax-5.5.8/util/FaxRecvInfo.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/util/FaxRecvInfo.c++ 2017-02-18 02:03:07.000000000 +0100 @@ -112,7 +112,7 @@ if (cp == NULL || cp[1] != ',' || cp[2] != '"') return (false); u_int i = 0; - while (cp+2 != '\0') { + while (*(cp+2) != '\0') { callid[i] = cp+3; // +1 for "/+1 for ,/+1 for " if (*cp == '\"') break; callid[i].resize(callid[i].next(0,'"')); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/util/InetTransport.c++ new/hylafax-5.5.9/util/InetTransport.c++ --- old/hylafax-5.5.8/util/InetTransport.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/util/InetTransport.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -108,7 +108,8 @@ } #endif if (err != 0) { - client.printWarning("getaddrinfo failed with %d: %s", err, gai_strerror(err)); + emsg = fxStr::format("getaddrinfo failed with %d: %s", err, gai_strerror(err)); + client.printWarning(emsg); return false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-5.5.8/util/TextFormat.c++ new/hylafax-5.5.9/util/TextFormat.c++ --- old/hylafax-5.5.8/util/TextFormat.c++ 2016-02-06 22:32:30.000000000 +0100 +++ new/hylafax-5.5.9/util/TextFormat.c++ 2017-02-18 02:03:08.000000000 +0100 @@ -755,6 +755,11 @@ void TextFormat::format(FILE* fp) { + int wordBuf[500]; // buffer for a word used in wrapping + int wordPos = 0; // position of the last character in wordBuf + TextCoord wordXOff = xoff; // position of the text when the last word was written + bool firstWord = true; // is this the first word on the line? + int c; while ((c = getc(fp)) != EOF) { if (useUTF8) { @@ -787,16 +792,36 @@ break; case '\f': // form feed if (!bop) { + if (wrapLines && wordPos) { + int pos; + for (pos = 0; pos < wordPos; pos++) { + if (040 <= wordBuf[pos] && wordBuf[pos] <= 0176) fputc(wordBuf[pos], tf); + else fprintf(tf, "\\%03o", wordBuf[pos] & 0xff); + } + wordPos = 0; + firstWord = true; + } endTextCol(); bol = bot = true; + wordXOff = xoff; } break; case '\n': // line break + if (wrapLines && wordPos) { + int pos; + for (pos = 0; pos < wordPos; pos++) { + if (040 <= wordBuf[pos] && wordBuf[pos] <= 0176) fputc(wordBuf[pos], tf); + else fprintf(tf, "\\%03o", wordBuf[pos] & 0xff); + } + wordPos = 0; + firstWord = true; + } if (bol) beginLine(); if (bot) beginText(); endTextLine(); + wordXOff = xoff; break; case '\r': // check for overstriking if ((c = getc(fp)) == '\n') { @@ -836,14 +861,35 @@ c = ' '; else c = '\t'; + if (wrapLines && wordPos) { + int pos; + for (pos = 0; pos < wordPos; pos++) fputc(wordBuf[pos], tf); + wordPos = 0; + if (c == ' ') fputc(c, tf); + firstWord = false; + } } else hm = curFont->charwidth(c); - if (xoff + hm > right_x) { + if (wordPos > 495 || xoff + hm > right_x) { if (!wrapLines) // discard line overflow break; if (c == '\t') // adjust white space motion hm -= right_x - xoff; + if (wordPos) { + wordXOff = xoff - wordXOff; + if (firstWord) { + int pos; + for (pos = 0; pos < wordPos; pos++) { + if (040 <= wordBuf[pos] && wordBuf[pos] <= 0176) fputc(wordBuf[pos], tf); + else fprintf(tf, "\\%03o", wordBuf[pos] & 0xff); + } + fputc('-', tf); + wordPos = 0; + } + } endTextLine(); + if (wordPos) xoff = wordXOff; + firstWord = true; } if (bol) beginLine(), bol = false; @@ -856,13 +902,21 @@ } else { // append to open PS string if (bot) beginText(), bot = false; + xoff += hm; if (040 <= c && c <= 0176) { if (c == '(' || c == ')' || c == '\\') - fputc('\\',tf); - fputc(c,tf); - } else - fprintf(tf, "\\%03o", c & 0xff); - xoff += hm; + if (wrapLines) + wordBuf[wordPos++] = '\\'; + else + fputc('\\',tf); + if (wrapLines) { + if (c != ' ') wordBuf[wordPos++] = c; + else wordXOff = xoff; + } else fputc(c,tf); + } else { + if (wrapLines) wordBuf[wordPos++] = c; + else fprintf(tf, "\\%03o", c & 0xff); + } } break; } @@ -872,6 +926,11 @@ void TextFormat::format(const char* cp, u_int cc) { + int wordBuf[500]; // buffer for a word used in wrapping + int wordPos = 0; // position of the last character in wordBuf + TextCoord wordXOff = xoff; // position of the text when the last word was written + bool firstWord = true; // is this the first word on the line? + const char* ep = cp+cc; while (cp < ep) { int c = *cp++ & 0xff; @@ -905,16 +964,36 @@ break; case '\f': // form feed if (!bop) { + if (wrapLines && wordPos) { + int pos; + for (pos = 0; pos < wordPos; pos++) { + if (040 <= wordBuf[pos] && wordBuf[pos] <= 0176) fputc(wordBuf[pos], tf); + else fprintf(tf, "\\%03o", wordBuf[pos] & 0xff); + } + wordPos = 0; + firstWord = true; + } endTextCol(); bol = bot = true; + wordXOff = xoff; } break; case '\n': // line break + if (wrapLines && wordPos) { + int pos; + for (pos = 0; pos < wordPos; pos++) { + if (040 <= wordBuf[pos] && wordBuf[pos] <= 0176) fputc(wordBuf[pos], tf); + else fprintf(tf, "\\%03o", wordBuf[pos] & 0xff); + } + wordPos = 0; + firstWord = true; + } if (bol) beginLine(); if (bot) beginText(); endTextLine(); + wordXOff = xoff; break; case '\r': // check for overstriking if (cp < ep && *cp == '\n') @@ -953,14 +1032,35 @@ c = ' '; else c = '\t'; + if (wrapLines && wordPos) { + int pos; + for (pos = 0; pos < wordPos; pos++) fputc(wordBuf[pos], tf); + wordPos = 0; + if (c == ' ') fputc(c, tf); + firstWord = false; + } } else hm = curFont->charwidth(c); - if (xoff + hm > right_x) { + if (wordPos > 495 || xoff + hm > right_x) { if (!wrapLines) // discard line overflow break; if (c == '\t') // adjust white space motion hm -= right_x - xoff; + if (wordPos) { + wordXOff = xoff - wordXOff; + if (firstWord) { + int pos; + for (pos = 0; pos < wordPos; pos++) { + if (040 <= wordBuf[pos] && wordBuf[pos] <= 0176) fputc(wordBuf[pos], tf); + else fprintf(tf, "\\%03o", wordBuf[pos] & 0xff); + } + fputc('-', tf); + wordPos = 0; + } + } endTextLine(); + if (wordPos) xoff = wordXOff; + firstWord = true; } if (bol) beginLine(), bol = false; @@ -973,14 +1073,22 @@ } else { // append to open PS string if (bot) beginText(), bot = false; + xoff += hm; if (040 <= c && c <= 0176) { if (c == '(' || c == ')' || c == '\\') - fputc('\\',tf); - fputc(c,tf); - } else - fprintf(tf, "\\%03o", c & 0xff); + if (wrapLines) + wordBuf[wordPos++] = '\\'; + else + fputc('\\',tf); + if (wrapLines) { + if (c != ' ') wordBuf[wordPos++] = c; + else wordXOff = xoff; + } else fputc('\\',tf); + } else { + if (wrapLines) wordBuf[wordPos++] = c; + else fprintf(tf, "\\%03o", c & 0xff); + } } - xoff += hm; break; } }