--- pine4.53/pine/osdep/os-osx.h.orig	Wed Nov 21 13:28:51 2001
+++ pine4.53/pine/osdep/os-osx.h	Wed Nov 21 13:30:51 2001
@@ -178,10 +178,10 @@
 
 /*----- System-wide config file ----------------------------------------*/
 #ifndef SYSTEM_PINERC
-#define SYSTEM_PINERC             "/usr/local/lib/pine.conf"
+#define SYSTEM_PINERC             "@PREFIX@/lib/pine.conf"
 #endif
 #ifndef SYSTEM_PINERC_FIXED
-#define SYSTEM_PINERC_FIXED       "/usr/local/lib/pine.conf.fixed"
+#define SYSTEM_PINERC_FIXED       "@PREFIX@/lib/pine.conf.fixed"
 #endif
 
 
--- pine4.53/pine/pine.hlp.orig	Fri Nov 30 09:56:26 2001
+++ pine4.53/pine/pine.hlp	Fri Nov 30 09:56:47 2001
@@ -596,8 +596,8 @@
  executable     &lt;Unix search path&gt;/pine
  persnl cfg     ~/.pinerc
  except cfg     ~/.pinercex
- global cfg     /usr/local/lib/pine.conf
- fixed cfg      /usr/local/lib/pine.conf.fixed
+ global cfg     @PREFIX@/etc/pine.conf
+ fixed cfg      @PREFIX@/etc/pine.conf.fixed
  local help     /usr/local/lib/pine.info
 
  interrupted    ~/.pine-interrupted-mail
@@ -1952,7 +1952,7 @@
 file, execute
 
 <PRE><CODE>
-		pine -conf > /usr/local/lib/pine.conf
+		pine -conf > @PREFIX@/etc/pine.conf
 </CODE></PRE>
 <P>
 
@@ -1960,7 +1960,7 @@
 system configuration file, execute
 
 <PRE><CODE>
-		pine -P old-pine.conf -conf > /usr/local/lib/pine.conf
+		pine -P old-pine.conf -conf > @PREFIX@/etc/pine.conf
 </CODE></PRE>
 <P>
 A system configuration file is not required.
@@ -2112,7 +2112,7 @@
 <DT> -P <EM>pinerc</EM>
 
 <DD> Uses the named file as the system wide configuration file instead of
-<EM>/usr/local/lib/pine.conf</EM> on UNIX, or nothing on <EM>PC-Pine</EM>.
+<EM>@PREFIX@/etc/pine.conf</EM> on UNIX, or nothing on <EM>PC-Pine</EM>.
 Pinerc may be either a local file or a remote configuration folder.
 <P>
 
@@ -2820,10 +2820,10 @@
 </OL>
 <P>
 The fixed configuration file is normally
-<CODE>/usr/local/lib/pine.conf.fixed</CODE>.
+<CODE>@PREFIX@/etc/pine.conf.fixed</CODE>.
 <P>
 The system-wide configuration file is normally
-<CODE>/usr/local/lib/pine.conf</CODE> for Unix Pine and is normally not
+<CODE>@PREFIX@/etc/pine.conf</CODE> for Unix Pine and is normally not
 set for PC-Pine.
 For PC-Pine, if the environment variable <EM>$PINECONF</EM> is set, that
 is used for the system-wide configuration.
diff -Naur pine4.53-orig/contrib/krb5-setup pine4.53/contrib/krb5-setup
diff -rc pine4.53/pine/filter.c pine4.53.qpfilter/pine/filter.c
*** pine4.53/pine/filter.c	Wed Jan  8 12:13:50 2003
--- pine4.53.qpfilter/pine/filter.c	Thu Jan 16 09:50:00 2003
***************
*** 1693,1698 ****
--- 1693,1699 ----
      GF_INIT(f, f->next);
  
      if(flg == GF_DATA){
+ 	register unsigned char e;
  	register unsigned char c;
  	register int state = f->f1;
  
***************
*** 1713,1718 ****
--- 1714,1720 ----
  		break;
  
  	      case EQUAL  :
+ 		e = c;
  		if(c == '\015'){	/* "=\015" is a soft EOL */
  		    state = CCR;
  		    break;
***************
*** 1725,1733 ****
  		}
  
  		if(!isxdigit((unsigned char)c)){	/* must be hex! */
! 		    fs_give((void **)&(f->line));
! 		    gf_error("Non-hexadecimal character in QP encoding");
! 		    /* NO RETURN */
  		}
  
  		if (isdigit ((unsigned char)c))
--- 1727,1738 ----
  		}
  
  		if(!isxdigit((unsigned char)c)){	/* must be hex! */
!                     GF_PUTC(f->next,c); /* be tolerant to sender errors */
! 		    e = '\0';
!                     state = DFL;  
! 	            q_status_message(SM_ORDER, 3, 4,
! 			"Non-hexadecimal character in QP encoding");
!                     break;
  		}
  
  		if (isdigit ((unsigned char)c))
***************
*** 1741,1749 ****
  	      case HEX :
  		state = DFL;
  		if(!isxdigit((unsigned char)c)){	/* must be hex! */
! 		    fs_give((void **)&(f->line));
! 		    gf_error("Non-hexadecimal character in QP encoding");
! 		    /* NO RETURN */
  		}
  
  		if (isdigit((unsigned char)c))
--- 1746,1760 ----
  	      case HEX :
  		state = DFL;
  		if(!isxdigit((unsigned char)c)){	/* must be hex! */
!                     GF_PUTC(f->next,'='); /* be tolerant to sender errors */
! 		    if (e)
!   	              GF_PUTC(f->next,e);
! 		    e = '\0'; 
!                     GF_PUTC(f->next,c); 
!                     state = DFL;  
! 	            q_status_message(SM_ORDER, 3, 4,
! 			"Non-hexadecimal character in QP encoding");
!                     break;
  		}
  
  		if (isdigit((unsigned char)c))
