[Midnightbsd-cvs] mports [20755] trunk/mail/faces: partial fix

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Nov 12 19:55:48 EST 2015


Revision: 20755
          http://svnweb.midnightbsd.org/mports/?rev=20755
Author:   laffer1
Date:     2015-11-12 19:55:47 -0500 (Thu, 12 Nov 2015)
Log Message:
-----------
partial fix

Modified Paths:
--------------
    trunk/mail/faces/Makefile

Added Paths:
-----------
    trunk/mail/faces/files/patch-compface_arith.c
    trunk/mail/faces/files/patch-compface_cmain.c
    trunk/mail/faces/files/patch-compface_compface.1
    trunk/mail/faces/files/patch-compface_compface.c
    trunk/mail/faces/files/patch-compface_compface.h
    trunk/mail/faces/files/patch-compface_compress.c
    trunk/mail/faces/files/patch-compface_file.c
    trunk/mail/faces/files/patch-compface_gen.c
    trunk/mail/faces/files/patch-compface_uncmain.c
    trunk/mail/faces/files/patch-compface_uncompface.c
    trunk/mail/faces/files/patch-configure
    trunk/mail/faces/files/patch-faces_Faces.ad

Removed Paths:
-------------
    trunk/mail/faces/files/patch-ba
    trunk/mail/faces/files/patch-ca
    trunk/mail/faces/files/patch-cb
    trunk/mail/faces/files/patch-cc
    trunk/mail/faces/files/patch-cd
    trunk/mail/faces/files/patch-ce
    trunk/mail/faces/files/patch-cf
    trunk/mail/faces/files/patch-ch
    trunk/mail/faces/files/patch-ci
    trunk/mail/faces/files/patch-cj
    trunk/mail/faces/files/patch-ck

Modified: trunk/mail/faces/Makefile
===================================================================
--- trunk/mail/faces/Makefile	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/Makefile	2015-11-13 00:55:47 UTC (rev 20755)
@@ -7,7 +7,7 @@
 CATEGORIES=	mail
 MASTER_SITES=	SF
 
-MAINTAINER=	ashish at FreeBSD.org
+MAINTAINER=	ports at MidnightBSD.org
 COMMENT=	Visual mail, user, and print face server
 
 LICENSE=	gpl2
@@ -53,6 +53,9 @@
 
 .include <bsd.mport.options.mk>
 
+post-extract:
+	${TOUCH} ${WRKSRC}/config.guess
+
 # I have no better idea up to now
 # Install the working Makefile for compface from the old faces port
 # This was much less complex an builds the shared libs, too

Deleted: trunk/mail/faces/files/patch-ba
===================================================================
--- trunk/mail/faces/files/patch-ba	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-ba	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,17 +0,0 @@
-*** faces/Faces.ad.orig	Tue Dec 18 05:11:31 2001
---- faces/Faces.ad	Sun Mar 17 21:14:05 2002
-***************
-*** 12,17 ****
-  faces.button1clear:		false
-  faces.displayHostname:		false
-  
-! faces.audioSupport:		false
-! faces.audioCommand:		play
-  faces.bellAudioFile:
---- 12,17 ----
-  faces.button1clear:		false
-  faces.displayHostname:		false
-  
-! faces.audioSupport:		true
-! faces.audioCommand:		rplay
-  faces.bellAudioFile:

Deleted: trunk/mail/faces/files/patch-ca
===================================================================
--- trunk/mail/faces/files/patch-ca	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-ca	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,447 +0,0 @@
-*** 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);
-  }
-  
-- 
-  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()
-  {

Deleted: trunk/mail/faces/files/patch-cb
===================================================================
--- trunk/mail/faces/files/patch-cb	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-cb	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,292 +0,0 @@
-*** 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 <stdlib.h>
-- #include <unistd.h>
-  #include <fcntl.h>
-  #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  = "<stdin>";
-  int outfile   = 1;
-  char *outname = "<stdout>";
-  
-! 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 <fcntl.h>
-  #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  = "<stdin>";
-  int outfile   = 1;
-  char *outname = "<stdout>";
-  
-! /* 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)
-***************
-*** 123,135 ****
-  int
-  WriteBuf()
-  {
-!     char *s, *t;
-!     int len;
-  
-      s = fbuf;
-      t = s + strlen(s);
-!     while (s < t) {
-!         if ((len = write(outfile, s, t - s)) == -1) {
-              INITERR(outname)
-              ADDERR(": ")
-              ADDERR(ERR)
---- 114,128 ----
-  int
-  WriteBuf()
-  {
-! 	register char *s, *t;
-! 	register int len;
-  
-  	s = fbuf;
-  	t = s + strlen(s);
-! 	while (s < t)
-! 	{
-! 		if ((len = write(outfile, s, t - s)) == -1)
-! 		{
-  			INITERR(outname)
-  			ADDERR(": ")
-  			ADDERR(ERR)
-***************
-*** 137,163 ****
-          }
-          s += len;
-      }
-!     return(0);
-  }
-  
-  
-  int
-  ReadBuf()
-  {
-!     int count, len;
-!     char *t;
-  
-      count = 0;
-      t = fbuf;
-!     while ((len = read(infile, t, FACEBUFLEN - count))) {
-!         if (len == -1) {
-              INITERR(inname)
-              ADDERR(": ")
-              ADDERR(ERR)
-              ERROR
-          }
-          t += len;
-!         if ((count += len) >= FACEBUFLEN) {
-              INITWARN(inname)
-              ADDWARN(" exceeds internal buffer size.  Data may be lost")
-              WARN
---- 130,159 ----
-  		}
-  		s += len;
-  	}
-! 	return 0;
-  }
-  
-  
-  int
-  ReadBuf()
-  {
-! 	register int count, len;
-! 	register char *t;
-  
-  	count = 0;
-  	t = fbuf;
-! 	while (len = read(infile, t, FACEBUFLEN - count))
-! 	{
-! 		if (len == -1)
-! 		{
-  			INITERR(inname)
-  			ADDERR(": ")
-  			ADDERR(ERR)
-  			ERROR
-  		}
-  		t += len;
-! 		if ((count += len) >= FACEBUFLEN)
-! 		{
-  			INITWARN(inname)
-  			ADDWARN(" exceeds internal buffer size.  Data may be lost")
-  			WARN
-***************
-*** 165,169 ****
-          }
-      }
-      *t = '\0';
-!     return(count);
-  }
---- 161,165 ----
-  		}
-  	}
-  	*t = '\0';
-! 	return count;
-  }

Deleted: trunk/mail/faces/files/patch-cc
===================================================================
--- trunk/mail/faces/files/patch-cc	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-cc	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,17 +0,0 @@
-*** compface/compface.1	Tue Jan 15 23:58:46 2002
---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.1	Sun Jan 19 19:35:35 2003
-***************
-*** 56,61 ****
---- 58,69 ----
-  .I compface
-  averages less than 200 characters.
-  The average number of output lines is three.
-+ .SH OPTIONS
-+ .TP 12
-+ .B \-X
-+ The same as
-+ .I uncompface
-+ | ikon2xbm. Usefull for exmh!
-  .SH DIAGNOSTICS
-  Exit status is normally 0.
-  Possible errors include IO errors when opening, reading or writing

Deleted: trunk/mail/faces/files/patch-cd
===================================================================
--- trunk/mail/faces/files/patch-cd	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-cd	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,40 +0,0 @@
-*** compface/compface.c	Thu Feb 21 16:42:54 2002
---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.c	Wed Jun 19 08:29:12 1991
-***************
-*** 14,29 ****
-   *  to me, then an attempt will be made to fix them.
-   */
-  
-  #include "compface.h"
-- #include "vars.h"
-  
-  int
-! compface(char *fbuf)
-  {
-!     if (!(status = setjmp(comp_env))) {
-          ReadFace(fbuf);
-          GenFace();
-          CompAll(fbuf);
-      }
-!     return(status);
-  }
---- 13,31 ----
-   *  to me, then an attempt will be made to fix them.
-   */
-  
-+ #define MAIN
-+ 
-  #include "compface.h"
-  
-  int
-! compface(fbuf)
-! char *fbuf;
-  {
-! 	if (!(status = setjmp(comp_env)))
-! 	{
-  		ReadFace(fbuf);
-  		GenFace();
-  		CompAll(fbuf);
-  	}
-! 	return status;
-  }

Deleted: trunk/mail/faces/files/patch-ce
===================================================================
--- trunk/mail/faces/files/patch-ce	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-ce	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,306 +0,0 @@
-*** compface/compface.h	Thu Feb 21 16:42:54 2002
---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.h	Thu Sep  5 07:24:42 1991
-***************
-*** 14,45 ****
-   *  to me, then an attempt will be made to fix them.
-   */
-  
-  #include <string.h>
-  #include <fcntl.h>
-  #include <setjmp.h>
-  
-! /* Need to know how many bits per hexadecimal digit for io */
-  #define BITSPERDIG 4
-! extern char HexDigits[];
-  
-! /* Define the face size - 48x48x1 */
-  #define WIDTH  48
-  #define HEIGHT WIDTH
-  
-! /* Total number of pixels and digits */
-  #define PIXELS (WIDTH * HEIGHT)
-  #define DIGITS (PIXELS / BITSPERDIG)
-  
-! extern char F[PIXELS];
-  
-! /* Output formatting word lengths and line lengths */
-  #define DIGSPERWORD  4
-  #define WORDSPERLINE (WIDTH / DIGSPERWORD / BITSPERDIG)
-  
-! /* Compressed output uses the full range of printable characters.
-   * in ascii these are in a contiguous block so we just need to know
-!  * the first and last.  The total number of printables is needed too.
-!  */
-  #define FIRSTPRINT '!'
-  #define LASTPRINT  '~'
-  #define NUMPRINTS  (LASTPRINT - FIRSTPRINT + 1)
---- 13,64 ----
-   *  to me, then an attempt will be made to fix them.
-   */
-  
-+ #if defined(SYSV32) || defined(hpux)
-  #include <string.h>
-+ #else
-+ #include <strings.h>
-+ #endif /* SYSV32 || hpux */
-  #include <fcntl.h>
-  #include <setjmp.h>
-  
-! /* For all function declarations, if ANSI then use a prototype. */
-! 
-! #if  defined(__STDC__)
-! #define P(args)  args
-! #else  /* ! __STDC__ */
-! #define P(args)  ()
-! #endif  /* STDC */
-! 
-! #ifdef MAIN
-! #define EXTERN
-! #define INIT(x) = x
-! #else
-! #define EXTERN extern
-! #define INIT(x)
-! #endif
-! 
-! /* need to know how many bits per hexadecimal digit for io */
-  #define BITSPERDIG 4
-! EXTERN char HexDigits[] INIT("0123456789ABCDEF");
-  
-! /* define the face size - 48x48x1 */
-  #define WIDTH 48
-  #define HEIGHT WIDTH
-  
-! /* total number of pixels and digits */
-  #define PIXELS (WIDTH * HEIGHT)
-  #define DIGITS (PIXELS / BITSPERDIG)
-  
-! /* internal face representation - 1 char per pixel is faster */
-! EXTERN char F[PIXELS];
-  
-! /* output formatting word lengths and line lengths */
-  #define DIGSPERWORD 4
-  #define WORDSPERLINE (WIDTH / DIGSPERWORD / BITSPERDIG)
-  
-! /* compressed output uses the full range of printable characters.
-   * in ascii these are in a contiguous block so we just need to know
-!  * the first and last.  The total number of printables is needed too */
-  #define FIRSTPRINT '!'
-  #define LASTPRINT '~'
-  #define NUMPRINTS (LASTPRINT - FIRSTPRINT + 1)
-***************
-*** 49,56 ****
-  
-  /* Portable, very large unsigned integer arithmetic is needed.
-   * Implementation uses arrays of WORDs.  COMPs must have at least
-!  * twice as many bits as WORDs to handle intermediate results.
-!  */
-  #define WORD        unsigned char
-  #define COMP        unsigned long
-  #define BITSPERWORD 8
---- 68,74 ----
-  
-  /* Portable, very large unsigned integer arithmetic is needed.
-   * Implementation uses arrays of WORDs.  COMPs must have at least
-!  * twice as many bits as WORDs to handle intermediate results */
-  #define WORD unsigned char
-  #define COMP unsigned long
-  #define BITSPERWORD 8
-***************
-*** 64,76 ****
-      WORD b_word[MAXWORDS];
-  } BigInt;
-  
-! extern BigInt B;
-  
-  /* This is the guess the next pixel table.  Normally there are 12 neighbour
-   * pixels used to give 1<<12 cases but in the upper left corner lesser
-!  * numbers of neighbours are available, leading to 6231 different guesses.
-!  */
-! typedef struct guesses {
-      char g_00[1<<12];
-      char g_01[1<<7];
-      char g_02[1<<2];
---- 82,94 ----
-  	WORD b_word[MAXWORDS];
-  } BigInt;
-  
-! EXTERN BigInt B;
-  
-  /* This is the guess the next pixel table.  Normally there are 12 neighbour
-   * pixels used to give 1<<12 cases but in the upper left corner lesser
-!  * numbers of neighbours are available, leading to 6231 different guesses */
-! typedef struct guesses
-! {
-  	char g_00[1<<12];
-  	char g_01[1<<7];
-  	char g_02[1<<2];
-***************
-*** 88,155 ****
-      char g_42[1<<2];
-  } Guesses;
-  
-! extern Guesses G;
-  
-  /* Data of varying probabilities are encoded by a value in the range 0 - 255.
-   * The probability of the data determines the range of possible encodings.
-!  * Offset gives the first possible encoding of the range.
-!  */
-! typedef struct prob {
-      WORD p_range;
-      WORD p_offset;
-  } Prob;
-  
-! extern Prob *ProbBuf[PIXELS * 2];
-! extern int NumProbs;
-  
-  /* Each face is encoded using 9 octrees of 16x16 each.  Each level of the
-   * trees has varying probabilities of being white, grey or black.
-!  * The table below is based on sampling many faces.
-!  */
-  
-  #define BLACK 0
-  #define GREY  1
-  #define WHITE 2
-  
-! extern Prob levels[4][3];
-! extern Prob freqs[16];
-  
-  #define ERR_OK        0     /* successful completion */
-  #define ERR_EXCESS    1     /* completed OK but some input was ignored */
-  #define ERR_INSUFF    -1    /* insufficient input.  Bad face format? */
-  #define ERR_INTERNAL  -2    /* Arithmetic overflow or buffer overflow */
-  
-! extern int status;
-  
-! extern jmp_buf comp_env;
-  
-! int AllBlack(char *, int, int);
-! int AllWhite(char *, int, int);
-! int BigPop(Prob *);
-! int compface(char *);
-! int main(int, char *[]);
-! int ReadBuf();
-! int Same(char *, int, int);
-! int uncompface(char *);
-! int WriteBuf();
-! 
-! void BigAdd(WORD);
-! void BigClear();
-! void BigDiv(WORD, WORD *);
-! void BigMul(WORD);
-! void BigPrint();
-! void BigPush(Prob *);
-! void BigRead(char *);
-! void BigSub(WORD);
-! void BigWrite(char *);
-! void CompAll(char *);
-! void Compress(char *, int, int, int);
-! void GenFace();
-! void PopGreys(char *, int, int);
-! void PushGreys(char *, int, int);
-! void ReadFace(char *);
-! void RevPush(Prob *);
-! void UnCompAll(char *);
-! void UnCompress(char *, int, int, int);
-! void UnGenFace();
-! void WriteFace(char *);
---- 106,204 ----
-  	char g_42[1<<2];
-  } Guesses;
-  
-! /* data.h was established by sampling over 1000 faces and icons */
-! EXTERN Guesses G
-! #ifdef MAIN
-! =
-! #include "data.h"
-! #endif
-! ;
-  
-  /* Data of varying probabilities are encoded by a value in the range 0 - 255.
-   * The probability of the data determines the range of possible encodings.
-!  * Offset gives the first possible encoding of the range */
-! typedef struct prob
-! {
-  	WORD p_range;
-  	WORD p_offset;
-  } Prob;
-  
-! /* A stack of probability values */
-! EXTERN Prob *ProbBuf[PIXELS * 2];
-! EXTERN int NumProbs INIT(0);
-  
-  /* Each face is encoded using 9 octrees of 16x16 each.  Each level of the
-   * trees has varying probabilities of being white, grey or black.
-!  * The table below is based on sampling many faces */
-  
-  #define BLACK 0
-  #define GREY 1
-  #define WHITE 2
-  
-! EXTERN Prob levels[4][3]
-! #ifdef MAIN
-! =
-! {
-! 	{{1, 255},	{251, 0},	{4, 251}},	/* Top of tree almost always grey */
-! 	{{1, 255},	{200, 0},	{55, 200}},
-! 	{{33, 223},	{159, 0},	{64, 159}},
-! 	{{131, 0},	{0, 0}, 	{125, 131}}	/* Grey disallowed at bottom */
-! }
-! #endif
-! ;
-! 
-! /* At the bottom of the octree 2x2 elements are considered black if any
-!  * pixel is black.  The probabilities below give the distribution of the
-!  * 16 possible 2x2 patterns.  All white is not really a possibility and
-!  * has a probability range of zero.  Again, experimentally derived data */
-! EXTERN Prob freqs[16]
-! #ifdef MAIN
-! =
-! {
-! 	{0, 0}, 	{38, 0},	{38, 38},	{13, 152},
-! 	{38, 76},	{13, 165},	{13, 178},	{6, 230},
-! 	{38, 114},	{13, 191},	{13, 204},	{6, 236},
-! 	{13, 217},	{6, 242},	{5, 248},	{3, 253}
-! }
-! #endif
-! ;
-  
-  #define ERR_OK		0	/* successful completion */
-  #define ERR_EXCESS	1	/* completed OK but some input was ignored */
-  #define ERR_INSUFF	-1	/* insufficient input.  Bad face format? */
-  #define ERR_INTERNAL	-2	/* Arithmetic overflow or buffer overflow */
-  
-! EXTERN int status;
-  
-! EXTERN jmp_buf comp_env;
-  
-! int AllBlack P((char *, int, int)) ;
-! int AllWhite P((char *, int, int)) ;
-! int BigPop P((Prob *)) ;
-! int compface P((char *)) ;
-! int main P((int, char *[])) ;
-! int ReadBuf P(()) ;
-! int Same P((char *, int, int)) ;
-! int uncompface P((char *)) ;
-! int WriteBuf P(()) ;
-! 
-! void BigAdd P((unsigned char)) ;
-! void BigClear P(()) ;
-! void BigDiv P((unsigned char, unsigned char *)) ;
-! void BigMul P((unsigned char)) ;
-! void BigPrint P(()) ;
-! void BigPush P((Prob *)) ;
-! void BigRead P((char *)) ;
-! void BigSub P((unsigned int)) ;
-! void BigWrite P((char *)) ;
-! void CompAll P((char *)) ;
-! void Compress P((char *, int, int, int)) ;
-! void GenFace P(()) ;
-! void PopGreys P((char *, int, int)) ;
-! void PushGreys P((char *, int, int)) ;
-! void ReadFace P((char *)) ;
-! void RevPush P((Prob *)) ;
-! void UnCompAll P((char *)) ;
-! void UnCompress P((char *, int, int, int)) ;
-! void UnGenFace P(()) ;
-! void WriteFace P((char *)) ;

Deleted: trunk/mail/faces/files/patch-cf
===================================================================
--- trunk/mail/faces/files/patch-cf	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-cf	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,314 +0,0 @@
-*** compface/compress.c	Tue Jan 15 23:58:46 2002
---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compress.c	Wed Jun 19 08:29:13 1991
-***************
-*** 17,113 ****
-  #include "compface.h"
-  
-  int
-! Same(char *f, int wid, int hei)
-  {
-! 	char val, *row;
-! 	int x;
-  
-  	val = *f;
-! 	while (hei--) {
-  		row = f;
-  		x = wid;
-! 		while (x--) {
-! 			if (*(row++) != val) {
-  				return(0);
--             }
--         }
-  		f += WIDTH;
-  	}
-! 	return(1);
-  }
-  
-- 
-  int
-! AllBlack(char *f, int wid, int hei)
-  {
-! 	if (wid > 3) {
-  		wid /= 2;
-  		hei /= 2;
-! 		return(AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) &&
-  		       AllBlack(f + WIDTH * hei, wid, hei) &&
-  		       AllBlack(f + WIDTH * hei + wid, wid, hei));
-- 	} else {
-- 		return(*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1));
-      }
-  }
-  
-- 
-  int
-! AllWhite(char *f, int wid, int hei)
-  {
-! 	return((*f == 0) && Same(f, wid, hei));
-  }
-  
-- 
-  void
-! PopGreys(char *f, int wid, int hei)
-  {
-! 	if (wid > 3) {
-  		wid /= 2;
-  		hei /= 2;
-  		PopGreys(f, wid, hei);
-  		PopGreys(f + wid, wid, hei);
-  		PopGreys(f + WIDTH * hei, wid, hei);
-  		PopGreys(f + WIDTH * hei + wid, wid, hei);
-! 	} else {
-  		wid = BigPop(freqs);
-! 		if (wid & 1) {
-  			*f = 1;
-!         }
-! 		if (wid & 2) {
-  			*(f + 1) = 1;
-!         }
-! 		if (wid & 4) {
-  			*(f + WIDTH) = 1;
-!         }
-! 		if (wid & 8) {
-  			*(f + WIDTH + 1) = 1;
-          }
-- 	}
-  }
-  
-- 
-  void
-! PushGreys(char *f, int wid, int hei)
-  {
-! 	if (wid > 3) {
-  		wid /= 2;
-  		hei /= 2;
-  		PushGreys(f, wid, hei);
-  		PushGreys(f + wid, wid, hei);
-  		PushGreys(f + WIDTH * hei, wid, hei);
-  		PushGreys(f + WIDTH * hei + wid, wid, hei);
-- 	} else {
-- 		RevPush(freqs + *f + 2 * *(f + 1) + 
--                 4 * *(f + WIDTH) + 8 * *(f + WIDTH + 1));
-      }
-  }
-  
-- 
-  void
-! UnCompress(char *f, int wid, int hei, int lev)
-  {
-! 	switch (BigPop(&levels[lev][0])) {
-  		case WHITE :
-  			return;
-  		case BLACK :
---- 16,120 ----
-  #include "compface.h"
-  
-  int
-! Same(f, wid, hei)
-! register char *f;
-! register int wid, hei;
-  {
-! 	register char val, *row;
-! 	register int x;
-  
-  	val = *f;
-! 	while (hei--)
-! 	{
-  		row = f;
-  		x = wid;
-! 		while (x--)
-! 			if (*(row++) != val)
-  				return(0);
-  		f += WIDTH;
-  	}
-! 	return 1;
-  }
-  
-  int
-! AllBlack(f, wid, hei)
-! char *f;
-! int wid, hei;
-  {
-! 	if (wid > 3)
-! 	{
-  		wid /= 2;
-  		hei /= 2;
-! 		return (AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) &&
-  		  AllBlack(f + WIDTH * hei, wid, hei) &&
-  		  AllBlack(f + WIDTH * hei + wid, wid, hei));
-  	}
-+ 	else
-+ 		return (*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1));
-  }
-  
-  int
-! AllWhite(f, wid, hei)
-! char *f;
-! int wid, hei;
-  {
-! 	return ((*f == 0) && Same(f, wid, hei));
-  }
-  
-  void
-! PopGreys(f, wid, hei)
-! char *f;
-! int wid, hei;
-  {
-! 	if (wid > 3)
-! 	{
-  		wid /= 2;
-  		hei /= 2;
-  		PopGreys(f, wid, hei);
-  		PopGreys(f + wid, wid, hei);
-  		PopGreys(f + WIDTH * hei, wid, hei);
-  		PopGreys(f + WIDTH * hei + wid, wid, hei);
-! 	}
-! 	else
-! 	{
-  		wid = BigPop(freqs);
-! 		if (wid & 1)
-  			*f = 1;
-! 		if (wid & 2)
-  			*(f + 1) = 1;
-! 		if (wid & 4)
-  			*(f + WIDTH) = 1;
-! 		if (wid & 8)
-  			*(f + WIDTH + 1) = 1;
-  	}
-  }
-  
-  void
-! PushGreys(f, wid, hei)
-! char *f;
-! int wid, hei;
-  {
-! 	if (wid > 3)
-! 	{
-  		wid /= 2;
-  		hei /= 2;
-  		PushGreys(f, wid, hei);
-  		PushGreys(f + wid, wid, hei);
-  		PushGreys(f + WIDTH * hei, wid, hei);
-  		PushGreys(f + WIDTH * hei + wid, wid, hei);
-  	}
-+ 	else
-+ 		RevPush(freqs + *f + 2 * *(f + 1) + 4 * *(f + WIDTH) +
-+ 		  8 * *(f + WIDTH + 1));
-  }
-  
-  void
-! UnCompress(f, wid, hei, lev)
-! register char *f;
-! register int wid, hei, lev;
-  {
-! 	switch (BigPop(&levels[lev][0]))
-! 	{
-  		case WHITE :
-  			return;
-  		case BLACK :
-***************
-*** 125,139 ****
-  	}
-  }
-  
-- 
-  void
-! Compress(char *f, int wid, int hei, int lev)
-  {
-! 	if (AllWhite(f, wid, hei)) {
-  		RevPush(&levels[lev][WHITE]);
-  		return;
-  	}
-! 	if (AllBlack(f, wid, hei)) {
-  		RevPush(&levels[lev][BLACK]);
-  		PushGreys(f, wid, hei);
-  		return;
---- 132,149 ----
-  	}
-  }
-  
-  void
-! Compress(f, wid, hei, lev)
-! register char *f;
-! register int wid, hei, lev;
-  {
-! 	if (AllWhite(f, wid, hei))
-! 	{
-  		RevPush(&levels[lev][WHITE]);
-  		return;
-  	}
-! 	if (AllBlack(f, wid, hei))
-! 	{
-  		RevPush(&levels[lev][BLACK]);
-  		PushGreys(f, wid, hei);
-  		return;
-***************
-*** 149,164 ****
-  }
-  
-  void
-! UnCompAll(char *fbuf)
-  {
-! 	char *p;
-  
-  	BigClear();
-  	BigRead(fbuf);
-  	p = F;
-! 	while (p < F + PIXELS) {
-  		*(p++) = 0;
--     }
-  	UnCompress(F, 16, 16, 0);
-  	UnCompress(F + 16, 16, 16, 0);
-  	UnCompress(F + 32, 16, 16, 0);
---- 159,174 ----
-  }
-  
-  void
-! UnCompAll(fbuf)
-! char *fbuf;
-  {
-! 	register char *p;
-  
-  	BigClear();
-  	BigRead(fbuf);
-  	p = F;
-! 	while (p < F + PIXELS)
-  		*(p++) = 0;
-  	UnCompress(F, 16, 16, 0);
-  	UnCompress(F + 16, 16, 16, 0);
-  	UnCompress(F + 32, 16, 16, 0);
-***************
-*** 171,177 ****
-  }
-  
-  void
-! CompAll(char *fbuf)
-  {
-  	Compress(F, 16, 16, 0);
-  	Compress(F + 16, 16, 16, 0);
---- 181,188 ----
-  }
-  
-  void
-! CompAll(fbuf)
-! char *fbuf;
-  {
-  	Compress(F, 16, 16, 0);
-  	Compress(F + 16, 16, 16, 0);
-***************
-*** 183,190 ****
-  	Compress(F + WIDTH * 32 + 16, 16, 16, 0);
-  	Compress(F + WIDTH * 32 + 32, 16, 16, 0);
-  	BigClear();
-! 	while (NumProbs > 0) {
-  		BigPush(ProbBuf[--NumProbs]);
--     }
-  	BigWrite(fbuf);
-  }
---- 194,200 ----
-  	Compress(F + WIDTH * 32 + 16, 16, 16, 0);
-  	Compress(F + WIDTH * 32 + 32, 16, 16, 0);
-  	BigClear();
-! 	while (NumProbs > 0)
-  		BigPush(ProbBuf[--NumProbs]);
-  	BigWrite(fbuf);
-  }

Deleted: trunk/mail/faces/files/patch-ch
===================================================================
--- trunk/mail/faces/files/patch-ch	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-ch	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,314 +0,0 @@
-*** compface/file.c	Tue Jan 15 23:58:46 2002
---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/file.c	Sun Jan 19 19:35:35 2003
-***************
-*** 16,147 ****
-  
-  #include "compface.h"
-  
-  void
-! BigRead(char *fbuf)
-  {
-!     int c;
-  
-!     while (*fbuf != '\0') {
-          c = *(fbuf++);
-!         if ((c < FIRSTPRINT) || (c > LASTPRINT)) {
-              continue;
--         }
-          BigMul(NUMPRINTS);
-          BigAdd((WORD)(c - FIRSTPRINT));
-      }
-  }
-  
-- 
-  void
-! BigWrite(char *fbuf)
-  {
-      static WORD tmp;
-      static char buf[DIGITS];
-!     char *s;
-!     int i;
-  
-      s = buf;
-!     while (B.b_words > 0) {
-          BigDiv(NUMPRINTS, &tmp);
-          *(s++) = tmp + FIRSTPRINT;
-      }
-!     i = 7;              /* Leave room for the field name on the first line */
-      *(fbuf++) = ' ';
-!     while (s-- > buf) {
-!         if (i == 0) {
-              *(fbuf++) = ' ';
--         }
-          *(fbuf++) = *s;
-!         if (++i >= MAXLINELEN) {
-              *(fbuf++) = '\n';
-              i = 0;
-          }
-      }
-!     if (i > 0) {
-          *(fbuf++) = '\n';
--     }
-      *(fbuf++) = '\0';
-  }
-  
-- 
-  void
-! ReadFace(char *fbuf)
-  {
-!     int c, i;
-!     char *s, *t;
-  
-      t = s = fbuf;
-!     for (i = strlen(s); i > 0; i--) {
-!         c = (int) *(s++);
-!         if ((c >= '0') && (c <= '9')) {
-!             if (t >= fbuf + DIGITS) {
-                  status = ERR_EXCESS;
-                  break;
-              }
-              *(t++) = c - '0';
-!         } else if ((c >= 'A') && (c <= 'F')) {
-!             if (t >= fbuf + DIGITS) {
-                  status = ERR_EXCESS;
-                  break;
-              }
-              *(t++) = c - 'A' + 10;
-!         } else if ((c >= 'a') && (c <= 'f')) {
-!             if (t >= fbuf + DIGITS) {
-                  status = ERR_EXCESS;
-                  break;
-              }
-              *(t++) = c - 'a' + 10;
--         } else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0)) {
--             t--;
-          }
-      }
-!     if (t < fbuf + DIGITS) {
-          longjmp(comp_env, ERR_INSUFF);
--     }
-      s = fbuf;
-      t = F;
-      c = 1 << (BITSPERDIG - 1);
-!     while (t < F + PIXELS) {
-          *(t++) = (*s & c) ? 1 : 0;
-!         if ((c >>= 1) == 0) {
-              s++;
-              c = 1 << (BITSPERDIG - 1);
-          }
-      }
-  }
-  
-- 
-  void
-! WriteFace(char *fbuf)
-  {
-!     char *s, *t;
-!     int i, bits, digits, words;
-  
-      s = F;
-      t = fbuf;
-      bits = digits = words = i = 0;
-!     while (s < F + PIXELS) {
-!         if ((bits == 0) && (digits == 0)) {
-              *(t++) = '0';
-              *(t++) = 'x';
-          }
-!         if (*(s++)) {
-              i = i * 2 + 1;
-!         } else {
-              i *= 2;
-          }
-!         if (++bits == BITSPERDIG) {
-!             *(t++) = *(i + HexDigits);
-              bits = i = 0;
-!             if (++digits == DIGSPERWORD) {
-                  *(t++) = ',';
-                  digits = 0;
-!                 if (++words == WORDSPERLINE) {
-                      *(t++) = '\n';
-                      words = 0;
-                  }
-              }
-          }
-      }
-      *(t++) = '\0';
-  }
---- 15,191 ----
-  
-  #include "compface.h"
-  
-+ int xbitmap=0;
-+ 
-  void
-! BigRead(fbuf)
-! register char *fbuf;
-  {
-! 	register int c;
-  
-! 	while (*fbuf != '\0')
-! 	{
-  		c = *(fbuf++);
-! 		if ((c < FIRSTPRINT) || (c > LASTPRINT))
-  			continue;
-  		BigMul(NUMPRINTS);
-  		BigAdd((WORD)(c - FIRSTPRINT));
-  	}
-  }
-  
-  void
-! BigWrite(fbuf)
-! register char *fbuf;
-  {
-  	static WORD tmp;
-  	static char buf[DIGITS];
-! 	register char *s;
-! 	register int i;
-  
-  	s = buf;
-! 	while (B.b_words > 0)
-! 	{
-  		BigDiv(NUMPRINTS, &tmp);
-  		*(s++) = tmp + FIRSTPRINT;
-  	}
-! 	i = 7;	/* leave room for the field name on the first line */
-  	*(fbuf++) = ' ';
-! 	while (s-- > buf)
-! 	{
-! 		if (i == 0)
-  			*(fbuf++) = ' ';
-  		*(fbuf++) = *s;
-! 		if (++i >= MAXLINELEN)
-! 		{
-  			*(fbuf++) = '\n';
-  			i = 0;
-  		}
-  	}
-! 	if (i > 0)
-  		*(fbuf++) = '\n';
-  	*(fbuf++) = '\0';
-  }
-  
-  void
-! ReadFace(fbuf)
-! char *fbuf;
-  {
-! 	register int c, i;
-! 	register char *s, *t;
-  
-  	t = s = fbuf;
-! 	for(i = strlen(s); i > 0; i--)
-! 	{
-! 		c = (int)*(s++);
-! 		if ((c >= '0') && (c <= '9'))
-! 		{
-! 			if (t >= fbuf + DIGITS)
-! 			{
-  				status = ERR_EXCESS;
-  				break;
-  			}
-  			*(t++) = c - '0';
-! 		}
-! 		else if ((c >= 'A') && (c <= 'F'))
-! 		{
-! 			if (t >= fbuf + DIGITS)
-! 			{
-  				status = ERR_EXCESS;
-  				break;
-  			}
-  			*(t++) = c - 'A' + 10;
-! 		}
-! 		else if ((c >= 'a') && (c <= 'f'))
-! 		{
-! 			if (t >= fbuf + DIGITS)
-! 			{
-  				status = ERR_EXCESS;
-  				break;
-  			}
-  			*(t++) = c - 'a' + 10;
-  		}
-+ 		else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0))
-+ 			t--;
-  	}
-! 	if (t < fbuf + DIGITS)
-  		longjmp(comp_env, ERR_INSUFF);
-  	s = fbuf;
-  	t = F;
-  	c = 1 << (BITSPERDIG - 1);
-! 	while (t < F + PIXELS)
-! 	{
-  		*(t++) = (*s & c) ? 1 : 0;
-! 		if ((c >>= 1) == 0)
-! 		{
-  			s++;
-  			c = 1 << (BITSPERDIG - 1);
-  		}
-  	}
-  }
-  
-  void
-! WriteFace(fbuf)
-! char *fbuf;
-  {
-! 	register char *s, *t;
-! 	register int i, bits, digits, words;
-! 	extern int xbitmap;
-! 	int digsperword = DIGSPERWORD;
-! 	int wordsperline = WORDSPERLINE;
-  
-  	s = F;
-  	t = fbuf;
-  	bits = digits = words = i = 0;
-! 	if (xbitmap) {
-! 		sprintf(t,"#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n ");
-! 		while (*t) t++;
-! 		digsperword = 2;
-! 		wordsperline = 15;
-! 	}
-! 	while (s < F + PIXELS)
-! 	{
-! 		if ((bits == 0) && (digits == 0))
-! 		{
-  			*(t++) = '0';
-  			*(t++) = 'x';
-  		}
-! 		if (xbitmap) {
-! 			if (*(s++))
-! 				i = (i >> 1) | 0x8;
-! 			else
-! 				i >>= 1;
-! 		}
-! 		else {
-! 			if (*(s++))
-  				i = i * 2 + 1;
-! 			else
-  				i *= 2;
-  		}
-! 		if (++bits == BITSPERDIG)
-! 		{
-! 			if (xbitmap) {
-! 				t++;
-! 				t[-(digits & 1) * 2] = *(i + HexDigits);
-! 			}
-! 			else *(t++) = *(i + HexDigits);
-  			bits = i = 0;
-! 			if (++digits == digsperword)
-! 			{
-! 				if (xbitmap && (s >= F + PIXELS)) break;
-  				*(t++) = ',';
-  				digits = 0;
-! 				if (++words == wordsperline)
-! 				{
-  					*(t++) = '\n';
-+ 					if (xbitmap) *(t++) = ' ';
-  					words = 0;
-  				}
-  			}
-  		}
-  	}
-+ 	if (xbitmap) {
-+ 		sprintf(t, "}\n");
-+ 		while (*t) t++;
-+ 	}
-  	*(t++) = '\0';
-  }

Deleted: trunk/mail/faces/files/patch-ci
===================================================================
--- trunk/mail/faces/files/patch-ci	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-ci	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,186 +0,0 @@
-*** compface/gen.c	Tue Jan 15 23:58:46 2002
---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/gen.c	Wed Jun 19 08:29:13 1991
-***************
-*** 18,79 ****
-  
-  #define GEN(g) F[h] ^= G.g[k]; break
-  
-! static void Gen(char *);
-  
-  static void
-! Gen(char *f)
-  {
-!     int m, l, k, j, i, h;
-  
-!     for (j = 0; j < HEIGHT;  j++) {
-!         for (i = 0; i < WIDTH;  i++) {
-              h = i + j * WIDTH;
-              k = 0;
-!             for (l = i - 2; l <= i + 2; l++) {
-!                 for (m = j - 2; m <= j; m++) {
-!                     if ((l >= i) && (m == j)) {
-                          continue;
-!                     }
-!                     if ((l > 0) && (l <= WIDTH) && (m > 0)) {
-                          k = *(f + l + m * WIDTH) ? k * 2 + 1 : k * 2;
-                      }
-!                 }
-!             }
-!             switch (i) {
-                  case 1 :
-!                     switch (j) {
-                          case 1 : GEN(g_22);
-                          case 2 : GEN(g_21);
-                          default : GEN(g_20);
-                      }
-                      break;
-- 
-                  case 2 :
-!                     switch (j) {
-                          case 1 : GEN(g_12);
-                          case 2 : GEN(g_11);
-                          default : GEN(g_10);
-                      }
-                      break;
-- 
-                  case WIDTH - 1 :
-!                     switch (j) {
-                          case 1 : GEN(g_42);
-                          case 2 : GEN(g_41);
-                          default : GEN(g_40);
-                      }
-                      break;
-- 
-                  case WIDTH :
-!                     switch (j) {
-                          case 1 : GEN(g_32);
-                          case 2 : GEN(g_31);
-                          default : GEN(g_30);
-                      }
-                      break;
-- 
-                  default :
-!                     switch (j) {
-                          case 1 : GEN(g_02);
-                          case 2 : GEN(g_01);
-                          default : GEN(g_00);
---- 17,81 ----
-  
-  #define GEN(g) F[h] ^= G.g[k]; break
-  
-! static void Gen P((char *)) ;
-  
-  static void
-! Gen(f)
-! register char *f;
-  {
-! 	register int m, l, k, j, i, h;
-  
-! 	for (j = 0; j < HEIGHT;  j++)
-! 	{
-! 		for (i = 0; i < WIDTH;  i++)
-! 		{
-  			h = i + j * WIDTH;
-  			k = 0;
-! 			for (l = i - 2; l <= i + 2; l++)
-! 				for (m = j - 2; m <= j; m++)
-! 				{
-! 					if ((l >= i) && (m == j))
-  						continue;
-! 					if ((l > 0) && (l <= WIDTH) && (m > 0))
-  						k = *(f + l + m * WIDTH) ? k * 2 + 1 : k * 2;
-  				}
-! 			switch (i)
-! 			{
-  				case 1 :
-! 					switch (j)
-! 					{
-  						case 1 : GEN(g_22);
-  						case 2 : GEN(g_21);
-  						default : GEN(g_20);
-  					}
-  					break;
-  				case 2 :
-! 					switch (j)
-! 					{
-  						case 1 : GEN(g_12);
-  						case 2 : GEN(g_11);
-  						default : GEN(g_10);
-  					}
-  					break;
-  				case WIDTH - 1 :
-! 					switch (j)
-! 					{
-  						case 1 : GEN(g_42);
-  						case 2 : GEN(g_41);
-  						default : GEN(g_40);
-  					}
-  					break;
-  				case WIDTH :
-! 					switch (j)
-! 					{
-  						case 1 : GEN(g_32);
-  						case 2 : GEN(g_31);
-  						default : GEN(g_30);
-  					}
-  					break;
-  				default :
-! 					switch (j)
-! 					{
-  						case 1 : GEN(g_02);
-  						case 2 : GEN(g_01);
-  						default : GEN(g_00);
-***************
-*** 84,109 ****
-      }
-  }
-  
-- 
-  void
-  GenFace()
-  {
-      static char new[PIXELS];
-!     char *f1, *f2;
-!     int i;
-  
-      f1 = new;
-      f2 = F;
-      i = PIXELS;
-!     while (i-- > 0) {
-          *(f1++) = *(f2++);
--     }
-      Gen(new);
-  }
-  
-- 
-  void
-  UnGenFace()
-  {
-      Gen(F);
-  }
---- 86,110 ----
-  	}
-  }
-  
-  void
-  GenFace()
-  {
-  	static char new[PIXELS];
-! 	register char *f1;
-! 	register char *f2;
-! 	register int i;
-  
-  	f1 = new;
-  	f2 = F;
-  	i = PIXELS;
-! 	while (i-- > 0)
-  		*(f1++) = *(f2++);
-  	Gen(new);
-  }
-  
-  void
-  UnGenFace()
-  {
-  	Gen(F);
-  }
-+ 

Deleted: trunk/mail/faces/files/patch-cj
===================================================================
--- trunk/mail/faces/files/patch-cj	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-cj	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,296 +0,0 @@
-*** compface/uncmain.c	Thu Feb 21 16:42:54 2002
---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/uncmain.c	Sun Jan 19 19:35:35 2003
-***************
-*** 13,28 ****
-   *  to me, then an attempt will be made to fix them.
-   */
-  
-- #include <stdlib.h>
-- #include <unistd.h>
-  #include <fcntl.h>
-  #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];
-  
---- 15,26 ----
-   *  to me, then an attempt will be made to fix them.
-   */
-  
-  #include <fcntl.h>
-  #include "compface.h"
-  
-! extern int xbitmap;
-  
-! /* the buffer is longer than needed to handle sparse input formats */
-  #define FACEBUFLEN 2048
-  char fbuf[FACEBUFLEN];
-  
-***************
-*** 32,87 ****
-  int outfile   = 1;
-  char *outname = "<stdout>";
-  
-! 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)
---- 30,87 ----
-  int outfile   = 1;
-  char *outname = "<stdout>";
-  
-! /* 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 > 1 && !strcmp(argv[1], "-X"))
-!     {
-!       xbitmap++;
-!       argc--;
-!       argv++;
-      }
-  
-!   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)
-***************
-*** 89,98 ****
-          }
-      }
-  
-!     if (argc > 2) {
-          outname = *++argv;
-!         if ((outfile = open(outname, O_WRONLY | O_CREAT | 
-!                                      O_TRUNC, 0644)) == -1) {
-              INITERR(outname)
-              ADDERR(": ")
-              ADDERR(ERR)
---- 89,99 ----
-          }
-      }
-  
-!   if (argc > 2)
-!     {
-        outname = *++argv;
-!       if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1)
-!         {
-            INITERR(outname)
-            ADDERR(": ")
-            ADDERR(ERR)
-***************
-*** 101,107 ****
-      }
-  
-      (void) ReadBuf();
-!     switch (uncompface(fbuf)) {
-          case -2 : INITERR("internal error")
-                    ERROR
-          case -1 : INITERR(inname)
---- 102,109 ----
-      }
-  
-    (void) ReadBuf();
-!   switch (uncompface(fbuf))
-!     {
-        case -2 : INITERR("internal error")
-                  ERROR
-        case -1 : INITERR(inname)
-***************
-*** 121,133 ****
-  int
-  WriteBuf()
-  {
-!     char *s, *t;
-!     int len;
-  
-      s = fbuf;
-      t = s + strlen(s);
-!     while (s < t) {
-!         if ((len = write(outfile, s, t - s)) == -1) {
-              INITERR(outname)
-              ADDERR(": ")
-              ADDERR(ERR)
---- 123,137 ----
-  int
-  WriteBuf()
-  {
-! 	register char *s, *t;
-! 	register int len;
-  
-  	s = fbuf;
-  	t = s + strlen(s);
-! 	while (s < t)
-! 	{
-! 		if ((len = write(outfile, s, t - s)) == -1)
-! 		{
-  			INITERR(outname)
-  			ADDERR(": ")
-  			ADDERR(ERR)
-***************
-*** 135,161 ****
-          }
-          s += len;
-      }
-!     return(0);
-  }
-  
-  
-  int
-  ReadBuf()
-  {
-!     int count, len;
-!     char *t;
-  
-      count = 0;
-      t = fbuf;
-!     while ((len = read(infile, t, FACEBUFLEN - count))) {
-!         if (len == -1) {
-              INITERR(inname)
-              ADDERR(": ")
-              ADDERR(ERR)
-              ERROR
-          }
-          t += len;
-!         if ((count += len) >= FACEBUFLEN) {
-              INITWARN(inname)
-              ADDWARN(" exceeds internal buffer size.  Data may be lost")
-              WARN
---- 139,168 ----
-  		}
-  		s += len;
-  	}
-! 	return 0;
-  }
-  
-  
-  int
-  ReadBuf()
-  {
-! 	register int count, len;
-! 	register char *t;
-  
-  	count = 0;
-  	t = fbuf;
-! 	while (len = read(infile, t, FACEBUFLEN - count))
-! 	{
-! 		if (len == -1)
-! 		{
-  			INITERR(inname)
-  			ADDERR(": ")
-  			ADDERR(ERR)
-  			ERROR
-  		}
-  		t += len;
-! 		if ((count += len) >= FACEBUFLEN)
-! 		{
-  			INITWARN(inname)
-  			ADDWARN(" exceeds internal buffer size.  Data may be lost")
-  			WARN
-***************
-*** 163,167 ****
-          }
-      }
-      *t = '\0';
-!     return(count);
-  }
---- 170,174 ----
-  		}
-  	}
-  	*t = '\0';
-! 	return count;
-  }

Deleted: trunk/mail/faces/files/patch-ck
===================================================================
--- trunk/mail/faces/files/patch-ck	2015-11-13 00:50:51 UTC (rev 20754)
+++ trunk/mail/faces/files/patch-ck	2015-11-13 00:55:47 UTC (rev 20755)
@@ -1,40 +0,0 @@
-*** compface/uncompface.c	Thu Feb 21 16:42:54 2002
---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/uncompface.c	Wed Jun 19 08:29:14 1991
-***************
-*** 14,29 ****
-   *  to me, then an attempt will be made to fix them.
-   */
-  
-  #include "compface.h"
-- #include "vars.h"
-  
-  int
-! uncompface(char *fbuf)
-  {
-!     if (!(status = setjmp(comp_env))) {
-!         UnCompAll(fbuf);       /* compress otherwise */
-          UnGenFace();
-          WriteFace(fbuf);
-      }
-!     return(status);
-  }
---- 13,31 ----
-   *  to me, then an attempt will be made to fix them.
-   */
-  
-+ #define MAIN
-+ 
-  #include "compface.h"
-  
-  int
-! uncompface(fbuf)
-! char *fbuf;
-  {
-! 	if (!(status = setjmp(comp_env)))
-! 	{
-! 		UnCompAll(fbuf);/* compress otherwise */
-  		UnGenFace();
-  		WriteFace(fbuf);
-  	}
-! 	return status;
-  }

Added: trunk/mail/faces/files/patch-compface_arith.c
===================================================================
--- trunk/mail/faces/files/patch-compface_arith.c	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_arith.c	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,447 @@
+*** 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);
+  }
+  
+- 
+  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()
+  {


Property changes on: trunk/mail/faces/files/patch-compface_arith.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_cmain.c
===================================================================
--- trunk/mail/faces/files/patch-compface_cmain.c	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_cmain.c	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,292 @@
+*** 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 <stdlib.h>
+- #include <unistd.h>
+  #include <fcntl.h>
+  #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  = "<stdin>";
+  int outfile   = 1;
+  char *outname = "<stdout>";
+  
+! 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 <fcntl.h>
+  #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  = "<stdin>";
+  int outfile   = 1;
+  char *outname = "<stdout>";
+  
+! /* 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)
+***************
+*** 123,135 ****
+  int
+  WriteBuf()
+  {
+!     char *s, *t;
+!     int len;
+  
+      s = fbuf;
+      t = s + strlen(s);
+!     while (s < t) {
+!         if ((len = write(outfile, s, t - s)) == -1) {
+              INITERR(outname)
+              ADDERR(": ")
+              ADDERR(ERR)
+--- 114,128 ----
+  int
+  WriteBuf()
+  {
+! 	register char *s, *t;
+! 	register int len;
+  
+  	s = fbuf;
+  	t = s + strlen(s);
+! 	while (s < t)
+! 	{
+! 		if ((len = write(outfile, s, t - s)) == -1)
+! 		{
+  			INITERR(outname)
+  			ADDERR(": ")
+  			ADDERR(ERR)
+***************
+*** 137,163 ****
+          }
+          s += len;
+      }
+!     return(0);
+  }
+  
+  
+  int
+  ReadBuf()
+  {
+!     int count, len;
+!     char *t;
+  
+      count = 0;
+      t = fbuf;
+!     while ((len = read(infile, t, FACEBUFLEN - count))) {
+!         if (len == -1) {
+              INITERR(inname)
+              ADDERR(": ")
+              ADDERR(ERR)
+              ERROR
+          }
+          t += len;
+!         if ((count += len) >= FACEBUFLEN) {
+              INITWARN(inname)
+              ADDWARN(" exceeds internal buffer size.  Data may be lost")
+              WARN
+--- 130,159 ----
+  		}
+  		s += len;
+  	}
+! 	return 0;
+  }
+  
+  
+  int
+  ReadBuf()
+  {
+! 	register int count, len;
+! 	register char *t;
+  
+  	count = 0;
+  	t = fbuf;
+! 	while (len = read(infile, t, FACEBUFLEN - count))
+! 	{
+! 		if (len == -1)
+! 		{
+  			INITERR(inname)
+  			ADDERR(": ")
+  			ADDERR(ERR)
+  			ERROR
+  		}
+  		t += len;
+! 		if ((count += len) >= FACEBUFLEN)
+! 		{
+  			INITWARN(inname)
+  			ADDWARN(" exceeds internal buffer size.  Data may be lost")
+  			WARN
+***************
+*** 165,169 ****
+          }
+      }
+      *t = '\0';
+!     return(count);
+  }
+--- 161,165 ----
+  		}
+  	}
+  	*t = '\0';
+! 	return count;
+  }


Property changes on: trunk/mail/faces/files/patch-compface_cmain.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_compface.1
===================================================================
--- trunk/mail/faces/files/patch-compface_compface.1	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_compface.1	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,17 @@
+*** compface/compface.1	Tue Jan 15 23:58:46 2002
+--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.1	Sun Jan 19 19:35:35 2003
+***************
+*** 56,61 ****
+--- 58,69 ----
+  .I compface
+  averages less than 200 characters.
+  The average number of output lines is three.
++ .SH OPTIONS
++ .TP 12
++ .B \-X
++ The same as
++ .I uncompface
++ | ikon2xbm. Usefull for exmh!
+  .SH DIAGNOSTICS
+  Exit status is normally 0.
+  Possible errors include IO errors when opening, reading or writing


Property changes on: trunk/mail/faces/files/patch-compface_compface.1
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_compface.c
===================================================================
--- trunk/mail/faces/files/patch-compface_compface.c	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_compface.c	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,40 @@
+*** compface/compface.c	Thu Feb 21 16:42:54 2002
+--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.c	Wed Jun 19 08:29:12 1991
+***************
+*** 14,29 ****
+   *  to me, then an attempt will be made to fix them.
+   */
+  
+  #include "compface.h"
+- #include "vars.h"
+  
+  int
+! compface(char *fbuf)
+  {
+!     if (!(status = setjmp(comp_env))) {
+          ReadFace(fbuf);
+          GenFace();
+          CompAll(fbuf);
+      }
+!     return(status);
+  }
+--- 13,31 ----
+   *  to me, then an attempt will be made to fix them.
+   */
+  
++ #define MAIN
++ 
+  #include "compface.h"
+  
+  int
+! compface(fbuf)
+! char *fbuf;
+  {
+! 	if (!(status = setjmp(comp_env)))
+! 	{
+  		ReadFace(fbuf);
+  		GenFace();
+  		CompAll(fbuf);
+  	}
+! 	return status;
+  }


Property changes on: trunk/mail/faces/files/patch-compface_compface.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_compface.h
===================================================================
--- trunk/mail/faces/files/patch-compface_compface.h	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_compface.h	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,306 @@
+*** compface/compface.h	Thu Feb 21 16:42:54 2002
+--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.h	Thu Sep  5 07:24:42 1991
+***************
+*** 14,45 ****
+   *  to me, then an attempt will be made to fix them.
+   */
+  
+  #include <string.h>
+  #include <fcntl.h>
+  #include <setjmp.h>
+  
+! /* Need to know how many bits per hexadecimal digit for io */
+  #define BITSPERDIG 4
+! extern char HexDigits[];
+  
+! /* Define the face size - 48x48x1 */
+  #define WIDTH  48
+  #define HEIGHT WIDTH
+  
+! /* Total number of pixels and digits */
+  #define PIXELS (WIDTH * HEIGHT)
+  #define DIGITS (PIXELS / BITSPERDIG)
+  
+! extern char F[PIXELS];
+  
+! /* Output formatting word lengths and line lengths */
+  #define DIGSPERWORD  4
+  #define WORDSPERLINE (WIDTH / DIGSPERWORD / BITSPERDIG)
+  
+! /* Compressed output uses the full range of printable characters.
+   * in ascii these are in a contiguous block so we just need to know
+!  * the first and last.  The total number of printables is needed too.
+!  */
+  #define FIRSTPRINT '!'
+  #define LASTPRINT  '~'
+  #define NUMPRINTS  (LASTPRINT - FIRSTPRINT + 1)
+--- 13,64 ----
+   *  to me, then an attempt will be made to fix them.
+   */
+  
++ #if defined(SYSV32) || defined(hpux)
+  #include <string.h>
++ #else
++ #include <strings.h>
++ #endif /* SYSV32 || hpux */
+  #include <fcntl.h>
+  #include <setjmp.h>
+  
+! /* For all function declarations, if ANSI then use a prototype. */
+! 
+! #if  defined(__STDC__)
+! #define P(args)  args
+! #else  /* ! __STDC__ */
+! #define P(args)  ()
+! #endif  /* STDC */
+! 
+! #ifdef MAIN
+! #define EXTERN
+! #define INIT(x) = x
+! #else
+! #define EXTERN extern
+! #define INIT(x)
+! #endif
+! 
+! /* need to know how many bits per hexadecimal digit for io */
+  #define BITSPERDIG 4
+! EXTERN char HexDigits[] INIT("0123456789ABCDEF");
+  
+! /* define the face size - 48x48x1 */
+  #define WIDTH 48
+  #define HEIGHT WIDTH
+  
+! /* total number of pixels and digits */
+  #define PIXELS (WIDTH * HEIGHT)
+  #define DIGITS (PIXELS / BITSPERDIG)
+  
+! /* internal face representation - 1 char per pixel is faster */
+! EXTERN char F[PIXELS];
+  
+! /* output formatting word lengths and line lengths */
+  #define DIGSPERWORD 4
+  #define WORDSPERLINE (WIDTH / DIGSPERWORD / BITSPERDIG)
+  
+! /* compressed output uses the full range of printable characters.
+   * in ascii these are in a contiguous block so we just need to know
+!  * the first and last.  The total number of printables is needed too */
+  #define FIRSTPRINT '!'
+  #define LASTPRINT '~'
+  #define NUMPRINTS (LASTPRINT - FIRSTPRINT + 1)
+***************
+*** 49,56 ****
+  
+  /* Portable, very large unsigned integer arithmetic is needed.
+   * Implementation uses arrays of WORDs.  COMPs must have at least
+!  * twice as many bits as WORDs to handle intermediate results.
+!  */
+  #define WORD        unsigned char
+  #define COMP        unsigned long
+  #define BITSPERWORD 8
+--- 68,74 ----
+  
+  /* Portable, very large unsigned integer arithmetic is needed.
+   * Implementation uses arrays of WORDs.  COMPs must have at least
+!  * twice as many bits as WORDs to handle intermediate results */
+  #define WORD unsigned char
+  #define COMP unsigned long
+  #define BITSPERWORD 8
+***************
+*** 64,76 ****
+      WORD b_word[MAXWORDS];
+  } BigInt;
+  
+! extern BigInt B;
+  
+  /* This is the guess the next pixel table.  Normally there are 12 neighbour
+   * pixels used to give 1<<12 cases but in the upper left corner lesser
+!  * numbers of neighbours are available, leading to 6231 different guesses.
+!  */
+! typedef struct guesses {
+      char g_00[1<<12];
+      char g_01[1<<7];
+      char g_02[1<<2];
+--- 82,94 ----
+  	WORD b_word[MAXWORDS];
+  } BigInt;
+  
+! EXTERN BigInt B;
+  
+  /* This is the guess the next pixel table.  Normally there are 12 neighbour
+   * pixels used to give 1<<12 cases but in the upper left corner lesser
+!  * numbers of neighbours are available, leading to 6231 different guesses */
+! typedef struct guesses
+! {
+  	char g_00[1<<12];
+  	char g_01[1<<7];
+  	char g_02[1<<2];
+***************
+*** 88,155 ****
+      char g_42[1<<2];
+  } Guesses;
+  
+! extern Guesses G;
+  
+  /* Data of varying probabilities are encoded by a value in the range 0 - 255.
+   * The probability of the data determines the range of possible encodings.
+!  * Offset gives the first possible encoding of the range.
+!  */
+! typedef struct prob {
+      WORD p_range;
+      WORD p_offset;
+  } Prob;
+  
+! extern Prob *ProbBuf[PIXELS * 2];
+! extern int NumProbs;
+  
+  /* Each face is encoded using 9 octrees of 16x16 each.  Each level of the
+   * trees has varying probabilities of being white, grey or black.
+!  * The table below is based on sampling many faces.
+!  */
+  
+  #define BLACK 0
+  #define GREY  1
+  #define WHITE 2
+  
+! extern Prob levels[4][3];
+! extern Prob freqs[16];
+  
+  #define ERR_OK        0     /* successful completion */
+  #define ERR_EXCESS    1     /* completed OK but some input was ignored */
+  #define ERR_INSUFF    -1    /* insufficient input.  Bad face format? */
+  #define ERR_INTERNAL  -2    /* Arithmetic overflow or buffer overflow */
+  
+! extern int status;
+  
+! extern jmp_buf comp_env;
+  
+! int AllBlack(char *, int, int);
+! int AllWhite(char *, int, int);
+! int BigPop(Prob *);
+! int compface(char *);
+! int main(int, char *[]);
+! int ReadBuf();
+! int Same(char *, int, int);
+! int uncompface(char *);
+! int WriteBuf();
+! 
+! void BigAdd(WORD);
+! void BigClear();
+! void BigDiv(WORD, WORD *);
+! void BigMul(WORD);
+! void BigPrint();
+! void BigPush(Prob *);
+! void BigRead(char *);
+! void BigSub(WORD);
+! void BigWrite(char *);
+! void CompAll(char *);
+! void Compress(char *, int, int, int);
+! void GenFace();
+! void PopGreys(char *, int, int);
+! void PushGreys(char *, int, int);
+! void ReadFace(char *);
+! void RevPush(Prob *);
+! void UnCompAll(char *);
+! void UnCompress(char *, int, int, int);
+! void UnGenFace();
+! void WriteFace(char *);
+--- 106,204 ----
+  	char g_42[1<<2];
+  } Guesses;
+  
+! /* data.h was established by sampling over 1000 faces and icons */
+! EXTERN Guesses G
+! #ifdef MAIN
+! =
+! #include "data.h"
+! #endif
+! ;
+  
+  /* Data of varying probabilities are encoded by a value in the range 0 - 255.
+   * The probability of the data determines the range of possible encodings.
+!  * Offset gives the first possible encoding of the range */
+! typedef struct prob
+! {
+  	WORD p_range;
+  	WORD p_offset;
+  } Prob;
+  
+! /* A stack of probability values */
+! EXTERN Prob *ProbBuf[PIXELS * 2];
+! EXTERN int NumProbs INIT(0);
+  
+  /* Each face is encoded using 9 octrees of 16x16 each.  Each level of the
+   * trees has varying probabilities of being white, grey or black.
+!  * The table below is based on sampling many faces */
+  
+  #define BLACK 0
+  #define GREY 1
+  #define WHITE 2
+  
+! EXTERN Prob levels[4][3]
+! #ifdef MAIN
+! =
+! {
+! 	{{1, 255},	{251, 0},	{4, 251}},	/* Top of tree almost always grey */
+! 	{{1, 255},	{200, 0},	{55, 200}},
+! 	{{33, 223},	{159, 0},	{64, 159}},
+! 	{{131, 0},	{0, 0}, 	{125, 131}}	/* Grey disallowed at bottom */
+! }
+! #endif
+! ;
+! 
+! /* At the bottom of the octree 2x2 elements are considered black if any
+!  * pixel is black.  The probabilities below give the distribution of the
+!  * 16 possible 2x2 patterns.  All white is not really a possibility and
+!  * has a probability range of zero.  Again, experimentally derived data */
+! EXTERN Prob freqs[16]
+! #ifdef MAIN
+! =
+! {
+! 	{0, 0}, 	{38, 0},	{38, 38},	{13, 152},
+! 	{38, 76},	{13, 165},	{13, 178},	{6, 230},
+! 	{38, 114},	{13, 191},	{13, 204},	{6, 236},
+! 	{13, 217},	{6, 242},	{5, 248},	{3, 253}
+! }
+! #endif
+! ;
+  
+  #define ERR_OK		0	/* successful completion */
+  #define ERR_EXCESS	1	/* completed OK but some input was ignored */
+  #define ERR_INSUFF	-1	/* insufficient input.  Bad face format? */
+  #define ERR_INTERNAL	-2	/* Arithmetic overflow or buffer overflow */
+  
+! EXTERN int status;
+  
+! EXTERN jmp_buf comp_env;
+  
+! int AllBlack P((char *, int, int)) ;
+! int AllWhite P((char *, int, int)) ;
+! int BigPop P((Prob *)) ;
+! int compface P((char *)) ;
+! int main P((int, char *[])) ;
+! int ReadBuf P(()) ;
+! int Same P((char *, int, int)) ;
+! int uncompface P((char *)) ;
+! int WriteBuf P(()) ;
+! 
+! void BigAdd P((unsigned char)) ;
+! void BigClear P(()) ;
+! void BigDiv P((unsigned char, unsigned char *)) ;
+! void BigMul P((unsigned char)) ;
+! void BigPrint P(()) ;
+! void BigPush P((Prob *)) ;
+! void BigRead P((char *)) ;
+! void BigSub P((unsigned int)) ;
+! void BigWrite P((char *)) ;
+! void CompAll P((char *)) ;
+! void Compress P((char *, int, int, int)) ;
+! void GenFace P(()) ;
+! void PopGreys P((char *, int, int)) ;
+! void PushGreys P((char *, int, int)) ;
+! void ReadFace P((char *)) ;
+! void RevPush P((Prob *)) ;
+! void UnCompAll P((char *)) ;
+! void UnCompress P((char *, int, int, int)) ;
+! void UnGenFace P(()) ;
+! void WriteFace P((char *)) ;


Property changes on: trunk/mail/faces/files/patch-compface_compface.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_compress.c
===================================================================
--- trunk/mail/faces/files/patch-compface_compress.c	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_compress.c	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,314 @@
+*** compface/compress.c	Tue Jan 15 23:58:46 2002
+--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compress.c	Wed Jun 19 08:29:13 1991
+***************
+*** 17,113 ****
+  #include "compface.h"
+  
+  int
+! Same(char *f, int wid, int hei)
+  {
+! 	char val, *row;
+! 	int x;
+  
+  	val = *f;
+! 	while (hei--) {
+  		row = f;
+  		x = wid;
+! 		while (x--) {
+! 			if (*(row++) != val) {
+  				return(0);
+-             }
+-         }
+  		f += WIDTH;
+  	}
+! 	return(1);
+  }
+  
+- 
+  int
+! AllBlack(char *f, int wid, int hei)
+  {
+! 	if (wid > 3) {
+  		wid /= 2;
+  		hei /= 2;
+! 		return(AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) &&
+  		       AllBlack(f + WIDTH * hei, wid, hei) &&
+  		       AllBlack(f + WIDTH * hei + wid, wid, hei));
+- 	} else {
+- 		return(*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1));
+      }
+  }
+  
+- 
+  int
+! AllWhite(char *f, int wid, int hei)
+  {
+! 	return((*f == 0) && Same(f, wid, hei));
+  }
+  
+- 
+  void
+! PopGreys(char *f, int wid, int hei)
+  {
+! 	if (wid > 3) {
+  		wid /= 2;
+  		hei /= 2;
+  		PopGreys(f, wid, hei);
+  		PopGreys(f + wid, wid, hei);
+  		PopGreys(f + WIDTH * hei, wid, hei);
+  		PopGreys(f + WIDTH * hei + wid, wid, hei);
+! 	} else {
+  		wid = BigPop(freqs);
+! 		if (wid & 1) {
+  			*f = 1;
+!         }
+! 		if (wid & 2) {
+  			*(f + 1) = 1;
+!         }
+! 		if (wid & 4) {
+  			*(f + WIDTH) = 1;
+!         }
+! 		if (wid & 8) {
+  			*(f + WIDTH + 1) = 1;
+          }
+- 	}
+  }
+  
+- 
+  void
+! PushGreys(char *f, int wid, int hei)
+  {
+! 	if (wid > 3) {
+  		wid /= 2;
+  		hei /= 2;
+  		PushGreys(f, wid, hei);
+  		PushGreys(f + wid, wid, hei);
+  		PushGreys(f + WIDTH * hei, wid, hei);
+  		PushGreys(f + WIDTH * hei + wid, wid, hei);
+- 	} else {
+- 		RevPush(freqs + *f + 2 * *(f + 1) + 
+-                 4 * *(f + WIDTH) + 8 * *(f + WIDTH + 1));
+      }
+  }
+  
+- 
+  void
+! UnCompress(char *f, int wid, int hei, int lev)
+  {
+! 	switch (BigPop(&levels[lev][0])) {
+  		case WHITE :
+  			return;
+  		case BLACK :
+--- 16,120 ----
+  #include "compface.h"
+  
+  int
+! Same(f, wid, hei)
+! register char *f;
+! register int wid, hei;
+  {
+! 	register char val, *row;
+! 	register int x;
+  
+  	val = *f;
+! 	while (hei--)
+! 	{
+  		row = f;
+  		x = wid;
+! 		while (x--)
+! 			if (*(row++) != val)
+  				return(0);
+  		f += WIDTH;
+  	}
+! 	return 1;
+  }
+  
+  int
+! AllBlack(f, wid, hei)
+! char *f;
+! int wid, hei;
+  {
+! 	if (wid > 3)
+! 	{
+  		wid /= 2;
+  		hei /= 2;
+! 		return (AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) &&
+  		  AllBlack(f + WIDTH * hei, wid, hei) &&
+  		  AllBlack(f + WIDTH * hei + wid, wid, hei));
+  	}
++ 	else
++ 		return (*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1));
+  }
+  
+  int
+! AllWhite(f, wid, hei)
+! char *f;
+! int wid, hei;
+  {
+! 	return ((*f == 0) && Same(f, wid, hei));
+  }
+  
+  void
+! PopGreys(f, wid, hei)
+! char *f;
+! int wid, hei;
+  {
+! 	if (wid > 3)
+! 	{
+  		wid /= 2;
+  		hei /= 2;
+  		PopGreys(f, wid, hei);
+  		PopGreys(f + wid, wid, hei);
+  		PopGreys(f + WIDTH * hei, wid, hei);
+  		PopGreys(f + WIDTH * hei + wid, wid, hei);
+! 	}
+! 	else
+! 	{
+  		wid = BigPop(freqs);
+! 		if (wid & 1)
+  			*f = 1;
+! 		if (wid & 2)
+  			*(f + 1) = 1;
+! 		if (wid & 4)
+  			*(f + WIDTH) = 1;
+! 		if (wid & 8)
+  			*(f + WIDTH + 1) = 1;
+  	}
+  }
+  
+  void
+! PushGreys(f, wid, hei)
+! char *f;
+! int wid, hei;
+  {
+! 	if (wid > 3)
+! 	{
+  		wid /= 2;
+  		hei /= 2;
+  		PushGreys(f, wid, hei);
+  		PushGreys(f + wid, wid, hei);
+  		PushGreys(f + WIDTH * hei, wid, hei);
+  		PushGreys(f + WIDTH * hei + wid, wid, hei);
+  	}
++ 	else
++ 		RevPush(freqs + *f + 2 * *(f + 1) + 4 * *(f + WIDTH) +
++ 		  8 * *(f + WIDTH + 1));
+  }
+  
+  void
+! UnCompress(f, wid, hei, lev)
+! register char *f;
+! register int wid, hei, lev;
+  {
+! 	switch (BigPop(&levels[lev][0]))
+! 	{
+  		case WHITE :
+  			return;
+  		case BLACK :
+***************
+*** 125,139 ****
+  	}
+  }
+  
+- 
+  void
+! Compress(char *f, int wid, int hei, int lev)
+  {
+! 	if (AllWhite(f, wid, hei)) {
+  		RevPush(&levels[lev][WHITE]);
+  		return;
+  	}
+! 	if (AllBlack(f, wid, hei)) {
+  		RevPush(&levels[lev][BLACK]);
+  		PushGreys(f, wid, hei);
+  		return;
+--- 132,149 ----
+  	}
+  }
+  
+  void
+! Compress(f, wid, hei, lev)
+! register char *f;
+! register int wid, hei, lev;
+  {
+! 	if (AllWhite(f, wid, hei))
+! 	{
+  		RevPush(&levels[lev][WHITE]);
+  		return;
+  	}
+! 	if (AllBlack(f, wid, hei))
+! 	{
+  		RevPush(&levels[lev][BLACK]);
+  		PushGreys(f, wid, hei);
+  		return;
+***************
+*** 149,164 ****
+  }
+  
+  void
+! UnCompAll(char *fbuf)
+  {
+! 	char *p;
+  
+  	BigClear();
+  	BigRead(fbuf);
+  	p = F;
+! 	while (p < F + PIXELS) {
+  		*(p++) = 0;
+-     }
+  	UnCompress(F, 16, 16, 0);
+  	UnCompress(F + 16, 16, 16, 0);
+  	UnCompress(F + 32, 16, 16, 0);
+--- 159,174 ----
+  }
+  
+  void
+! UnCompAll(fbuf)
+! char *fbuf;
+  {
+! 	register char *p;
+  
+  	BigClear();
+  	BigRead(fbuf);
+  	p = F;
+! 	while (p < F + PIXELS)
+  		*(p++) = 0;
+  	UnCompress(F, 16, 16, 0);
+  	UnCompress(F + 16, 16, 16, 0);
+  	UnCompress(F + 32, 16, 16, 0);
+***************
+*** 171,177 ****
+  }
+  
+  void
+! CompAll(char *fbuf)
+  {
+  	Compress(F, 16, 16, 0);
+  	Compress(F + 16, 16, 16, 0);
+--- 181,188 ----
+  }
+  
+  void
+! CompAll(fbuf)
+! char *fbuf;
+  {
+  	Compress(F, 16, 16, 0);
+  	Compress(F + 16, 16, 16, 0);
+***************
+*** 183,190 ****
+  	Compress(F + WIDTH * 32 + 16, 16, 16, 0);
+  	Compress(F + WIDTH * 32 + 32, 16, 16, 0);
+  	BigClear();
+! 	while (NumProbs > 0) {
+  		BigPush(ProbBuf[--NumProbs]);
+-     }
+  	BigWrite(fbuf);
+  }
+--- 194,200 ----
+  	Compress(F + WIDTH * 32 + 16, 16, 16, 0);
+  	Compress(F + WIDTH * 32 + 32, 16, 16, 0);
+  	BigClear();
+! 	while (NumProbs > 0)
+  		BigPush(ProbBuf[--NumProbs]);
+  	BigWrite(fbuf);
+  }


Property changes on: trunk/mail/faces/files/patch-compface_compress.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_file.c
===================================================================
--- trunk/mail/faces/files/patch-compface_file.c	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_file.c	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,314 @@
+*** compface/file.c	Tue Jan 15 23:58:46 2002
+--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/file.c	Sun Jan 19 19:35:35 2003
+***************
+*** 16,147 ****
+  
+  #include "compface.h"
+  
+  void
+! BigRead(char *fbuf)
+  {
+!     int c;
+  
+!     while (*fbuf != '\0') {
+          c = *(fbuf++);
+!         if ((c < FIRSTPRINT) || (c > LASTPRINT)) {
+              continue;
+-         }
+          BigMul(NUMPRINTS);
+          BigAdd((WORD)(c - FIRSTPRINT));
+      }
+  }
+  
+- 
+  void
+! BigWrite(char *fbuf)
+  {
+      static WORD tmp;
+      static char buf[DIGITS];
+!     char *s;
+!     int i;
+  
+      s = buf;
+!     while (B.b_words > 0) {
+          BigDiv(NUMPRINTS, &tmp);
+          *(s++) = tmp + FIRSTPRINT;
+      }
+!     i = 7;              /* Leave room for the field name on the first line */
+      *(fbuf++) = ' ';
+!     while (s-- > buf) {
+!         if (i == 0) {
+              *(fbuf++) = ' ';
+-         }
+          *(fbuf++) = *s;
+!         if (++i >= MAXLINELEN) {
+              *(fbuf++) = '\n';
+              i = 0;
+          }
+      }
+!     if (i > 0) {
+          *(fbuf++) = '\n';
+-     }
+      *(fbuf++) = '\0';
+  }
+  
+- 
+  void
+! ReadFace(char *fbuf)
+  {
+!     int c, i;
+!     char *s, *t;
+  
+      t = s = fbuf;
+!     for (i = strlen(s); i > 0; i--) {
+!         c = (int) *(s++);
+!         if ((c >= '0') && (c <= '9')) {
+!             if (t >= fbuf + DIGITS) {
+                  status = ERR_EXCESS;
+                  break;
+              }
+              *(t++) = c - '0';
+!         } else if ((c >= 'A') && (c <= 'F')) {
+!             if (t >= fbuf + DIGITS) {
+                  status = ERR_EXCESS;
+                  break;
+              }
+              *(t++) = c - 'A' + 10;
+!         } else if ((c >= 'a') && (c <= 'f')) {
+!             if (t >= fbuf + DIGITS) {
+                  status = ERR_EXCESS;
+                  break;
+              }
+              *(t++) = c - 'a' + 10;
+-         } else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0)) {
+-             t--;
+          }
+      }
+!     if (t < fbuf + DIGITS) {
+          longjmp(comp_env, ERR_INSUFF);
+-     }
+      s = fbuf;
+      t = F;
+      c = 1 << (BITSPERDIG - 1);
+!     while (t < F + PIXELS) {
+          *(t++) = (*s & c) ? 1 : 0;
+!         if ((c >>= 1) == 0) {
+              s++;
+              c = 1 << (BITSPERDIG - 1);
+          }
+      }
+  }
+  
+- 
+  void
+! WriteFace(char *fbuf)
+  {
+!     char *s, *t;
+!     int i, bits, digits, words;
+  
+      s = F;
+      t = fbuf;
+      bits = digits = words = i = 0;
+!     while (s < F + PIXELS) {
+!         if ((bits == 0) && (digits == 0)) {
+              *(t++) = '0';
+              *(t++) = 'x';
+          }
+!         if (*(s++)) {
+              i = i * 2 + 1;
+!         } else {
+              i *= 2;
+          }
+!         if (++bits == BITSPERDIG) {
+!             *(t++) = *(i + HexDigits);
+              bits = i = 0;
+!             if (++digits == DIGSPERWORD) {
+                  *(t++) = ',';
+                  digits = 0;
+!                 if (++words == WORDSPERLINE) {
+                      *(t++) = '\n';
+                      words = 0;
+                  }
+              }
+          }
+      }
+      *(t++) = '\0';
+  }
+--- 15,191 ----
+  
+  #include "compface.h"
+  
++ int xbitmap=0;
++ 
+  void
+! BigRead(fbuf)
+! register char *fbuf;
+  {
+! 	register int c;
+  
+! 	while (*fbuf != '\0')
+! 	{
+  		c = *(fbuf++);
+! 		if ((c < FIRSTPRINT) || (c > LASTPRINT))
+  			continue;
+  		BigMul(NUMPRINTS);
+  		BigAdd((WORD)(c - FIRSTPRINT));
+  	}
+  }
+  
+  void
+! BigWrite(fbuf)
+! register char *fbuf;
+  {
+  	static WORD tmp;
+  	static char buf[DIGITS];
+! 	register char *s;
+! 	register int i;
+  
+  	s = buf;
+! 	while (B.b_words > 0)
+! 	{
+  		BigDiv(NUMPRINTS, &tmp);
+  		*(s++) = tmp + FIRSTPRINT;
+  	}
+! 	i = 7;	/* leave room for the field name on the first line */
+  	*(fbuf++) = ' ';
+! 	while (s-- > buf)
+! 	{
+! 		if (i == 0)
+  			*(fbuf++) = ' ';
+  		*(fbuf++) = *s;
+! 		if (++i >= MAXLINELEN)
+! 		{
+  			*(fbuf++) = '\n';
+  			i = 0;
+  		}
+  	}
+! 	if (i > 0)
+  		*(fbuf++) = '\n';
+  	*(fbuf++) = '\0';
+  }
+  
+  void
+! ReadFace(fbuf)
+! char *fbuf;
+  {
+! 	register int c, i;
+! 	register char *s, *t;
+  
+  	t = s = fbuf;
+! 	for(i = strlen(s); i > 0; i--)
+! 	{
+! 		c = (int)*(s++);
+! 		if ((c >= '0') && (c <= '9'))
+! 		{
+! 			if (t >= fbuf + DIGITS)
+! 			{
+  				status = ERR_EXCESS;
+  				break;
+  			}
+  			*(t++) = c - '0';
+! 		}
+! 		else if ((c >= 'A') && (c <= 'F'))
+! 		{
+! 			if (t >= fbuf + DIGITS)
+! 			{
+  				status = ERR_EXCESS;
+  				break;
+  			}
+  			*(t++) = c - 'A' + 10;
+! 		}
+! 		else if ((c >= 'a') && (c <= 'f'))
+! 		{
+! 			if (t >= fbuf + DIGITS)
+! 			{
+  				status = ERR_EXCESS;
+  				break;
+  			}
+  			*(t++) = c - 'a' + 10;
+  		}
++ 		else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0))
++ 			t--;
+  	}
+! 	if (t < fbuf + DIGITS)
+  		longjmp(comp_env, ERR_INSUFF);
+  	s = fbuf;
+  	t = F;
+  	c = 1 << (BITSPERDIG - 1);
+! 	while (t < F + PIXELS)
+! 	{
+  		*(t++) = (*s & c) ? 1 : 0;
+! 		if ((c >>= 1) == 0)
+! 		{
+  			s++;
+  			c = 1 << (BITSPERDIG - 1);
+  		}
+  	}
+  }
+  
+  void
+! WriteFace(fbuf)
+! char *fbuf;
+  {
+! 	register char *s, *t;
+! 	register int i, bits, digits, words;
+! 	extern int xbitmap;
+! 	int digsperword = DIGSPERWORD;
+! 	int wordsperline = WORDSPERLINE;
+  
+  	s = F;
+  	t = fbuf;
+  	bits = digits = words = i = 0;
+! 	if (xbitmap) {
+! 		sprintf(t,"#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n ");
+! 		while (*t) t++;
+! 		digsperword = 2;
+! 		wordsperline = 15;
+! 	}
+! 	while (s < F + PIXELS)
+! 	{
+! 		if ((bits == 0) && (digits == 0))
+! 		{
+  			*(t++) = '0';
+  			*(t++) = 'x';
+  		}
+! 		if (xbitmap) {
+! 			if (*(s++))
+! 				i = (i >> 1) | 0x8;
+! 			else
+! 				i >>= 1;
+! 		}
+! 		else {
+! 			if (*(s++))
+  				i = i * 2 + 1;
+! 			else
+  				i *= 2;
+  		}
+! 		if (++bits == BITSPERDIG)
+! 		{
+! 			if (xbitmap) {
+! 				t++;
+! 				t[-(digits & 1) * 2] = *(i + HexDigits);
+! 			}
+! 			else *(t++) = *(i + HexDigits);
+  			bits = i = 0;
+! 			if (++digits == digsperword)
+! 			{
+! 				if (xbitmap && (s >= F + PIXELS)) break;
+  				*(t++) = ',';
+  				digits = 0;
+! 				if (++words == wordsperline)
+! 				{
+  					*(t++) = '\n';
++ 					if (xbitmap) *(t++) = ' ';
+  					words = 0;
+  				}
+  			}
+  		}
+  	}
++ 	if (xbitmap) {
++ 		sprintf(t, "}\n");
++ 		while (*t) t++;
++ 	}
+  	*(t++) = '\0';
+  }


Property changes on: trunk/mail/faces/files/patch-compface_file.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_gen.c
===================================================================
--- trunk/mail/faces/files/patch-compface_gen.c	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_gen.c	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,186 @@
+*** compface/gen.c	Tue Jan 15 23:58:46 2002
+--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/gen.c	Wed Jun 19 08:29:13 1991
+***************
+*** 18,79 ****
+  
+  #define GEN(g) F[h] ^= G.g[k]; break
+  
+! static void Gen(char *);
+  
+  static void
+! Gen(char *f)
+  {
+!     int m, l, k, j, i, h;
+  
+!     for (j = 0; j < HEIGHT;  j++) {
+!         for (i = 0; i < WIDTH;  i++) {
+              h = i + j * WIDTH;
+              k = 0;
+!             for (l = i - 2; l <= i + 2; l++) {
+!                 for (m = j - 2; m <= j; m++) {
+!                     if ((l >= i) && (m == j)) {
+                          continue;
+!                     }
+!                     if ((l > 0) && (l <= WIDTH) && (m > 0)) {
+                          k = *(f + l + m * WIDTH) ? k * 2 + 1 : k * 2;
+                      }
+!                 }
+!             }
+!             switch (i) {
+                  case 1 :
+!                     switch (j) {
+                          case 1 : GEN(g_22);
+                          case 2 : GEN(g_21);
+                          default : GEN(g_20);
+                      }
+                      break;
+- 
+                  case 2 :
+!                     switch (j) {
+                          case 1 : GEN(g_12);
+                          case 2 : GEN(g_11);
+                          default : GEN(g_10);
+                      }
+                      break;
+- 
+                  case WIDTH - 1 :
+!                     switch (j) {
+                          case 1 : GEN(g_42);
+                          case 2 : GEN(g_41);
+                          default : GEN(g_40);
+                      }
+                      break;
+- 
+                  case WIDTH :
+!                     switch (j) {
+                          case 1 : GEN(g_32);
+                          case 2 : GEN(g_31);
+                          default : GEN(g_30);
+                      }
+                      break;
+- 
+                  default :
+!                     switch (j) {
+                          case 1 : GEN(g_02);
+                          case 2 : GEN(g_01);
+                          default : GEN(g_00);
+--- 17,81 ----
+  
+  #define GEN(g) F[h] ^= G.g[k]; break
+  
+! static void Gen P((char *)) ;
+  
+  static void
+! Gen(f)
+! register char *f;
+  {
+! 	register int m, l, k, j, i, h;
+  
+! 	for (j = 0; j < HEIGHT;  j++)
+! 	{
+! 		for (i = 0; i < WIDTH;  i++)
+! 		{
+  			h = i + j * WIDTH;
+  			k = 0;
+! 			for (l = i - 2; l <= i + 2; l++)
+! 				for (m = j - 2; m <= j; m++)
+! 				{
+! 					if ((l >= i) && (m == j))
+  						continue;
+! 					if ((l > 0) && (l <= WIDTH) && (m > 0))
+  						k = *(f + l + m * WIDTH) ? k * 2 + 1 : k * 2;
+  				}
+! 			switch (i)
+! 			{
+  				case 1 :
+! 					switch (j)
+! 					{
+  						case 1 : GEN(g_22);
+  						case 2 : GEN(g_21);
+  						default : GEN(g_20);
+  					}
+  					break;
+  				case 2 :
+! 					switch (j)
+! 					{
+  						case 1 : GEN(g_12);
+  						case 2 : GEN(g_11);
+  						default : GEN(g_10);
+  					}
+  					break;
+  				case WIDTH - 1 :
+! 					switch (j)
+! 					{
+  						case 1 : GEN(g_42);
+  						case 2 : GEN(g_41);
+  						default : GEN(g_40);
+  					}
+  					break;
+  				case WIDTH :
+! 					switch (j)
+! 					{
+  						case 1 : GEN(g_32);
+  						case 2 : GEN(g_31);
+  						default : GEN(g_30);
+  					}
+  					break;
+  				default :
+! 					switch (j)
+! 					{
+  						case 1 : GEN(g_02);
+  						case 2 : GEN(g_01);
+  						default : GEN(g_00);
+***************
+*** 84,109 ****
+      }
+  }
+  
+- 
+  void
+  GenFace()
+  {
+      static char new[PIXELS];
+!     char *f1, *f2;
+!     int i;
+  
+      f1 = new;
+      f2 = F;
+      i = PIXELS;
+!     while (i-- > 0) {
+          *(f1++) = *(f2++);
+-     }
+      Gen(new);
+  }
+  
+- 
+  void
+  UnGenFace()
+  {
+      Gen(F);
+  }
+--- 86,110 ----
+  	}
+  }
+  
+  void
+  GenFace()
+  {
+  	static char new[PIXELS];
+! 	register char *f1;
+! 	register char *f2;
+! 	register int i;
+  
+  	f1 = new;
+  	f2 = F;
+  	i = PIXELS;
+! 	while (i-- > 0)
+  		*(f1++) = *(f2++);
+  	Gen(new);
+  }
+  
+  void
+  UnGenFace()
+  {
+  	Gen(F);
+  }
++ 


Property changes on: trunk/mail/faces/files/patch-compface_gen.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_uncmain.c
===================================================================
--- trunk/mail/faces/files/patch-compface_uncmain.c	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_uncmain.c	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,296 @@
+*** compface/uncmain.c	Thu Feb 21 16:42:54 2002
+--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/uncmain.c	Sun Jan 19 19:35:35 2003
+***************
+*** 13,28 ****
+   *  to me, then an attempt will be made to fix them.
+   */
+  
+- #include <stdlib.h>
+- #include <unistd.h>
+  #include <fcntl.h>
+  #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];
+  
+--- 15,26 ----
+   *  to me, then an attempt will be made to fix them.
+   */
+  
+  #include <fcntl.h>
+  #include "compface.h"
+  
+! extern int xbitmap;
+  
+! /* the buffer is longer than needed to handle sparse input formats */
+  #define FACEBUFLEN 2048
+  char fbuf[FACEBUFLEN];
+  
+***************
+*** 32,87 ****
+  int outfile   = 1;
+  char *outname = "<stdout>";
+  
+! 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)
+--- 30,87 ----
+  int outfile   = 1;
+  char *outname = "<stdout>";
+  
+! /* 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 > 1 && !strcmp(argv[1], "-X"))
+!     {
+!       xbitmap++;
+!       argc--;
+!       argv++;
+      }
+  
+!   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)
+***************
+*** 89,98 ****
+          }
+      }
+  
+!     if (argc > 2) {
+          outname = *++argv;
+!         if ((outfile = open(outname, O_WRONLY | O_CREAT | 
+!                                      O_TRUNC, 0644)) == -1) {
+              INITERR(outname)
+              ADDERR(": ")
+              ADDERR(ERR)
+--- 89,99 ----
+          }
+      }
+  
+!   if (argc > 2)
+!     {
+        outname = *++argv;
+!       if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1)
+!         {
+            INITERR(outname)
+            ADDERR(": ")
+            ADDERR(ERR)
+***************
+*** 101,107 ****
+      }
+  
+      (void) ReadBuf();
+!     switch (uncompface(fbuf)) {
+          case -2 : INITERR("internal error")
+                    ERROR
+          case -1 : INITERR(inname)
+--- 102,109 ----
+      }
+  
+    (void) ReadBuf();
+!   switch (uncompface(fbuf))
+!     {
+        case -2 : INITERR("internal error")
+                  ERROR
+        case -1 : INITERR(inname)
+***************
+*** 121,133 ****
+  int
+  WriteBuf()
+  {
+!     char *s, *t;
+!     int len;
+  
+      s = fbuf;
+      t = s + strlen(s);
+!     while (s < t) {
+!         if ((len = write(outfile, s, t - s)) == -1) {
+              INITERR(outname)
+              ADDERR(": ")
+              ADDERR(ERR)
+--- 123,137 ----
+  int
+  WriteBuf()
+  {
+! 	register char *s, *t;
+! 	register int len;
+  
+  	s = fbuf;
+  	t = s + strlen(s);
+! 	while (s < t)
+! 	{
+! 		if ((len = write(outfile, s, t - s)) == -1)
+! 		{
+  			INITERR(outname)
+  			ADDERR(": ")
+  			ADDERR(ERR)
+***************
+*** 135,161 ****
+          }
+          s += len;
+      }
+!     return(0);
+  }
+  
+  
+  int
+  ReadBuf()
+  {
+!     int count, len;
+!     char *t;
+  
+      count = 0;
+      t = fbuf;
+!     while ((len = read(infile, t, FACEBUFLEN - count))) {
+!         if (len == -1) {
+              INITERR(inname)
+              ADDERR(": ")
+              ADDERR(ERR)
+              ERROR
+          }
+          t += len;
+!         if ((count += len) >= FACEBUFLEN) {
+              INITWARN(inname)
+              ADDWARN(" exceeds internal buffer size.  Data may be lost")
+              WARN
+--- 139,168 ----
+  		}
+  		s += len;
+  	}
+! 	return 0;
+  }
+  
+  
+  int
+  ReadBuf()
+  {
+! 	register int count, len;
+! 	register char *t;
+  
+  	count = 0;
+  	t = fbuf;
+! 	while (len = read(infile, t, FACEBUFLEN - count))
+! 	{
+! 		if (len == -1)
+! 		{
+  			INITERR(inname)
+  			ADDERR(": ")
+  			ADDERR(ERR)
+  			ERROR
+  		}
+  		t += len;
+! 		if ((count += len) >= FACEBUFLEN)
+! 		{
+  			INITWARN(inname)
+  			ADDWARN(" exceeds internal buffer size.  Data may be lost")
+  			WARN
+***************
+*** 163,167 ****
+          }
+      }
+      *t = '\0';
+!     return(count);
+  }
+--- 170,174 ----
+  		}
+  	}
+  	*t = '\0';
+! 	return count;
+  }


Property changes on: trunk/mail/faces/files/patch-compface_uncmain.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-compface_uncompface.c
===================================================================
--- trunk/mail/faces/files/patch-compface_uncompface.c	                        (rev 0)
+++ trunk/mail/faces/files/patch-compface_uncompface.c	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,40 @@
+*** compface/uncompface.c	Thu Feb 21 16:42:54 2002
+--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/uncompface.c	Wed Jun 19 08:29:14 1991
+***************
+*** 14,29 ****
+   *  to me, then an attempt will be made to fix them.
+   */
+  
+  #include "compface.h"
+- #include "vars.h"
+  
+  int
+! uncompface(char *fbuf)
+  {
+!     if (!(status = setjmp(comp_env))) {
+!         UnCompAll(fbuf);       /* compress otherwise */
+          UnGenFace();
+          WriteFace(fbuf);
+      }
+!     return(status);
+  }
+--- 13,31 ----
+   *  to me, then an attempt will be made to fix them.
+   */
+  
++ #define MAIN
++ 
+  #include "compface.h"
+  
+  int
+! uncompface(fbuf)
+! char *fbuf;
+  {
+! 	if (!(status = setjmp(comp_env)))
+! 	{
+! 		UnCompAll(fbuf);/* compress otherwise */
+  		UnGenFace();
+  		WriteFace(fbuf);
+  	}
+! 	return status;
+  }


Property changes on: trunk/mail/faces/files/patch-compface_uncompface.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-configure
===================================================================
--- trunk/mail/faces/files/patch-configure	                        (rev 0)
+++ trunk/mail/faces/files/patch-configure	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,19 @@
+--- configure.orig	2015-01-11 20:18:10.319363623 +0530
++++ configure	2015-01-11 20:21:02.304351633 +0530
+@@ -5065,6 +5065,8 @@
+ fi
+ done
+ 
++if test "x$with_x" = xyes; then
++
+ # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
+ if test "${with_gtk_prefix+set}" = set; then
+   withval="$with_gtk_prefix"
+@@ -5356,6 +5358,7 @@
+   fi
+ 
+   rm -f conf.gtktest
++fi # with_x=xyes
+ 
+ ALL_LINGUAS=""
+ echo "$as_me:5361: checking for $CC option to accept ANSI C" >&5


Property changes on: trunk/mail/faces/files/patch-configure
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/faces/files/patch-faces_Faces.ad
===================================================================
--- trunk/mail/faces/files/patch-faces_Faces.ad	                        (rev 0)
+++ trunk/mail/faces/files/patch-faces_Faces.ad	2015-11-13 00:55:47 UTC (rev 20755)
@@ -0,0 +1,17 @@
+*** faces/Faces.ad.orig	Tue Dec 18 05:11:31 2001
+--- faces/Faces.ad	Sun Mar 17 21:14:05 2002
+***************
+*** 12,17 ****
+  faces.button1clear:		false
+  faces.displayHostname:		false
+  
+! faces.audioSupport:		false
+! faces.audioCommand:		play
+  faces.bellAudioFile:
+--- 12,17 ----
+  faces.button1clear:		false
+  faces.displayHostname:		false
+  
+! faces.audioSupport:		true
+! faces.audioCommand:		rplay
+  faces.bellAudioFile:


Property changes on: trunk/mail/faces/files/patch-faces_Faces.ad
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list