From nobody Tue Oct 01 20:12:45 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJ8Hx4MPRz5XKZ0; Tue, 01 Oct 2024 20:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJ8Hx3k02z4jRT; Tue, 1 Oct 2024 20:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727813565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TlncpOpE5pcYdu3VHFg2Zy8/J3QdbqthcM6kXqPt/tA=; b=ZXG2vFbnmdmKFUpksTiaQ1G4NLDnRaE+1WmFjZFTbBaqRUvYe1L40BhQfVHl5990CEOf+J cmFGx2ZGdS8F1mqHQavj/yOu4BSWs7LjQux2R5wwoK9jHd4c6adjx5DAc0nE2rKRmoWzz1 tP3IhRubrvOcBI1d8qsDk/t1WtVwDt6//TdVM+8mmL/WPBnbTLg1VGA6HP1bp4IJe1g20C HrRzwmVMUU/AGXKakHBIPG8P/zUAJ4A9GJVbzYYk6ML/1jXjc81sFc2yM/cfuqcE0Hizyh mxuhusmldyTIn9ktqaO5kblQNkd3+H0M3Nvl0L2silpM9131GJ5wCPcta4TCeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727813565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TlncpOpE5pcYdu3VHFg2Zy8/J3QdbqthcM6kXqPt/tA=; b=jMw2QopqDetdedPxd1/viKx50vt/h2ouHahR8NvGCMBmy/3vIvtGMCB86qBz54XlvqOSuj AwZpSD0TxF6mIvQN0OVZjgL1WWGPYeXxcH1fD/qH71Tk1QXfs+yvv148zc6klZurX1s2sS NIQUb4cpvcDHH6vwBNMUvJLtxm0tIy4/jZpqnnQG6A0Uwae22kleMKET7R/hkcoLMQuu2Z TmEDrLuP1nEU2DOT5Pcaz3hCXXT9jYnAc7KwfXDLUN+IJ47B698uyxtIiOtV++t3wYCO7z /zBo7L/1mdrW+Nd1ZsH+rUcxY2Ts5LDkWht+axSOvcDEKh8M18GepE/cu7S7Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727813565; a=rsa-sha256; cv=none; b=umYzRH7i1To2eFjaDW5GplGdisOr2zxh3+qCR+FdgpyxFkruxmRseohF5X229n+AkI0tGc BaEKlASwtPKsj8nipmU9Se9B7Gm0cCAGESL9/FU4LzFD0phh3ua3H7P3qiKegJVksACvA0 UPydT0EKoAYOFIdl/NdOmoc1cLuCryEtv/de6O+qoF76YhApQWqWKchGbXJFiZNYBWmCEz 8gW5nNjp0CGYYEQ2uuuwKm+7+BR3OmUwEri0hgSddI1wyezb01T5+/ZYPMQT/h0VoGuqWO 7VdZFFhX3WJC0Rkcm0xpGggfgnx2w1jlNvyn3UiYjRQTnWgM1o0CAcS9xumGPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJ8Hx3JYbzs54; Tue, 1 Oct 2024 20:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 491KCj0W049596; Tue, 1 Oct 2024 20:12:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 491KCjXL049592; Tue, 1 Oct 2024 20:12:45 GMT (envelope-from git) Date: Tue, 1 Oct 2024 20:12:45 GMT Message-Id: <202410012012.491KCjXL049592@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Brooks Davis Subject: git: 4680b0d8d0f1 - main - mail/faces: [NFC] regen patches at unified diffs List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4680b0d8d0f16ee626d12567d3264bfac02b2b1a Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=4680b0d8d0f16ee626d12567d3264bfac02b2b1a commit 4680b0d8d0f16ee626d12567d3264bfac02b2b1a Author: Brooks Davis AuthorDate: 2024-09-30 18:11:10 +0000 Commit: Brooks Davis CommitDate: 2024-10-01 20:11:45 +0000 mail/faces: [NFC] regen patches at unified diffs PR: 281783 Approved by: portmgr (build fix blanket), mikael --- mail/faces/files/patch-compface_arith.c | 758 +++++++++++---------------- mail/faces/files/patch-compface_cmain.c | 489 +++++++---------- mail/faces/files/patch-compface_compface.1 | 32 +- mail/faces/files/patch-compface_compface.c | 66 +-- mail/faces/files/patch-compface_compface.h | 539 ++++++++----------- mail/faces/files/patch-compface_compress.c | 525 ++++++++----------- mail/faces/files/patch-compface_file.c | 541 ++++++++----------- mail/faces/files/patch-compface_gen.c | 308 +++++------ mail/faces/files/patch-compface_uncmain.c | 495 +++++++---------- mail/faces/files/patch-compface_uncompface.c | 67 +-- mail/faces/files/patch-faces_Faces.ad | 28 +- 11 files changed, 1580 insertions(+), 2268 deletions(-) diff --git a/mail/faces/files/patch-compface_arith.c b/mail/faces/files/patch-compface_arith.c index b76ad572de07..7da58d04e68c 100644 --- a/mail/faces/files/patch-compface_arith.c +++ b/mail/faces/files/patch-compface_arith.c @@ -1,447 +1,313 @@ -*** compface/arith.c Tue Jan 15 23:58:46 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/arith.c Thu Oct 24 03:28:07 1991 -*************** -*** 17,33 **** - #include "compface.h" - - void -! RevPush(Prob *p) - { -! if (NumProbs >= PIXELS * 2 - 1) { - longjmp(comp_env, ERR_INTERNAL); -- } - ProbBuf[NumProbs++] = p; - } - -- - void -! BigPush(Prob *p) - { - static WORD tmp; - ---- 16,32 ---- - #include "compface.h" - - void -! RevPush(p) -! Prob *p; - { -! if (NumProbs >= PIXELS * 2 - 1) - longjmp(comp_env, ERR_INTERNAL); - ProbBuf[NumProbs++] = p; - } - - void -! BigPush(p) -! Prob *p; - { - static WORD tmp; - -*************** -*** 36,76 **** - BigAdd(tmp + p->p_offset); - } - +--- compface/arith.c.orig ++++ compface/arith.c +@@ -17,17 +17,17 @@ + #include "compface.h" + + void +-RevPush(Prob *p) ++RevPush(p) ++Prob *p; + { +- if (NumProbs >= PIXELS * 2 - 1) { ++ if (NumProbs >= PIXELS * 2 - 1) + longjmp(comp_env, ERR_INTERNAL); +- } + ProbBuf[NumProbs++] = p; + } + - - int -! BigPop(Prob *p) - { - static WORD tmp; -! int i; - - BigDiv(0, &tmp); - i = 0; -! while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset)) { - p++; - i++; - } - BigMul(p->p_range); - BigAdd(tmp - p->p_offset); -! return(i); - } - -- - #ifdef DEBUG - void -! BigPrint() /* Print a BigInt in HexaDecimal. */ - { -! int i, c, count; -! WORD *w; - - count = 0; - w = B.b_word + (i = B.b_words); -! while (i--) { - w--; - c = *((*w >> 4) + HexDigits); - putc(c, stderr); - c = *((*w & 0xf) + HexDigits); - putc(c, stderr); -! if (++count >= 36) { - putc('\\', stderr); - putc('\n', stderr); - count = 0; ---- 35,79 ---- - BigAdd(tmp + p->p_offset); - } - - int -! BigPop(p) -! register Prob *p; - { - static WORD tmp; -! register int i; - - BigDiv(0, &tmp); - i = 0; -! while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset)) -! { - p++; - i++; - } - BigMul(p->p_range); - BigAdd(tmp - p->p_offset); -! return i; - } - - #ifdef DEBUG -+ /* Print a BigInt in HexaDecimal -+ */ - void -! BigPrint() - { -! register int i, c, count; -! register WORD *w; - - count = 0; - w = B.b_word + (i = B.b_words); -! while (i--) -! { - w--; - c = *((*w >> 4) + HexDigits); - putc(c, stderr); - c = *((*w & 0xf) + HexDigits); - putc(c, stderr); -! if (++count >= 36) -! { - putc('\\', stderr); - putc('\n', stderr); - count = 0; -*************** -*** 78,110 **** - } - putc('\n', stderr); - } -! #endif /*DEBUG*/ -! - - /* Divide B by a storing the result in B and the remainder in the word -! * pointer to by r. - */ -- - void -! BigDiv(WORD a, WORD *r) - { -! int i; -! WORD *w; -! COMP c, d; - - a &= WORDMASK; -! if ((a == 1) || (B.b_words == 0)) { - *r = 0; - return; - } -! -! /* Treat this as a == WORDCARRY and just shift everything right a WORD */ -! -! if (a == 0) { - i = --B.b_words; - w = B.b_word; - *r = *w; -! while (i--) { - *w = *(w + 1); - w++; - } ---- 81,112 ---- - } - putc('\n', stderr); - } -! #endif - - /* Divide B by a storing the result in B and the remainder in the word -! * pointer to by r - */ - void -! BigDiv(a, r) -! register WORD a, *r; - { -! register int i; -! register WORD *w; -! register COMP c, d; - - a &= WORDMASK; -! if ((a == 1) || (B.b_words == 0)) -! { - *r = 0; - return; - } -! if (a == 0) /* treat this as a == WORDCARRY */ -! { /* and just shift everything right a WORD */ - i = --B.b_words; - w = B.b_word; - *r = *w; -! while (i--) -! { - *w = *(w + 1); - w++; - } -*************** -*** 113,154 **** - } - w = B.b_word + (i = B.b_words); - c = 0; -! while (i--) { - c <<= BITSPERWORD; -! c += (COMP) *--w; -! d = c / (COMP) a; -! c = c % (COMP) a; -! *w = (WORD) (d & WORDMASK); - } - *r = c; -! if (B.b_word[B.b_words - 1] == 0) { - B.b_words--; -- } - } - -! -! /* Multiply a by B storing the result in B. */ -! - void -! BigMul(WORD a) - { -! int i; -! WORD *w; -! COMP c; - - a &= WORDMASK; -! if ((a == 1) || (B.b_words == 0)) { - return; -! } -! -! /* Treat this as a == WORDCARRY and just shift everything left a WORD */ -! -! if (a == 0) { -! if ((i = B.b_words++) >= MAXWORDS - 1) { - longjmp(comp_env, ERR_INTERNAL); -- } - w = B.b_word + i; -! while (i--) { - *w = *(w - 1); - w--; - } ---- 115,153 ---- - } - w = B.b_word + (i = B.b_words); - c = 0; -! while (i--) -! { - c <<= BITSPERWORD; -! c += (COMP)*--w; -! d = c / (COMP)a; -! c = c % (COMP)a; -! *w = (WORD)(d & WORDMASK); - } - *r = c; -! if (B.b_word[B.b_words - 1] == 0) - B.b_words--; - } - -! /* Multiply a by B storing the result in B -! */ - void -! BigMul(a) -! register WORD a; - { -! register int i; -! register WORD *w; -! register COMP c; - - a &= WORDMASK; -! if ((a == 1) || (B.b_words == 0)) - return; -! if (a == 0) /* treat this as a == WORDCARRY */ -! { /* and just shift everything left a WORD */ -! if ((i = B.b_words++) >= MAXWORDS - 1) - longjmp(comp_env, ERR_INTERNAL); - w = B.b_word + i; -! while (i--) -! { - *w = *(w - 1); - w--; - } -*************** -*** 158,239 **** - i = B.b_words; - w = B.b_word; - c = 0; -! while (i--) { - c += (COMP)*w * (COMP)a; - *(w++) = (WORD)(c & WORDMASK); - c >>= BITSPERWORD; - } -! if (c) { -! if (B.b_words++ >= MAXWORDS) { - longjmp(comp_env, ERR_INTERNAL); -- } - *w = (COMP)(c & WORDMASK); - } - } - -! -! /* Subtract a from B storing the result in B. */ -! - void -! BigSub(WORD a) - { -! int i; -! WORD *w; -! COMP c; - - a &= WORDMASK; -! if (a == 0) { - return; -- } - i = 1; - w = B.b_word; -! c = (COMP) *w - (COMP) a; -! *w = (WORD) (c & WORDMASK); -! while (c & WORDCARRY) { -! if (i >= B.b_words) { - longjmp(comp_env, ERR_INTERNAL); -! } -! c = (COMP) *++w - 1; -! *w = (WORD) (c & WORDMASK); - i++; - } -! if ((i == B.b_words) && (*w == 0) && (i > 0)) { - B.b_words--; -- } - } - -! -! /* Add to a to B storing the result in B. */ -! - void -! BigAdd(WORD a) - { -! int i; -! WORD *w; -! COMP c; - - a &= WORDMASK; -! if (a == 0) { - return; -- } - i = 0; - w = B.b_word; - c = a; -! while ((i < B.b_words) && c) { -! c += (COMP) *w; -! *w++ = (WORD) (c & WORDMASK); - c >>= BITSPERWORD; - i++; - } -! if ((i == B.b_words) && c) { -! if (B.b_words++ >= MAXWORDS) { - longjmp(comp_env, ERR_INTERNAL); -! } -! *w = (COMP) (c & WORDMASK); - } - } - -- - void - BigClear() - { ---- 157,238 ---- - i = B.b_words; - w = B.b_word; - c = 0; -! while (i--) -! { - c += (COMP)*w * (COMP)a; - *(w++) = (WORD)(c & WORDMASK); - c >>= BITSPERWORD; - } -! if (c) -! { -! if (B.b_words++ >= MAXWORDS) - longjmp(comp_env, ERR_INTERNAL); - *w = (COMP)(c & WORDMASK); - } - } - -! #if 0 -! /* Subtract a from B storing the result in B -! */ - void -! BigSub(a) -! WORD a; - { -! register int i; -! register WORD *w; -! register COMP c; - - a &= WORDMASK; -! if (a == 0) - return; - i = 1; - w = B.b_word; -! c = (COMP)*w - (COMP)a; -! *w = (WORD)(c & WORDMASK); -! while (c & WORDCARRY) -! { -! if (i >= B.b_words) - longjmp(comp_env, ERR_INTERNAL); -! c = (COMP)*++w - 1; -! *w = (WORD)(c & WORDMASK); - i++; - } -! if ((i == B.b_words) && (*w == 0) && (i > 0)) - B.b_words--; - } -+ #endif - -! /* Add to a to B storing the result in B -! */ - void -! BigAdd(a) -! WORD a; - { -! register int i; -! register WORD *w; -! register COMP c; - - a &= WORDMASK; -! if (a == 0) - return; - i = 0; - w = B.b_word; - c = a; -! while ((i < B.b_words) && c) -! { -! c += (COMP)*w; -! *w++ = (WORD)(c & WORDMASK); - c >>= BITSPERWORD; - i++; - } -! if ((i == B.b_words) && c) -! { -! if (B.b_words++ >= MAXWORDS) - longjmp(comp_env, ERR_INTERNAL); -! *w = (COMP)(c & WORDMASK); - } - } - - void - BigClear() - { + void +-BigPush(Prob *p) ++BigPush(p) ++Prob *p; + { + static WORD tmp; + +@@ -36,41 +36,45 @@ + BigAdd(tmp + p->p_offset); + } + +- + int +-BigPop(Prob *p) ++BigPop(p) ++register Prob *p; + { + static WORD tmp; +- int i; ++ register int i; + + BigDiv(0, &tmp); + i = 0; +- while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset)) { ++ while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset)) ++ { + p++; + i++; + } + BigMul(p->p_range); + BigAdd(tmp - p->p_offset); +- return(i); ++ return i; + } + +- + #ifdef DEBUG ++/* Print a BigInt in HexaDecimal ++ */ + void +-BigPrint() /* Print a BigInt in HexaDecimal. */ ++BigPrint() + { +- int i, c, count; +- WORD *w; ++ register int i, c, count; ++ register WORD *w; + + count = 0; + w = B.b_word + (i = B.b_words); +- while (i--) { ++ while (i--) ++ { + w--; + c = *((*w >> 4) + HexDigits); + putc(c, stderr); + c = *((*w & 0xf) + HexDigits); + putc(c, stderr); +- if (++count >= 36) { ++ if (++count >= 36) ++ { + putc('\\', stderr); + putc('\n', stderr); + count = 0; +@@ -78,33 +82,32 @@ + } + putc('\n', stderr); + } +-#endif /*DEBUG*/ ++#endif + +- + /* Divide B by a storing the result in B and the remainder in the word +- * pointer to by r. ++ * pointer to by r + */ +- + void +-BigDiv(WORD a, WORD *r) ++BigDiv(a, r) ++register WORD a, *r; + { +- int i; +- WORD *w; +- COMP c, d; ++ register int i; ++ register WORD *w; ++ register COMP c, d; + + a &= WORDMASK; +- if ((a == 1) || (B.b_words == 0)) { ++ if ((a == 1) || (B.b_words == 0)) ++ { + *r = 0; + return; + } +- +-/* Treat this as a == WORDCARRY and just shift everything right a WORD */ +- +- if (a == 0) { ++ if (a == 0) /* treat this as a == WORDCARRY */ ++ { /* and just shift everything right a WORD */ + i = --B.b_words; + w = B.b_word; + *r = *w; +- while (i--) { ++ while (i--) ++ { + *w = *(w + 1); + w++; + } +@@ -113,42 +116,39 @@ + } + w = B.b_word + (i = B.b_words); + c = 0; +- while (i--) { ++ while (i--) ++ { + c <<= BITSPERWORD; +- c += (COMP) *--w; +- d = c / (COMP) a; +- c = c % (COMP) a; +- *w = (WORD) (d & WORDMASK); ++ c += (COMP)*--w; ++ d = c / (COMP)a; ++ c = c % (COMP)a; ++ *w = (WORD)(d & WORDMASK); + } + *r = c; +- if (B.b_word[B.b_words - 1] == 0) { ++ if (B.b_word[B.b_words - 1] == 0) + B.b_words--; +- } + } + +- +-/* Multiply a by B storing the result in B. */ +- ++/* Multiply a by B storing the result in B ++ */ + void +-BigMul(WORD a) ++BigMul(a) ++register WORD a; + { +- int i; +- WORD *w; +- COMP c; ++ register int i; ++ register WORD *w; ++ register COMP c; + + a &= WORDMASK; +- if ((a == 1) || (B.b_words == 0)) { ++ if ((a == 1) || (B.b_words == 0)) + return; +- } +- +-/* Treat this as a == WORDCARRY and just shift everything left a WORD */ +- +- if (a == 0) { +- if ((i = B.b_words++) >= MAXWORDS - 1) { ++ if (a == 0) /* treat this as a == WORDCARRY */ ++ { /* and just shift everything left a WORD */ ++ if ((i = B.b_words++) >= MAXWORDS - 1) + longjmp(comp_env, ERR_INTERNAL); +- } + w = B.b_word + i; +- while (i--) { ++ while (i--) ++ { + *w = *(w - 1); + w--; + } +@@ -158,81 +158,81 @@ + i = B.b_words; + w = B.b_word; + c = 0; +- while (i--) { ++ while (i--) ++ { + c += (COMP)*w * (COMP)a; + *(w++) = (WORD)(c & WORDMASK); + c >>= BITSPERWORD; + } +- if (c) { +- if (B.b_words++ >= MAXWORDS) { ++ if (c) ++ { ++ if (B.b_words++ >= MAXWORDS) + longjmp(comp_env, ERR_INTERNAL); +- } + *w = (COMP)(c & WORDMASK); + } + } + +- +-/* Subtract a from B storing the result in B. */ +- ++#if 0 ++/* Subtract a from B storing the result in B ++ */ + void +-BigSub(WORD a) ++BigSub(a) ++WORD a; + { +- int i; +- WORD *w; +- COMP c; ++ register int i; ++ register WORD *w; ++ register COMP c; + + a &= WORDMASK; +- if (a == 0) { ++ if (a == 0) + return; +- } + i = 1; + w = B.b_word; +- c = (COMP) *w - (COMP) a; +- *w = (WORD) (c & WORDMASK); +- while (c & WORDCARRY) { +- if (i >= B.b_words) { ++ c = (COMP)*w - (COMP)a; ++ *w = (WORD)(c & WORDMASK); ++ while (c & WORDCARRY) ++ { ++ if (i >= B.b_words) + longjmp(comp_env, ERR_INTERNAL); +- } +- c = (COMP) *++w - 1; +- *w = (WORD) (c & WORDMASK); ++ c = (COMP)*++w - 1; ++ *w = (WORD)(c & WORDMASK); + i++; + } +- if ((i == B.b_words) && (*w == 0) && (i > 0)) { ++ if ((i == B.b_words) && (*w == 0) && (i > 0)) + B.b_words--; +- } + } ++#endif + +- +-/* Add to a to B storing the result in B. */ +- ++/* Add to a to B storing the result in B ++ */ + void +-BigAdd(WORD a) ++BigAdd(a) ++WORD a; + { +- int i; +- WORD *w; +- COMP c; ++ register int i; ++ register WORD *w; ++ register COMP c; + + a &= WORDMASK; +- if (a == 0) { ++ if (a == 0) + return; +- } + i = 0; + w = B.b_word; + c = a; +- while ((i < B.b_words) && c) { +- c += (COMP) *w; +- *w++ = (WORD) (c & WORDMASK); ++ while ((i < B.b_words) && c) ++ { ++ c += (COMP)*w; ++ *w++ = (WORD)(c & WORDMASK); + c >>= BITSPERWORD; + i++; + } +- if ((i == B.b_words) && c) { +- if (B.b_words++ >= MAXWORDS) { ++ if ((i == B.b_words) && c) ++ { ++ if (B.b_words++ >= MAXWORDS) + longjmp(comp_env, ERR_INTERNAL); +- } +- *w = (COMP) (c & WORDMASK); ++ *w = (COMP)(c & WORDMASK); + } + } +- + + void + BigClear() diff --git a/mail/faces/files/patch-compface_cmain.c b/mail/faces/files/patch-compface_cmain.c index 31f64942af3b..c3f144a65ad0 100644 --- a/mail/faces/files/patch-compface_cmain.c +++ b/mail/faces/files/patch-compface_cmain.c @@ -1,292 +1,197 @@ -*** compface/cmain.c Thu Feb 21 16:42:54 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/cmain.c Thu Oct 24 03:28:07 1991 -*************** -*** 13,89 **** - * to me, then an attempt will be made to fix them. - */ - -- #include -- #include - #include - #include "compface.h" - -! #define STRCAT (void) strcat -! #define STRCPY (void) strcpy -! #define WRITE (void) write -! -! /* The buffer is longer than needed to handle sparse input formats */ -! - #define FACEBUFLEN 2048 - char fbuf[FACEBUFLEN]; - - /* IO file descriptors and their names */ -- - int infile = 0; - char *inname = ""; - int outfile = 1; - char *outname = ""; - -! char *cmdname; /* Basename of executable */ - -! /* Error handling definitions follow */ - - extern int errno, sys_nerr; - extern char *sys_errlist[]; - - #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") -! #define INITERR(s) { \ -! STRCPY(fbuf, cmdname); \ -! STRCAT(fbuf, ": "); \ -! STRCAT(fbuf, (s));\ -! } -! #define ADDERR(s) STRCAT(fbuf, (s)); -! #define ERROR { \ -! STRCAT(fbuf, "\n"); \ -! WRITE(2, fbuf, strlen(fbuf)); \ -! exit(1); \ -! } -! #define INITWARN(s) { \ -! STRCPY(fbuf, cmdname); \ -! STRCAT(fbuf, ": (warning) "); \ -! STRCAT(fbuf, (s)); \ -! } -! #define ADDWARN(s) STRCAT(fbuf, (s)); -! #define WARN { \ -! STRCAT(fbuf, "\n"); \ -! WRITE(2, fbuf, strlen(fbuf)); \ -! } - - int -! main(int argc, char *argv[]) - { - cmdname = *argv; -! while (**argv) { -! if (*((*argv)++) == '/') { -! cmdname = *argv; /* Find the command's basename */ -! } -! } - -! if (argc > 3) { - INITERR("usage: ") - ADDERR(cmdname) - ADDERR(" [infile [outfile]]") - ERROR - } - -! if ((argc > 1) && strcmp(*++argv, "-")) { - inname = *argv; -! if ((infile = open(inname, O_RDONLY)) == -1) { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) ---- 15,78 ---- - * to me, then an attempt will be made to fix them. - */ - - #include - #include "compface.h" - -! /* the buffer is longer than needed to handle sparse input formats */ - #define FACEBUFLEN 2048 - char fbuf[FACEBUFLEN]; - - /* IO file descriptors and their names */ - int infile = 0; - char *inname = ""; - int outfile = 1; - char *outname = ""; - -! /* basename of executable */ -! char *cmdname; - -! /* error handling definitions follow */ - - extern int errno, sys_nerr; - extern char *sys_errlist[]; - -+ extern void exit P((int)) ; -+ - #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") -! #define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\ -! (void)strcat(fbuf, (s));} -! #define ADDERR(s) (void)strcat(fbuf, (s)); -! #define ERROR {(void)strcat(fbuf, "\n");\ -! (void)write(2, fbuf, strlen(fbuf)); exit(1);} -! #define INITWARN(s) {(void)strcpy(fbuf, cmdname);\ -! (void)strcat(fbuf, ": (warning) ");\ -! (void)strcat(fbuf, (s));} -! #define ADDWARN(s) (void)strcat(fbuf, (s)); -! #define WARN {(void)strcat(fbuf, "\n"); (void)write(2, fbuf, strlen(fbuf));} - - int -! main(argc, argv) -! int argc; -! char *argv[]; - { - cmdname = *argv; -! while (**argv) -! if (*((*argv)++) == '/') -! cmdname = *argv; /* find the command's basename */ - -! if (argc > 3) -! { - INITERR("usage: ") - ADDERR(cmdname) - ADDERR(" [infile [outfile]]") - ERROR - } - -! if ((argc > 1) && strcmp(*++argv, "-")) -! { - inname = *argv; -! if ((infile = open(inname, O_RDONLY)) == -1) -! { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) -*************** -*** 91,100 **** - } - } - -! if (argc > 2) { - outname = *++argv; -! if ((outfile = open(outname, O_WRONLY | O_CREAT | -! O_TRUNC, 0644)) == -1) { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) ---- 80,90 ---- - } - } - -! if (argc > 2) -! { - outname = *++argv; -! if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) -! { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) -*************** -*** 103,109 **** - } - - (void) ReadBuf(); -! switch (compface(fbuf)) { - case -2 : INITERR("internal error") - ERROR - case -1 : INITERR(inname) ---- 93,100 ---- - } - - (void) ReadBuf(); -! switch (compface(fbuf)) -! { - case -2 : INITERR("internal error") - ERROR - case -1 : INITERR(inname) -*************** *** 2946 LINES SKIPPED ***