--- centericq-4.20.0.orig/kkconsui-0.1/config.guess
+++ centericq-4.20.0/kkconsui-0.1/config.guess
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2001-07-12'
+timestamp='2002-03-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -24,8 +24,9 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
@@ -97,7 +98,7 @@
 
 set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
  ,,)    echo "int dummy(){}" > $dummy.c ;
-	for c in cc gcc c89 ; do
+	for c in cc gcc c89 c99 ; do
 	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
 	  if test $? = 0 ; then
 	     CC_FOR_BUILD="$c"; break ;
@@ -127,29 +128,29 @@
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
-	# Netbsd (nbsd) targets should (where applicable) match one or
+	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
 	# compatibility and a consistent mechanism for selecting the
 	# object file format.
-	# Determine the machine/vendor (is the vendor relevant).
-	case "${UNAME_MACHINE}" in
-	    amiga) machine=m68k-unknown ;;
-	    arm32) machine=arm-unknown ;;
-	    atari*) machine=m68k-atari ;;
-	    sun3*) machine=m68k-sun ;;
-	    mac68k) machine=m68k-apple ;;
-	    macppc) machine=powerpc-apple ;;
-	    hp3[0-9][05]) machine=m68k-hp ;;
-	    ibmrt|romp-ibm) machine=romp-ibm ;;
-	    *) machine=${UNAME_MACHINE}-unknown ;;
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE}" in
-	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep __ELF__ >/dev/null
@@ -172,6 +173,45 @@
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     alpha:OSF1:*:*)
 	if test $UNAME_RELEASE = "V4.0"; then
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -227,6 +267,9 @@
 			2-307)
 				UNAME_MACHINE="alphaev67"
 				;;
+			2-1307)
+				UNAME_MACHINE="alphaev68"
+				;;
 		esac
 	fi
 	rm -f $dummy.s $dummy
@@ -244,29 +287,11 @@
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
 	exit 0;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
 	exit 0 ;;
-    arc64:OpenBSD:*:*)
-	echo mips64el-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hkmips:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
 	exit 0 ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
@@ -316,7 +341,7 @@
 	echo m68k-sun-sunos${UNAME_RELEASE}
 	exit 0 ;;
     sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
@@ -330,9 +355,6 @@
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
 	exit 0 ;;
-    atari*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -359,18 +381,6 @@
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
         exit 0 ;;
-    sun3*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
 	exit 0 ;;
@@ -387,6 +397,7 @@
 	echo clipper-intergraph-clix${UNAME_RELEASE}
 	exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
@@ -408,7 +419,6 @@
 	  exit (-1);
 	}
 EOF
-	eval $set_cc_for_build
 	$CC_FOR_BUILD $dummy.c -o $dummy \
 	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 	  && rm -f $dummy.c $dummy && exit 0
@@ -478,6 +488,7 @@
 	exit 0 ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
 		sed 's/^		//' << EOF >$dummy.c
 		#include <sys/systemcfg.h>
 
@@ -489,7 +500,6 @@
 			exit(0);
 			}
 EOF
-		eval $set_cc_for_build
 		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
 		rm -f $dummy.c $dummy
 		echo rs6000-ibm-aix3.2.5
@@ -500,7 +510,7 @@
 	fi
 	exit 0 ;;
     *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
@@ -540,10 +550,8 @@
 	    9000/31? )            HP_ARCH=m68000 ;;
 	    9000/[34]?? )         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
-              case "${HPUX_REV}" in
-                11.[0-9][0-9])
-                  if [ -x /usr/bin/getconf ]; then
-                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                     case "${sc_cpu_version}" in
                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@@ -552,12 +560,13 @@
                         case "${sc_kernel_bits}" in
                           32) HP_ARCH="hppa2.0n" ;;
                           64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
                         esac ;;
                     esac
-                  fi ;;
-              esac
-              if [ "${HP_ARCH}" = "" ]; then
-              sed 's/^              //' << EOF >$dummy.c
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
 
               #define _HPUX_SOURCE
               #include <stdlib.h>
@@ -590,11 +599,10 @@
                   exit (0);
               }
 EOF
-	eval $set_cc_for_build
-	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-	rm -f $dummy.c $dummy
-	fi ;;
+		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+		    rm -f $dummy.c $dummy
+		fi ;;
 	esac
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
@@ -603,6 +611,7 @@
 	echo ia64-hp-hpux${HPUX_REV}
 	exit 0 ;;
     3050*:HI-UX:*:*)
+	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
 	int
@@ -628,7 +637,6 @@
 	  exit (0);
 	}
 EOF
-	eval $set_cc_for_build
 	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
 	rm -f $dummy.c $dummy
 	echo unknown-hitachi-hiuxwe2
@@ -658,9 +666,6 @@
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
 	exit 0 ;;
-    hppa*:OpenBSD:*:*)
-	echo hppa-unknown-openbsd
-	exit 0 ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
         exit 0 ;;
@@ -679,9 +684,6 @@
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
         exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
@@ -703,18 +705,12 @@
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 	exit 0 ;;
@@ -727,9 +723,6 @@
     *:FreeBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit 0 ;;
@@ -739,6 +732,9 @@
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit 0 ;;
+    x86:Interix*:3*)
+	echo i386-pc-interix3
+	exit 0 ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -764,20 +760,37 @@
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     mips:Linux:*:*)
-	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
-	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
-	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
-	esac
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	rm -f $dummy.c
+	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
 	;;
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-gnu
 	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit 0 ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -786,7 +799,7 @@
 	  PCA57) UNAME_MACHINE=alphapca56 ;;
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
         esac
 	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
@@ -819,7 +832,8 @@
 	# The BFD linker knows what the default object file format is, so
 	# first see if it will tell us. cd to the root directory to prevent
 	# problems with other programs or directories called `ld' in the path.
-	ld_supported_targets=`cd /; ld --help 2>&1 \
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
 			 | sed -ne '/supported targets:/!d
 				    s/[ 	][ 	]*/ /g
 				    s/.*supported targets: *//
@@ -842,33 +856,30 @@
 		exit 0 ;;
 	esac
 	# Determine whether the default compiler is a.out or elf
-	cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-#  if __GLIBC__ >= 2
-    printf ("%s-pc-linux-gnu\n", argv[1]);
-#  else
-    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-#  endif
-# else
-   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-#else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
 	eval $set_cc_for_build
-	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 	;;
     i*86:DYNIX/ptx:4*:*)
@@ -947,7 +958,7 @@
 	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -993,8 +1004,8 @@
 		echo ns32k-sni-sysv
 	fi
 	exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <Richard.M.Bartel@ccMail.Census.GOV>
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
         exit 0 ;;
     *:UNIX_System_V:4*:FTX*)
@@ -1006,6 +1017,10 @@
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
 	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
 	exit 0 ;;
@@ -1044,15 +1059,17 @@
 	echo `uname -p`-apple-darwin${UNAME_RELEASE}
 	exit 0 ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	if test "${UNAME_MACHINE}" = "x86pc"; then
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
 	exit 0 ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit 0 ;;
-    NSR-[KW]:NONSTOP_KERNEL:*:*)
+    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
 	exit 0 ;;
     *:NonStop-UX:*:*)
@@ -1098,11 +1115,18 @@
     *:ITS:*:*)
 	echo pdp10-unknown-its
 	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
+eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
@@ -1217,7 +1241,6 @@
 }
 EOF
 
-eval $set_cc_for_build
 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
 rm -f $dummy.c $dummy
 
--- centericq-4.20.0.orig/kkconsui-0.1/config.sub
+++ centericq-4.20.0/kkconsui-0.1/config.sub
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2001-06-08'
+timestamp='2002-03-07'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,8 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -117,7 +118,7 @@
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -223,26 +224,36 @@
 case $basic_machine in
 	# Recognize the basic CPU types without company name.
 	# Some are omitted here because they have special meanings below.
-	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
-	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
-		| pyramid | mn10200 | mn10300 | tron | a29k \
-		| 580 | i960 | h8300 \
-		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
-		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
-		| hppa64 \
-		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
-		| alphaev6[78] \
-		| we32k | ns16k | clipper | i370 | sh | sh[34] \
-		| powerpc | powerpcle \
-		| 1750a | dsp16xx | pdp10 | pdp11 \
-		| mips16 | mips64 | mipsel | mips64el \
-		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
-		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
-		| mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \
-		| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
-		| v850 | c4x \
-		| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
-		| pj | pjl | h8500 | z8k)
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dsp16xx \
+	| fr30 \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
+	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
+	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+	| mipsisa32 | mipsisa64 \
+	| mn10200 | mn10300 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
 		basic_machine=$basic_machine-unknown
 		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
@@ -265,31 +276,45 @@
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
-	# FIXME: clean up the formatting here.
-	vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
-	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
-	      | xmp-* | ymp-* \
-	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
-	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
-	      | hppa2.0n-* | hppa64-* \
-	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
-	      | alphaev6[78]-* \
-	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
-	      | clipper-* | orion-* \
-	      | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \
-	      | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
-	      | mips16-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-* \
-	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
-	      | mipstx39-* | mipstx39el-* | mcore-* \
-	      | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
-	      | [cjt]90-* \
-	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
-	      | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
-	      | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c54x-* \
+	| clipper-* | cydra-* \
+	| d10v-* | d30v-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| m32r-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+	| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+	| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
+	| ymp-* \
+	| z8k-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -352,6 +377,10 @@
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -372,16 +401,8 @@
 		basic_machine=c38-convex
 		os=-bsd
 		;;
-	cray | ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	cray2)
-		basic_machine=cray2-cray
-		os=-unicos
-		;;
-	[cjt]90)
-		basic_machine=${basic_machine}-cray
+	cray | j90)
+		basic_machine=j90-cray
 		os=-unicos
 		;;
 	crds | unos)
@@ -396,6 +417,14 @@
 	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
 		basic_machine=mips-dec
 		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
 		basic_machine=m68k-motorola
@@ -576,14 +605,6 @@
 		basic_machine=m68k-atari
 		os=-mint
 		;;
-	mipsel*-linux*)
-		basic_machine=mipsel-unknown
-		os=-linux-gnu
-		;;
-	mips*-linux*)
-		basic_machine=mips-unknown
-		os=-linux-gnu
-		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 		;;
@@ -598,6 +619,10 @@
 		basic_machine=m68k-rom68k
 		os=-coff
 		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
 	msdos)
 		basic_machine=i386-pc
 		os=-msdos
@@ -677,6 +702,10 @@
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
 		os=-ose
@@ -702,7 +731,7 @@
         pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
-	pentium | p5 | k5 | k6 | nexgen)
+	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
 	pentiumpro | p6 | 6x86 | athlon)
@@ -711,7 +740,7 @@
 	pentiumii | pentium2)
 		basic_machine=i686-pc
 		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentiumpro-* | p6-* | 6x86-* | athlon-*)
@@ -735,6 +764,16 @@
 	ppcle-* | powerpclittle-*)
 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
+	ppc64)	basic_machine=powerpc64-unknown
+	        ;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+	        ;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	ps2)
 		basic_machine=i386-ibm
 		;;
@@ -752,6 +791,12 @@
 	rtpc | rtpc-*)
 		basic_machine=romp-ibm
 		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
 	sa29200)
 		basic_machine=a29k-amd
 		os=-udi
@@ -763,7 +808,7 @@
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
-	sparclite-wrs)
+	sparclite-wrs | simso-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
 		;;
@@ -821,7 +866,7 @@
 	sun386 | sun386i | roadrunner)
 		basic_machine=i386-sun
 		;;
-	sv1)
+        sv1)
 		basic_machine=sv1-cray
 		os=-unicos
 		;;
@@ -829,8 +874,16 @@
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
+	t3d)
+		basic_machine=alpha-cray
+		os=-unicos
+		;;
 	t3e)
-		basic_machine=t3e-cray
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
 		os=-unicos
 		;;
 	tic54x | c54x*)
@@ -843,6 +896,10 @@
 	tx39el)
 		basic_machine=mipstx39el-unknown
 		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
@@ -893,13 +950,13 @@
 		basic_machine=i386-pc
 		os=-windows32-msvcrt
 		;;
-	xmp)
-		basic_machine=xmp-cray
-		os=-unicos
-		;;
         xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
 	z8k-*-coff)
 		basic_machine=z8k-unknown
 		os=-sim
@@ -920,13 +977,6 @@
 	op60c)
 		basic_machine=hppa1.1-oki
 		;;
-	mips)
-		if [ x$os = x-linux-gnu ]; then
-			basic_machine=mips-unknown
-		else
-			basic_machine=mips-mips
-		fi
-		;;
 	romp)
 		basic_machine=romp-ibm
 		;;
@@ -946,9 +996,12 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4)
+	sh3 | sh4 | sh3eb | sh4eb)
 		basic_machine=sh-unknown
 		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
 	sparc | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
@@ -1035,7 +1088,9 @@
 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1087,12 +1142,18 @@
 	-acis*)
 		os=-aos
 		;;
+	-atheos*)
+		os=-atheos
+		;;
 	-386bsd)
 		os=-bsd
 		;;
 	-ctix* | -uts*)
 		os=-sysv
 		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
 	-ns2 )
 	        os=-nextstep2
 		;;
@@ -1167,6 +1228,7 @@
 	arm*-semi)
 		os=-aout
 		;;
+	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
 		;;
@@ -1197,6 +1259,9 @@
 	mips*-*)
 		os=-elf
 		;;
+	or32-*)
+		os=-coff
+		;;
 	*-tti)	# must be before sparc entry or we get the wrong os.
 		os=-sysv3
 		;;
@@ -1358,6 +1423,9 @@
 				;;
 			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
 				;;
 		esac
 		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
--- centericq-4.20.0.orig/debian/README.Debian
+++ centericq-4.20.0/debian/README.Debian
@@ -0,0 +1,9 @@
+centericq for Debian
+---------------
+
+ * Warning : When your are using libnss with a ldap server, you can not put ldap before 
+   dns in file nsswitch.conf for hosts, that cause centericq freeze, here is a 
+   correct line for hosts:
+   hosts: file dns ldap
+
+ -- Julien LEMOINE <speedblue@debian.org>, Mon, 12 May 2003 20:36:20 +0100
--- centericq-4.20.0.orig/debian/centericq-common.dirs
+++ centericq-4.20.0/debian/centericq-common.dirs
@@ -0,0 +1 @@
+usr/bin
--- centericq-4.20.0.orig/debian/centericq-common.docs
+++ centericq-4.20.0/debian/centericq-common.docs
@@ -0,0 +1,4 @@
+FAQ
+README
+TODO
+THANKS
--- centericq-4.20.0.orig/debian/centericq-fribidi.dirs
+++ centericq-4.20.0/debian/centericq-fribidi.dirs
@@ -0,0 +1 @@
+usr/bin
--- centericq-4.20.0.orig/debian/centericq-fribidi.docs
+++ centericq-4.20.0/debian/centericq-fribidi.docs
@@ -0,0 +1,4 @@
+FAQ
+README
+TODO
+THANKS
--- centericq-4.20.0.orig/debian/centericq-utf8.dirs
+++ centericq-4.20.0/debian/centericq-utf8.dirs
@@ -0,0 +1 @@
+usr/bin
--- centericq-4.20.0.orig/debian/centericq-utf8.docs
+++ centericq-4.20.0/debian/centericq-utf8.docs
@@ -0,0 +1,4 @@
+FAQ
+README
+TODO
+THANKS
--- centericq-4.20.0.orig/debian/centericq.dirs
+++ centericq-4.20.0/debian/centericq.dirs
@@ -0,0 +1 @@
+usr/bin
--- centericq-4.20.0.orig/debian/centericq.docs
+++ centericq-4.20.0/debian/centericq.docs
@@ -0,0 +1,4 @@
+FAQ
+README
+TODO
+THANKS
--- centericq-4.20.0.orig/debian/changelog
+++ centericq-4.20.0/debian/changelog
@@ -0,0 +1,720 @@
+centericq (4.20.0-1.backports.org.1) unstable; urgency=low
+
+  * Recompiled for <http://www.backports.org/>
+  * Removed version from libfribidi-dev build-dependency, it was added because
+    earlier versions missed a shlibs file.
+
+ -- Norbert Tretkowski <tretkowski@inittab.de>  Fri, 11 Mar 2005 13:28:25 +0100
+
+centericq (4.20.0-2) unstable; urgency=low
+
+  * Cvs backport to fix Jabber/PGP decrypt problem when 
+    receiving multiple <x> tags (Closes: 295469)
+
+ -- Julien Lemoine <speedblue@debian.org>  Thu, 17 Feb 2005 22:09:12 +0100
+
+centericq (4.20.0-1) unstable; urgency=low
+
+  * New upstream release, added gpg support for jabber (added build 
+    depend on gpgme)
+
+ -- Julien Lemoine <speedblue@debian.org>  Fri,  4 Feb 2005 08:45:23 +0100
+
+centericq (4.14.0-1) unstable; urgency=low
+
+  * New upstream release (includes cvs backport of 4.13.0-2)
+  * Use sox instead of esound to play wave file (Closes: #290965)
+
+ -- Julien Lemoine <speedblue@debian.org>  Thu, 20 Jan 2005 08:46:44 +0100
+
+centericq (4.13.0-2) unstable; urgency=low
+
+  * Backport cvs patch to fixes the 'u' disappearing issue
+    (Closes: #288226)
+  * Backport cvs patch to fixed memory leak problem
+    (Closes: #261055)
+
+ -- Julien Lemoine <speedblue@debian.org>  Sun,  2 Jan 2005 21:42:16 +0100
+
+centericq (4.13.0-1) unstable; urgency=low
+
+  * New upstream release 
+
+ -- Julien Lemoine <speedblue@debian.org>  Mon, 20 Dec 2004 21:24:00 +0100
+
+centericq (4.12.0-3) unstable; urgency=low
+
+  * Fixed compilation error with gcc 3.4 (applied patch from gentoo.org)
+    (Closes: #274181)
+
+ -- Julien Lemoine <speedblue@debian.org>  Mon, 18 Oct 2004 22:57:45 +0200
+
+centericq (4.12.0-2) unstable; urgency=low
+
+  * Changed build-dep from fribidi-dev to fribidi-dev (>= 0.10.4-4)
+
+ -- Julien Lemoine <speedblue@debian.org>  Wed, 13 Oct 2004 00:02:36 +0200
+
+centericq (4.12.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Julien Lemoine <speedblue@debian.org>  Tue, 28 Sep 2004 22:46:23 +0200
+
+centericq (4.11.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Julien Lemoine <speedblue@debian.org>  Thu,  5 Aug 2004 23:29:43 +0200
+
+centericq (4.10.0-3) unstable; urgency=low
+
+  * Rebuild centericq with libgnutls11
+    (Closes: #263664)
+
+ -- Julien Lemoine <speedblue@debian.org>  Thu,  5 Aug 2004 19:58:47 +0200
+
+centericq (4.10.0-2) unstable; urgency=low
+
+  * Applied patch from Paul Hampson <Paul.Hampson@anu.edu.au> to fix 
+    MSN server disconnection (Closes: #257899)
+  * Added a message for double escape (Closes: #258036)
+
+ -- Julien Lemoine <speedblue@debian.org>  Mon, 19 Jul 2004 20:50:20 +0200
+
+centericq (4.10.0-1) unstable; urgency=low
+
+  * New upstream release
+    problem with non us characters fixed (Closes: #232014, #253170)
+
+ -- Julien Lemoine <speedblue@debian.org>  Thu,  1 Jul 2004 07:10:56 +0200
+
+centericq (4.9.12-5) unstable; urgency=low
+
+  * Replaced recommand on mozilla by www-browser
+    (Closes: #256058, #254646)
+  
+ -- Julien Lemoine <speedblue@debian.org>  Sat, 26 Jun 2004 14:45:09 +0200
+
+centericq (4.9.12-4) unstable; urgency=low
+
+  * recompile with --enable-locales-fix
+
+ -- Julien Lemoine <speedblue@debian.org>  Tue,  8 Jun 2004 22:02:53 +0200
+
+centericq (4.9.12-3) unstable; urgency=low
+
+  * Recompilation with libgcc1 3.3.1 (4.9.12-2 was compiled with libgcc1 3.4.0)
+    Thanks to David B. Harris.
+  
+ -- Julien Lemoine <speedblue@debian.org>  Sun,  9 May 2004 23:43:35 +0200
+
+centericq (4.9.12-2) unstable; urgency=low
+
+  * Fixed error in --help command (wrong list of protocol) 
+    (Closes: #244630)
+
+ -- Julien Lemoine <speedblue@debian.org>  Sun,  9 May 2004 03:40:38 +0200
+
+centericq (4.9.12-1) unstable; urgency=low
+
+  * New upstream release
+  * [Upstream] Fixed segv in MSN module (Closes: #235148, #235741, #236262)
+
+ -- Julien Lemoine <speedblue@debian.org>  Tue, 13 Apr 2004 23:32:19 +0200
+
+centericq (4.9.11-2) unstable; urgency=low
+
+  * Remove libicq2000 headers file from centericq-common
+
+ -- Julien Lemoine <speedblue@debian.org>  Tue, 23 Mar 2004 22:50:41 +0100
+
+centericq (4.9.11-1) unstable; urgency=low
+
+  * New upstream release
+  * Now use libgnutls10 (patched libgadu to allow use of libgnutls)
+  * [Upstream] Configurable key bindings patch by Daniel Kraus was applied
+    (Closes: #152915)
+  * [Upstream] Reply button reappears
+    (Closes: #232622)
+  * [Upstream] Centericq can scroll a message in the full-screen
+    (Closes: #235625)
+  * [Upstream] Fixed timestamp problem
+    (Closes: #221592)
+  * [Upstream] Fixed lj integration bug
+    (Closes: #224386)
+  * [Upstream] Fixed contact deletion synchronisation bug
+    (Closes: #231801, #225125, #238886)
+  * [Upstream] Fixed utf8 bug
+    (Closes: #232014)
+  
+ -- Julien Lemoine <speedblue@debian.org>  Mon, 22 Mar 2004 22:53:51 +0100
+
+centericq (4.9.10-3) unstable; urgency=low
+
+  * Unofficial version with a test to fix multiple segv in msn part...
+
+ -- Julien Lemoine <speedblue@debian.org>  Wed, 17 Mar 2004 21:59:30 +0100
+
+centericq (4.9.10-2) unstable; urgency=low
+
+  * Fix segfault when connecting to Msn messager and jabber with ssl
+    (Closes: #229129, #234382)
+  * Fix segv when pressing 'c' key on 'Online' or 'Offline' tree item
+  
+ -- Julien Lemoine <speedblue@debian.org>  Tue, 24 Feb 2004 20:05:53 +0100
+
+centericq (4.9.10-1) unstable; urgency=low
+
+  * New upstream release (Closes: #229660)
+  * Fix yahoo connection problem (Closes: #227489)
+  
+ -- Julien Lemoine <speedblue@debian.org>  Fri,  6 Feb 2004 22:26:38 +0100
+
+centericq (4.9.9-3) unstable; urgency=low
+
+  * Allow user to select HTTP browser in configuration dialog 
+    (Closes: #225699)
+
+ -- Julien Lemoine <speedblue@debian.org>  Mon,  5 Jan 2004 14:50:12 +0100
+
+centericq (4.9.9-2) unstable; urgency=low
+
+  * Fixed a bug in MSN support (added a missing memset in connection string)
+    (Closes: #223577)
+
+ -- Julien Lemoine <speedblue@debian.org>  Mon, 15 Dec 2003 00:26:16 +0100
+
+centericq (4.9.9-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Julien Lemoine <speedblue@debian.org>  Tue, 25 Nov 2003 14:48:12 +0100
+
+centericq (4.9.8-3) unstable; urgency=low
+
+  * Re-apply MSN patch
+    * Fixed FTBFS when automake wasn't installed
+  * Changed build dep on libgnutls7-dev (>= 0.8.12-2)
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 30 Oct 2003 18:40:50 +0100
+
+centericq (4.9.8-2) unstable; urgency=low
+
+  * Do not apply msn patch because it does not work and it cause build
+    failure on m68k (Closes: #217882)
+  * Removed MSN from description
+
+ -- Julien LEMOINE <speedblue@debian.org>  Sat, 25 Oct 2003 19:23:53 +0200
+
+centericq (4.9.8-1) unstable; urgency=low
+
+  * New upstream release
+  * Applied centericq 4.9.7 msn patch (Closes: #209076(
+
+ -- Julien LEMOINE <speedblue@debian.org>  Sat, 25 Oct 2003 14:40:58 +0200
+
+centericq (4.9.7-2) unstable; urgency=low
+
+  * Applied patch from "Wim Cools" <w.cools@chello.nl> to support new MSN
+    protocol (Closes: #207728, #209076)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 23 Oct 2003 13:36:23 +0200
+
+centericq (4.9.7-1) unstable; urgency=low
+
+  * New upstream release
+  * [Upstream] fixed Yahoo! IM support (Closes: #213261)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri,  3 Oct 2003 00:41:06 +0200
+
+centericq (4.9.6-4) unstable; urgency=low
+
+  * Fixed segmentation fault in Alt-F (Closes: #210718)
+  * Added example of ~/.centericq/external file
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Sun, 14 Sep 2003 02:05:47 +0200
+
+centericq (4.9.6-3) unstable; urgency=low
+
+  * Fixed typo in description (Closes: #208973)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Sat,  6 Sep 2003 23:32:31 +0200
+
+centericq (4.9.6-2) unstable; urgency=low
+
+  * Added a centericq-utf8 package linked with libncursesw5 instead of
+    libncurses5 (Closes: #207373)
+  * Updated to Standards-Version 3.6.1
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Wed, 27 Aug 2003 14:21:02 +0200
+
+centericq (4.9.6-1) unstable; urgency=low
+
+  * New upstream release
+  * Removed patches/namespace.dpatch and patches/configure.dpatch, they are
+    now included in upstream tarball
+  * Removed patches/appearence.dpatch
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 22 Aug 2003 13:26:23 +0200
+
+centericq (4.9.5-3) unstable; urgency=low
+
+  * Removed build-dep on automake/autoconf (was to prevent an autoconf bug 
+    in upstream releases) (Closes: #205982)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 21 Aug 2003 12:38:36 +0200
+
+centericq (4.9.5-2) unstable; urgency=low
+
+  * Use libgnutls7 instead of libgnutls5
+  * Recompile only kkconsui for centericq-fribidi
+  * Updated to Standards-Version 3.6.0
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 18 Jul 2003 12:38:18 +0200
+
+centericq (4.9.5-1) unstable; urgency=low
+
+  * New upstream release
+  * Updated to Standards-Version 3.5.10
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Wed, 16 Jul 2003 09:19:17 +0200
+
+centericq (4.9.4-2) unstable; urgency=low
+
+  * Clean up debian/ directory (removed unused file)
+  * Removed NEWS.gz since it is useless (Closes: #200590)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Wed,  9 Jul 2003 13:44:29 +0200
+
+centericq (4.9.4-1) unstable; urgency=low
+
+  * New upstream release (bug fix release)
+  * Fixed typo in icqface.cc (Closes: #192722)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Mon, 12 May 2003 20:45:08 +0200
+
+centericq (4.9.3-2) unstable; urgency=low
+
+  * Re-enabled ssl support with gnutls5 (was a configuration problem)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri,  9 May 2003 18:20:10 +0200
+
+centericq (4.9.3-1) unstable; urgency=low
+
+  * New upstream release
+  * Removed flush-log, man, yahoohook, emacs patches (now shipped upstream).
+  * Removed libglib1.2-dev from build-depends 
+    (Glib is not needed to build the program anymore).
+  * Disabled ssl support for the moment, when enabled centericq freeze, 
+    this is probably a gnutls problem.
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu,  8 May 2003 03:56:16 +0200
+
+centericq (4.9.2-5) unstable; urgency=low
+
+  * Apply new patch from Romain FRANCOISE <romain@orebokech.com> to add
+    more emacs bindings :
+    o M-< : go to the beginning of the buffer
+    o M-> : go to the end of the buffer
+    o M-b : move one word backwards
+    o M-f : move one word forwards
+    o M-d : delete one word
+    o C-t : transpose two characters
+
+ -- Julien LEMOINE <speedblue@debian.org>  Wed, 23 Apr 2003 01:24:05 +0200
+
+centericq (4.9.2-4) unstable; urgency=low
+
+  * Apply patch from Romain FRANCOISE <romain@orebokech.com> to add 
+    c-u and c-k emacs-bindings (Closes: #189597)
+  * Fixed cicqsync manpage (was manpage of cicqconv)
+  * Change http://centericq.net to http://konst.org.ua/centericq/ 
+    since centericq.net site is not accessible
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Sat, 19 Apr 2003 12:46:46 +0200
+
+centericq (4.9.2-3) unstable; urgency=low
+
+  * Added an option in centericq configuration to Enable/Disable
+    Emacs-binding (sent patch to upstream)
+  * clean-up package (now use dpatch)
+  * Updated to Standards-Version 3.5.9
+
+ -- Julien LEMOINE <speedblue@debian.org>  Wed, 16 Apr 2003 18:55:23 +0200
+
+centericq (4.9.2-2) unstable; urgency=low
+
+  * Fixed typos in man pages
+  * Fixed segv with yahoo contacts actives (Closes: #180381)
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Sat, 15 Feb 2003 23:29:10 +0100
+
+centericq (4.9.2-1) unstable; urgency=low
+
+  * New upstream release
+  * [upstream] Jabber treats correctly all the data encoded in UTF-8
+    (Closes: #174718)
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Tue, 21 Jan 2003 07:17:06 +0100
+
+centericq (4.9.1-4) unstable; urgency=low
+
+  * Added emacs binding in texteditor
+    (support for c-d c-a c-e c-p c-n c-b c-f and c-k)
+    (Closes: #155707)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 10 Jan 2003 15:26:01 +0100
+
+centericq (4.9.1-3) unstable; urgency=low
+
+  * Fixed problem with Recommends section
+
+ -- Julien LEMOINE <speedblue@debian.org>  Sun, 29 Dec 2002 03:32:33 +0100
+
+centericq (4.9.1-2) unstable; urgency=low
+
+  * Fixed compilation problem with g++ >= 3.0 
+    (std namespace problem)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Sun, 29 Dec 2002 00:29:29 +0100
+
+centericq (4.9.1-1) unstable; urgency=low
+
+  * New upstream release
+  * [Upstream] splits offline messages into pieces 450 bytes each
+    (Closes: #169205)
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Sat, 28 Dec 2002 14:10:42 +0100
+
+centericq (4.9.0-2) unstable; urgency=low
+
+  * Changed description
+    (Closes: #172830)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 12 Dec 2002 23:25:33 +0100
+
+centericq (4.9.0-1) unstable; urgency=low
+
+  * New upstream release
+  * compile with libgnutls (enable ssl support for jabber protocole)
+    (Closes: #170842)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 12 Dec 2002 20:59:36 +0100
+
+centericq (4.8.9-1) unstable; urgency=low
+
+  * New upstream release
+  * Updated description
+  * Removed build-depend on libsigc++ (see upstream ChangeLog for details)
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Mon,  2 Dec 2002 21:25:39 +0100
+
+centericq (4.8.8-1) unstable; urgency=low
+
+  * New upstream release
+  * [Upstream] Support for the 6th protocol - Jabber, was added
+    (Closes: #132991) 
+  * updated to follow the last version of Debian Policy
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Mon, 25 Nov 2002 22:28:19 +0100
+
+centericq (4.8.7-4) unstable; urgency=low
+
+  * Applied 2 patchs from http://centericq.de/archive/contrib/patches/
+    fetch-by-one-touch and status-all-on-top
+    (Closes: #170046)
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 22 Nov 2002 11:57:42 +0100
+
+centericq (4.8.7-3) unstable; urgency=low
+
+  * Added fr.po from Emmanuel le Chevoir <manu42@free.fr>
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 15 Nov 2002 09:44:02 +0100
+
+centericq (4.8.7-2) unstable; urgency=low
+
+  * Applied patch from David Murn <scuffer@hups.net> to fix
+    mail check problem (Closes: #168197)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu,  7 Nov 2002 23:50:55 +0100
+
+centericq (4.8.7-1) unstable; urgency=low
+
+  * New upstream release
+  * [UPSTREAM] added IRC server password support
+    (Closes: #167611)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Mon,  4 Nov 2002 09:39:46 +0100
+
+centericq (4.8.6-5) unstable; urgency=low
+
+  * Added -lstdc++ on final ld
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 24 Oct 2002 20:01:36 +0200
+
+centericq (4.8.6-4) unstable; urgency=low
+
+  * Added -lstdc++ in configure tests
+    This should fix compilation problem on hppa
+  * Added -lstdc++ in final link
+    This should fix compilation problem on S/390
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 24 Oct 2002 16:59:09 +0200
+
+centericq (4.8.6-3) unstable; urgency=low
+
+  * Added more output on compilation problem with hppa 
+    (seem to be a libsgic++ problem)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 24 Oct 2002 14:28:01 +0200
+
+centericq (4.8.6-2) unstable; urgency=low
+
+  * Added build dep on libncurses (will fix compilation pb on hppa)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 24 Oct 2002 09:38:52 +0200
+
+centericq (4.8.6-1) unstable; urgency=low
+
+  * New upstream release
+  * [Upstream] Fixed the segfault problem in the Yahoo module.
+    (Closes: #161309)
+  
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 18 Oct 2002 20:10:38 +0200
+
+centericq (4.8.5-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Julien LEMOINE <speedblue@debian.org>  Tue,  8 Oct 2002 22:44:14 +0200
+
+centericq (4.8.4-2) unstable; urgency=low
+
+  * Add flush on log to save logfile immediately
+   (Closes: #161305)
+  * Added documentation in centericq and centericq-fribidi
+   (Closes: #161466)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 20 Sep 2002 14:42:29 +0200
+
+centericq (4.8.4-1) unstable; urgency=low
+
+  * New upstream release
+  * updated to follow the last version of Debian Policy (4.5.7.0)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Tue, 10 Sep 2002 21:28:57 +0200
+
+centericq (4.8.3-2) unstable; urgency=low
+
+  * Changed second default navigator from netscape to galeon
+  * Changed default sound player from play to esdplay
+  * Added recommends on mozilla | galeon, 
+
+ -- Julien LEMOINE <speedblue@debian.org>  Tue,  3 Sep 2002 16:20:25 +0200
+
+centericq (4.8.3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Julien LEMOINE <speedblue@debian.org>  Thu, 29 Aug 2002 12:42:39 +0200
+
+centericq (4.8.2-4) unstable; urgency=low
+
+  * recompiled to fix 'undefined symbol: _ZTIN4SigC6ObjectE'
+
+ -- Julien LEMOINE <speedblue@debian.org>  Sat, 24 Aug 2002 12:49:05 +0200
+
+centericq (4.8.2-3) unstable; urgency=low
+
+  * fixed compilation problem with g++-3.1 and g++-3.2 
+    (patch sent to upstream)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 23 Aug 2002 12:30:44 +0200
+
+centericq (4.8.2-2) unstable; urgency=low
+
+  * updated to follow the last version of Debian Policy
+
+ -- Julien LEMOINE <speedblue@debian.org>  Wed, 21 Aug 2002 15:46:20 +0200
+
+centericq (4.8.2-1) unstable; urgency=low
+
+  * New upstream version
+  * Improve clean rule
+
+ -- Julien LEMOINE <speedblue@debian.org>  Tue, 20 Aug 2002 15:10:53 +0200
+
+centericq (4.8.0-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri,  9 Aug 2002 20:44:43 +0200
+
+centericq (4.7.8-3) unstable; urgency=low
+
+  * Applyed patch from David Murn
+
+ -- Julien LEMOINE <speedblue@debian.org>  Wed, 17 Jul 2002 03:28:37 +0200
+
+centericq (4.7.8-2) unstable; urgency=low
+
+  * Fixed bug in libmsn (Closes: #149096)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Tue, 16 Jul 2002 16:45:03 +0200
+
+centericq (4.7.8-1) unstable; urgency=low
+
+  * New upstream version
+  * Fixed cosmetic bugs (Closes: #152914)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Tue, 16 Jul 2002 14:56:57 +0200
+
+centericq (4.7.7-1) unstable; urgency=low
+
+  * New upstream version
+  * Fixed bug in yahoo engine (Closes: #149096)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Mon,  8 Jul 2002 22:37:45 +0200
+
+centericq (4.7.5-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Julien LEMOINE <speedblue@debian.org>  Tue, 18 Jun 2002 23:32:19 +0200
+
+centericq (4.7.2-1) unstable; urgency=low
+
+  * New upstream version
+  * Fixed crash when adding empty users in search (Closes: #148006)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 24 May 2002 15:25:41 +0200
+
+centericq (4.7.1-4) unstable; urgency=low
+
+  * improved clean rule
+
+ -- Julien LEMOINE <speedblue@debian.org>  Tue, 14 May 2002 12:00:35 +0200
+
+centericq (4.7.1-3) unstable; urgency=low
+
+  * fixed iostream problem with g++-3.0 (Closes: #146535)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Sat, 11 May 2002 09:41:55 +0200
+
+centericq (4.7.1-2) unstable; urgency=low
+
+  * fixed template problem with g++-3.0 (Closes: #146535)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 10 May 2002 23:53:02 +0200
+
+centericq (4.7.1-1) unstable; urgency=low
+
+  * New upstream version (Closes: #146220)
+  * Add fribi-check in configure (Closes: #145967)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Wed,  8 May 2002 16:58:00 +0200
+
+centericq (4.6.9-5) unstable; urgency=low
+
+   * split centericq in 3 packages :
+     - centericq-common for data and tools
+     - centericq
+     - centericq-fribidi : centericq with fribidi support
+
+ -- Julien LEMOINE <speedblue@debian.org>  Wed,  8 May 2002 15:01:41 +0200
+
+centericq (4.6.9-4) unstable; urgency=low
+
+  * changed build-depends automake to automake1.5
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 26 Apr 2002 06:26:29 +0200
+
+centericq (4.6.9-3) unstable; urgency=low
+
+  * added build-depend on automake to fix problem on m68k
+
+ -- Julien LEMOINE <speedblue@debian.org>  Fri, 26 Apr 2002 04:29:06 +0200
+
+centericq (4.6.9-2) unstable; urgency=low
+
+  * fixed build depends (Closes: #144372)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Wed, 24 Apr 2002 21:00:12 +0200
+
+centericq (4.6.9-1) unstable; urgency=low
+
+  * New Maintainer
+  * made french translation.
+    Thanks to Emmanuel le Chevoir
+  * fixed output of usage message (Closes: #135258)
+  * fixed mail problem (Closes: #107003)
+  * fixed cycling problem (Closes: #107004)
+  * activated gettext support
+  * activated fribidi support (Closes: #132964)
+  * fixed build failure with g++ 3.0 (Closes: #126837)
+    (to build centericq with g++ 3.0, libsigc++-dev and lisgigc++0 must
+    be compiled with g++ 3.0)
+
+ -- Julien LEMOINE <speedblue@debian.org>  Sun, 21 Apr 2002 00:52:15 +0200
+
+centericq (4.5.1-1.1) unstable; urgency=low
+
+  * NMU to fix RC bug(s).
+  * (Re-)Applied patch from Lamont to fix build failure when compiled with
+    gcc-3.0 (as is done on hppa, where gcc-3.0 is the default). Only the parts
+    that applied to libmsn and libyahoo were applied. The newer libicq in this
+    package does not have the problems of the old one. Did a test build on
+    sparc using CC=gcc-3.0 CXX=g++-3.0, and all built fine. Closes: #126837
+
+    NOTE: Maintainer, please do not overlook NMU's in the future.
+
+ -- Ben Collins <bcollins@debian.org>  Sun, 10 Feb 2002 18:54:03 -0500
+
+centericq (4.5.1-1) unstable; urgency=low
+
+  * New upstream version (Closes: #124041)
+  * Upstream includes new ICQ2000 protocol (Closes: #125985, #128915)
+  * Fixed spelling in long description (Closes: #124492)
+
+ -- Wouter de Vries <sax@debian.org>  Mon,  4 Feb 2002 09:50:02 +0100
+
+centericq (4.2.1-1) unstable; urgency=low
+
+  * New upstream version (Closes: #116753)
+  * Object files removed (Closes: #111447)
+
+ -- Wouter de Vries <sax@debian.org>  Thu,  14 Dec 2001 13:36:35 +0100
+
+centericq (3.35.22-2) unstable; urgency=low
+
+  * Oops... fixed sound config for real now. 
+
+ -- Wouter de Vries <sax@debian.org>  Wed,  5 Sep 2001 14:56:49 +0200
+
+centericq (3.35.22-1) unstable; urgency=low
+
+  * New upstream version. 
+  * Source-dependency on libncurses5-dev added (Closes: #97987)
+  * Menu hint added (Closes: #98774)
+  * Description field updated (Closes: #97827)
+  * Sound config fixed (Closes: #97827, #97837, #97838)
+  * Email checking now configurable (Closes: #106980)
+  * New version packaged (Closes: #107005)
+
+ -- Wouter de Vries <sax@debian.org>  Wed,  5 Sep 2001 14:14:25 +0200
+
+centericq (3.29.12-1) unstable; urgency=low
+
+  * New upstream version. 
+
+ -- Wouter de Vries <sax@debian.org>  Thu, 17 May 2001 11:14:18 +0200
+
+centericq (3.22.9s-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Wouter de Vries <sax@debian.org>  Tue, 24 Apr 2001 11:16:13 +0200
+
+
--- centericq-4.20.0.orig/debian/compat
+++ centericq-4.20.0/debian/compat
@@ -0,0 +1 @@
+4
--- centericq-4.20.0.orig/debian/control
+++ centericq-4.20.0/debian/control
@@ -0,0 +1,58 @@
+Source: centericq
+Section: net
+Priority: optional
+Maintainer: Julien LEMOINE <speedblue@debian.org>
+Build-Depends: debhelper (>= 4.0), libncurses5-dev, gettext (>= 0.10), 
+	       libfribidi-dev, dpatch, libncurses5-dev, 
+	       autotools-dev, libgnutls11-dev, perl, libncursesw5-dev, 
+	       libcurl3-dev, libgpgme11-dev
+Build-Conflicts: libglib1.2-dev
+Standards-Version: 3.6.1
+
+Package: centericq-common
+Replaces: centericq (<< 4.6.9-5)
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: A text-mode multi-protocol instant messenger client (data files)
+ Centericq is a text mode menu- and window-driven IM client program that 
+ supports the ICQ2000, Yahoo!, AIM, MSN, IRC and Jabber protocols. 
+ .
+ A full list of its features is available at http://konst.org.ua/centericq/.
+ .
+ This package provides the common files for centericq and centericq-fribidi
+ binary packages (manpages, locales and documentation).
+
+Package: centericq
+Recommends: www-browser, sox
+Architecture: any
+Depends: ${shlibs:Depends}, centericq-common
+Description: A text-mode multi-protocol instant messenger client
+ Centericq is a text mode menu- and window-driven IM client program that 
+ supports the ICQ2000, Yahoo!, AIM, MSN, IRC and Jabber protocols. 
+ .
+ A full list of its features is available at http://konst.org.ua/centericq/.
+
+Package: centericq-utf8
+Recommends: www-browser, sox
+Architecture: any
+Depends: ${shlibs:Depends}, centericq-common
+Description: A text-mode multi-protocol instant messenger client
+ Centericq is a text mode menu- and window-driven IM client program that 
+ supports the ICQ2000, Yahoo!, AIM, MSN, IRC and Jabber protocols. 
+ .
+ A full list of its features is available at http://konst.org.ua/centericq/.
+ .
+ This is a version of centericq linked with libncursesw5. It may be buggy.
+
+Package: centericq-fribidi
+Recommends: www-browser, sox
+Architecture: any
+Depends: ${shlibs:Depends}, centericq-common
+Description: A text-mode multi-protocol instant messenger client (Hebrew)
+ Centericq is a text mode menu- and window-driven IM client program that 
+ supports the ICQ2000, Yahoo!, AIM, MSN, IRC and Jabber protocols. 
+ .
+ A full list of its features is available at http://konst.org.ua/centericq/.
+ .
+ Binary in this package is compiled with fribidi support. Add support for 
+ displaying Hebrew and Arabic texts.
--- centericq-4.20.0.orig/debian/copyright
+++ centericq-4.20.0/debian/copyright
@@ -0,0 +1,12 @@
+This package was debianized by Wouter de Vries <sax@debian.org> on
+Wed, 22 Nov 2000 00:50:26 +0100.
+
+It was downloaded from http://konst.org.ua/centericq/
+ 
+You can contact the upstream author, Konstantin Klyagin,
+at: <konst@konst.org.ua>
+				 
+You are free to distribute this software under the terms of
+the GNU General Public License.
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL file.
--- centericq-4.20.0.orig/debian/external.example
+++ centericq-4.20.0/debian/external.example
@@ -0,0 +1,162 @@
+# File /$HOME/.centericq/external
+#
+# External actions
+# ----------------
+#
+# Every section starts with a line containing the "%action <name>",
+# "%pre-send <name>", "%pre-receive <name>" or "%manual <name>" text.
+# Please note that the <name> of any kind is necessary. It musn't be
+# empty. Inside it the following parameters can be used:
+#
+# event
+# -----
+# Can be "msg", "sms", "url", "online", "auth", "contacts" or "notification".
+# The latter means centericq's own notifications, such as birthday reminders,
+# away messages, and other stuff. Specifying several event types is
+# also allowed. "all" stands for all the event types.
+#
+# proto
+# -----
+# Can be "icq", "yahoo", "msn", "aim", "irc" or "jabber". Or combination
+# of these words. "all" can be used as a synonim for all of them.
+#
+# status
+# ------
+# Can be "online", "away", "dnd", "na", "occupied", "ffc" or "invisible".
+# Specifying several ones is possible. "all" stands for all of possible
+# status modes.
+#
+# options
+# -------
+# Possible options for an action are:
+#
+#       stdin           The incoming message text is to be passed to
+#                       stdin of the script to be executed.
+#
+#       stdout          The script output is to be sent as a reply
+#                       message (if not empty).
+#
+#       nowait          Don't wait for the script to finish. Obviously, the
+#                       stdout option won't make sense if this one is used.
+#
+# Then, the section named "%exec" should follow. It contains a piece of
+# script to be executed being copied to a file first.
+#
+#
+#Also, the script from the %exec section when executed has the following
+#environment variables imported by centericq:
+#
+#EVENT_TYPE
+#
+#    The type of the received event. Can be "msg", "sms", "url",
+#    "online", "auth", "contacts" or "notification".
+#
+#EVENT_NETWORK
+#
+#    The IM network name through which the event was received. Can be
+#    "icq", "msn", "yahoo", "aim", "irc" or "jabber".
+#
+#CONTACT_UIN
+#
+#    If an event is received through ICQ equals to the other party's UIN.
+#    Otherwise empty.
+#
+#CONTACT_NICK
+#
+#    Set to other party's real nickname. Real means that even if you
+#    renamed the user in your contact list, this parameter will be equal
+#    to the original one, and not to what you set.
+#
+#CONTACT_INFODIR
+#
+#    The most intresting parameter. Using it, you can access further
+#    information about the user. Every time an external action is
+#    executed it is set to the user's information directory under your
+#    ~/.centericq/ directory. It makes it easier to access "about" and
+#    "info" files under it. Fetching lines from certain positions of the
+#    latter allows to get details. It's enough to take a look at an
+#    "info" file of any user to find out what lines mean. Here I'll
+#    describe the most useful ones:
+#
+#    - the 2nd and 3rd lines contain user's first and last names
+#       respectively;
+#    - the 4th one contains user's e-mail address;
+#    - the 7th has the home city;
+#    - the 8th is used for the home state name;
+#    - the 9th is used for the home phone number;
+#    - the user's home country resides in the 14th line;
+#    - etc;
+#
+#To read a certain line from the info file I recommend to use the
+#following shell command: "head -n <N> $CONTACT_INFODIR/info | tail -n 1",
+#where N is the line number. Below the real examples go.
+#
+#    fname=`head -n 2 $CONTACT_INFODIR/info | tail -n 1`
+#    # to fetch contact's first name
+#
+#    lname=`head -n 3 $CONTACT_INFODIR/info | tail -n 1`
+#    # to fetch contact's last name
+
+%manual         Host Lookup
+proto           icq
+# Only ICQ shows up IP addresses
+%exec
+#!/bin/sh
+ip=`head -n 45 $CONTACT_INFODIR/info | tail -n 1`
+for i in $ip; do ip=$i; break; done
+host $ip
+
+%action eLiza ChatBot
+event msg
+proto all
+status occupied na dnd
+options stdin stdout
+%exec
+elizatalk
+
+#%action         Simple auto-responder
+#event           msg
+## Reacts only on events of message type ..
+#proto           icq yahoo
+## .. only for icq and yahoo protocols
+#status          away na
+## .. when we are in away or n/a status
+#options         stdin stdout
+## .. the external commands text (below) reads the message from
+## stdin, then its stdout output is sent as a response to a
+## remote user.
+#%exec
+#msg=`cat`
+#echo "hello. this is auto-responder. your message was: $msg"
+
+#%action         Answering machine
+#event           msg
+#proto           all
+#status          away na
+#options         stdout
+#%exec
+##!/bin/sh
+#fname=`head -n 2 $CONTACT_INFODIR/info | tail -n 1`
+#lname=`head -n 3 $CONTACT_INFODIR/info | tail -n 1`
+#cat <<EOF
+#Hello, $fname $lname!
+#
+#Unfortunatelly, I'm not near my box now, but I'll certainly contact you
+#as soon as I get here.
+#
+#--
+#me
+#EOF
+
+#%action         Remote control
+#event           msg
+#proto           all
+#status          all
+#options         stdin stdout
+#%exec
+##!/bin/sh
+#case `cat` in
+#    ls) ls -l ~/.centericq/;;
+#    df) df -h;;
+#    uptime) uptime;;
+#esac
--- centericq-4.20.0.orig/debian/patches/makefile_src.dpatch
+++ centericq-4.20.0/debian/patches/makefile_src.dpatch
@@ -0,0 +1,38 @@
+#! /bin/sh -e
+## makefile_src.dpatch by julien LEMOINE <speedblue@debian.org>
+##
+## DP: Added a link with libgnutls-extra (upstream Makefile bug)
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.9.11.orig/src/Makefile.in centericq-4.9.11/src/Makefile.in
+--- centericq-4.9.11.orig/src/Makefile.in	2004-03-22 21:27:18.000000000 +0100
++++ centericq-4.9.11/src/Makefile.in	2004-03-22 23:07:10.000000000 +0100
+@@ -108,11 +108,11 @@
+ 
+ 
+ DEFS = @DEFS@ -I. -I$(srcdir) -I..
+ CPPFLAGS = @CPPFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ -lgnutls-openssl
+ centericq_OBJECTS =  icqcontact.o icqgroups.o eventmanager.o \
+ icqdialogs.o icqhist.o imexternal.o imcontact.o imlogger.o \
+ accountmanager.o icqcontacts.o icqmlist.o imcontroller.o icqconf.o \
+ imevents.o icqface.o centermain.o icqgroup.o centericq.o
+ centericq_DEPENDENCIES =  $(top_srcdir)/src/hooks/libhooks.a
--- centericq-4.20.0.orig/debian/patches/makefile_contrib.dpatch
+++ centericq-4.20.0/debian/patches/makefile_contrib.dpatch
@@ -0,0 +1,42 @@
+#! /bin/sh -e
+## makefile_contrib.dpatch by julien LEMOINE <speedblue@debian.org>
+##
+## DP: Do not install COPYRIGHT file in /usr/share/centericq
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+--- centericq-4.9.2.orig/contrib/spanish/Makefile.in	2003-01-20 12:45:05.000000000 +0100
++++ centericq-4.9.2/contrib/spanish/Makefile.in	2003-04-16 14:24:06.000000000 +0200
+@@ -92,7 +92,7 @@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
+ 
+-EXTRA_DIST = FAQ README INSTALL ChangeLog COPYING
++EXTRA_DIST = FAQ README ChangeLog
+ 
+ contribdir = $(pkgdatadir)/contrib/spanish
+ contrib_DATA = $(EXTRA_DIST)
+@@ -101,7 +101,7 @@
+ CONFIG_CLEAN_FILES = 
+ DATA =  $(contrib_DATA)
+ 
+-DIST_COMMON =  README COPYING ChangeLog INSTALL Makefile.am Makefile.in
++DIST_COMMON =  README ChangeLog Makefile.am Makefile.in
+ 
+ 
+ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
--- centericq-4.20.0.orig/debian/patches/emacs-improve.dpatch
+++ centericq-4.20.0/debian/patches/emacs-improve.dpatch
@@ -0,0 +1,375 @@
+#! /bin/sh -e
+## emacs-improve.dpatch by Romain FRANCOISE <romain@orebokech.com>
+##
+## DP: add more emacs bindings (c-u, c-k, ...)
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.9.6.orig/kkconsui-0.1/include/conscommon.h centericq-4.9.6/kkconsui-0.1/include/conscommon.h
+--- centericq-4.9.6.orig/kkconsui-0.1/include/conscommon.h	2003-04-11 07:48:22.000000000 +0200
++++ centericq-4.9.6/kkconsui-0.1/include/conscommon.h	2003-09-14 02:02:58.000000000 +0200
+@@ -55,10 +55,18 @@
+ #define TTEE            kintf_graph ? ACS_TTEE          : '+'
+ #define BTEE            kintf_graph ? ACS_BTEE          : '+'
+ 
+ #define KEY_TAB 9
+ #define KEY_ESC 27
++#define KEY_EMACS_C_U 800
++#define KEY_EMACS_C_K 801
++#define KEY_EMACS_C_T 802
++#define KEY_EMACS_M_D 803
++#define KEY_EMACS_BEG_OF_BUFFER 804
++#define KEY_EMACS_END_OF_BUFFER 805
++#define KEY_EMACS_FORWARD_WORD  806
++#define KEY_EMACS_BACKWARD_WORD 807
+ 
+ #ifndef CTRL
+ #define CTRL(x) ((x) & 0x1F)
+ #endif
+ 
+diff -bBdNrw -U5 centericq-4.9.6.orig/kkconsui-0.1/include/texteditor.h centericq-4.9.6/kkconsui-0.1/include/texteditor.h
+--- centericq-4.9.6.orig/kkconsui-0.1/include/texteditor.h	2002-03-05 20:03:06.000000000 +0100
++++ centericq-4.9.6/kkconsui-0.1/include/texteditor.h	2003-09-14 02:02:58.000000000 +0200
+@@ -131,11 +131,15 @@
+ 	void edmove(int k, int options = 2);
+ 	void eddel(bool usetabs = true);
+ 	void edenter(bool countspaces = true);
+ 	void edbackspace();
+ 	void eddelline();
++	void eddelbegofline();
++	void eddelendofline();
++	void edtransposechar();
+ 	void eddelword();
++	void eddelwordemacs();
+ 
+ 	void inschar(int k);
+ 
+ 	void shiftmarkedblock(int delta);
+ 	
+diff -bBdNrw -U5 centericq-4.9.6.orig/kkconsui-0.1/src/conscommon.cc centericq-4.9.6/kkconsui-0.1/src/conscommon.cc
+--- centericq-4.9.6.orig/kkconsui-0.1/src/conscommon.cc	2003-01-19 03:14:50.000000000 +0100
++++ centericq-4.9.6/kkconsui-0.1/src/conscommon.cc	2003-09-14 02:02:58.000000000 +0200
+@@ -136,11 +136,18 @@
+ 	case CTRL('p'): return KEY_UP;
+ 	case CTRL('d'): return KEY_DC;
+ 	case CTRL('a'): return KEY_HOME;
+ 	case CTRL('e'): return KEY_END;
+ 	case CTRL('v'): return KEY_NPAGE;
+-	case CTRL('k'): return CTRL('y');
++	case CTRL('u'): return KEY_EMACS_C_U;
++	case CTRL('k'): return KEY_EMACS_C_K;
++	case CTRL('t'): return KEY_EMACS_C_T;
++	case ALT('d'): return KEY_EMACS_M_D;
++	case ALT('<'): return KEY_EMACS_BEG_OF_BUFFER;
++	case ALT('>'): return KEY_EMACS_END_OF_BUFFER;
++	case ALT('f'): return KEY_EMACS_FORWARD_WORD;
++	case ALT('b'): return KEY_EMACS_BACKWARD_WORD;
+ 	default: return k;
+     }
+ }
+ 
+ void printchar(char c) {
+diff -bBdNrw -U5 centericq-4.9.6.orig/kkconsui-0.1/src/texteditor.cc centericq-4.9.6/kkconsui-0.1/src/texteditor.cc
+--- centericq-4.9.6.orig/kkconsui-0.1/src/texteditor.cc	2003-06-26 09:44:14.000000000 +0200
++++ centericq-4.9.6/kkconsui-0.1/src/texteditor.cc	2003-09-14 02:03:38.000000000 +0200
+@@ -51,11 +51,11 @@
+ #define CSTRLEN       strlen(CURSTRING ? CURSTRING : "")
+ #define UPDATECURRENTLINE       { kgotoxy(x1, y1+curfile->y); showline(CURLINE, curfile->sx, x2-x1); }
+ 
+ #define MAX_STRLEN    10240
+ #define ALONE_DELIM   " ;(){}[].,:-+*/^?!=<>"
+-#define NONCHAR_DELIM " ;(){}[].,:-+*/^?!=<>\"'"
++#define NONCHAR_DELIM " ;(){}[].,:-+*/^?!=<>\"'_"
+ #define WORD_DELIM    " ,"
+ 
+ #define EM_TAB        2
+ #define EM_CTRL       4
+ #define EM_MANUAL     8
+@@ -1126,10 +1126,11 @@
+ 	eddel();
+     }
+ }
+ 
+ void texteditor::eddelword() {
++    // This is the kkconsui original version: it does not skip whitespace
+     char *p = CURSTRING, *e;
+     string deltext, n;
+     int count;
+ 
+     if(!strlen(p)) {
+@@ -1164,10 +1165,56 @@
+ 	draw(curfile->y);
+ 	updatecursor();
+     }
+ }
+ 
++void texteditor::eddelwordemacs() { 
++    // This is the "emacs-compliant" version, it skips all whitespace
++    char *p = CURSTRING, *e;
++    string deltext, n;
++    int count = 0;
++
++    if(!strlen(p)) {
++	if(CURLINE < curfile->lines->count-1) {
++	    eddelline();
++	    eddelwordemacs();
++	}
++    } else if(CURCOL == strlen(p)) {
++	if(CURLINE < curfile->lines->count-1) {
++	    eddel();
++	    if(currentchar() == ' ') eddelword();
++	}
++    } else {
++	n = p;
++	deltext = n.substr(CURCOL);
++	    
++	// skip whitespace
++	if(currentchar() == ' ') {
++	    count = strspn(p+CURCOL, " ");
++	    n.replace(CURCOL, count, "");
++	    curfile->lines->replace(CURLINE, strdup(n.c_str()));
++	}
++
++	n = p = CURSTRING;
++
++	if(!(e = strpbrk(&p[CURCOL], NONCHAR_DELIM))) e = p + strlen(p);
++
++	if((count = e-p-curfile->sx-curfile->x)) {
++	    n.replace(CURCOL, count, "");
++	} else {
++	    count += strspn(n.substr(CURCOL).c_str(), NONCHAR_DELIM);
++	    n.replace(CURCOL, strspn(n.c_str()+CURCOL, NONCHAR_DELIM), "");
++	}
++
++	deltext.resize(count);
++	curfile->lines->replace(CURLINE, strdup(n.c_str()));
++	modification(udelchar, deltext);
++	draw(curfile->y);
++	updatecursor();
++    }
++}
++
+ void texteditor::eddelline() {
+     char *p = (char *) curfile->lines->at(CURLINE);
+     string deltext = (string) p + "\n";
+ 
+     if(CURLINE+1 < curfile->lines->count) {
+@@ -1191,10 +1238,95 @@
+     abscol = 0;
+     draw(curfile->y);
+     updatecursor();
+ }
+ 
++void texteditor::eddelbegofline() {
++    char *p = CURSTRING;
++    string deltext, n;
++    int count = 0;
++
++    if(CURCOL == 0 && CURLINE) { // We're at the beginning of the line
++	edmove(KEY_UP);
++	edmove(KEY_END);
++	eddel();
++    } else if(CURCOL == strlen(p)) { // We're at the end
++	eddelline();
++    } else {
++	n = p;
++	deltext = (string) p;
++	
++	n.replace(curfile->sx, CURCOL, "");
++	
++	edmove(KEY_HOME);
++
++	curfile->lines->replace(CURLINE, strdup(n.c_str()));
++	modification(udelchar, deltext);
++	draw(curfile->y);
++	updatecursor();
++    }
++    
++}
++
++void texteditor::eddelendofline() {
++    char *p = CURSTRING;
++    string deltext, n;
++    int count = 0;
++
++    if(CURCOL == 0) { // We're at the beginning of the line
++	eddelline();
++    } else if (CURCOL == strlen(p)) { // We're at the end
++	eddel();
++    } else {
++	n = p;
++	deltext = (string) p + "\n";
++	
++	count = strlen(p) - CURCOL;
++	n.replace(CURCOL, count, "");
++
++	curfile->lines->replace(CURLINE, strdup(n.c_str()));
++	modification(udelchar, deltext);
++	draw(curfile->y);
++	updatecursor();
++    }
++    
++}
++
++void texteditor::edtransposechar() {
++    char *p = CURSTRING;
++    string deltext;
++    char tmp;
++
++    if (CURCOL == 0) return;
++    else if (CURCOL == strlen(p)) {
++	deltext = (string) p;
++	
++	tmp = p[CURCOL-2];
++	p[CURCOL-2] = p[CURCOL-1];
++	p[CURCOL-1] = tmp;
++	
++	curfile->lines->replace(CURLINE, strdup(p));
++	modification(udelchar, deltext);
++	draw(curfile->y);
++	updatecursor();
++    } else {
++	deltext = (string) p;
++	
++	tmp = p[CURCOL-1];
++	p[CURCOL-1] = p[CURCOL];
++	p[CURCOL] = tmp;
++	
++	setpos(CURCOL+1, CURLINE);
++
++	curfile->lines->replace(CURLINE, strdup(p));
++	modification(udelchar, deltext);
++	draw(curfile->y);
++	updatecursor();
++    }
++    
++}
++
+ void texteditor::edenter(bool countspaces) {
+     char *p = CURSTRING, *r;
+     string spaceins;
+     
+     if(wrap) strimtrail(p);
+@@ -1435,10 +1567,69 @@
+ 
+ 		    fix_x(options & EM_TAB);
+ 		    draw();
+ 		}
+ 		break;
++	    case KEY_EMACS_BEG_OF_BUFFER:
++		setpos(0, 0);
++		break;
++	    case KEY_EMACS_END_OF_BUFFER:
++		p = (char *) curfile->lines->at(curfile->lines->count-1);
++		i = strlen(p);
++		setpos(i, curfile->lines->count-1);
++		break;
++	    case KEY_EMACS_FORWARD_WORD:
++		if(endofline() && CURLINE < curfile->lines->count-1) {
++		    setpos(0, CURLINE+1);
++		    p = CURSTRING;
++		    if(strchr(NONCHAR_DELIM, p[CURCOL])) {
++			i = strspn(p+CURCOL, NONCHAR_DELIM);
++			setpos(CURCOL+i, CURLINE);
++		    }
++		} else if(endofline() && CURLINE == curfile->lines->count-1)
++		    return;
++		i = 0;
++		if(strchr(NONCHAR_DELIM, p[CURCOL])) 
++		    i = strspn(p+CURCOL, NONCHAR_DELIM);
++		i += strcspn(p+CURCOL+i, NONCHAR_DELIM);
++		setpos(CURCOL+i, CURLINE);
++		break;
++	    case KEY_EMACS_BACKWARD_WORD:
++		if(CURCOL == 0 && CURLINE > 0 && curfile->lines->count) {
++		    setpos(strlen((char *)curfile->lines->at(CURLINE-1)), 
++			   CURLINE-1);
++		}
++		
++		if(CURCOL > 0) {
++		    char *s;
++		    int len, offset = 0;
++
++		    p = CURSTRING;
++		    len = CURCOL;
++		    s = (char *)malloc(len+1);
++
++		    for(i = 0; i < len; i++) {
++			s[i] = p[len-i-1];
++		    }
++		    s[len] = '\0';
++
++		    if(strchr(NONCHAR_DELIM, p[CURCOL]) || 
++		       strchr(NONCHAR_DELIM, p[CURCOL-1]))
++			offset = strspn(s, NONCHAR_DELIM);
++
++		    offset += strcspn(s+offset, NONCHAR_DELIM);
++
++		    if(offset == CURCOL && strchr(NONCHAR_DELIM, p[0])) {
++			setpos(strlen((char *)curfile->lines->at(CURLINE-1)), 
++			       CURLINE-1);
++			edmove(KEY_EMACS_BACKWARD_WORD);
++		    } else
++			setpos(CURCOL-offset, CURLINE);
++
++		    if(s) free(s);
++		}
++		break;
+ 	}
+     }
+ 
+     if(curfile->x >= x2-x1)
+     switch(k) {
+@@ -1613,10 +1804,14 @@
+ 		case KEY_RIGHT:
+ 		case KEY_HOME:
+ 		case KEY_END:
+ 		case KEY_PPAGE:
+ 		case KEY_NPAGE:
++		case KEY_EMACS_BEG_OF_BUFFER:
++		case KEY_EMACS_END_OF_BUFFER:
++		case KEY_EMACS_FORWARD_WORD:
++		case KEY_EMACS_BACKWARD_WORD:
+ 		    edmove(k, EM_TAB | EM_CTRL | EM_MANUAL);
+ 		    updatecursor();
+ 		    break;
+ 
+ 		default:
+@@ -1636,10 +1831,22 @@
+ 			edbackspace();
+ 			break;
+ 		    case CTRL('y'):
+ 			eddelline();
+ 			break;
++		    case KEY_EMACS_C_U:
++			eddelbegofline();
++			break;
++		    case KEY_EMACS_C_K:
++			eddelendofline();
++			break;
++		    case KEY_EMACS_C_T:
++			edtransposechar();
++			break;
++		    case KEY_EMACS_M_D:
++			eddelwordemacs();
++			break;
+ 		    case KEY_TAB:
+ 			inschar('\t');
+ 			break;
+ 		    case CTRL('t'):
+ 			eddelword();
--- centericq-4.20.0.orig/debian/patches/appearence.dpatch
+++ centericq-4.20.0/debian/patches/appearence.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh -e
+## appearence.dpatch by julien LEMOINE <speedblue@debian.org>
+##
+## DP: apply patch Martin Bergemann to change appearence
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.9.2.orig/src/icqface.cc centericq-4.9.2/src/icqface.cc
+--- centericq-4.9.2.orig/src/icqface.cc	2003-04-16 18:34:59.000000000 +0200
++++ centericq-4.9.2/src/icqface.cc	2003-04-16 18:37:32.000000000 +0200
+@@ -1135,10 +1135,18 @@
+ 	_(" [irc] IRC"),
+ 	_(" [jab] Jabber"),
+ 	""
+     };
+ 
++    //next lines inserted here from icqface::changestatus by
++    //Martin Bergemann to get this menuitem first
++    if (conf.getouridcount() > 1) {
++      m.additem(0, proto_all, _(" [all] All of them"));
++      m.addline();
++    }
++    //end of changes
++
+     for(ipname = icq; ipname != protocolname_size; (int) ipname += 1) {
+ 	ia = conf.getourid(ipname);
+ 
+ 	if(!ia.empty()) {
+ 	    m.additem(0, ipname, pitems[ipname]);
--- centericq-4.20.0.orig/debian/patches/settings.dpatch
+++ centericq-4.20.0/debian/patches/settings.dpatch
@@ -0,0 +1,46 @@
+#! /bin/sh -e
+## settings.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: Change default settings
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.9.2.orig/src/icqconf.cc centericq-4.9.2/src/icqconf.cc
+--- centericq-4.9.2.orig/src/icqconf.cc	2003-04-16 18:34:59.000000000 +0200
++++ centericq-4.9.2/src/icqconf.cc	2003-04-16 18:34:05.000000000 +0200
+@@ -392,15 +392,15 @@
+ 
+ 	    fo << endl << "# <command>\tcommand line to be executed to play a sound" << endl << endl;
+ 
+ 	    switch(rs) {
+ 		case rscard:
+-		    fo << "*\tmsg\tplay " << SHARE_DIR << "/msg.wav" << endl;
+-		    fo << "*\turl\tplay " << SHARE_DIR << "/url.wav" << endl;
+-		    fo << "*\temail\tplay " << SHARE_DIR << "/email.wav" << endl;
+-		    fo << "*\tonline\tplay " << SHARE_DIR << "/online.wav" << endl;
+-		    fo << "*\tsms\tplay " << SHARE_DIR << "/sms.wav" << endl;
++		    fo << "*\tmsg\tesdplay " << SHARE_DIR << "/msg.wav" << endl;
++		    fo << "*\turl\tesdplay " << SHARE_DIR << "/url.wav" << endl;
++		    fo << "*\temail\tesdplay " << SHARE_DIR << "/email.wav" << endl;
++		    fo << "*\tonline\tesdplay " << SHARE_DIR << "/online.wav" << endl;
++		    fo << "*\tsms\tesdplay " << SHARE_DIR << "/sms.wav" << endl;
+ 		    break;
+ 
+ 		case rsspeaker:
+ 		    fo << "*\tmsg\t!spk1" << endl;
+ 		    fo << "*\turl\t!spk2" << endl;
--- centericq-4.20.0.orig/debian/patches/msn.dpatch
+++ centericq-4.20.0/debian/patches/msn.dpatch
@@ -0,0 +1,7551 @@
+#! /bin/sh -e
+## msn.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: apply patch from "Wim Cools" <w.cools@chello.nl> to enable MSN support
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0
+	       chmod +x blip-0.1/missing;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.9.10/Makefile.in centericq-4.9.10-modif/Makefile.in
+--- centericq-4.9.10/Makefile.in	2004-01-16 21:40:32.000000000 +0100
++++ centericq-4.9.10-modif/Makefile.in	2004-02-06 22:33:07.000000000 +0100
+@@ -90,11 +90,11 @@
+ RANLIB = @RANLIB@
+ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
+ 
+-SUBDIRS = firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1 intl po misc share src
++SUBDIRS = blip-0.1 firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1 intl po misc share src
+ 
+ # END OF MOTOR DIST TARGETS #
+ EXTRA_DIST = centericq.1 centericq.motor config.rpath FAQ NEWS TODO README THANKS AUTHORS INSTALL ABOUT-NLS ChangeLog COPYING centericq.spec firetalk-0.1/* kkconsui-0.1/* kkstrtext-0.1/* libicq2000-0.1/* libjabber-0.1/* libyahoo2-0.1/* kksystr-0.1/* connwrap-0.1/*
+ AUTOMAKE_OPTIONS = foreign
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+@@ -289,11 +289,11 @@
+ 	cd $(top_srcdir) \
+ 	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
+ 	$(mkinstalldirs) $(distdir)/connwrap-0.1 $(distdir)/firetalk-0.1 \
+ 	   $(distdir)/kkconsui-0.1 $(distdir)/kkstrtext-0.1 \
+ 	   $(distdir)/kksystr-0.1 $(distdir)/libicq2000-0.1 \
+-	   $(distdir)/libjabber-0.1 $(distdir)/libyahoo2-0.1
++	   $(distdir)/libjabber-0.1 $(distdir)/libyahoo2-0.1 $(distdir)/blip-0.1
+ 	@for file in $(DISTFILES); do \
+ 	  d=$(srcdir); \
+ 	  if test -d $$d/$$file; then \
+ 	    cp -pr $$d/$$file $(distdir)/$$file; \
+ 	  else \
+@@ -386,11 +386,11 @@
+ installdirs mostlyclean-generic distclean-generic clean-generic \
+ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+ 
+ dist-hook:
+ 	cd $(top_distdir); subs=`egrep "^[:space:]*SUBDIRS" Makefile.am | sed 's/SUBDIRS[ =]\+//g'`; \
+-	echo "SUBDIRS = firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1 $$subs" >>.makefile.am; \
++	echo "SUBDIRS = blip-0.1 firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1 $$subs" >>.makefile.am; \
+ 	egrep -v "^[:space:]*SUBDIRS" Makefile.am >>.makefile.am; \
+ 	mv .makefile.am Makefile.am; autoconf && automake
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/Makefile.am centericq-4.9.10-modif/blip-0.1/Makefile.am
+--- centericq-4.9.10/blip-0.1/Makefile.am	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/Makefile.am	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,10 @@
++noinst_LIBRARIES = libblip.a
++libblip_a_SOURCES = md5.c msn_bittybits.C msn_core.C
++EXTRA_DIST = md5.c msn_bittybits.C msn_core.C md5.h msn_bittybits.h msn_core.h msn_interface.h
++AUTOMAKE_OPTIONS = foreign
++
++if BUILD_MSN
++
++
++endif
++
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/Makefile.in centericq-4.9.10-modif/blip-0.1/Makefile.in
+--- centericq-4.9.10/blip-0.1/Makefile.in	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/Makefile.in	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,364 @@
++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
++
++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
++# This Makefile.in is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++
++SHELL = @SHELL@
++
++srcdir = @srcdir@
++top_srcdir = @top_srcdir@
++VPATH = @srcdir@
++prefix = @prefix@
++exec_prefix = @exec_prefix@
++
++bindir = @bindir@
++sbindir = @sbindir@
++libexecdir = @libexecdir@
++datadir = @datadir@
++sysconfdir = @sysconfdir@
++sharedstatedir = @sharedstatedir@
++localstatedir = @localstatedir@
++libdir = @libdir@
++infodir = @infodir@
++mandir = @mandir@
++includedir = @includedir@
++oldincludedir = /usr/include
++
++DESTDIR =
++
++pkgdatadir = $(datadir)/@PACKAGE@
++pkglibdir = $(libdir)/@PACKAGE@
++pkgincludedir = $(includedir)/@PACKAGE@
++
++top_builddir = .
++
++ACLOCAL = @ACLOCAL@
++AUTOCONF = @AUTOCONF@
++AUTOMAKE = @AUTOMAKE@
++AUTOHEADER = @AUTOHEADER@
++
++INSTALL = @INSTALL@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++INSTALL_DATA = @INSTALL_DATA@
++INSTALL_SCRIPT = @INSTALL_SCRIPT@
++transform = @program_transform_name@
++
++NORMAL_INSTALL = :
++PRE_INSTALL = :
++POST_INSTALL = :
++NORMAL_UNINSTALL = :
++PRE_UNINSTALL = :
++POST_UNINSTALL = :
++CC = @CC@
++CXX = @CXX@
++MAKEINFO = @MAKEINFO@
++PACKAGE = @PACKAGE@
++RANLIB = @RANLIB@
++VERSION = @VERSION@
++
++noinst_LIBRARIES = libblip.a
++libblip_a_SOURCES = md5.c msn_bittybits.C msn_core.C
++EXTRA_DIST = md5.c msn_bittybits.C msn_core.C md5.h msn_bittybits.h msn_core.h msn_interface.h
++AUTOMAKE_OPTIONS = foreign
++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
++CONFIG_CLEAN_FILES = 
++LIBRARIES =  $(noinst_LIBRARIES)
++
++
++DEFS = @DEFS@ -I. -I$(srcdir) 
++CPPFLAGS = @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
++LIBS = @LIBS@
++libblip_a_LIBADD = 
++libblip_a_OBJECTS =  md5.o msn_bittybits.o msn_core.o
++AR = ar
++CXXFLAGS = @CXXFLAGS@
++CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
++CXXLD = $(CXX)
++CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
++CFLAGS = @CFLAGS@
++COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++CCLD = $(CC)
++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
++DIST_COMMON =  Makefile.am Makefile.in aclocal.m4 configure configure.in \
++install-sh missing mkinstalldirs
++
++
++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++TAR = gtar
++GZIP_ENV = --best
++DEP_FILES =  .deps/md5.P .deps/msn_bittybits.P .deps/msn_core.P
++SOURCES = $(libblip_a_SOURCES)
++OBJECTS = $(libblip_a_OBJECTS)
++
++all: all-redirect
++.SUFFIXES:
++.SUFFIXES: .C .S .c .o .s
++$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
++	cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
++
++Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
++	cd $(top_builddir) \
++	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
++
++$(ACLOCAL_M4):  configure.in 
++	cd $(srcdir) && $(ACLOCAL)
++
++config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
++	$(SHELL) ./config.status --recheck
++$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
++	cd $(srcdir) && $(AUTOCONF)
++
++mostlyclean-noinstLIBRARIES:
++
++clean-noinstLIBRARIES:
++	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
++
++distclean-noinstLIBRARIES:
++
++maintainer-clean-noinstLIBRARIES:
++
++.s.o:
++	$(COMPILE) -c $<
++
++.S.o:
++	$(COMPILE) -c $<
++
++mostlyclean-compile:
++	-rm -f *.o core *.core
++
++clean-compile:
++
++distclean-compile:
++	-rm -f *.tab.c
++
++maintainer-clean-compile:
++
++libblip.a: $(libblip_a_OBJECTS) $(libblip_a_DEPENDENCIES)
++	-rm -f libblip.a
++	$(AR) cru libblip.a $(libblip_a_OBJECTS) $(libblip_a_LIBADD)
++	$(RANLIB) libblip.a
++.C.o:
++	$(CXXCOMPILE) -c $<
++
++tags: TAGS
++
++ID: $(HEADERS) $(SOURCES) $(LISP)
++	list='$(SOURCES) $(HEADERS)'; \
++	unique=`for i in $$list; do echo $$i; done | \
++	  awk '    { files[$$0] = 1; } \
++	       END { for (i in files) print i; }'`; \
++	here=`pwd` && cd $(srcdir) \
++	  && mkid -f$$here/ID $$unique $(LISP)
++
++TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
++	tags=; \
++	here=`pwd`; \
++	list='$(SOURCES) $(HEADERS)'; \
++	unique=`for i in $$list; do echo $$i; done | \
++	  awk '    { files[$$0] = 1; } \
++	       END { for (i in files) print i; }'`; \
++	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
++	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
++
++mostlyclean-tags:
++
++clean-tags:
++
++distclean-tags:
++	-rm -f TAGS ID
++
++maintainer-clean-tags:
++
++distdir = $(PACKAGE)-$(VERSION)
++top_distdir = $(distdir)
++
++# This target untars the dist file and tries a VPATH configuration.  Then
++# it guarantees that the distribution is self-contained by making another
++# tarfile.
++distcheck: dist
++	-rm -rf $(distdir)
++	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
++	mkdir $(distdir)/=build
++	mkdir $(distdir)/=inst
++	dc_install_base=`cd $(distdir)/=inst && pwd`; \
++	cd $(distdir)/=build \
++	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
++	  && $(MAKE) $(AM_MAKEFLAGS) \
++	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
++	  && $(MAKE) $(AM_MAKEFLAGS) check \
++	  && $(MAKE) $(AM_MAKEFLAGS) install \
++	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
++	  && $(MAKE) $(AM_MAKEFLAGS) dist
++	-rm -rf $(distdir)
++	@banner="$(distdir).tar.gz is ready for distribution"; \
++	dashes=`echo "$$banner" | sed s/./=/g`; \
++	echo "$$dashes"; \
++	echo "$$banner"; \
++	echo "$$dashes"
++dist: distdir
++	-chmod -R a+r $(distdir)
++	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
++	-rm -rf $(distdir)
++dist-all: distdir
++	-chmod -R a+r $(distdir)
++	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
++	-rm -rf $(distdir)
++distdir: $(DISTFILES)
++	-rm -rf $(distdir)
++	mkdir $(distdir)
++	-chmod 777 $(distdir)
++	here=`cd $(top_builddir) && pwd`; \
++	top_distdir=`cd $(distdir) && pwd`; \
++	distdir=`cd $(distdir) && pwd`; \
++	cd $(top_srcdir) \
++	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
++	@for file in $(DISTFILES); do \
++	  d=$(srcdir); \
++	  if test -d $$d/$$file; then \
++	    cp -pr $$d/$$file $(distdir)/$$file; \
++	  else \
++	    test -f $(distdir)/$$file \
++	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++	    || cp -p $$d/$$file $(distdir)/$$file || :; \
++	  fi; \
++	done
++
++DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
++
++-include $(DEP_FILES)
++
++mostlyclean-depend:
++
++clean-depend:
++
++distclean-depend:
++	-rm -rf .deps
++
++maintainer-clean-depend:
++
++%.o: %.c
++	@echo '$(COMPILE) -c $<'; \
++	$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
++	@-cp .deps/$(*F).pp .deps/$(*F).P; \
++	tr ' ' '\012' < .deps/$(*F).pp \
++	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
++	    >> .deps/$(*F).P; \
++	rm .deps/$(*F).pp
++
++%.lo: %.c
++	@echo '$(LTCOMPILE) -c $<'; \
++	$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
++	@-sed -e 's/^\([^:]*\)\.o[ 	]*:/\1.lo \1.o :/' \
++	  < .deps/$(*F).pp > .deps/$(*F).P; \
++	tr ' ' '\012' < .deps/$(*F).pp \
++	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
++	    >> .deps/$(*F).P; \
++	rm -f .deps/$(*F).pp
++
++%.o: %.C
++	@echo '$(CXXCOMPILE) -c $<'; \
++	$(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
++	@-cp .deps/$(*F).pp .deps/$(*F).P; \
++	tr ' ' '\012' < .deps/$(*F).pp \
++	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
++	    >> .deps/$(*F).P; \
++	rm .deps/$(*F).pp
++
++%.lo: %.C
++	@echo '$(LTCXXCOMPILE) -c $<'; \
++	$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
++	@-sed -e 's/^\([^:]*\)\.o[ 	]*:/\1.lo \1.o :/' \
++	  < .deps/$(*F).pp > .deps/$(*F).P; \
++	tr ' ' '\012' < .deps/$(*F).pp \
++	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
++	    >> .deps/$(*F).P; \
++	rm -f .deps/$(*F).pp
++info-am:
++info: info-am
++dvi-am:
++dvi: dvi-am
++check-am: all-am
++check: check-am
++installcheck-am:
++installcheck: installcheck-am
++install-exec-am:
++install-exec: install-exec-am
++
++install-data-am:
++install-data: install-data-am
++
++install-am: all-am
++	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
++install: install-am
++uninstall-am:
++uninstall: uninstall-am
++all-am: Makefile $(LIBRARIES)
++all-redirect: all-am
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++installdirs:
++
++
++mostlyclean-generic:
++
++clean-generic:
++
++distclean-generic:
++	-rm -f Makefile $(CONFIG_CLEAN_FILES)
++	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
++
++maintainer-clean-generic:
++mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
++		mostlyclean-tags mostlyclean-depend mostlyclean-generic
++
++mostlyclean: mostlyclean-am
++
++clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-depend \
++		clean-generic mostlyclean-am
++
++clean: clean-am
++
++distclean-am:  distclean-noinstLIBRARIES distclean-compile \
++		distclean-tags distclean-depend distclean-generic \
++		clean-am
++
++distclean: distclean-am
++	-rm -f config.status
++
++maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
++		maintainer-clean-compile maintainer-clean-tags \
++		maintainer-clean-depend maintainer-clean-generic \
++		distclean-am
++	@echo "This command is intended for maintainers to use;"
++	@echo "it deletes files that may require special tools to rebuild."
++
++maintainer-clean: maintainer-clean-am
++	-rm -f config.status
++
++.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
++clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
++mostlyclean-compile distclean-compile clean-compile \
++maintainer-clean-compile tags mostlyclean-tags distclean-tags \
++clean-tags maintainer-clean-tags distdir mostlyclean-depend \
++distclean-depend clean-depend maintainer-clean-depend info-am info \
++dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
++install-exec install-data-am install-data install-am install \
++uninstall-am uninstall all-redirect all-am all installdirs \
++mostlyclean-generic distclean-generic clean-generic \
++maintainer-clean-generic clean mostlyclean distclean maintainer-clean
++
++
++# Tell versions [3.59,3.63) of GNU make to not export all variables.
++# Otherwise a system limit (for SysV at least) may be exceeded.
++.NOEXPORT:
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/aclocal.m4 centericq-4.9.10-modif/blip-0.1/aclocal.m4
+--- centericq-4.9.10/blip-0.1/aclocal.m4	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/aclocal.m4	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,117 @@
++dnl aclocal.m4 generated automatically by aclocal 1.4-p5
++
++dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
++
++dnl This program is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++dnl PARTICULAR PURPOSE.
++
++# Do all the work for Automake.  This macro actually does too much --
++# some checks are only needed if your package does certain things.
++# But this isn't really a big deal.
++
++# serial 1
++
++dnl Usage:
++dnl AM_INIT_AUTOMAKE(package,version, [no-define])
++
++AC_DEFUN([AM_INIT_AUTOMAKE],
++[AC_REQUIRE([AC_PROG_INSTALL])
++PACKAGE=[$1]
++AC_SUBST(PACKAGE)
++VERSION=[$2]
++AC_SUBST(VERSION)
++dnl test to see if srcdir already configured
++if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
++  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
++fi
++ifelse([$3],,
++AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
++AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
++AC_REQUIRE([AM_SANITY_CHECK])
++AC_REQUIRE([AC_ARG_PROGRAM])
++dnl FIXME This is truly gross.
++missing_dir=`cd $ac_aux_dir && pwd`
++AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
++AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
++AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
++AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
++AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
++AC_REQUIRE([AC_PROG_MAKE_SET])])
++
++#
++# Check to make sure that the build environment is sane.
++#
++
++AC_DEFUN([AM_SANITY_CHECK],
++[AC_MSG_CHECKING([whether build environment is sane])
++# Just in case
++sleep 1
++echo timestamp > conftestfile
++# Do `set' in a subshell so we don't clobber the current shell's
++# arguments.  Must try -L first in case configure is actually a
++# symlink; some systems play weird games with the mod time of symlinks
++# (eg FreeBSD returns the mod time of the symlink's containing
++# directory).
++if (
++   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
++   if test "[$]*" = "X"; then
++      # -L didn't work.
++      set X `ls -t $srcdir/configure conftestfile`
++   fi
++   if test "[$]*" != "X $srcdir/configure conftestfile" \
++      && test "[$]*" != "X conftestfile $srcdir/configure"; then
++
++      # If neither matched, then we have a broken ls.  This can happen
++      # if, for instance, CONFIG_SHELL is bash and it inherits a
++      # broken ls alias from the environment.  This has actually
++      # happened.  Such a system could not be considered "sane".
++      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
++alias in your environment])
++   fi
++
++   test "[$]2" = conftestfile
++   )
++then
++   # Ok.
++   :
++else
++   AC_MSG_ERROR([newly created file is older than distributed files!
++Check your system clock])
++fi
++rm -f conftest*
++AC_MSG_RESULT(yes)])
++
++dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
++dnl The program must properly implement --version.
++AC_DEFUN([AM_MISSING_PROG],
++[AC_MSG_CHECKING(for working $2)
++# Run test in a subshell; some versions of sh will print an error if
++# an executable is not found, even if stderr is redirected.
++# Redirect stdin to placate older versions of autoconf.  Sigh.
++if ($2 --version) < /dev/null > /dev/null 2>&1; then
++   $1=$2
++   AC_MSG_RESULT(found)
++else
++   $1="$3/missing $2"
++   AC_MSG_RESULT(missing)
++fi
++AC_SUBST($1)])
++
++# Define a conditional.
++
++AC_DEFUN([AM_CONDITIONAL],
++[AC_SUBST($1_TRUE)
++AC_SUBST($1_FALSE)
++if $2; then
++  $1_TRUE=
++  $1_FALSE='#'
++else
++  $1_TRUE='#'
++  $1_FALSE=
++fi])
++
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/configure centericq-4.9.10-modif/blip-0.1/configure
+--- centericq-4.9.10/blip-0.1/configure	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/configure	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,1519 @@
++#! /bin/sh
++
++# Guess values for system-dependent variables and create Makefiles.
++# Generated automatically using autoconf version 2.13 
++# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
++#
++# This configure script is free software; the Free Software Foundation
++# gives unlimited permission to copy, distribute and modify it.
++
++# Defaults:
++ac_help=
++ac_default_prefix=/usr/local
++# Any additions from configure.in:
++ac_help="$ac_help
++  --disable-msn   Build without MSN"
++
++# Initialize some variables set by options.
++# The variables have the same names as the options, with
++# dashes changed to underlines.
++build=NONE
++cache_file=./config.cache
++exec_prefix=NONE
++host=NONE
++no_create=
++nonopt=NONE
++no_recursion=
++prefix=NONE
++program_prefix=NONE
++program_suffix=NONE
++program_transform_name=s,x,x,
++silent=
++site=
++srcdir=
++target=NONE
++verbose=
++x_includes=NONE
++x_libraries=NONE
++bindir='${exec_prefix}/bin'
++sbindir='${exec_prefix}/sbin'
++libexecdir='${exec_prefix}/libexec'
++datadir='${prefix}/share'
++sysconfdir='${prefix}/etc'
++sharedstatedir='${prefix}/com'
++localstatedir='${prefix}/var'
++libdir='${exec_prefix}/lib'
++includedir='${prefix}/include'
++oldincludedir='/usr/include'
++infodir='${prefix}/info'
++mandir='${prefix}/man'
++
++# Initialize some other variables.
++subdirs=
++MFLAGS= MAKEFLAGS=
++SHELL=${CONFIG_SHELL-/bin/sh}
++# Maximum number of lines to put in a shell here document.
++ac_max_here_lines=12
++
++ac_prev=
++for ac_option
++do
++
++  # If the previous option needs an argument, assign it.
++  if test -n "$ac_prev"; then
++    eval "$ac_prev=\$ac_option"
++    ac_prev=
++    continue
++  fi
++
++  case "$ac_option" in
++  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
++  *) ac_optarg= ;;
++  esac
++
++  # Accept the important Cygnus configure options, so we can diagnose typos.
++
++  case "$ac_option" in
++
++  -bindir | --bindir | --bindi | --bind | --bin | --bi)
++    ac_prev=bindir ;;
++  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
++    bindir="$ac_optarg" ;;
++
++  -build | --build | --buil | --bui | --bu)
++    ac_prev=build ;;
++  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
++    build="$ac_optarg" ;;
++
++  -cache-file | --cache-file | --cache-fil | --cache-fi \
++  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
++    ac_prev=cache_file ;;
++  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
++  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
++    cache_file="$ac_optarg" ;;
++
++  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
++    ac_prev=datadir ;;
++  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
++  | --da=*)
++    datadir="$ac_optarg" ;;
++
++  -disable-* | --disable-*)
++    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
++    # Reject names that are not valid shell variable names.
++    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
++      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
++    fi
++    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
++    eval "enable_${ac_feature}=no" ;;
++
++  -enable-* | --enable-*)
++    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
++    # Reject names that are not valid shell variable names.
++    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
++      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
++    fi
++    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
++    case "$ac_option" in
++      *=*) ;;
++      *) ac_optarg=yes ;;
++    esac
++    eval "enable_${ac_feature}='$ac_optarg'" ;;
++
++  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
++  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
++  | --exec | --exe | --ex)
++    ac_prev=exec_prefix ;;
++  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
++  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
++  | --exec=* | --exe=* | --ex=*)
++    exec_prefix="$ac_optarg" ;;
++
++  -gas | --gas | --ga | --g)
++    # Obsolete; use --with-gas.
++    with_gas=yes ;;
++
++  -help | --help | --hel | --he)
++    # Omit some internal or obsolete options to make the list less imposing.
++    # This message is too long to be a string in the A/UX 3.1 sh.
++    cat << EOF
++Usage: configure [options] [host]
++Options: [defaults in brackets after descriptions]
++Configuration:
++  --cache-file=FILE       cache test results in FILE
++  --help                  print this message
++  --no-create             do not create output files
++  --quiet, --silent       do not print \`checking...' messages
++  --version               print the version of autoconf that created configure
++Directory and file names:
++  --prefix=PREFIX         install architecture-independent files in PREFIX
++                          [$ac_default_prefix]
++  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
++                          [same as prefix]
++  --bindir=DIR            user executables in DIR [EPREFIX/bin]
++  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
++  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
++  --datadir=DIR           read-only architecture-independent data in DIR
++                          [PREFIX/share]
++  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
++  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
++                          [PREFIX/com]
++  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
++  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
++  --includedir=DIR        C header files in DIR [PREFIX/include]
++  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
++  --infodir=DIR           info documentation in DIR [PREFIX/info]
++  --mandir=DIR            man documentation in DIR [PREFIX/man]
++  --srcdir=DIR            find the sources in DIR [configure dir or ..]
++  --program-prefix=PREFIX prepend PREFIX to installed program names
++  --program-suffix=SUFFIX append SUFFIX to installed program names
++  --program-transform-name=PROGRAM
++                          run sed PROGRAM on installed program names
++EOF
++    cat << EOF
++Host type:
++  --build=BUILD           configure for building on BUILD [BUILD=HOST]
++  --host=HOST             configure for HOST [guessed]
++  --target=TARGET         configure for TARGET [TARGET=HOST]
++Features and packages:
++  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
++  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
++  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
++  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
++  --x-includes=DIR        X include files are in DIR
++  --x-libraries=DIR       X library files are in DIR
++EOF
++    if test -n "$ac_help"; then
++      echo "--enable and --with options recognized:$ac_help"
++    fi
++    exit 0 ;;
++
++  -host | --host | --hos | --ho)
++    ac_prev=host ;;
++  -host=* | --host=* | --hos=* | --ho=*)
++    host="$ac_optarg" ;;
++
++  -includedir | --includedir | --includedi | --included | --include \
++  | --includ | --inclu | --incl | --inc)
++    ac_prev=includedir ;;
++  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
++  | --includ=* | --inclu=* | --incl=* | --inc=*)
++    includedir="$ac_optarg" ;;
++
++  -infodir | --infodir | --infodi | --infod | --info | --inf)
++    ac_prev=infodir ;;
++  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
++    infodir="$ac_optarg" ;;
++
++  -libdir | --libdir | --libdi | --libd)
++    ac_prev=libdir ;;
++  -libdir=* | --libdir=* | --libdi=* | --libd=*)
++    libdir="$ac_optarg" ;;
++
++  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
++  | --libexe | --libex | --libe)
++    ac_prev=libexecdir ;;
++  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
++  | --libexe=* | --libex=* | --libe=*)
++    libexecdir="$ac_optarg" ;;
++
++  -localstatedir | --localstatedir | --localstatedi | --localstated \
++  | --localstate | --localstat | --localsta | --localst \
++  | --locals | --local | --loca | --loc | --lo)
++    ac_prev=localstatedir ;;
++  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
++  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
++  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
++    localstatedir="$ac_optarg" ;;
++
++  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
++    ac_prev=mandir ;;
++  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
++    mandir="$ac_optarg" ;;
++
++  -nfp | --nfp | --nf)
++    # Obsolete; use --without-fp.
++    with_fp=no ;;
++
++  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
++  | --no-cr | --no-c)
++    no_create=yes ;;
++
++  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
++  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
++    no_recursion=yes ;;
++
++  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
++  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
++  | --oldin | --oldi | --old | --ol | --o)
++    ac_prev=oldincludedir ;;
++  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
++  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
++  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
++    oldincludedir="$ac_optarg" ;;
++
++  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
++    ac_prev=prefix ;;
++  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
++    prefix="$ac_optarg" ;;
++
++  -program-prefix | --program-prefix | --program-prefi | --program-pref \
++  | --program-pre | --program-pr | --program-p)
++    ac_prev=program_prefix ;;
++  -program-prefix=* | --program-prefix=* | --program-prefi=* \
++  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
++    program_prefix="$ac_optarg" ;;
++
++  -program-suffix | --program-suffix | --program-suffi | --program-suff \
++  | --program-suf | --program-su | --program-s)
++    ac_prev=program_suffix ;;
++  -program-suffix=* | --program-suffix=* | --program-suffi=* \
++  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
++    program_suffix="$ac_optarg" ;;
++
++  -program-transform-name | --program-transform-name \
++  | --program-transform-nam | --program-transform-na \
++  | --program-transform-n | --program-transform- \
++  | --program-transform | --program-transfor \
++  | --program-transfo | --program-transf \
++  | --program-trans | --program-tran \
++  | --progr-tra | --program-tr | --program-t)
++    ac_prev=program_transform_name ;;
++  -program-transform-name=* | --program-transform-name=* \
++  | --program-transform-nam=* | --program-transform-na=* \
++  | --program-transform-n=* | --program-transform-=* \
++  | --program-transform=* | --program-transfor=* \
++  | --program-transfo=* | --program-transf=* \
++  | --program-trans=* | --program-tran=* \
++  | --progr-tra=* | --program-tr=* | --program-t=*)
++    program_transform_name="$ac_optarg" ;;
++
++  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++  | -silent | --silent | --silen | --sile | --sil)
++    silent=yes ;;
++
++  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
++    ac_prev=sbindir ;;
++  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
++  | --sbi=* | --sb=*)
++    sbindir="$ac_optarg" ;;
++
++  -sharedstatedir | --sharedstatedir | --sharedstatedi \
++  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
++  | --sharedst | --shareds | --shared | --share | --shar \
++  | --sha | --sh)
++    ac_prev=sharedstatedir ;;
++  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
++  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
++  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
++  | --sha=* | --sh=*)
++    sharedstatedir="$ac_optarg" ;;
++
++  -site | --site | --sit)
++    ac_prev=site ;;
++  -site=* | --site=* | --sit=*)
++    site="$ac_optarg" ;;
++
++  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
++    ac_prev=srcdir ;;
++  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
++    srcdir="$ac_optarg" ;;
++
++  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
++  | --syscon | --sysco | --sysc | --sys | --sy)
++    ac_prev=sysconfdir ;;
++  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
++  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
++    sysconfdir="$ac_optarg" ;;
++
++  -target | --target | --targe | --targ | --tar | --ta | --t)
++    ac_prev=target ;;
++  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
++    target="$ac_optarg" ;;
++
++  -v | -verbose | --verbose | --verbos | --verbo | --verb)
++    verbose=yes ;;
++
++  -version | --version | --versio | --versi | --vers)
++    echo "configure generated by autoconf version 2.13"
++    exit 0 ;;
++
++  -with-* | --with-*)
++    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
++    # Reject names that are not valid shell variable names.
++    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
++      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
++    fi
++    ac_package=`echo $ac_package| sed 's/-/_/g'`
++    case "$ac_option" in
++      *=*) ;;
++      *) ac_optarg=yes ;;
++    esac
++    eval "with_${ac_package}='$ac_optarg'" ;;
++
++  -without-* | --without-*)
++    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
++    # Reject names that are not valid shell variable names.
++    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
++      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
++    fi
++    ac_package=`echo $ac_package| sed 's/-/_/g'`
++    eval "with_${ac_package}=no" ;;
++
++  --x)
++    # Obsolete; use --with-x.
++    with_x=yes ;;
++
++  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
++  | --x-incl | --x-inc | --x-in | --x-i)
++    ac_prev=x_includes ;;
++  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
++  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
++    x_includes="$ac_optarg" ;;
++
++  -x-libraries | --x-libraries | --x-librarie | --x-librari \
++  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
++    ac_prev=x_libraries ;;
++  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
++  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
++    x_libraries="$ac_optarg" ;;
++
++  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
++    ;;
++
++  *)
++    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
++      echo "configure: warning: $ac_option: invalid host type" 1>&2
++    fi
++    if test "x$nonopt" != xNONE; then
++      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
++    fi
++    nonopt="$ac_option"
++    ;;
++
++  esac
++done
++
++if test -n "$ac_prev"; then
++  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
++fi
++
++trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
++
++# File descriptor usage:
++# 0 standard input
++# 1 file creation
++# 2 errors and warnings
++# 3 some systems may open it to /dev/tty
++# 4 used on the Kubota Titan
++# 6 checking for... messages and results
++# 5 compiler messages saved in config.log
++if test "$silent" = yes; then
++  exec 6>/dev/null
++else
++  exec 6>&1
++fi
++exec 5>./config.log
++
++echo "\
++This file contains any messages produced by compilers while
++running configure, to aid debugging if configure makes a mistake.
++" 1>&5
++
++# Strip out --no-create and --no-recursion so they do not pile up.
++# Also quote any args containing shell metacharacters.
++ac_configure_args=
++for ac_arg
++do
++  case "$ac_arg" in
++  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
++  | --no-cr | --no-c) ;;
++  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
++  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
++  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
++  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
++  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
++  esac
++done
++
++# NLS nuisances.
++# Only set these to C if already set.  These must not be set unconditionally
++# because not all systems understand e.g. LANG=C (notably SCO).
++# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
++# Non-C LC_CTYPE values break the ctype check.
++if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
++if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
++if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
++if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
++
++# confdefs.h avoids OS command line length limits that DEFS can exceed.
++rm -rf conftest* confdefs.h
++# AIX cpp loses on an empty file, so make sure it contains at least a newline.
++echo > confdefs.h
++
++# A filename unique to this package, relative to the directory that
++# configure is in, which we can look for to find out if srcdir is correct.
++ac_unique_file=aclocal.m4
++
++# Find the source files, if location was not specified.
++if test -z "$srcdir"; then
++  ac_srcdir_defaulted=yes
++  # Try the directory containing this script, then its parent.
++  ac_prog=$0
++  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
++  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
++  srcdir=$ac_confdir
++  if test ! -r $srcdir/$ac_unique_file; then
++    srcdir=..
++  fi
++else
++  ac_srcdir_defaulted=no
++fi
++if test ! -r $srcdir/$ac_unique_file; then
++  if test "$ac_srcdir_defaulted" = yes; then
++    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
++  else
++    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
++  fi
++fi
++srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
++
++# Prefer explicitly selected file to automatically selected ones.
++if test -z "$CONFIG_SITE"; then
++  if test "x$prefix" != xNONE; then
++    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
++  else
++    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
++  fi
++fi
++for ac_site_file in $CONFIG_SITE; do
++  if test -r "$ac_site_file"; then
++    echo "loading site script $ac_site_file"
++    . "$ac_site_file"
++  fi
++done
++
++if test -r "$cache_file"; then
++  echo "loading cache $cache_file"
++  . $cache_file
++else
++  echo "creating cache $cache_file"
++  > $cache_file
++fi
++
++ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++ac_exeext=
++ac_objext=o
++if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
++  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
++  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
++    ac_n= ac_c='
++' ac_t='	'
++  else
++    ac_n=-n ac_c= ac_t=
++  fi
++else
++  ac_n= ac_c='\c' ac_t=
++fi
++
++
++ac_aux_dir=
++for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
++  if test -f $ac_dir/install-sh; then
++    ac_aux_dir=$ac_dir
++    ac_install_sh="$ac_aux_dir/install-sh -c"
++    break
++  elif test -f $ac_dir/install.sh; then
++    ac_aux_dir=$ac_dir
++    ac_install_sh="$ac_aux_dir/install.sh -c"
++    break
++  fi
++done
++if test -z "$ac_aux_dir"; then
++  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
++fi
++ac_config_guess=$ac_aux_dir/config.guess
++ac_config_sub=$ac_aux_dir/config.sub
++ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
++
++# Find a good install program.  We prefer a C program (faster),
++# so one script is as good as another.  But avoid the broken or
++# incompatible versions:
++# SysV /etc/install, /usr/sbin/install
++# SunOS /usr/etc/install
++# IRIX /sbin/install
++# AIX /bin/install
++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
++# AFS /usr/afsws/bin/install, which mishandles nonexistent args
++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
++# ./install, which can be erroneously created by make from ./install.sh.
++echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
++echo "configure:558: checking for a BSD compatible install" >&5
++if test -z "$INSTALL"; then
++if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
++  for ac_dir in $PATH; do
++    # Account for people who put trailing slashes in PATH elements.
++    case "$ac_dir/" in
++    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
++    *)
++      # OSF1 and SCO ODT 3.0 have their own names for install.
++      # Don't use installbsd from OSF since it installs stuff as root
++      # by default.
++      for ac_prog in ginstall scoinst install; do
++        if test -f $ac_dir/$ac_prog; then
++	  if test $ac_prog = install &&
++            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
++	    # AIX install.  It has an incompatible calling convention.
++	    :
++	  else
++	    ac_cv_path_install="$ac_dir/$ac_prog -c"
++	    break 2
++	  fi
++	fi
++      done
++      ;;
++    esac
++  done
++  IFS="$ac_save_IFS"
++
++fi
++  if test "${ac_cv_path_install+set}" = set; then
++    INSTALL="$ac_cv_path_install"
++  else
++    # As a last resort, use the slow shell script.  We don't cache a
++    # path for INSTALL within a source directory, because that will
++    # break other packages using the cache if that directory is
++    # removed, or if the path is relative.
++    INSTALL="$ac_install_sh"
++  fi
++fi
++echo "$ac_t""$INSTALL" 1>&6
++
++# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
++# It thinks the first close brace ends the variable substitution.
++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
++
++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
++
++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
++
++echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
++echo "configure:611: checking whether build environment is sane" >&5
++# Just in case
++sleep 1
++echo timestamp > conftestfile
++# Do `set' in a subshell so we don't clobber the current shell's
++# arguments.  Must try -L first in case configure is actually a
++# symlink; some systems play weird games with the mod time of symlinks
++# (eg FreeBSD returns the mod time of the symlink's containing
++# directory).
++if (
++   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
++   if test "$*" = "X"; then
++      # -L didn't work.
++      set X `ls -t $srcdir/configure conftestfile`
++   fi
++   if test "$*" != "X $srcdir/configure conftestfile" \
++      && test "$*" != "X conftestfile $srcdir/configure"; then
++
++      # If neither matched, then we have a broken ls.  This can happen
++      # if, for instance, CONFIG_SHELL is bash and it inherits a
++      # broken ls alias from the environment.  This has actually
++      # happened.  Such a system could not be considered "sane".
++      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
++alias in your environment" 1>&2; exit 1; }
++   fi
++
++   test "$2" = conftestfile
++   )
++then
++   # Ok.
++   :
++else
++   { echo "configure: error: newly created file is older than distributed files!
++Check your system clock" 1>&2; exit 1; }
++fi
++rm -f conftest*
++echo "$ac_t""yes" 1>&6
++if test "$program_transform_name" = s,x,x,; then
++  program_transform_name=
++else
++  # Double any \ or $.  echo might interpret backslashes.
++  cat <<\EOF_SED > conftestsed
++s,\\,\\\\,g; s,\$,$$,g
++EOF_SED
++  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
++  rm -f conftestsed
++fi
++test "$program_prefix" != NONE &&
++  program_transform_name="s,^,${program_prefix},; $program_transform_name"
++# Use a double $ so make ignores it.
++test "$program_suffix" != NONE &&
++  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
++
++# sed with no file args requires a program.
++test "$program_transform_name" = "" && program_transform_name="s,x,x,"
++
++echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
++echo "configure:668: checking whether ${MAKE-make} sets \${MAKE}" >&5
++set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  cat > conftestmake <<\EOF
++all:
++	@echo 'ac_maketemp="${MAKE}"'
++EOF
++# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
++eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
++if test -n "$ac_maketemp"; then
++  eval ac_cv_prog_make_${ac_make}_set=yes
++else
++  eval ac_cv_prog_make_${ac_make}_set=no
++fi
++rm -f conftestmake
++fi
++if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
++  echo "$ac_t""yes" 1>&6
++  SET_MAKE=
++else
++  echo "$ac_t""no" 1>&6
++  SET_MAKE="MAKE=${MAKE-make}"
++fi
++
++
++PACKAGE=blip
++
++VERSION=0.1
++
++if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
++  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
++fi
++cat >> confdefs.h <<EOF
++#define PACKAGE "$PACKAGE"
++EOF
++
++cat >> confdefs.h <<EOF
++#define VERSION "$VERSION"
++EOF
++
++
++
++missing_dir=`cd $ac_aux_dir && pwd`
++echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
++echo "configure:714: checking for working aclocal" >&5
++# Run test in a subshell; some versions of sh will print an error if
++# an executable is not found, even if stderr is redirected.
++# Redirect stdin to placate older versions of autoconf.  Sigh.
++if (aclocal --version) < /dev/null > /dev/null 2>&1; then
++   ACLOCAL=aclocal
++   echo "$ac_t""found" 1>&6
++else
++   ACLOCAL="$missing_dir/missing aclocal"
++   echo "$ac_t""missing" 1>&6
++fi
++
++echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
++echo "configure:727: checking for working autoconf" >&5
++# Run test in a subshell; some versions of sh will print an error if
++# an executable is not found, even if stderr is redirected.
++# Redirect stdin to placate older versions of autoconf.  Sigh.
++if (autoconf --version) < /dev/null > /dev/null 2>&1; then
++   AUTOCONF=autoconf
++   echo "$ac_t""found" 1>&6
++else
++   AUTOCONF="$missing_dir/missing autoconf"
++   echo "$ac_t""missing" 1>&6
++fi
++
++echo $ac_n "checking for working automake""... $ac_c" 1>&6
++echo "configure:740: checking for working automake" >&5
++# Run test in a subshell; some versions of sh will print an error if
++# an executable is not found, even if stderr is redirected.
++# Redirect stdin to placate older versions of autoconf.  Sigh.
++if (automake --version) < /dev/null > /dev/null 2>&1; then
++   AUTOMAKE=automake
++   echo "$ac_t""found" 1>&6
++else
++   AUTOMAKE="$missing_dir/missing automake"
++   echo "$ac_t""missing" 1>&6
++fi
++
++echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
++echo "configure:753: checking for working autoheader" >&5
++# Run test in a subshell; some versions of sh will print an error if
++# an executable is not found, even if stderr is redirected.
++# Redirect stdin to placate older versions of autoconf.  Sigh.
++if (autoheader --version) < /dev/null > /dev/null 2>&1; then
++   AUTOHEADER=autoheader
++   echo "$ac_t""found" 1>&6
++else
++   AUTOHEADER="$missing_dir/missing autoheader"
++   echo "$ac_t""missing" 1>&6
++fi
++
++echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
++echo "configure:766: checking for working makeinfo" >&5
++# Run test in a subshell; some versions of sh will print an error if
++# an executable is not found, even if stderr is redirected.
++# Redirect stdin to placate older versions of autoconf.  Sigh.
++if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
++   MAKEINFO=makeinfo
++   echo "$ac_t""found" 1>&6
++else
++   MAKEINFO="$missing_dir/missing makeinfo"
++   echo "$ac_t""missing" 1>&6
++fi
++
++
++
++# Extract the first word of "ranlib", so it can be a program name with args.
++set dummy ranlib; ac_word=$2
++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++echo "configure:783: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test -n "$RANLIB"; then
++  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
++else
++  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
++  ac_dummy="$PATH"
++  for ac_dir in $ac_dummy; do
++    test -z "$ac_dir" && ac_dir=.
++    if test -f $ac_dir/$ac_word; then
++      ac_cv_prog_RANLIB="ranlib"
++      break
++    fi
++  done
++  IFS="$ac_save_ifs"
++  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
++fi
++fi
++RANLIB="$ac_cv_prog_RANLIB"
++if test -n "$RANLIB"; then
++  echo "$ac_t""$RANLIB" 1>&6
++else
++  echo "$ac_t""no" 1>&6
++fi
++
++
++# Check whether --enable-msn or --disable-msn was given.
++if test "${enable_msn+set}" = set; then
++  enableval="$enable_msn"
++  build_msn="$enableval"
++else
++  build_msn="yes"
++fi
++
++
++
++if test "x$build_msn" = xyes; then
++  BUILD_MSN_TRUE=
++  BUILD_MSN_FALSE='#'
++else
++  BUILD_MSN_TRUE='#'
++  BUILD_MSN_FALSE=
++fi
++
++if test "$build_msn" = "yes"; then
++    # Extract the first word of "gcc", so it can be a program name with args.
++set dummy gcc; ac_word=$2
++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++echo "configure:833: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
++  ac_dummy="$PATH"
++  for ac_dir in $ac_dummy; do
++    test -z "$ac_dir" && ac_dir=.
++    if test -f $ac_dir/$ac_word; then
++      ac_cv_prog_CC="gcc"
++      break
++    fi
++  done
++  IFS="$ac_save_ifs"
++fi
++fi
++CC="$ac_cv_prog_CC"
++if test -n "$CC"; then
++  echo "$ac_t""$CC" 1>&6
++else
++  echo "$ac_t""no" 1>&6
++fi
++
++if test -z "$CC"; then
++  # Extract the first word of "cc", so it can be a program name with args.
++set dummy cc; ac_word=$2
++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++echo "configure:863: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
++  ac_prog_rejected=no
++  ac_dummy="$PATH"
++  for ac_dir in $ac_dummy; do
++    test -z "$ac_dir" && ac_dir=.
++    if test -f $ac_dir/$ac_word; then
++      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
++        ac_prog_rejected=yes
++	continue
++      fi
++      ac_cv_prog_CC="cc"
++      break
++    fi
++  done
++  IFS="$ac_save_ifs"
++if test $ac_prog_rejected = yes; then
++  # We found a bogon in the path, so make sure we never use it.
++  set dummy $ac_cv_prog_CC
++  shift
++  if test $# -gt 0; then
++    # We chose a different compiler from the bogus one.
++    # However, it has the same basename, so the bogon will be chosen
++    # first if we set CC to just the basename; use the full file name.
++    shift
++    set dummy "$ac_dir/$ac_word" "$@"
++    shift
++    ac_cv_prog_CC="$@"
++  fi
++fi
++fi
++fi
++CC="$ac_cv_prog_CC"
++if test -n "$CC"; then
++  echo "$ac_t""$CC" 1>&6
++else
++  echo "$ac_t""no" 1>&6
++fi
++
++  if test -z "$CC"; then
++    case "`uname -s`" in
++    *win32* | *WIN32*)
++      # Extract the first word of "cl", so it can be a program name with args.
++set dummy cl; ac_word=$2
++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++echo "configure:914: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
++  ac_dummy="$PATH"
++  for ac_dir in $ac_dummy; do
++    test -z "$ac_dir" && ac_dir=.
++    if test -f $ac_dir/$ac_word; then
++      ac_cv_prog_CC="cl"
++      break
++    fi
++  done
++  IFS="$ac_save_ifs"
++fi
++fi
++CC="$ac_cv_prog_CC"
++if test -n "$CC"; then
++  echo "$ac_t""$CC" 1>&6
++else
++  echo "$ac_t""no" 1>&6
++fi
++ ;;
++    esac
++  fi
++  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
++fi
++
++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
++echo "configure:946: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++
++ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++cat > conftest.$ac_ext << EOF
++
++#line 957 "configure"
++#include "confdefs.h"
++
++main(){return(0);}
++EOF
++if { (eval echo configure:962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  ac_cv_prog_cc_works=yes
++  # If we can't run a trivial program, we are probably using a cross compiler.
++  if (./conftest; exit) 2>/dev/null; then
++    ac_cv_prog_cc_cross=no
++  else
++    ac_cv_prog_cc_cross=yes
++  fi
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  ac_cv_prog_cc_works=no
++fi
++rm -fr conftest*
++ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
++if test $ac_cv_prog_cc_works = no; then
++  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
++fi
++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
++echo "configure:988: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
++echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
++cross_compiling=$ac_cv_prog_cc_cross
++
++echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
++echo "configure:993: checking whether we are using GNU C" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  cat > conftest.c <<EOF
++#ifdef __GNUC__
++  yes;
++#endif
++EOF
++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++  ac_cv_prog_gcc=yes
++else
++  ac_cv_prog_gcc=no
++fi
++fi
++
++echo "$ac_t""$ac_cv_prog_gcc" 1>&6
++
++if test $ac_cv_prog_gcc = yes; then
++  GCC=yes
++else
++  GCC=
++fi
++
++ac_test_CFLAGS="${CFLAGS+set}"
++ac_save_CFLAGS="$CFLAGS"
++CFLAGS=
++echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
++echo "configure:1021: checking whether ${CC-cc} accepts -g" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  echo 'void f(){}' > conftest.c
++if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
++  ac_cv_prog_cc_g=yes
++else
++  ac_cv_prog_cc_g=no
++fi
++rm -f conftest*
++
++fi
++
++echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
++if test "$ac_test_CFLAGS" = set; then
++  CFLAGS="$ac_save_CFLAGS"
++elif test $ac_cv_prog_cc_g = yes; then
++  if test "$GCC" = yes; then
++    CFLAGS="-g -O2"
++  else
++    CFLAGS="-g"
++  fi
++else
++  if test "$GCC" = yes; then
++    CFLAGS="-O2"
++  else
++    CFLAGS=
++  fi
++fi
++
++    for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
++do
++# Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++echo "configure:1057: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test -n "$CXX"; then
++  ac_cv_prog_CXX="$CXX" # Let the user override the test.
++else
++  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
++  ac_dummy="$PATH"
++  for ac_dir in $ac_dummy; do
++    test -z "$ac_dir" && ac_dir=.
++    if test -f $ac_dir/$ac_word; then
++      ac_cv_prog_CXX="$ac_prog"
++      break
++    fi
++  done
++  IFS="$ac_save_ifs"
++fi
++fi
++CXX="$ac_cv_prog_CXX"
++if test -n "$CXX"; then
++  echo "$ac_t""$CXX" 1>&6
++else
++  echo "$ac_t""no" 1>&6
++fi
++
++test -n "$CXX" && break
++done
++test -n "$CXX" || CXX="gcc"
++
++
++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
++echo "configure:1089: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
++
++ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++cat > conftest.$ac_ext << EOF
++
++#line 1100 "configure"
++#include "confdefs.h"
++
++int main(){return(0);}
++EOF
++if { (eval echo configure:1105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  ac_cv_prog_cxx_works=yes
++  # If we can't run a trivial program, we are probably using a cross compiler.
++  if (./conftest; exit) 2>/dev/null; then
++    ac_cv_prog_cxx_cross=no
++  else
++    ac_cv_prog_cxx_cross=yes
++  fi
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  ac_cv_prog_cxx_works=no
++fi
++rm -fr conftest*
++ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
++if test $ac_cv_prog_cxx_works = no; then
++  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
++fi
++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
++echo "configure:1131: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
++echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
++cross_compiling=$ac_cv_prog_cxx_cross
++
++echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
++echo "configure:1136: checking whether we are using GNU C++" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  cat > conftest.C <<EOF
++#ifdef __GNUC__
++  yes;
++#endif
++EOF
++if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++  ac_cv_prog_gxx=yes
++else
++  ac_cv_prog_gxx=no
++fi
++fi
++
++echo "$ac_t""$ac_cv_prog_gxx" 1>&6
++
++if test $ac_cv_prog_gxx = yes; then
++  GXX=yes
++else
++  GXX=
++fi
++
++ac_test_CXXFLAGS="${CXXFLAGS+set}"
++ac_save_CXXFLAGS="$CXXFLAGS"
++CXXFLAGS=
++echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
++echo "configure:1164: checking whether ${CXX-g++} accepts -g" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  echo 'void f(){}' > conftest.cc
++if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
++  ac_cv_prog_cxx_g=yes
++else
++  ac_cv_prog_cxx_g=no
++fi
++rm -f conftest*
++
++fi
++
++echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
++if test "$ac_test_CXXFLAGS" = set; then
++  CXXFLAGS="$ac_save_CXXFLAGS"
++elif test $ac_cv_prog_cxx_g = yes; then
++  if test "$GXX" = yes; then
++    CXXFLAGS="-g -O2"
++  else
++    CXXFLAGS="-g"
++  fi
++else
++  if test "$GXX" = yes; then
++    CXXFLAGS="-O2"
++  else
++    CXXFLAGS=
++  fi
++fi
++
++for ac_declaration in \
++   ''\
++   '#include <stdlib.h>' \
++   'extern "C" void std::exit (int) throw (); using std::exit;' \
++   'extern "C" void std::exit (int); using std::exit;' \
++   'extern "C" void exit (int) throw ();' \
++   'extern "C" void exit (int);' \
++   'void exit (int);'
++do
++  cat > conftest.$ac_ext <<EOF
++#line 1205 "configure"
++#include "confdefs.h"
++#include <stdlib.h>
++$ac_declaration
++int main() {
++exit (42);
++; return 0; }
++EOF
++if { (eval echo configure:1213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++  :
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  continue
++fi
++rm -f conftest*
++  cat > conftest.$ac_ext <<EOF
++#line 1223 "configure"
++#include "confdefs.h"
++$ac_declaration
++int main() {
++exit (42);
++; return 0; }
++EOF
++if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++  rm -rf conftest*
++  break
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++done
++if test -n "$ac_declaration"; then
++  echo '#ifdef __cplusplus' >>confdefs.h
++  echo $ac_declaration      >>confdefs.h
++  echo '#endif'             >>confdefs.h
++fi
++
++
++fi
++
++trap '' 1 2 15
++cat > confcache <<\EOF
++# This file is a shell script that caches the results of configure
++# tests run on this system so they can be shared between configure
++# scripts and configure runs.  It is not useful on other systems.
++# If it contains results you don't want to keep, you may remove or edit it.
++#
++# By default, configure uses ./config.cache as the cache file,
++# creating it if it does not exist already.  You can give configure
++# the --cache-file=FILE option to use a different cache file; that is
++# what configure does when it calls configure scripts in
++# subdirectories, so they share the cache.
++# Giving --cache-file=/dev/null disables caching, for debugging configure.
++# config.status only pays attention to the cache file if you give it the
++# --recheck option to rerun configure.
++#
++EOF
++# The following way of writing the cache mishandles newlines in values,
++# but we know of no workaround that is simple, portable, and efficient.
++# So, don't put newlines in cache variables' values.
++# Ultrix sh set writes to stderr and can't be redirected directly,
++# and sets the high bit in the cache file unless we assign to the vars.
++(set) 2>&1 |
++  case `(ac_space=' '; set | grep ac_space) 2>&1` in
++  *ac_space=\ *)
++    # `set' does not quote correctly, so add quotes (double-quote substitution
++    # turns \\\\ into \\, and sed turns \\ into \).
++    sed -n \
++      -e "s/'/'\\\\''/g" \
++      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
++    ;;
++  *)
++    # `set' quotes correctly as required by POSIX, so do not add quotes.
++    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
++    ;;
++  esac >> confcache
++if cmp -s $cache_file confcache; then
++  :
++else
++  if test -w $cache_file; then
++    echo "updating cache $cache_file"
++    cat confcache > $cache_file
++  else
++    echo "not updating unwritable cache $cache_file"
++  fi
++fi
++rm -f confcache
++
++trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
++
++test "x$prefix" = xNONE && prefix=$ac_default_prefix
++# Let make expand exec_prefix.
++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
++
++# Any assignment to VPATH causes Sun make to only execute
++# the first set of double-colon rules, so remove it if not needed.
++# If there is a colon in the path, we need to keep it.
++if test "x$srcdir" = x.; then
++  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
++fi
++
++trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
++
++# Transform confdefs.h into DEFS.
++# Protect against shell expansion while executing Makefile rules.
++# Protect against Makefile macro expansion.
++cat > conftest.defs <<\EOF
++s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
++s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
++s%\[%\\&%g
++s%\]%\\&%g
++s%\$%$$%g
++EOF
++DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
++rm -f conftest.defs
++
++
++# Without the "./", some shells look in PATH for config.status.
++: ${CONFIG_STATUS=./config.status}
++
++echo creating $CONFIG_STATUS
++rm -f $CONFIG_STATUS
++cat > $CONFIG_STATUS <<EOF
++#! /bin/sh
++# Generated automatically by configure.
++# Run this file to recreate the current configuration.
++# This directory was configured as follows,
++# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
++#
++# $0 $ac_configure_args
++#
++# Compiler output produced by configure, useful for debugging
++# configure, is in ./config.log if it exists.
++
++ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
++for ac_option
++do
++  case "\$ac_option" in
++  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
++    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
++  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
++    echo "$CONFIG_STATUS generated by autoconf version 2.13"
++    exit 0 ;;
++  -help | --help | --hel | --he | --h)
++    echo "\$ac_cs_usage"; exit 0 ;;
++  *) echo "\$ac_cs_usage"; exit 1 ;;
++  esac
++done
++
++ac_given_srcdir=$srcdir
++ac_given_INSTALL="$INSTALL"
++
++trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
++EOF
++cat >> $CONFIG_STATUS <<EOF
++
++# Protect against being on the right side of a sed subst in config.status.
++sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
++ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
++$ac_vpsub
++$extrasub
++s%@SHELL@%$SHELL%g
++s%@CFLAGS@%$CFLAGS%g
++s%@CPPFLAGS@%$CPPFLAGS%g
++s%@CXXFLAGS@%$CXXFLAGS%g
++s%@FFLAGS@%$FFLAGS%g
++s%@DEFS@%$DEFS%g
++s%@LDFLAGS@%$LDFLAGS%g
++s%@LIBS@%$LIBS%g
++s%@exec_prefix@%$exec_prefix%g
++s%@prefix@%$prefix%g
++s%@program_transform_name@%$program_transform_name%g
++s%@bindir@%$bindir%g
++s%@sbindir@%$sbindir%g
++s%@libexecdir@%$libexecdir%g
++s%@datadir@%$datadir%g
++s%@sysconfdir@%$sysconfdir%g
++s%@sharedstatedir@%$sharedstatedir%g
++s%@localstatedir@%$localstatedir%g
++s%@libdir@%$libdir%g
++s%@includedir@%$includedir%g
++s%@oldincludedir@%$oldincludedir%g
++s%@infodir@%$infodir%g
++s%@mandir@%$mandir%g
++s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
++s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
++s%@INSTALL_DATA@%$INSTALL_DATA%g
++s%@PACKAGE@%$PACKAGE%g
++s%@VERSION@%$VERSION%g
++s%@ACLOCAL@%$ACLOCAL%g
++s%@AUTOCONF@%$AUTOCONF%g
++s%@AUTOMAKE@%$AUTOMAKE%g
++s%@AUTOHEADER@%$AUTOHEADER%g
++s%@MAKEINFO@%$MAKEINFO%g
++s%@SET_MAKE@%$SET_MAKE%g
++s%@RANLIB@%$RANLIB%g
++s%@BUILD_MSN_TRUE@%$BUILD_MSN_TRUE%g
++s%@BUILD_MSN_FALSE@%$BUILD_MSN_FALSE%g
++s%@CC@%$CC%g
++s%@CXX@%$CXX%g
++
++CEOF
++EOF
++
++cat >> $CONFIG_STATUS <<\EOF
++
++# Split the substitutions into bite-sized pieces for seds with
++# small command number limits, like on Digital OSF/1 and HP-UX.
++ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
++ac_file=1 # Number of current file.
++ac_beg=1 # First line for current file.
++ac_end=$ac_max_sed_cmds # Line after last line for current file.
++ac_more_lines=:
++ac_sed_cmds=""
++while $ac_more_lines; do
++  if test $ac_beg -gt 1; then
++    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
++  else
++    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
++  fi
++  if test ! -s conftest.s$ac_file; then
++    ac_more_lines=false
++    rm -f conftest.s$ac_file
++  else
++    if test -z "$ac_sed_cmds"; then
++      ac_sed_cmds="sed -f conftest.s$ac_file"
++    else
++      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
++    fi
++    ac_file=`expr $ac_file + 1`
++    ac_beg=$ac_end
++    ac_end=`expr $ac_end + $ac_max_sed_cmds`
++  fi
++done
++if test -z "$ac_sed_cmds"; then
++  ac_sed_cmds=cat
++fi
++EOF
++
++cat >> $CONFIG_STATUS <<EOF
++
++CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
++EOF
++cat >> $CONFIG_STATUS <<\EOF
++for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
++  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
++  case "$ac_file" in
++  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
++       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
++  *) ac_file_in="${ac_file}.in" ;;
++  esac
++
++  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
++
++  # Remove last slash and all that follows it.  Not all systems have dirname.
++  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
++  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
++    # The file is in a subdirectory.
++    test ! -d "$ac_dir" && mkdir "$ac_dir"
++    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
++    # A "../" for each directory in $ac_dir_suffix.
++    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
++  else
++    ac_dir_suffix= ac_dots=
++  fi
++
++  case "$ac_given_srcdir" in
++  .)  srcdir=.
++      if test -z "$ac_dots"; then top_srcdir=.
++      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
++  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
++  *) # Relative path.
++    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
++    top_srcdir="$ac_dots$ac_given_srcdir" ;;
++  esac
++
++  case "$ac_given_INSTALL" in
++  [/$]*) INSTALL="$ac_given_INSTALL" ;;
++  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
++  esac
++
++  echo creating "$ac_file"
++  rm -f "$ac_file"
++  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
++  case "$ac_file" in
++  *Makefile*) ac_comsub="1i\\
++# $configure_input" ;;
++  *) ac_comsub= ;;
++  esac
++
++  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
++  sed -e "$ac_comsub
++s%@configure_input@%$configure_input%g
++s%@srcdir@%$srcdir%g
++s%@top_srcdir@%$top_srcdir%g
++s%@INSTALL@%$INSTALL%g
++" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
++fi; done
++rm -f conftest.s*
++
++EOF
++cat >> $CONFIG_STATUS <<EOF
++
++EOF
++cat >> $CONFIG_STATUS <<\EOF
++
++exit 0
++EOF
++chmod +x $CONFIG_STATUS
++rm -fr confdefs* $ac_clean_files
++test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
++
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/configure.in centericq-4.9.10-modif/blip-0.1/configure.in
+--- centericq-4.9.10/blip-0.1/configure.in	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/configure.in	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,14 @@
++AC_INIT(aclocal.m4)
++AM_INIT_AUTOMAKE(blip, 0.1)
++
++AC_PROG_RANLIB
++
++AC_ARG_ENABLE(msn, [  --disable-msn   Build without MSN], build_msn="$enableval", build_msn="yes")
++AM_CONDITIONAL(BUILD_MSN, test "x$build_msn" = xyes)
++
++if test "$build_msn" = "yes"; then
++    AC_PROG_CC
++    AC_PROG_CXX
++fi
++
++AC_OUTPUT(Makefile)
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/depcomp centericq-4.9.10-modif/blip-0.1/depcomp
+--- centericq-4.9.10/blip-0.1/depcomp	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/depcomp	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,411 @@
++#! /bin/sh
++
++# depcomp - compile a program generating dependencies as side-effects
++# Copyright 1999, 2000 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++# As a special exception to the GNU General Public License, if you
++# distribute this file as part of a program that contains a
++# configuration script generated by Autoconf, you may include it under
++# the same distribution terms that you use for the rest of that program.
++
++# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
++
++if test -z "$depmode" || test -z "$source" || test -z "$object"; then
++  echo "depcomp: Variables source, object and depmode must be set" 1>&2
++  exit 1
++fi
++# `libtool' can also be set to `yes' or `no'.
++
++depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
++tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
++
++rm -f "$tmpdepfile"
++
++# Some modes work just like other modes, but use different flags.  We
++# parameterize here, but still list the modes in the big case below,
++# to make depend.m4 easier to write.  Note that we *cannot* use a case
++# here, because this file can only contain one case statement.
++if test "$depmode" = hp; then
++  # HP compiler uses -M and no extra arg.
++  gccflag=-M
++  depmode=gcc
++fi
++
++if test "$depmode" = dashXmstdout; then
++   # This is just like dashmstdout with a different argument.
++   dashmflag=-xM
++   depmode=dashmstdout
++fi
++
++case "$depmode" in
++gcc3)
++## gcc 3 implements dependency tracking that does exactly what
++## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
++## it if -MD -MP comes after the -MF stuff.  Hmm.
++  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
++  stat=$?
++  if test $stat -eq 0; then :
++  else
++    rm -f "$tmpdepfile"
++    exit $stat
++  fi
++  mv "$tmpdepfile" "$depfile"
++  ;;
++
++gcc)
++## There are various ways to get dependency output from gcc.  Here's
++## why we pick this rather obscure method:
++## - Don't want to use -MD because we'd like the dependencies to end
++##   up in a subdir.  Having to rename by hand is ugly.
++##   (We might end up doing this anyway to support other compilers.)
++## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
++##   -MM, not -M (despite what the docs say).
++## - Using -M directly means running the compiler twice (even worse
++##   than renaming).
++  if test -z "$gccflag"; then
++    gccflag=-MD,
++  fi
++  "$@" -Wp,"$gccflag$tmpdepfile"
++  stat=$?
++  if test $stat -eq 0; then :
++  else
++    rm -f "$tmpdepfile"
++    exit $stat
++  fi
++  rm -f "$depfile"
++  echo "$object : \\" > "$depfile"
++  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
++## The second -e expression handles DOS-style file names with drive letters.
++  sed -e 's/^[^:]*: / /' \
++      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
++## This next piece of magic avoids the `deleted header file' problem.
++## The problem is that when a header file which appears in a .P file
++## is deleted, the dependency causes make to die (because there is
++## typically no way to rebuild the header).  We avoid this by adding
++## dummy dependencies for each header file.  Too bad gcc doesn't do
++## this for us directly.
++  tr ' ' '
++' < "$tmpdepfile" |
++## Some versions of gcc put a space before the `:'.  On the theory
++## that the space means something, we add a space to the output as
++## well.
++## Some versions of the HPUX 10.20 sed can't process this invocation
++## correctly.  Breaking it into two sed invocations is a workaround.
++    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
++  rm -f "$tmpdepfile"
++  ;;
++
++hp)
++  # This case exists only to let depend.m4 do its work.  It works by
++  # looking at the text of this script.  This case will never be run,
++  # since it is checked for above.
++  exit 1
++  ;;
++
++sgi)
++  if test "$libtool" = yes; then
++    "$@" "-Wp,-MDupdate,$tmpdepfile"
++  else
++    "$@" -MDupdate "$tmpdepfile"
++  fi
++  stat=$?
++  if test $stat -eq 0; then :
++  else
++    rm -f "$tmpdepfile"
++    exit $stat
++  fi
++  rm -f "$depfile"
++
++  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
++    echo "$object : \\" > "$depfile"
++
++    # Clip off the initial element (the dependent).  Don't try to be
++    # clever and replace this with sed code, as IRIX sed won't handle
++    # lines with more than a fixed number of characters (4096 in
++    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
++    # the IRIX cc adds comments like `#:fec' to the end of the
++    # dependency line.
++    tr ' ' '
++' < "$tmpdepfile" \
++    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
++    tr '
++' ' ' >> $depfile
++    echo >> $depfile
++
++    # The second pass generates a dummy entry for each header file.
++    tr ' ' '
++' < "$tmpdepfile" \
++   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
++   >> $depfile
++  else
++    # The sourcefile does not contain any dependencies, so just
++    # store a dummy comment line, to avoid errors with the Makefile
++    # "include basename.Plo" scheme.
++    echo "#dummy" > "$depfile"
++  fi
++  rm -f "$tmpdepfile"
++  ;;
++
++aix)
++  # The C for AIX Compiler uses -M and outputs the dependencies
++  # in a .u file.  This file always lives in the current directory.
++  # Also, the AIX compiler puts `$object:' at the start of each line;
++  # $object doesn't have directory information.
++  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
++  tmpdepfile="$stripped.u"
++  outname="$stripped.o"
++  if test "$libtool" = yes; then
++    "$@" -Wc,-M
++  else
++    "$@" -M
++  fi
++
++  stat=$?
++  if test $stat -eq 0; then :
++  else
++    rm -f "$tmpdepfile"
++    exit $stat
++  fi
++
++  if test -f "$tmpdepfile"; then
++    # Each line is of the form `foo.o: dependent.h'.
++    # Do two passes, one to just change these to
++    # `$object: dependent.h' and one to simply `dependent.h:'.
++    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
++    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
++  else
++    # The sourcefile does not contain any dependencies, so just
++    # store a dummy comment line, to avoid errors with the Makefile
++    # "include basename.Plo" scheme.
++    echo "#dummy" > "$depfile"
++  fi
++  rm -f "$tmpdepfile"
++  ;;
++
++tru64)
++   # The Tru64 AIX compiler uses -MD to generate dependencies as a side
++   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
++   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 
++   # dependencies in `foo.d' instead, so we check for that too.
++   # Subdirectories are respected.
++
++   tmpdepfile1="$object.d"
++   tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` 
++   if test "$libtool" = yes; then
++      "$@" -Wc,-MD
++   else
++      "$@" -MD
++   fi
++
++   stat=$?
++   if test $stat -eq 0; then :
++   else
++      rm -f "$tmpdepfile1" "$tmpdepfile2"
++      exit $stat
++   fi
++
++   if test -f "$tmpdepfile1"; then
++      tmpdepfile="$tmpdepfile1"
++   else
++      tmpdepfile="$tmpdepfile2"
++   fi
++   if test -f "$tmpdepfile"; then
++      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
++      # That's a space and a tab in the [].
++      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
++   else
++      echo "#dummy" > "$depfile"
++   fi
++   rm -f "$tmpdepfile"
++   ;;
++
++#nosideeffect)
++  # This comment above is used by automake to tell side-effect
++  # dependency tracking mechanisms from slower ones.
++
++dashmstdout)
++  # Important note: in order to support this mode, a compiler *must*
++  # always write the proprocessed file to stdout, regardless of -o,
++  # because we must use -o when running libtool.
++  test -z "$dashmflag" && dashmflag=-M
++  ( IFS=" "
++    case " $* " in
++    *" --mode=compile "*) # this is libtool, let us make it quiet
++      for arg
++      do # cycle over the arguments
++        case "$arg" in
++	"--mode=compile")
++	  # insert --quiet before "--mode=compile"
++	  set fnord "$@" --quiet
++	  shift # fnord
++	  ;;
++	esac
++	set fnord "$@" "$arg"
++	shift # fnord
++	shift # "$arg"
++      done
++      ;;
++    esac
++    "$@" $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
++  ) &
++  proc=$!
++  "$@"
++  stat=$?
++  wait "$proc"
++  if test "$stat" != 0; then exit $stat; fi
++  rm -f "$depfile"
++  cat < "$tmpdepfile" > "$depfile"
++  tr ' ' '
++' < "$tmpdepfile" | \
++## Some versions of the HPUX 10.20 sed can't process this invocation
++## correctly.  Breaking it into two sed invocations is a workaround.
++    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
++  rm -f "$tmpdepfile"
++  ;;
++
++dashXmstdout)
++  # This case only exists to satisfy depend.m4.  It is never actually
++  # run, as this mode is specially recognized in the preamble.
++  exit 1
++  ;;
++
++makedepend)
++  # X makedepend
++  (
++    shift
++    cleared=no
++    for arg in "$@"; do
++      case $cleared in no)
++        set ""; shift
++	cleared=yes
++      esac
++      case "$arg" in
++        -D*|-I*)
++	  set fnord "$@" "$arg"; shift;;
++	-*)
++	  ;;
++	*)
++	  set fnord "$@" "$arg"; shift;;
++      esac
++    done
++    obj_suffix="`echo $object | sed 's/^.*\././'`"
++    touch "$tmpdepfile"
++    ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
++  ) &
++  proc=$!
++  "$@"
++  stat=$?
++  wait "$proc"
++  if test "$stat" != 0; then exit $stat; fi
++  rm -f "$depfile"
++  cat < "$tmpdepfile" > "$depfile"
++  tail +3 "$tmpdepfile" | tr ' ' '
++' | \
++## Some versions of the HPUX 10.20 sed can't process this invocation
++## correctly.  Breaking it into two sed invocations is a workaround.
++    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
++  rm -f "$tmpdepfile" "$tmpdepfile".bak
++  ;;
++
++cpp)
++  # Important note: in order to support this mode, a compiler *must*
++  # always write the proprocessed file to stdout, regardless of -o,
++  # because we must use -o when running libtool.
++  ( IFS=" "
++    case " $* " in
++    *" --mode=compile "*)
++      for arg
++      do # cycle over the arguments
++        case $arg in
++	"--mode=compile")
++	  # insert --quiet before "--mode=compile"
++	  set fnord "$@" --quiet
++	  shift # fnord
++	  ;;
++	esac
++	set fnord "$@" "$arg"
++	shift # fnord
++	shift # "$arg"
++      done
++      ;;
++    esac
++    "$@" -E |
++    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
++    sed '$ s: \\$::' > "$tmpdepfile"
++  ) &
++  proc=$!
++  "$@"
++  stat=$?
++  wait "$proc"
++  if test "$stat" != 0; then exit $stat; fi
++  rm -f "$depfile"
++  echo "$object : \\" > "$depfile"
++  cat < "$tmpdepfile" >> "$depfile"
++  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
++  rm -f "$tmpdepfile"
++  ;;
++
++msvisualcpp)
++  # Important note: in order to support this mode, a compiler *must*
++  # always write the proprocessed file to stdout, regardless of -o,
++  # because we must use -o when running libtool.
++  ( IFS=" "
++    case " $* " in
++    *" --mode=compile "*)
++      for arg
++      do # cycle over the arguments
++        case $arg in
++	"--mode=compile")
++	  # insert --quiet before "--mode=compile"
++	  set fnord "$@" --quiet
++	  shift # fnord
++	  ;;
++	esac
++	set fnord "$@" "$arg"
++	shift # fnord
++	shift # "$arg"
++      done
++      ;;
++    esac
++    "$@" -E |
++    sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
++  ) &
++  proc=$!
++  "$@"
++  stat=$?
++  wait "$proc"
++  if test "$stat" != 0; then exit $stat; fi
++  rm -f "$depfile"
++  echo "$object : \\" > "$depfile"
++  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
++  echo "	" >> "$depfile"
++  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
++  rm -f "$tmpdepfile"
++  ;;
++
++none)
++  exec "$@"
++  ;;
++
++*)
++  echo "Unknown depmode $depmode" 1>&2
++  exit 1
++  ;;
++esac
++
++exit 0
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/install-sh centericq-4.9.10-modif/blip-0.1/install-sh
+--- centericq-4.9.10/blip-0.1/install-sh	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/install-sh	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,251 @@
++#!/bin/sh
++#
++# install - install a program, script, or datafile
++# This comes from X11R5 (mit/util/scripts/install.sh).
++#
++# Copyright 1991 by the Massachusetts Institute of Technology
++#
++# Permission to use, copy, modify, distribute, and sell this software and its
++# documentation for any purpose is hereby granted without fee, provided that
++# the above copyright notice appear in all copies and that both that
++# copyright notice and this permission notice appear in supporting
++# documentation, and that the name of M.I.T. not be used in advertising or
++# publicity pertaining to distribution of the software without specific,
++# written prior permission.  M.I.T. makes no representations about the
++# suitability of this software for any purpose.  It is provided "as is"
++# without express or implied warranty.
++#
++# Calling this script install-sh is preferred over install.sh, to prevent
++# `make' implicit rules from creating a file called install from it
++# when there is no Makefile.
++#
++# This script is compatible with the BSD install script, but was written
++# from scratch.  It can only install one file at a time, a restriction
++# shared with many OS's install programs.
++
++
++# set DOITPROG to echo to test this script
++
++# Don't use :- since 4.3BSD and earlier shells don't like it.
++doit="${DOITPROG-}"
++
++
++# put in absolute paths if you don't have them in your path; or use env. vars.
++
++mvprog="${MVPROG-mv}"
++cpprog="${CPPROG-cp}"
++chmodprog="${CHMODPROG-chmod}"
++chownprog="${CHOWNPROG-chown}"
++chgrpprog="${CHGRPPROG-chgrp}"
++stripprog="${STRIPPROG-strip}"
++rmprog="${RMPROG-rm}"
++mkdirprog="${MKDIRPROG-mkdir}"
++
++transformbasename=""
++transform_arg=""
++instcmd="$mvprog"
++chmodcmd="$chmodprog 0755"
++chowncmd=""
++chgrpcmd=""
++stripcmd=""
++rmcmd="$rmprog -f"
++mvcmd="$mvprog"
++src=""
++dst=""
++dir_arg=""
++
++while [ x"$1" != x ]; do
++    case $1 in
++	-c) instcmd="$cpprog"
++	    shift
++	    continue;;
++
++	-d) dir_arg=true
++	    shift
++	    continue;;
++
++	-m) chmodcmd="$chmodprog $2"
++	    shift
++	    shift
++	    continue;;
++
++	-o) chowncmd="$chownprog $2"
++	    shift
++	    shift
++	    continue;;
++
++	-g) chgrpcmd="$chgrpprog $2"
++	    shift
++	    shift
++	    continue;;
++
++	-s) stripcmd="$stripprog"
++	    shift
++	    continue;;
++
++	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
++	    shift
++	    continue;;
++
++	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
++	    shift
++	    continue;;
++
++	*)  if [ x"$src" = x ]
++	    then
++		src=$1
++	    else
++		# this colon is to work around a 386BSD /bin/sh bug
++		:
++		dst=$1
++	    fi
++	    shift
++	    continue;;
++    esac
++done
++
++if [ x"$src" = x ]
++then
++	echo "install:	no input file specified"
++	exit 1
++else
++	true
++fi
++
++if [ x"$dir_arg" != x ]; then
++	dst=$src
++	src=""
++	
++	if [ -d $dst ]; then
++		instcmd=:
++		chmodcmd=""
++	else
++		instcmd=mkdir
++	fi
++else
++
++# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
++# might cause directories to be created, which would be especially bad 
++# if $src (and thus $dsttmp) contains '*'.
++
++	if [ -f $src -o -d $src ]
++	then
++		true
++	else
++		echo "install:  $src does not exist"
++		exit 1
++	fi
++	
++	if [ x"$dst" = x ]
++	then
++		echo "install:	no destination specified"
++		exit 1
++	else
++		true
++	fi
++
++# If destination is a directory, append the input filename; if your system
++# does not like double slashes in filenames, you may need to add some logic
++
++	if [ -d $dst ]
++	then
++		dst="$dst"/`basename $src`
++	else
++		true
++	fi
++fi
++
++## this sed command emulates the dirname command
++dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
++
++# Make sure that the destination directory exists.
++#  this part is taken from Noah Friedman's mkinstalldirs script
++
++# Skip lots of stat calls in the usual case.
++if [ ! -d "$dstdir" ]; then
++defaultIFS='	
++'
++IFS="${IFS-${defaultIFS}}"
++
++oIFS="${IFS}"
++# Some sh's can't handle IFS=/ for some reason.
++IFS='%'
++set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
++IFS="${oIFS}"
++
++pathcomp=''
++
++while [ $# -ne 0 ] ; do
++	pathcomp="${pathcomp}${1}"
++	shift
++
++	if [ ! -d "${pathcomp}" ] ;
++        then
++		$mkdirprog "${pathcomp}"
++	else
++		true
++	fi
++
++	pathcomp="${pathcomp}/"
++done
++fi
++
++if [ x"$dir_arg" != x ]
++then
++	$doit $instcmd $dst &&
++
++	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
++	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
++	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
++	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
++else
++
++# If we're going to rename the final executable, determine the name now.
++
++	if [ x"$transformarg" = x ] 
++	then
++		dstfile=`basename $dst`
++	else
++		dstfile=`basename $dst $transformbasename | 
++			sed $transformarg`$transformbasename
++	fi
++
++# don't allow the sed command to completely eliminate the filename
++
++	if [ x"$dstfile" = x ] 
++	then
++		dstfile=`basename $dst`
++	else
++		true
++	fi
++
++# Make a temp file name in the proper directory.
++
++	dsttmp=$dstdir/#inst.$$#
++
++# Move or copy the file name to the temp name
++
++	$doit $instcmd $src $dsttmp &&
++
++	trap "rm -f ${dsttmp}" 0 &&
++
++# and set any options; do chmod last to preserve setuid bits
++
++# If any of these fail, we abort the whole thing.  If we want to
++# ignore errors from any of these, just make sure not to ignore
++# errors from the above "$doit $instcmd $src $dsttmp" command.
++
++	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
++	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
++	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
++	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
++
++# Now rename the file to the real destination.
++
++	$doit $rmcmd -f $dstdir/$dstfile &&
++	$doit $mvcmd $dsttmp $dstdir/$dstfile 
++
++fi &&
++
++
++exit 0
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/md5.c centericq-4.9.10-modif/blip-0.1/md5.c
+--- centericq-4.9.10/blip-0.1/md5.c	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/md5.c	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,392 @@
++/*
++  Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
++
++  This software is provided 'as-is', without any express or implied
++  warranty.  In no event will the authors be held liable for any damages
++  arising from the use of this software.
++
++  Permission is granted to anyone to use this software for any purpose,
++  including commercial applications, and to alter it and redistribute it
++  freely, subject to the following restrictions:
++
++  1. The origin of this software must not be misrepresented; you must not
++     claim that you wrote the original software. If you use this software
++     in a product, an acknowledgment in the product documentation would be
++     appreciated but is not required.
++  2. Altered source versions must be plainly marked as such, and must not be
++     misrepresented as being the original software.
++  3. This notice may not be removed or altered from any source distribution.
++
++  L. Peter Deutsch
++  ghost@aladdin.com
++
++ */
++/*$Id: md5.c,v 1.1.1.1 2002/12/09 08:48:19 konst Exp $ */
++/*
++  Independent implementation of MD5 (RFC 1321).
++
++  This code implements the MD5 Algorithm defined in RFC 1321.
++  It is derived directly from the text of the RFC and not from the
++  reference implementation.
++
++  The original and principal author of md5.c is L. Peter Deutsch
++  <ghost@aladdin.com>.  Other authors are noted in the change history
++  that follows (in reverse chronological order):
++
++  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
++  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
++  1999-05-03 lpd Original version.
++ */
++
++#include "md5.h"
++
++#ifdef TEST
++/*
++ * Compile with -DTEST to create a self-contained executable test program.
++ * The test program should print out the same values as given in section
++ * A.5 of RFC 1321, reproduced below.
++ */
++#include <string.h>
++main()
++{
++    static const char *const test[7] = {
++	"", /*d41d8cd98f00b204e9800998ecf8427e*/
++	"945399884.61923487334tuvga", /*0cc175b9c0f1b6a831c399e269772661*/
++	"abc", /*900150983cd24fb0d6963f7d28e17f72*/
++	"message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/
++	"abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/
++	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
++				/*d174ab98d277d9f5a5611c2c9f419d9f*/
++	"12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/
++    };
++    int i;
++
++    for (i = 0; i < 7; ++i) {
++	md5_state_t state;
++	md5_byte_t digest[16];
++	int di;
++
++	md5_init(&state);
++	md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i]));
++	md5_finish(&state, digest);
++	printf("MD5 (\"%s\") = ", test[i]);
++	for (di = 0; di < 16; ++di)
++	    printf("%02x", digest[di]);
++	printf("\n");
++    }
++    return 0;
++}
++#endif /* TEST */
++
++
++/*
++ * For reference, here is the program that computed the T values.
++ */
++#if 0
++#include <math.h>
++main()
++{
++    int i;
++    for (i = 1; i <= 64; ++i) {
++	unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i)));
++	printf("#define T%d 0x%08lx\n", i, v);
++    }
++    return 0;
++}
++#endif
++/*
++ * End of T computation program.
++ */
++#define T1 0xd76aa478
++#define T2 0xe8c7b756
++#define T3 0x242070db
++#define T4 0xc1bdceee
++#define T5 0xf57c0faf
++#define T6 0x4787c62a
++#define T7 0xa8304613
++#define T8 0xfd469501
++#define T9 0x698098d8
++#define T10 0x8b44f7af
++#define T11 0xffff5bb1
++#define T12 0x895cd7be
++#define T13 0x6b901122
++#define T14 0xfd987193
++#define T15 0xa679438e
++#define T16 0x49b40821
++#define T17 0xf61e2562
++#define T18 0xc040b340
++#define T19 0x265e5a51
++#define T20 0xe9b6c7aa
++#define T21 0xd62f105d
++#define T22 0x02441453
++#define T23 0xd8a1e681
++#define T24 0xe7d3fbc8
++#define T25 0x21e1cde6
++#define T26 0xc33707d6
++#define T27 0xf4d50d87
++#define T28 0x455a14ed
++#define T29 0xa9e3e905
++#define T30 0xfcefa3f8
++#define T31 0x676f02d9
++#define T32 0x8d2a4c8a
++#define T33 0xfffa3942
++#define T34 0x8771f681
++#define T35 0x6d9d6122
++#define T36 0xfde5380c
++#define T37 0xa4beea44
++#define T38 0x4bdecfa9
++#define T39 0xf6bb4b60
++#define T40 0xbebfbc70
++#define T41 0x289b7ec6
++#define T42 0xeaa127fa
++#define T43 0xd4ef3085
++#define T44 0x04881d05
++#define T45 0xd9d4d039
++#define T46 0xe6db99e5
++#define T47 0x1fa27cf8
++#define T48 0xc4ac5665
++#define T49 0xf4292244
++#define T50 0x432aff97
++#define T51 0xab9423a7
++#define T52 0xfc93a039
++#define T53 0x655b59c3
++#define T54 0x8f0ccc92
++#define T55 0xffeff47d
++#define T56 0x85845dd1
++#define T57 0x6fa87e4f
++#define T58 0xfe2ce6e0
++#define T59 0xa3014314
++#define T60 0x4e0811a1
++#define T61 0xf7537e82
++#define T62 0xbd3af235
++#define T63 0x2ad7d2bb
++#define T64 0xeb86d391
++
++static void
++md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
++{
++    md5_word_t
++	a = pms->abcd[0], b = pms->abcd[1],
++	c = pms->abcd[2], d = pms->abcd[3];
++    md5_word_t t;
++
++#ifndef ARCH_IS_BIG_ENDIAN
++# define ARCH_IS_BIG_ENDIAN 1	/* slower, default implementation */
++#endif
++#if ARCH_IS_BIG_ENDIAN
++
++    /*
++     * On big-endian machines, we must arrange the bytes in the right
++     * order.  (This also works on machines of unknown byte order.)
++     */
++    md5_word_t X[16];
++    const md5_byte_t *xp = data;
++    int i;
++
++    for (i = 0; i < 16; ++i, xp += 4)
++	X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
++
++#else  /* !ARCH_IS_BIG_ENDIAN */
++
++    /*
++     * On little-endian machines, we can process properly aligned data
++     * without copying it.
++     */
++    md5_word_t xbuf[16];
++    const md5_word_t *X;
++
++    if (!((data - (const md5_byte_t *)0) & 3)) {
++	/* data are properly aligned */
++	X = (const md5_word_t *)data;
++    } else {
++	/* not aligned */
++	memcpy(xbuf, data, 64);
++	X = xbuf;
++    }
++#endif
++
++#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
++
++    /* Round 1. */
++    /* Let [abcd k s i] denote the operation
++       a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
++#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
++#define SET(a, b, c, d, k, s, Ti)\
++  t = a + F(b,c,d) + X[k] + Ti;\
++  a = ROTATE_LEFT(t, s) + b
++    /* Do the following 16 operations. */
++    SET(a, b, c, d,  0,  7,  T1);
++    SET(d, a, b, c,  1, 12,  T2);
++    SET(c, d, a, b,  2, 17,  T3);
++    SET(b, c, d, a,  3, 22,  T4);
++    SET(a, b, c, d,  4,  7,  T5);
++    SET(d, a, b, c,  5, 12,  T6);
++    SET(c, d, a, b,  6, 17,  T7);
++    SET(b, c, d, a,  7, 22,  T8);
++    SET(a, b, c, d,  8,  7,  T9);
++    SET(d, a, b, c,  9, 12, T10);
++    SET(c, d, a, b, 10, 17, T11);
++    SET(b, c, d, a, 11, 22, T12);
++    SET(a, b, c, d, 12,  7, T13);
++    SET(d, a, b, c, 13, 12, T14);
++    SET(c, d, a, b, 14, 17, T15);
++    SET(b, c, d, a, 15, 22, T16);
++#undef SET
++
++     /* Round 2. */
++     /* Let [abcd k s i] denote the operation
++          a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
++#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
++#define SET(a, b, c, d, k, s, Ti)\
++  t = a + G(b,c,d) + X[k] + Ti;\
++  a = ROTATE_LEFT(t, s) + b
++     /* Do the following 16 operations. */
++    SET(a, b, c, d,  1,  5, T17);
++    SET(d, a, b, c,  6,  9, T18);
++    SET(c, d, a, b, 11, 14, T19);
++    SET(b, c, d, a,  0, 20, T20);
++    SET(a, b, c, d,  5,  5, T21);
++    SET(d, a, b, c, 10,  9, T22);
++    SET(c, d, a, b, 15, 14, T23);
++    SET(b, c, d, a,  4, 20, T24);
++    SET(a, b, c, d,  9,  5, T25);
++    SET(d, a, b, c, 14,  9, T26);
++    SET(c, d, a, b,  3, 14, T27);
++    SET(b, c, d, a,  8, 20, T28);
++    SET(a, b, c, d, 13,  5, T29);
++    SET(d, a, b, c,  2,  9, T30);
++    SET(c, d, a, b,  7, 14, T31);
++    SET(b, c, d, a, 12, 20, T32);
++#undef SET
++
++     /* Round 3. */
++     /* Let [abcd k s t] denote the operation
++          a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
++#define H(x, y, z) ((x) ^ (y) ^ (z))
++#define SET(a, b, c, d, k, s, Ti)\
++  t = a + H(b,c,d) + X[k] + Ti;\
++  a = ROTATE_LEFT(t, s) + b
++     /* Do the following 16 operations. */
++    SET(a, b, c, d,  5,  4, T33);
++    SET(d, a, b, c,  8, 11, T34);
++    SET(c, d, a, b, 11, 16, T35);
++    SET(b, c, d, a, 14, 23, T36);
++    SET(a, b, c, d,  1,  4, T37);
++    SET(d, a, b, c,  4, 11, T38);
++    SET(c, d, a, b,  7, 16, T39);
++    SET(b, c, d, a, 10, 23, T40);
++    SET(a, b, c, d, 13,  4, T41);
++    SET(d, a, b, c,  0, 11, T42);
++    SET(c, d, a, b,  3, 16, T43);
++    SET(b, c, d, a,  6, 23, T44);
++    SET(a, b, c, d,  9,  4, T45);
++    SET(d, a, b, c, 12, 11, T46);
++    SET(c, d, a, b, 15, 16, T47);
++    SET(b, c, d, a,  2, 23, T48);
++#undef SET
++
++     /* Round 4. */
++     /* Let [abcd k s t] denote the operation
++          a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
++#define I(x, y, z) ((y) ^ ((x) | ~(z)))
++#define SET(a, b, c, d, k, s, Ti)\
++  t = a + I(b,c,d) + X[k] + Ti;\
++  a = ROTATE_LEFT(t, s) + b
++     /* Do the following 16 operations. */
++    SET(a, b, c, d,  0,  6, T49);
++    SET(d, a, b, c,  7, 10, T50);
++    SET(c, d, a, b, 14, 15, T51);
++    SET(b, c, d, a,  5, 21, T52);
++    SET(a, b, c, d, 12,  6, T53);
++    SET(d, a, b, c,  3, 10, T54);
++    SET(c, d, a, b, 10, 15, T55);
++    SET(b, c, d, a,  1, 21, T56);
++    SET(a, b, c, d,  8,  6, T57);
++    SET(d, a, b, c, 15, 10, T58);
++    SET(c, d, a, b,  6, 15, T59);
++    SET(b, c, d, a, 13, 21, T60);
++    SET(a, b, c, d,  4,  6, T61);
++    SET(d, a, b, c, 11, 10, T62);
++    SET(c, d, a, b,  2, 15, T63);
++    SET(b, c, d, a,  9, 21, T64);
++#undef SET
++
++     /* Then perform the following additions. (That is increment each
++        of the four registers by the value it had before this block
++        was started.) */
++    pms->abcd[0] += a;
++    pms->abcd[1] += b;
++    pms->abcd[2] += c;
++    pms->abcd[3] += d;
++}
++
++void
++md5_init(md5_state_t *pms)
++{
++    pms->count[0] = pms->count[1] = 0;
++    pms->abcd[0] = 0x67452301;
++    pms->abcd[1] = 0xefcdab89;
++    pms->abcd[2] = 0x98badcfe;
++    pms->abcd[3] = 0x10325476;
++}
++
++void
++md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
++{
++    const md5_byte_t *p = data;
++    int left = nbytes;
++    int offset = (pms->count[0] >> 3) & 63;
++    md5_word_t nbits = (md5_word_t)(nbytes << 3);
++
++    if (nbytes <= 0)
++	return;
++
++    /* Update the message length. */
++    pms->count[1] += nbytes >> 29;
++    pms->count[0] += nbits;
++    if (pms->count[0] < nbits)
++	pms->count[1]++;
++
++    /* Process an initial partial block. */
++    if (offset) {
++	int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
++
++	memcpy(pms->buf + offset, p, copy);
++	if (offset + copy < 64)
++	    return;
++	p += copy;
++	left -= copy;
++	md5_process(pms, pms->buf);
++    }
++
++    /* Process full blocks. */
++    for (; left >= 64; p += 64, left -= 64)
++	md5_process(pms, p);
++
++    /* Process a final partial block. */
++    if (left)
++	memcpy(pms->buf, p, left);
++}
++
++void
++md5_finish(md5_state_t *pms, md5_byte_t digest[16])
++{
++    static const md5_byte_t pad[64] = {
++	0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
++    };
++    md5_byte_t data[8];
++    int i;
++
++    /* Save the length before padding. */
++    for (i = 0; i < 8; ++i)
++	data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
++    /* Pad to 56 bytes mod 64. */
++    md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
++    /* Append the length. */
++    md5_append(pms, data, 8);
++    for (i = 0; i < 16; ++i)
++	digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
++}
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/md5.h centericq-4.9.10-modif/blip-0.1/md5.h
+--- centericq-4.9.10/blip-0.1/md5.h	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/md5.h	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,94 @@
++/*
++  Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
++
++  This software is provided 'as-is', without any express or implied
++  warranty.  In no event will the authors be held liable for any damages
++  arising from the use of this software.
++
++  Permission is granted to anyone to use this software for any purpose,
++  including commercial applications, and to alter it and redistribute it
++  freely, subject to the following restrictions:
++
++  1. The origin of this software must not be misrepresented; you must not
++     claim that you wrote the original software. If you use this software
++     in a product, an acknowledgment in the product documentation would be
++     appreciated but is not required.
++  2. Altered source versions must be plainly marked as such, and must not be
++     misrepresented as being the original software.
++  3. This notice may not be removed or altered from any source distribution.
++
++  L. Peter Deutsch
++  ghost@aladdin.com
++
++ */
++/*$Id: md5.h,v 1.1.1.1 2002/12/09 08:48:22 konst Exp $ */
++/*
++  Independent implementation of MD5 (RFC 1321).
++
++  This code implements the MD5 Algorithm defined in RFC 1321.
++  It is derived directly from the text of the RFC and not from the
++  reference implementation.
++
++  The original and principal author of md5.h is L. Peter Deutsch
++  <ghost@aladdin.com>.  Other authors are noted in the change history
++  that follows (in reverse chronological order):
++
++  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
++  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
++	added conditionalization for C++ compilation from Martin
++	Purschke <purschke@bnl.gov>.
++  1999-05-03 lpd Original version.
++ */
++
++#ifndef md5_INCLUDED
++#  define md5_INCLUDED
++
++/*
++ * This code has some adaptations for the Ghostscript environment, but it
++ * will compile and run correctly in any environment with 8-bit chars and
++ * 32-bit ints.  Specifically, it assumes that if the following are
++ * defined, they have the same meaning as in Ghostscript: P1, P2, P3,
++ * ARCH_IS_BIG_ENDIAN.
++ */
++
++typedef unsigned char md5_byte_t; /* 8-bit byte */
++typedef unsigned int md5_word_t; /* 32-bit word */
++
++/* Define the state of the MD5 Algorithm. */
++typedef struct md5_state_s {
++    md5_word_t count[2];	/* message length in bits, lsw first */
++    md5_word_t abcd[4];		/* digest buffer */
++    md5_byte_t buf[64];		/* accumulate block */
++} md5_state_t;
++
++#ifdef __cplusplus
++extern "C" 
++{
++#endif
++
++/* Initialize the algorithm. */
++#ifdef P1
++void md5_init(P1(md5_state_t *pms));
++#else
++void md5_init(md5_state_t *pms);
++#endif
++
++/* Append a string to the message. */
++#ifdef P3
++void md5_append(P3(md5_state_t *pms, const md5_byte_t *data, int nbytes));
++#else
++void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
++#endif
++
++/* Finish the message and return the digest. */
++#ifdef P2
++void md5_finish(P2(md5_state_t *pms, md5_byte_t digest[16]));
++#else
++void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
++#endif
++
++#ifdef __cplusplus
++}  /* end extern "C" */
++#endif
++
++#endif /* md5_INCLUDED */
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/missing centericq-4.9.10-modif/blip-0.1/missing
+--- centericq-4.9.10/blip-0.1/missing	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/missing	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,198 @@
++#! /bin/sh
++# Common stub for a few missing GNU programs while installing.
++# Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
++# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++if test $# -eq 0; then
++  echo 1>&2 "Try \`$0 --help' for more information"
++  exit 1
++fi
++
++# In the cases where this matters, `missing' is being run in the
++# srcdir already.
++if test -f configure.in; then
++  configure_ac=configure.ac
++else
++  configure_ac=configure.in
++fi
++
++case "$1" in
++
++  -h|--h|--he|--hel|--help)
++    echo "\
++$0 [OPTION]... PROGRAM [ARGUMENT]...
++
++Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
++error status if there is no known handling for PROGRAM.
++
++Options:
++  -h, --help      display this help and exit
++  -v, --version   output version information and exit
++
++Supported PROGRAM values:
++  aclocal      touch file \`aclocal.m4'
++  autoconf     touch file \`configure'
++  autoheader   touch file \`config.h.in'
++  automake     touch all \`Makefile.in' files
++  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
++  flex         create \`lex.yy.c', if possible, from existing .c
++  lex          create \`lex.yy.c', if possible, from existing .c
++  makeinfo     touch the output file
++  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
++    ;;
++
++  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
++    echo "missing - GNU libit 0.0"
++    ;;
++
++  -*)
++    echo 1>&2 "$0: Unknown \`$1' option"
++    echo 1>&2 "Try \`$0 --help' for more information"
++    exit 1
++    ;;
++
++  aclocal)
++    echo 1>&2 "\
++WARNING: \`$1' is missing on your system.  You should only need it if
++         you modified \`acinclude.m4' or \`$configure_ac'.  You might want
++         to install the \`Automake' and \`Perl' packages.  Grab them from
++         any GNU archive site."
++    touch aclocal.m4
++    ;;
++
++  autoconf)
++    echo 1>&2 "\
++WARNING: \`$1' is missing on your system.  You should only need it if
++         you modified \`$configure_ac'.  You might want to install the
++         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
++         archive site."
++    touch configure
++    ;;
++
++  autoheader)
++    echo 1>&2 "\
++WARNING: \`$1' is missing on your system.  You should only need it if
++         you modified \`acconfig.h' or \`$configure_ac'.  You might want
++         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
++         from any GNU archive site."
++    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac`
++    test -z "$files" && files="config.h"
++    touch_files=
++    for f in $files; do
++      case "$f" in
++      *:*) touch_files="$touch_files "`echo "$f" |
++				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
++      *) touch_files="$touch_files $f.in";;
++      esac
++    done
++    touch $touch_files
++    ;;
++
++  automake)
++    echo 1>&2 "\
++WARNING: \`$1' is missing on your system.  You should only need it if
++         you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'.
++         You might want to install the \`Automake' and \`Perl' packages.
++         Grab them from any GNU archive site."
++    find . -type f -name Makefile.am -print |
++	   sed 's/\.am$/.in/' |
++	   while read f; do touch "$f"; done
++    ;;
++
++  bison|yacc)
++    echo 1>&2 "\
++WARNING: \`$1' is missing on your system.  You should only need it if
++         you modified a \`.y' file.  You may need the \`Bison' package
++         in order for those modifications to take effect.  You can get
++         \`Bison' from any GNU archive site."
++    rm -f y.tab.c y.tab.h
++    if [ $# -ne 1 ]; then
++        eval LASTARG="\${$#}"
++	case "$LASTARG" in
++	*.y)
++	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
++	    if [ -f "$SRCFILE" ]; then
++	         cp "$SRCFILE" y.tab.c
++	    fi
++	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
++	    if [ -f "$SRCFILE" ]; then
++	         cp "$SRCFILE" y.tab.h
++	    fi
++	  ;;
++	esac
++    fi
++    if [ ! -f y.tab.h ]; then
++	echo >y.tab.h
++    fi
++    if [ ! -f y.tab.c ]; then
++	echo 'main() { return 0; }' >y.tab.c
++    fi
++    ;;
++
++  lex|flex)
++    echo 1>&2 "\
++WARNING: \`$1' is missing on your system.  You should only need it if
++         you modified a \`.l' file.  You may need the \`Flex' package
++         in order for those modifications to take effect.  You can get
++         \`Flex' from any GNU archive site."
++    rm -f lex.yy.c
++    if [ $# -ne 1 ]; then
++        eval LASTARG="\${$#}"
++	case "$LASTARG" in
++	*.l)
++	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
++	    if [ -f "$SRCFILE" ]; then
++	         cp "$SRCFILE" lex.yy.c
++	    fi
++	  ;;
++	esac
++    fi
++    if [ ! -f lex.yy.c ]; then
++	echo 'main() { return 0; }' >lex.yy.c
++    fi
++    ;;
++
++  makeinfo)
++    echo 1>&2 "\
++WARNING: \`$1' is missing on your system.  You should only need it if
++         you modified a \`.texi' or \`.texinfo' file, or any other file
++         indirectly affecting the aspect of the manual.  The spurious
++         call might also be the consequence of using a buggy \`make' (AIX,
++         DU, IRIX).  You might want to install the \`Texinfo' package or
++         the \`GNU make' package.  Grab either from any GNU archive site."
++    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
++    if test -z "$file"; then
++      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
++      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
++    fi
++    touch $file
++    ;;
++
++  *)
++    echo 1>&2 "\
++WARNING: \`$1' is needed, and you do not seem to have it handy on your
++         system.  You might have modified some files without having the
++         proper tools for further handling them.  Check the \`README' file,
++         it often tells you about the needed prerequirements for installing
++         this package.  You may also peek at any GNU archive site, in case
++         some other package would contain this missing \`$1' program."
++    exit 1
++    ;;
++esac
++
++exit 0
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/mkinstalldirs centericq-4.9.10-modif/blip-0.1/mkinstalldirs
+--- centericq-4.9.10/blip-0.1/mkinstalldirs	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/mkinstalldirs	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,40 @@
++#! /bin/sh
++# mkinstalldirs --- make directory hierarchy
++# Author: Noah Friedman <friedman@prep.ai.mit.edu>
++# Created: 1993-05-16
++# Public domain
++
++# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
++
++errstatus=0
++
++for file
++do
++   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
++   shift
++
++   pathcomp=
++   for d
++   do
++     pathcomp="$pathcomp$d"
++     case "$pathcomp" in
++       -* ) pathcomp=./$pathcomp ;;
++     esac
++
++     if test ! -d "$pathcomp"; then
++        echo "mkdir $pathcomp"
++
++        mkdir "$pathcomp" || lasterr=$?
++
++        if test ! -d "$pathcomp"; then
++  	  errstatus=$lasterr
++        fi
++     fi
++
++     pathcomp="$pathcomp/"
++   done
++done
++
++exit $errstatus
++
++# mkinstalldirs ends here
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/msn_bittybits.C centericq-4.9.10-modif/blip-0.1/msn_bittybits.C
+--- centericq-4.9.10/blip-0.1/msn_bittybits.C	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/msn_bittybits.C	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,283 @@
++/* msn_bittybits.c - all the little string- and list-bashing functions */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <ctype.h>
++#include <sys/errno.h>
++
++#include "msn_core.h"
++#include "msn_interface.h"
++#include "msn_bittybits.h"
++
++char ** msn_read_line(int sock, int * numargs)
++{
++  // Right, this is quite a task. Step One is to read the thing in.
++  char ** retval;
++  char c;
++  int pos=0, numspaces=0;
++
++  *numargs = 0;
++
++  while(1)
++  {
++    if(read(sock, &c, 1)<1)
++    {
++    #ifdef MSNDEBUG
++      perror("Stream closed\n"); //DEBUG
++    #endif
++      return NULL;
++    }
++    if(c=='\314') { return NULL; } // just drop it
++    if(c=='\r') { continue; }
++    if(c=='\n') { numspaces++; buf[pos]='\0'; break; }
++    if(c==' ') { numspaces++; }
++    buf[pos]=c;
++    pos++;
++    if(pos>=BUF_SIZE)
++    {
++    #ifdef MSNDEBUG
++      printf("Severe warning - overflow, dropping/splitting a line!");
++    #endif
++      return NULL;
++    }
++  }
++
++  if(numspaces==0) {
++    #ifdef MSNDEBUG
++    printf("What the..?\n");
++    #endif
++    return NULL; }
++
++  ext_protocol_log(buf, 1, 0);
++
++  retval=new char * [numspaces];
++  retval[0]=new char[strlen(buf)+1];
++  strcpy(retval[0], buf);
++  *numargs=numspaces;
++
++  // OK, take it as read (boom, boom!)
++  // Now we cruise through the string, changing all spaces to null 0's and setting
++  // a pointer at the beginning of each substring
++
++  pos=0;
++  numspaces=1; // pointer #0 is already set at the beginning
++  while(1)
++  {
++    if(retval[0][pos]==' ')
++    {
++      retval[0][pos]='\0';
++      retval[numspaces]=retval[0]+pos+1;
++      numspaces++;
++      pos++;
++      continue;
++    }
++    if(retval[0][pos]=='\0') { break; }
++
++    pos++;
++  }
++
++  return retval;
++}
++
++void msn_clean_up(msnconn * conn)
++{
++  llist * connlist;
++  connlist=connections;
++
++  if(conn->type!=CONN_FTP)
++  { ext_closing_connection(conn); }
++
++  while(1)
++  {
++    if(connlist==NULL) { return; }
++    if(connlist->data==conn) { break; }
++    connlist=connlist->next;
++  }
++
++  close(conn->sock);
++  ext_unregister_sock(conn->sock);
++//  delete conn;
++
++  if(connlist->next!=NULL)
++  { connlist->next->prev=connlist->prev; }
++  if(connlist->prev!=NULL)
++  { connlist->prev->next=connlist->next; } else { connections=connlist->next; }
++  connlist->prev=NULL; // no recursive destructors, please...
++  connlist->next=NULL;
++  connlist->data=NULL; // already deleted the conn object
++  delete connlist;
++}
++
++void msn_add_callback(msnconn * conn, void (*func)(msnconn * conn, int trid, char ** args, int numargs, callback_data * data), int trid, callback_data * data)
++{
++  callback * call;
++
++  call=new callback;
++  call->trid=trid;
++  call->data=data;
++  call->func=func;
++
++  msn_add_to_llist(conn->callbacks, call);
++}
++
++void msn_del_callback(msnconn * conn, int trid)
++{
++  llist * list;
++  callback * call;
++
++  list=conn->callbacks;
++
++  if(list==NULL) { return; }
++
++  do
++  {
++    call=(callback *)list->data;
++    if(call->trid==trid)
++    {
++      if(list->next!=NULL)
++      { list->next->prev=list->prev; }
++      if(list->prev!=NULL)
++      { list->prev->next=list->next; } else { conn->callbacks=NULL; }
++      list->prev=NULL; // no recursive destructors
++      list->next=NULL;
++      delete list;
++      break;
++    }
++    list=list->next;
++  } while(list!=NULL);
++}
++
++void msn_add_to_llist(llist *& listp, llist_data * data)
++{
++  llist * tlist;
++  llist * newlist;
++
++  if(listp==NULL) { listp=new llist; listp->data=data; return; }
++
++  tlist=listp;
++
++  while(tlist->next!=NULL) { tlist=tlist->next; }
++
++  newlist=new llist;
++  newlist->prev=tlist;
++  newlist->next=NULL;
++  newlist->data=data;
++  tlist->next=newlist;
++}
++
++void msn_del_from_llist(llist *& listp, llist_data * data)
++{
++  // Note: this function does NOT delete the data, only the list object
++  llist * tlist;
++
++  tlist=listp;
++
++  while(tlist!=NULL)
++  {
++    if(tlist->data==data)
++    {
++      if(tlist->next!=NULL)
++      { tlist->next->prev=tlist->prev; }
++      if(tlist->prev!=NULL)
++      { tlist->prev->next=tlist->next; } else { listp=tlist->next; }
++      tlist->next=NULL; // otherwise the whole list is clobbered by the destructor
++      tlist->prev=NULL;
++      tlist->data=NULL;
++      delete tlist;
++      return;
++    }
++    tlist=tlist->next;
++  }
++}
++
++int msn_count_llist(llist * list)
++{
++  llist * l=list;
++  int retval=0;
++
++  while(l!=NULL) { l=l->next; retval++; }
++
++  return retval;
++}
++
++char * msn_permstring(const char * s)
++{
++  char * retval;
++
++  if(s==NULL) { return NULL; }
++
++  retval=new char [strlen(s)+1];
++
++  strcpy(retval, s);
++
++  return retval;
++}
++
++char * msn_decode_URL(char * s)
++{
++  char * rpos; // read
++  char * wpos; // write
++
++  wpos=rpos=s;
++
++  while(1)
++  {
++    if(*rpos=='\0') { *wpos='\0'; break; }
++
++    if(*rpos=='%')
++    {
++      char buf[3];
++      int c;
++      rpos++;
++      buf[0]=*rpos;
++      rpos++;
++      buf[1]=*rpos;
++      rpos++;
++      buf[2]='\0';
++      sscanf(buf, "%x", &c);
++      *wpos=c;
++      wpos++;
++      continue;
++    }
++
++    *wpos=*rpos;
++    rpos++;
++    wpos++;
++  }
++  return s;
++}
++
++char * msn_encode_URL(const char * s)
++{
++  const char * rptr = s;
++  char * wptr;
++  char * retval;
++
++  wptr=retval=new char[strlen(s)*3];
++
++  while(1)
++  {
++    if(*rptr=='\0')
++    { *wptr='\0'; break; }
++
++    if(!(isalpha(*rptr) || isdigit(*rptr)))
++    {
++      if ( *rptr != '\xc2' && *rptr != '\xb0' ) {
++      sprintf(wptr, "%%%2x", (int)(*rptr));
++
++      rptr++;
++      wptr+=3;
++      continue;
++    }
++    }
++
++    *wptr=*rptr;
++    wptr++;
++    rptr++;
++  }
++
++  return retval;
++}
++
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/msn_bittybits.h centericq-4.9.10-modif/blip-0.1/msn_bittybits.h
+--- centericq-4.9.10/blip-0.1/msn_bittybits.h	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/msn_bittybits.h	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,35 @@
++#ifndef __MSN_BITTYBITS_H__
++#define __MSN_BITTYBITS_H__
++
++/* msn_bittybits.h - all the little string-bashing functions */
++
++/*
++	char ** msn_read_line(int sock, int * numargs);
++
++	Purpose:        Read a line from the MSN server, then break it up into
++			space-separated strings
++	Arguments:
++	  sock          The socket to use
++	  numargs       Gets set to the number of arguments
++	Returns:        A NULL-terminated array of strings, or NULL on error
++*/
++char ** msn_read_line(int sock, int * numargs);
++
++void msn_clean_up(msnconn * conn);
++
++void msn_add_callback(msnconn * conn, void (*func)(msnconn * conn, int trid, char ** args, int numargs, callback_data * data), int trid, callback_data * data);
++
++void msn_del_callback(msnconn * conn, int trid);
++
++void msn_add_to_llist(llist *& listp, llist_data * data);
++
++void msn_del_from_llist(llist *& listp, llist_data * data);
++
++int msn_count_llist(llist * list);
++
++char * msn_permstring(const char * s);
++
++char * msn_decode_URL(char * s);
++char * msn_encode_URL(const char * s);
++
++#endif
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/msn_core.C centericq-4.9.10-modif/blip-0.1/msn_core.C
+--- centericq-4.9.10/blip-0.1/msn_core.C	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/msn_core.C	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,2163 @@
++/* msn_core.c - this contains all the functions used to do anything with MSN */
++
++#include <stdio.h>
++#include <unistd.h>
++#include <ctype.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include <errno.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <time.h>
++
++#include <sys/types.h>
++#include <sys/socket.h> // for the accept() in filetrans code
++#include <sys/stat.h>
++
++#include "md5.h"
++#include "msn_core.h"
++#include "msn_bittybits.h"
++#include "msn_interface.h"
++#include "../connwrap-0.1/connwrap.h"
++
++#define DEBUG 1
++#define MSN_VERSION_ID		0	// ID that is sent after commands like CHG, NLN, etc.
++
++// Define all those extern'ed variables in msn_core.h:
++llist * connections=NULL;
++int next_trid=10;
++char buf[BUF_SIZE]; // used for anything temporary
++char * errors[1000];
++char default_error_msg[]="Unknown error code";
++
++void msn_init(msnconn * conn, const char * username, const char * password)
++{
++  srand(time(NULL));
++
++  conn->auth=new authdata_NS;
++  conn->type=CONN_NS;
++  conn->ready=0;
++  ((authdata_NS *)conn->auth)->username=msn_permstring(username);
++  ((authdata_NS *)conn->auth)->password=msn_permstring(password);
++
++  for(int a=0; a<1000; a++)
++  {
++    errors[a]=default_error_msg;
++  }
++
++  errors[200]=msn_permstring("Syntax error");
++  errors[201]=msn_permstring("Invalid parameter");
++  errors[205]=msn_permstring("Invalid user");
++  errors[206]=msn_permstring("Domain name missing from username");
++  errors[207]=msn_permstring("Already logged in");
++  errors[208]=msn_permstring("Invalid username");
++  errors[209]=msn_permstring("Invalid friendly name");
++  errors[210]=msn_permstring("List full");
++  errors[215]=msn_permstring("This user is already on this list or in this session");
++  errors[216]=msn_permstring("Not on list");
++  errors[218]=msn_permstring("Already in this mode");
++  errors[219]=msn_permstring("This user is already in the opposite list");
++  errors[280]=msn_permstring("Switchboard server failed");
++  errors[281]=msn_permstring("Transfer notification failed");
++  errors[300]=msn_permstring("Required fields missing");
++  errors[302]=msn_permstring("Not logged in");
++  errors[500]=msn_permstring("Internal server error");
++  errors[501]=msn_permstring("Database server error");
++  errors[510]=msn_permstring("File operation failed at server");
++  errors[520]=msn_permstring("Memory allocation failed on server");
++  errors[600]=msn_permstring("The server is too busy");
++  errors[601]=msn_permstring("The server is unavailable");
++  errors[602]=msn_permstring("A Peer Notification Server is down");
++  errors[603]=msn_permstring("Database connection failed");
++  errors[604]=msn_permstring("Server going down for maintenance");
++  errors[707]=msn_permstring("Server failed to create connection");
++  errors[711]=msn_permstring("Blocking write failed on server");
++  errors[712]=msn_permstring("Session overload on server");
++  errors[713]=msn_permstring("You have been too active recently. Slow down!");
++  errors[714]=msn_permstring("Too many sessions open");
++  errors[715]=msn_permstring("Not expected");
++  errors[717]=msn_permstring("Bad friend file on server");
++  errors[911]=msn_permstring("Authentication failed. Check that you typed your username and password correctly.");
++  errors[913]=msn_permstring("This action is not allowed while you are offline");
++  errors[920]=msn_permstring("This server is not accepting new users");
++
++  msn_add_to_llist(connections, conn);
++}
++
++void msn_show_verbose_error(msnconn * conn, int errcode)
++{
++  snprintf(buf, 1024, "An error has occurred while communicating with the MSN Messenger server: %s (code %d)", errors[errcode], errcode);
++  ext_show_error(conn, buf);
++}
++
++void msn_invite_user(msnconn * conn, char * rcpt)
++{
++  sprintf(buf, "CAL %d %s\r\n", next_trid++, rcpt);
++  write(conn->sock, buf, strlen(buf));
++}
++
++void msn_send_IM(msnconn * conn, const char * rcpt, const char * s)
++{
++  static char header[]="MIME-Version: 1.0\r\nContent-Type: text/plain; charset=UTF-8\r\n\r\n";
++  message * msg=new message;
++  msg->body=s;
++  msg->header=msn_permstring(header);
++  msg->font=NULL;
++  msg->colour=NULL;
++  msn_send_IM(conn, rcpt, msg);
++
++  msg->body=NULL; // don't delete s
++  delete msg;
++}
++
++void msn_send_IM(msnconn * conn, const char * rcpt, message * msg)
++{
++  char header[1024];
++
++  if(conn->type==CONN_NS)
++  {
++    llist * list;
++
++    list=connections;
++    while(1)
++    {
++      msnconn * c;
++      llist * users;
++
++      if(list==NULL) { break ; }
++      c=(msnconn *)list->data;
++      if(c->type==CONN_NS) { list=list->next; continue; }
++      users=c->users;
++      // the below sends a message into this session if the only other participant is
++      // the user we want to talk to
++      if(users!=NULL && users->next==NULL && !strcmp(((char_data *)users->data)->c, rcpt))
++      {
++	msn_send_IM(c, rcpt, msg);
++	return;
++      }
++
++      list=list->next;
++    }
++    // otherwise, just connect
++    msn_request_SB(conn, rcpt, msg, NULL);
++    return;
++  }
++
++  if(msg->header==NULL)
++  {
++    if(msg->font==NULL)
++    {
++      sprintf(header, "MIME-Version: 1.0\r\nContent-Type: %s\r\n\r\n", (msg->content==NULL)?("text/plain; charset=UTF-8"):(msg->content));
++    } else {
++      char * fontname=msn_encode_URL(msg->font);
++      char ef[2] = {'\0', '\0'};
++      if(msg->bold) { ef[0]='B'; }
++      if(msg->underline) { ef[0]='U'; }
++
++      sprintf(header, "MIME-Version: 1.0\r\nContent-Type: %s\r\nX-MMS-IM-Format: FN=%s; EF=%s; CO=%s; CS=0; PF=%d\r\n\r\n",
++	(msg->content==NULL)?("text/plain"):(msg->content), fontname, ef, msg->colour, msg->fontsize);
++
++      delete fontname;
++    }
++  } else {
++    strcpy(header, msg->header);
++  }
++
++
++  sprintf(buf, "MSG %d N %d\r\n%s", next_trid, strlen(header)+strlen(msg->body), header);
++  write(conn->sock, buf, strlen(buf));
++  write(conn->sock, msg->body, strlen(msg->body));
++  next_trid++;
++}
++
++void msn_send_typing(msnconn * conn)
++{
++  char header[]="MIME-Version: 1.0\r\nContent-Type: text/x-msmsgscontrol\r\nTypingUser: ";
++  char * username=((authdata_SB *)conn->auth)->username;
++
++  sprintf(buf, "MSG %d U %d\r\n%s%s\r\n\r\n\r\n",
++	next_trid++, strlen(header)+strlen(username)+6, header, username);
++
++  write(conn->sock, buf, strlen(buf));
++}
++
++void msn_add_to_list(msnconn * conn, const char * lst, const char * username)
++{
++  sprintf(buf, "ADD %d %s %s %s\r\n", next_trid++, lst, username, username);
++  write(conn->sock, buf, strlen(buf));
++}
++
++void msn_del_from_list(msnconn * conn, const char * lst, const char * username)
++{
++  sprintf(buf, "REM %d %s %s\r\n", next_trid++, lst, username);
++  write(conn->sock, buf, strlen(buf));
++}
++
++void msn_set_GTC(msnconn * conn, char c)
++{
++  sprintf(buf, "GTC %d %c\r\n", next_trid++, c);
++  write(conn->sock, buf, strlen(buf));
++}
++
++void msn_set_BLP(msnconn * conn, char c)
++{
++  sprintf(buf, "BLP %d %cL\r\n", next_trid++, c);
++  write(conn->sock, buf, strlen(buf));
++}
++
++void msn_set_friendlyname(msnconn * conn, const char * friendlyname)
++{
++  char * username;
++
++  username=((authdata_NS *)conn->auth)->username;
++  sprintf(buf, "REA %d %s %s\r\n", next_trid++, username, msn_encode_URL(friendlyname));
++  write(conn->sock, buf, strlen(buf));
++}
++
++void msn_get_list_info( msnconn *conn, int nargs, char **args )
++{
++        char    buf[ 1000 ];
++	syncinfo *info;
++
++	info = conn->sync_info;
++
++	if ( NULL == info )
++	{
++		ext_debug("error! : conn->sync_info == NULL in msn_get_list_info");
++		return ;
++	}
++
++        if ( !nargs )
++		return ;
++
++        if ( !strcmp( args[ 0 ], "SYN" ) )
++  {
++                if ( info->serial == atoi( args[ 2 ] ) )
++    {
++      delete info;
++                        info = NULL;
++      ext_got_info(conn, NULL);
++      return;
++    }
++
++                info->serial = atoi( args[ 2 ] );
++                ext_latest_serial( conn, info->serial );
++                info->nContacts = atoi( args[ 3 ] );
++                info->nGroups = atoi( args[ 4 ] );
++		return ;
++  }
++
++        if ( !strcmp( args[ 0 ], "GTC" ) )
++      {
++                info->gtc = args[ 1 ][ 0 ];
++                info->complete |= COMPLETE_GTC;
++                ext_got_GTC( conn, args[ 1 ][ 0 ] );
++    }
++
++        if ( !strcmp( args[ 0 ], "BLP" ) )
++      {
++                info->blp = args[ 1 ][0];
++                info->complete |= COMPLETE_BLP;
++                ext_got_BLP( conn, args[ 1 ][ 0 ] );
++      }
++
++        if ( !strcmp( args[ 0 ], "PRP" ) )
++        {
++                // We just eat PRP-codes.
++		return ;
++    }
++
++        if ( !strcmp( args[ 0 ], "LSG" ) )
++    {
++                if ( !info->nContacts )
++      {
++                        msn_check_rl(conn, info);
++                        ext_got_info(conn, info);
++                        delete info;
++                        conn->sync = 0;
++      }
++
++                // Just eat 'm.
++		return ;
++    }
++
++        if ( !strcmp( args[ 0 ], "BPR" ) )
++      {
++        	if ( !info->nFound ) {
++       			ext_debug("MSNp8: error: got BPR without contact");
++      } else {
++        		llist *ll = info->fl;
++
++			while( ll ) {
++				userdata * ud = (userdata *) ll->data;
++				
++				if( !strcmp( ud->username, info->last_user_handled ) )
++				{
++					phonedata * newphone=new phonedata();
++					newphone->title=msn_permstring(args[1]);
++					newphone->number=msn_decode_URL(msn_permstring(args[2]));
++					msn_add_to_llist( ud->phone, newphone );
++					break;
++      }
++				
++				ll = ll->next;
++    }
++  }
++
++		return ;
++  }
++
++        //  0         1                  2
++        // LST email@address.com Friendly%20Nickname w x,y,z
++        if ( !strcmp( args[ 0 ], "LST" ) )
++  {
++                // XXX - Todo: see if the user is really on our FL
++                //             list and handle the BL list.
++
++                userdata *newuser_fl = new userdata();
++                newuser_fl->username = msn_permstring( args[ 1 ] );
++                newuser_fl->friendlyname = msn_decode_URL( msn_permstring( args[ 1 ] ) );
++                                  
++               	info->last_user_handled = newuser_fl->username;
++ 
++                msn_add_to_llist( info->fl, newuser_fl );
++
++                userdata *newuser_rl = new userdata();
++                newuser_rl->username = msn_permstring( args[ 1 ] );
++                newuser_rl->friendlyname = msn_decode_URL( msn_permstring( args[ 1 ] ) );
++
++                msn_add_to_llist( info->rl, newuser_rl );
++
++                userdata *newuser_al = new userdata();
++                newuser_al->username = msn_permstring( args[ 1 ] );
++                newuser_al->friendlyname = msn_decode_URL( msn_permstring( args[ 1 ] ) );
++
++                msn_add_to_llist( info->al, newuser_al );                        
++
++                info->nFound++;
++                
++                if ( info->nFound == info->nContacts )
++  {
++    msn_check_rl(conn, info);
++    ext_got_info(conn, info);
++    delete info;
++			conn->sync = 0;
++                }
++  }
++}
++
++void msn_sync_lists(msnconn * conn, int version)
++{
++  syncinfo * info=new syncinfo;
++
++  info->serial=version;
++
++  sprintf(buf, "SYN %d %d\r\n", next_trid, version);
++  write(conn->sock, buf, strlen(buf));
++
++  conn->sync = 1;
++  conn->sync_info = info;
++
++  next_trid++;
++}
++
++void msn_check_rl(msnconn * conn, syncinfo * info)
++{
++  llist * flist; // FL
++  llist * olist; // other list
++  userdata * fcontact;
++  userdata * ocontact;
++
++  int is_on_list;
++  int a=0;
++
++  flist=info->rl;
++
++  while(flist!=NULL)
++  {
++    is_on_list=0;
++
++    fcontact=(userdata *)flist->data;
++
++    a=0;
++    for(olist=info->al; a<2; olist=info->bl, a++)
++    {
++      while(olist!=NULL)
++      {
++	ocontact=(userdata *)olist->data;
++	if(!strcmp(ocontact->username, fcontact->username))
++	{
++	  is_on_list=1;
++	  break;
++	}
++	olist=olist->next;
++      }
++      if(is_on_list) { break; } // avoid a second loop if unnecessary
++    }
++
++    if(!is_on_list)
++    {
++      ext_new_RL_entry(conn, fcontact->username, fcontact->friendlyname);
++    }
++
++    flist=flist->next;
++  }
++}
++
++void msn_new_SB(msnconn * nsconn, void * tag)
++{
++  msn_request_SB(nsconn, NULL, NULL, tag);
++}
++
++void msn_request_SB(msnconn * nsconn, const char * rcpt, message * msg, void * tag)
++{
++  conninfo_SB * info=new conninfo_SB;
++
++  info->auth=new authdata_SB;
++  info->auth->username=msn_permstring(((authdata_NS *)nsconn->auth)->username);
++  info->auth->rcpt=msn_permstring(rcpt);
++  if(msg==NULL)
++  {
++    info->auth->msg=NULL;
++  } else {
++    info->auth->msg=new message;
++    info->auth->msg->header=msn_permstring(msg->header);
++    info->auth->msg->body=msn_permstring(msg->body);
++    info->auth->msg->font=msn_permstring(msg->font);
++    info->auth->msg->colour=msn_permstring(msg->colour);
++    info->auth->msg->content=msn_permstring(msg->content);
++    info->auth->msg->bold=msg->bold;
++    info->auth->msg->italic=msg->italic;
++    info->auth->msg->underline=msg->underline;
++  }
++
++  info->auth->tag=tag;
++
++  sprintf(buf, "XFR %d SB\r\n", next_trid);
++  write(nsconn->sock, buf, strlen(buf));
++
++  msn_add_callback(nsconn, msn_SBconn_2, next_trid, info);
++  next_trid++;
++}
++
++void msn_SBconn_2(msnconn * conn, int trid, char ** args, int numargs, callback_data * data)
++{
++  conninfo_SB * info=(conninfo_SB *)data;
++
++  msn_del_callback(conn, trid);
++
++  if(strcmp(args[0], "XFR"))
++  {
++    msn_show_verbose_error(conn, atoi(args[0]));
++    delete info;
++    return;
++  }
++
++  info->auth->cookie=msn_permstring(args[5]);
++  info->auth->sessionID=NULL;
++
++  msnconn * newconn=new msnconn;
++
++  newconn->auth=info->auth;
++  newconn->type=CONN_SB;
++  newconn->ready=0;
++
++  msn_add_to_llist(connections, newconn);
++
++  int port=1863;
++  char * c;
++
++  if((c=strstr(args[3], ":"))!=NULL)
++  {
++    *c='\0';
++    c++;
++    port=atoi(c);
++  }
++
++  delete info;
++
++  msn_connect(newconn, args[3], port);
++}
++
++void msn_SBconn_3(msnconn * conn, int trid, char ** args, int numargs, callback_data * data)
++{
++  authdata_SB * auth=(authdata_SB *)conn->auth;
++
++  msn_del_callback(conn, trid);
++
++  if(strcmp(args[2], "OK"))
++  {
++    msn_show_verbose_error(conn, atoi(args[0]));
++    msn_clean_up(conn);
++    return;
++  }
++
++  if(auth->rcpt==NULL) // they're requesting the SB session the proper way
++  {
++    ext_got_SB(conn, auth->tag);
++  } else {
++    sprintf(buf, "CAL %d %s\r\n", next_trid, auth->rcpt);
++    write(conn->sock, buf, strlen(buf));
++
++    delete auth->rcpt;
++    auth->rcpt=NULL;
++
++    next_trid++;
++  }
++  conn->ready=1;
++  ext_new_connection(conn);
++}
++
++void msn_handle_incoming(int sock, int readable, int writable)
++{
++  // First, we find which msnconn this socket belongs to
++
++  llist * list;
++  msnconn * conn;
++  callback * call;
++
++  char ** args;
++  int numargs;
++  int trid;
++
++  list=connections;
++
++  if(list==NULL) { return; }
++
++  while(1)
++  {
++    conn=(msnconn *)list->data;
++    if(conn->sock==sock)
++    { break; }
++    list=list->next;
++    if(list==NULL)
++    {
++    #ifdef MSNDEBUG
++	printf("Network traffic not for us\n");
++    #endif
++	return;
++    } // not for us
++  }
++
++  // first, siphon off any file transfer traffic to the special handler
++  if(conn->type==CONN_FTP)
++  { msn_handle_filetrans_incoming(conn, readable, writable); return; }
++
++  // OK, it's for us. If it's readable, parse it, then deliver it to the appropriate handler
++
++  if(!readable) { return; }
++
++  args=msn_read_line(sock, &numargs);
++  if ( !numargs )
++  {
++  	ext_debug("msn: error: no arguments for this data");
++	return ;
++  }
++
++  if(args==NULL)
++  {
++    if(errno!=0)
++    { msn_clean_up(conn); }
++    return;
++  }
++
++  if(!strcmp(args[0], "XFR") && !strcmp(args[2], "NS"))
++  {
++    delete conn->callbacks; // delete the callback data
++    conn->callbacks=NULL;
++
++    ext_unregister_sock(conn->sock);
++    close(conn->sock);
++
++    char * c;
++    int port=1863;
++
++    if((c=strstr(args[3], ":"))!=NULL)
++    {
++      *c='\0';
++      c++;
++      port=atoi(c);
++    }
++
++    msn_connect(conn, args[3], port);
++    return;
++  }
++
++  if(!strcmp(args[0], "RNG"))
++  {
++    msn_handle_RNG(conn, args, numargs);
++    return;
++  }
++
++  trid=atoi(args[1]);
++
++  if ( conn->sync )
++  {
++	// connection is synching. is this a SYNC-relation instruction?
++	if ( !strcmp( args[ 0 ], "SYN" ) || !strcmp( args[ 0 ], "GTC") || !strcmp( args[ 0 ], "BLP" ) ||
++	     !strcmp( args[ 0 ], "PRP" ) || !strcmp( args[ 0 ], "LSG") || !strcmp( args[ 0 ], "BPR" ) ||
++	     !strcmp( args[ 0 ], "LST" ) )
++	{
++		msn_get_list_info( conn, numargs, args );
++		delete args[0];
++		delete args;
++		return ;
++	}  
++
++	// else: it's a normal message
++  } 
++
++  list=conn->callbacks;
++
++  if(list!=NULL && trid>0)
++  {
++    while(1)
++    {
++      call=(callback *)list->data;
++      if(call->trid==trid)
++      {
++	(call->func)(conn, trid, args, numargs, call->data);
++	delete args[0];
++	delete args;
++	return;
++      }
++      list=list->next;
++      if(list==NULL) { break; } // defaults
++    }
++  }
++
++  msn_handle_default(conn, args, numargs);
++
++  delete args[0];
++  delete args;
++}
++
++void msn_handle_close(int sock)
++{
++  // First, we find which msnconn this socket belongs to
++
++  llist * list;
++  msnconn * conn;
++
++  list=connections;
++
++  if(list==NULL) { return; }
++
++  while(1)
++  {
++    conn=(msnconn *)list->data;
++    if(conn->sock==sock)
++    { break; }
++    list=list->next;
++    if(list==NULL)
++    {
++	#ifdef MSNDEBUG
++	printf("Socket close not for us\n");
++	#endif
++       return; } // not for us
++  }
++
++  msn_clean_up(conn);
++}
++
++void msn_handle_default(msnconn * conn, char ** args, int numargs)
++{
++
++  //     Switchboard messages
++
++  if(!strcmp(args[0], "MSG"))
++  {
++    msn_handle_MSG(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "NAK"))
++  {
++    msn_handle_NAK(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "JOI"))
++  {
++    msn_handle_JOI(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "BYE"))
++  {
++    msn_handle_BYE(conn, args, numargs);
++    return;
++  }
++
++  //    Notification server messages
++
++  if(!strcmp(args[0], "NLN") || !strcmp(args[0], "ILN") || !strcmp(args[0], "FLN"))
++  {
++    msn_handle_statechange(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "CHG"))
++  {
++    ext_changed_state(conn, args[2]);
++    return;
++  }
++
++  if(!strcmp(args[0], "ADD"))
++  {
++    msn_handle_ADD(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "REM"))
++  {
++    msn_handle_REM(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "BLP"))
++  {
++    msn_handle_BLP(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "GTC"))
++  {
++    msn_handle_GTC(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "REA"))
++  {
++    msn_handle_REA(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "CHL"))
++  {
++    msn_handle_CHL(conn, args, numargs);
++    return;
++  }
++
++  if(!strcmp(args[0], "OUT"))
++  {
++    msn_handle_OUT(conn, args, numargs);
++    return;
++  }
++
++  if(isdigit(args[0][0]))
++  {
++    msn_show_verbose_error(conn, atoi(args[0]));
++    return;
++  }
++
++  #ifdef MSNDEBUG
++  printf("Don't know what to do with this one, ignoring it:\n"); // DEBUG
++  for(int a=0; a<numargs; a++)
++  {
++    printf("%s ", args[a]);
++  }
++  printf("\n");
++  #endif
++}
++
++void msn_handle_MSG(msnconn * conn, char ** args, int numargs)
++{
++  int msglen;
++  char * msg;
++  char * mime;
++  char * body;
++  char * tmp;
++
++  msglen=atoi(args[3]);
++
++  msg=new char[msglen+1];
++  read(conn->sock, msg, msglen);
++  msg[msglen]='\0';
++
++  mime=msg;
++  body=strstr(msg, "\r\n\r\n");
++  if(body!=NULL) { body[2]='\0'; /* finish the MIME string */ body+=4; }
++
++    // the below is a kludge until I remember the header name for TypingUser
++  if((strstr(mime, "TypingUser")!=NULL) || (strstr(mime, "TypeingUser")!=NULL))
++  { // the second of the above two is a workaround for a spelling bug in the Jabber MSN transport
++    ext_typing_user(conn, args[1], msn_decode_URL(args[2]));
++    delete msg;
++    return;
++  }
++
++  /* Warning - the code below was written at what my body clock insisted was past midnight,
++  jetlagged, on a foreign road, because I had nothing better to do. I would like to please
++  call to your attention the no-warranty clause in the GPL.... :^) */
++
++  char * content; // content-type
++
++  content=msn_find_in_mime(mime, "Content-Type");
++  if(content==NULL) { ext_show_error(conn, "MSG with no Content-type set"); delete msg; return; }
++  #ifdef MSNDEBUG
++  printf("Content type: \"%s\"\n", content);
++  #endif
++  if((tmp=strstr(content, "; charset"))!=NULL) { *tmp='\0'; }
++
++  if(!strcmp(content, "text/x-msmsgsprofile"))
++  {
++    ext_debug("MSNp8: got x-msmsgsprofile");
++  } else
++  if(!strcmp(content, "text/plain"))
++  {
++    message * msg=new message;
++    msg->header=mime;
++    msg->body=body;
++    msg->font=NULL;
++    msg->content=msn_find_in_mime(mime, "Content-Type"); // include any "charset=" I've chopped off
++
++    ext_got_IM(conn, args[1], msn_decode_URL(args[2]), msg);
++  } else if(!strcmp(content, "text/x-msmsgsinitialemailnotification")) {
++    char * unread_ibc;
++    char * unread_folc;
++    int unread_ib=0, unread_fol=0;
++
++    unread_ibc=msn_find_in_mime(body, "Inbox-Unread");
++    unread_folc=msn_find_in_mime(body, "Folders-Unread");
++    if(unread_ibc!=NULL) { unread_ib=atoi(unread_ibc); delete unread_ibc; }
++    if(unread_folc!=NULL) { unread_fol=atoi(unread_folc); delete unread_folc; }
++
++    ext_initial_email(conn, unread_ib, unread_fol);
++  } else if(!strcmp(content, "text/x-msmsgsemailnotification")) {
++    char * from=msn_find_in_mime(body, "From-Addr");
++    char * subject=msn_find_in_mime(body, "Subject");
++
++    ext_new_mail_arrived(conn, from, subject);
++
++    delete from;
++    delete subject;
++  } else if(!strcmp(content, "text/x-msmsgsinvite")) {
++    msn_handle_invite(conn, args[1], msn_decode_URL(args[2]), mime, body);
++  } else {
++    #ifdef MSNDEBUG
++    printf("Unknown content-type: \"%s\"\n", content);
++    #endif
++  }
++  delete content;
++  delete msg;
++}
++
++char * msn_find_in_mime(char * mime, char * header)
++{
++  char * retval;
++  int pos;
++
++  if(!strncmp(mime, header, strlen(header)))
++  {
++    retval=mime;
++  } else {
++    char * tmp=new char[strlen(header)+3];
++    strcpy(tmp, "\r\n");
++    strcat(tmp, header);
++    retval=strstr(mime, header);
++    if(retval==NULL) { return NULL; }
++    retval+=2;
++    delete tmp;
++  }
++
++  while(*retval!=':') { retval++; }
++  retval++; // pass the colon
++  while(isspace(*retval)) { retval++; } // position at start of value
++
++  pos=0;
++  while(retval[pos]!='\0')
++  {
++    if(retval[pos]=='\r')
++    {
++      char * tmp;
++      retval[pos]='\0';
++      tmp=msn_permstring(retval);
++      retval[pos]='\r';
++      return tmp;
++    }
++    pos++;
++  }
++  #ifdef MSNDEBUG
++  printf("Invalid MIME header - WTF?!\n");
++  #endif
++  return NULL;
++}
++
++void msn_handle_invite(msnconn * conn, char * from, char * friendly, char * mime, char * body)
++{
++  char * command=msn_find_in_mime(body, "Invitation-Command");
++  char * cookie=msn_find_in_mime(body, "Invitation-Cookie");
++  int inv_is_out=0;
++  invitation * inv=NULL;
++  llist * l;
++
++  l=conn->invitations_in;
++  while(1)
++  {
++    if(l==NULL)
++    { if(!inv_is_out) { l=conn->invitations_out; inv_is_out=1; continue; } else { break; } }
++    inv=(invitation *)l->data;
++    #ifdef MSNDEBUG
++    printf("invitation: checking %s against %s\n", inv->cookie, cookie);
++    #endif
++    if(!strcmp(inv->cookie, cookie))
++    { break ; }
++    inv=NULL;
++    l=l->next;
++  }
++
++
++  if(!strcmp(command, "INVITE"))
++  {
++    msn_handle_new_invite(conn, from, friendly, mime, body);
++  } else if(!strcmp(command, "ACCEPT")) {
++    if(inv==NULL)
++    {
++     #ifdef MSNDEBUG
++     printf("Very odd - just got an ACCEPT out of mid-air...\n");
++     #endif
++     delete command; return; }
++
++    if(!inv_is_out && inv->app==APP_FTP)
++    {
++      #ifdef MSNDEBUG
++      printf("Downloading file from remote host..\n");
++      #endif
++      msn_recv_file((invitation_ftp *)inv, body);
++    } else if(inv_is_out && inv->app==APP_FTP) {
++      msn_send_file((invitation_ftp *)inv, body);
++    }
++  } else if(!strcmp(command, "CANCEL") || !strcmp(command, "REJECT")) {
++    if(inv==NULL)
++    {
++      #ifdef MSNDEBUG
++      printf("Very odd - just got a CANCEL/REJECT out of mid-air...\n");
++      #endif
++      delete command;
++      return;
++    }
++    if(inv->app==APP_FTP)
++    {
++      ext_filetrans_failed((invitation_ftp *)inv, 0, "Cancelled by remote user");
++      if(inv_is_out)
++      {
++	msn_del_from_llist(conn->invitations_out, inv);
++      } else {
++	msn_del_from_llist(conn->invitations_in, inv);
++      }
++      delete inv;
++    }
++  } else {
++    #ifdef MSNDEBUG
++    printf("Argh, don't support %s yet!\n", command);
++    #endif
++  }
++
++  delete command;
++}
++
++void msn_handle_new_invite(msnconn * conn, char * from, char * friendlyname, char * mime, char * body)
++{
++
++  char * appname;
++
++  char * tmp1=NULL;
++  char * tmp2=NULL;
++
++  appname=msn_find_in_mime(body, "Application-Name");
++  invitation * invg=NULL;
++
++  if((tmp1=msn_find_in_mime (body, "Application-File")) != NULL
++  && (tmp2=msn_find_in_mime (body, "Application-FileSize")) != NULL)
++  {
++    invitation_ftp * inv=new invitation_ftp;
++    invg=inv;
++    invg->app=APP_FTP;
++    invg->other_user=msn_permstring(from);
++    invg->cookie=msn_find_in_mime(body, "Invitation-Cookie");
++    invg->conn=conn;
++    inv->filename=tmp1;
++    tmp1=NULL;
++    inv->filesize=atol(tmp2);
++
++    ext_filetrans_invite(conn, from, friendlyname, inv);
++  }
++  if(tmp1!=NULL) { delete tmp1; }
++  if(tmp2!=NULL) { delete tmp2; }
++
++  delete appname;
++
++  if(invg==NULL)
++  {
++    ext_show_error(conn, "Unknown invitation type!");
++    return;
++  }
++
++  msn_add_to_llist(conn->invitations_in, invg);
++}
++
++void msn_recv_file(invitation_ftp * inv, char * msg_body)
++{
++  char * cookie=msn_find_in_mime(msg_body, "AuthCookie");
++  char * remote=msn_find_in_mime(msg_body, "IP-Address");
++  char * port_c=msn_find_in_mime(msg_body, "Port");
++  int port;
++
++  if(cookie==NULL || remote==NULL || port_c==NULL)
++  {
++    ext_filetrans_failed(inv, 0, "Missing parameters");
++    msn_del_from_llist(inv->conn->invitations_in, inv);
++    if(cookie!=NULL) { delete cookie; }
++    if(remote!=NULL) { delete remote; }
++    if(port_c!=NULL) { delete port_c; }
++    delete inv;
++  }
++
++  port=atoi(port_c);
++  delete port_c;
++
++  msnconn * conn=new msnconn;
++  conn->type=CONN_FTP;
++
++  sprintf(buf, "Connecting to %s:%d\n", remote, port);
++  ext_filetrans_progress(inv, buf, 0, 0);
++
++  conn->sock=ext_connect_socket(remote, port);
++  delete remote;
++
++  if(conn->sock<0)
++  {
++    ext_filetrans_failed(inv, errno, strerror(errno));
++    msn_del_from_llist(inv->conn->invitations_in, inv);
++    delete cookie;
++    delete inv;
++    return;
++  }
++
++  ext_register_sock(conn->sock, 1, 0);
++
++  ext_filetrans_progress(inv, "Connected", 0, 0);
++
++  authdata_FTP * auth=new authdata_FTP;
++  auth->cookie=msn_permstring(cookie);
++  delete cookie;
++  auth->inv=inv;
++  auth->username=msn_permstring(((authdata_SB *)inv->conn->auth)->username);
++  auth->direction=MSNFTP_RECV;
++
++  conn->auth=auth;
++
++  msn_add_to_llist(connections, conn);
++
++  write(conn->sock, "VER MSNFTP\r\n", strlen("VER MSNFTP\r\n"));
++}
++
++void msn_handle_filetrans_incoming(msnconn * conn, int readable, int writable)
++{
++  authdata_FTP * auth=(authdata_FTP *)conn->auth;
++
++  #ifdef MSNDEBUG
++  printf("Incoming from file sender\n");
++  #endif
++
++  if(auth->direction==MSNFTP_RECV)
++  {
++    if(!readable) { return; } // not interested...
++
++    if(auth->fd==-1)
++    {
++      char ** args;
++      int numargs;
++
++      args=msn_read_line(conn->sock, &numargs);
++
++      if(args==NULL) { msn_clean_up(conn); return; }
++
++      if(!strcmp(args[0], "VER"))
++      {
++	sprintf(buf, "USR %s %s\r\n", auth->username, auth->cookie);
++	write(conn->sock, buf, strlen(buf));
++	ext_filetrans_progress(auth->inv, "Negotiating", 0, 0);
++      } else if (!strcmp(args[0], "FIL")) {
++	auth->fd=open(auth->inv->filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU);
++	if(auth->fd<0)
++	{
++	  ext_filetrans_failed(auth->inv, errno, strerror(errno));
++	  msn_del_from_llist(conn->invitations_in, auth->inv);
++	  msn_clean_up(conn);
++	  delete args[0];
++	  delete args;
++	  return;
++	}
++
++	write(conn->sock, "TFR\r\n", strlen("TFR\r\n"));
++      }
++      delete args[0];
++      delete args;
++      auth->num_ignore=3;
++    }
++
++    fd_set readfd;
++    struct timeval timeout={0, 0};
++    FD_ZERO(&readfd);
++    FD_SET(conn->sock, &readfd);
++    char c;
++
++    while(select(conn->sock+1, &readfd, NULL, NULL, &timeout)==1)
++    {
++      if(read(conn->sock, &c, 1)<1)
++      {
++	msn_clean_up(conn);
++	return;
++      }
++      if(auth->num_ignore>0)
++      {
++	auth->num_ignore--;
++	continue;
++      }
++      auth->bytes_done++;
++      write(auth->fd, &c, 1);
++      if(auth->bytes_done==auth->inv->filesize)
++      {
++	write(conn->sock, "BYE 16777989\r\n", strlen("BYE 16777989"));
++	ext_filetrans_success(auth->inv);
++
++	msn_del_from_llist(auth->inv->conn->invitations_in, auth->inv);
++	msn_clean_up(conn);
++	return;
++      }
++      if(auth->bytes_done%2045==0) { auth->num_ignore=3; }
++    }
++
++    ext_filetrans_progress(auth->inv, "Receiving file", auth->bytes_done, auth->inv->filesize);
++  } else {
++    // We are sending
++
++    if(!auth->connected) // we have not accept()ed yet, but the read/writability means there's one waiting
++    {
++      int s;
++
++      if((s=accept(conn->sock, NULL, NULL))<0)
++      {
++	#ifdef MSNDEBUG
++	perror("Could not accept()\n");
++	#endif
++	ext_filetrans_failed(auth->inv, errno, strerror(errno));
++	msn_del_from_llist(auth->inv->conn->invitations_out, auth->inv);
++	msn_clean_up(conn); // that will nuke both auth and inv
++	return;
++      }
++
++      ext_unregister_sock(conn->sock);
++      close(conn->sock);
++
++      conn->sock=s;
++      ext_register_sock(conn->sock, 1, 1);
++
++      ext_filetrans_progress(auth->inv, "Connected", 0, 0);
++
++      auth->connected=1;
++    } else {
++      // we know it's connected already
++
++      if(auth->fd==-1)
++      {
++	char ** args;
++	int numargs;
++
++	if(!readable) { return; } // not interested...
++
++	if((args=msn_read_line(conn->sock, &numargs))==NULL)
++	{
++	  #ifdef MSNDEBUG
++	  perror("read() failed");
++	  #endif
++	  ext_filetrans_failed(auth->inv, errno, strerror(errno));
++	  msn_del_from_llist(auth->inv->conn->invitations_out, auth->inv);
++	  msn_clean_up(conn);
++	  return;
++	}
++
++	if(!strcmp(args[0], "VER"))
++	{
++	  sprintf(buf, "VER MSNFTP\r\n");
++	  write(conn->sock, buf, strlen(buf));
++	  ext_filetrans_progress(auth->inv, "Negotiating", 0, 0);
++	}
++
++	if(!strcmp(args[0], "USR"))
++	{
++	  if(strcmp(args[2], auth->cookie))  // if they DIFFER
++	  {
++	    ext_filetrans_failed(auth->inv, errno, strerror(errno));
++	    msn_del_from_llist(auth->inv->conn->invitations_out, auth->inv);
++	    msn_clean_up(conn);
++	    return;
++	  }
++
++	  sprintf(buf, "FIL %lu\r\n", auth->inv->filesize);
++	  write(conn->sock, buf, strlen(buf));
++	}
++
++	if(!strcmp(args[0], "TFR"))
++	{
++	  // you asked for it, go to data-dump mode
++	  auth->fd=open(auth->inv->filename, O_RDONLY);
++	  if(auth->fd<0)
++	  {
++	    ext_filetrans_failed(auth->inv, errno, "Could not open file for reading");
++	    msn_del_from_llist(auth->inv->conn->invitations_out, auth->inv);
++	    msn_clean_up(conn);
++	    return;
++	  }
++
++	  // OK, now we lose control, but the next round of the polling loop will
++	  // say that the socket is writable, and then the fun starts...
++	  ext_filetrans_progress(auth->inv, "Sending data", 0, 0);
++	}
++      } else {
++	// just pumping data now
++
++	fd_set writefd;
++	FD_ZERO(&writefd);
++	FD_SET(conn->sock, &writefd);
++	struct timeval tout={0, 0};
++	char c;
++
++	while(select(conn->sock+1, NULL, &writefd, NULL, &tout)==1)
++	{
++	  if(auth->bytes_done%2045==0)
++	  {
++	    unsigned char check[3];
++	    int to_go=(auth->inv->filesize-auth->bytes_done>2045)?(2045):(auth->inv->filesize-auth->bytes_done);
++
++
++	    check[0]='\0';
++	    check[1]=to_go%256;
++	    check[2]=to_go/256;
++	    write(conn->sock, check, 3);
++	  }
++
++	  if(read(auth->fd, &c, 1)<1)
++	  {
++	    ext_filetrans_failed(auth->inv, errno, strerror(errno));
++	    msn_del_from_llist(auth->inv->conn->invitations_out, auth->inv);
++	    msn_clean_up(conn);
++	    return;
++	  }
++
++	  auth->bytes_done++;
++	  write(conn->sock, &c, 1);
++
++	  if(auth->bytes_done==auth->inv->filesize)
++	  {
++	    ext_filetrans_success(auth->inv);
++
++	    msn_del_from_llist(auth->inv->conn->invitations_in, auth->inv);
++	    msn_clean_up(conn);
++	    return;
++	  }
++	}
++
++	ext_filetrans_progress(auth->inv, "Sending file", auth->bytes_done, auth->inv->filesize);
++      }
++    }
++  }
++}
++
++void msn_send_file(invitation_ftp * inv, char * msg_body)
++{
++  int port=6891;
++  msnconn * conn=new msnconn;
++
++  ext_filetrans_progress(inv, "Sending IP address", 0, 0);
++
++  conn->type=CONN_FTP;
++
++  while((conn->sock=ext_server_socket(port))<0)
++  {
++    port++;
++    if(port>6911)
++    {
++      ext_filetrans_failed(inv, errno, strerror(errno));
++      msn_del_from_llist(inv->conn->invitations_out, inv);
++      delete inv;
++      delete conn;
++      return;
++    }
++  }
++
++  ext_register_sock(conn->sock, 1, 0);
++
++  msn_add_to_llist(connections, conn);
++
++  authdata_FTP * auth=new authdata_FTP;
++
++  conn->auth=auth;
++
++  auth->cookie=new char[64];
++  sprintf(auth->cookie, "%d", rand());
++
++  auth->inv=inv;
++  auth->direction=MSNFTP_SEND;
++
++  auth->connected=0;
++
++  message * msg=new message;
++  msg->content=msn_permstring("text/x-msmsgsinvite; charset=UTF-8");
++
++
++  sprintf(buf, "Invitation-Command: ACCEPT\r\nInvitation-Cookie: %s\r\nIP-Address: %s\r\nPort: %d\r\nAuthCookie: %s\r\nLaunch-Application: FALSE\r\nRequest-Data: IP-Address:\r\n\r\n",
++    inv->cookie, ext_get_IP(), port, auth->cookie);
++
++  msg->body=msn_permstring(buf);
++
++  msn_send_IM(inv->conn, NULL, msg);
++
++  delete msg;
++}
++
++void msn_handle_NAK(msnconn * conn, char ** args, int numargs)
++{
++  ext_IM_failed(conn);
++}
++
++void msn_handle_JOI(msnconn * conn, char ** args, int numargs)
++{
++  authdata_SB * auth;
++
++  auth=(authdata_SB *)conn->auth;
++
++  if(!strcmp(args[1], auth->username)) { return; }
++
++  msn_add_to_llist(conn->users, new char_data(msn_permstring(args[1])));
++  ext_user_joined(conn, args[1], msn_decode_URL(args[2]), 0);
++
++  if(auth->msg!=NULL)
++  {
++    msn_send_IM(conn, NULL, auth->msg);
++    delete auth->msg;
++    auth->msg=NULL;
++  }
++}
++
++void msn_handle_RNG(msnconn * conn, char ** args, int numargs)
++{
++  msnconn * newSBconn=new msnconn;
++  authdata_SB * auth=new authdata_SB;
++
++  newSBconn->type=CONN_SB;
++  newSBconn->auth=auth;
++
++  auth->username=msn_permstring(((authdata_NS *)(conn->auth))->username);
++  auth->sessionID=msn_permstring(args[1]);
++  auth->cookie=msn_permstring(args[4]);
++  auth->msg=NULL;
++
++  msn_add_to_llist(connections, newSBconn);
++
++  char * c;
++  int port=1863;
++  if((c=strstr(args[2], ":"))!=NULL)
++  {
++    *c='\0';
++    c++;
++    port=atoi(c);
++  }
++
++  msn_connect(newSBconn, args[2], port);
++}
++
++void msn_handle_BYE(msnconn * conn, char ** args, int numargs)
++{
++  llist * list;
++  char_data * c;
++
++  list=conn->users;
++
++  ext_user_left(conn, args[1]);
++
++  while(list!=NULL)
++  {
++    c=(char_data *)list->data;
++    if(!strcmp(c->c, args[1])) // if the departing user matches this item on the list
++    {
++      if(list->next!=NULL)
++      { list->next->prev=list->prev; }
++      if(list->prev!=NULL)
++      { list->prev->next=list->next; }
++      if(list->prev==NULL) { conn->users=list->next; }
++      list->next=NULL;  // otherwise the delete will go through the entire llist!
++      list->prev=NULL;
++      delete list; // will delete the char_data for us too
++      break;
++    }
++    list=list->next;
++  }
++
++  if(conn->users==NULL)
++  {
++    msn_clean_up(conn);
++  }
++}
++
++void msn_handle_statechange(msnconn * conn, char ** args, int numargs)
++{
++  char * buddy;
++  char * state;
++  char * friendlyname;
++
++  if(!strcmp(args[0], "ILN"))
++  {
++    friendlyname=args[4];
++    buddy=args[3];
++    state=args[2];
++  } else if(!strcmp(args[0], "FLN")) {
++    buddy=args[1];
++    ext_buddy_offline(conn, buddy);
++    return;
++  } else {
++    friendlyname=args[3];
++    buddy=args[2];
++    state=args[1];
++  }
++
++  ext_buddy_set(conn, buddy, msn_decode_URL(friendlyname), state);
++}
++
++void msn_handle_ADD(msnconn * conn, char ** args, int numargs)
++{
++  if(!strcmp(args[2], "RL"))
++  {
++    #ifdef MSNDEBUG
++    printf("Via ADD:\n");
++    #endif
++    ext_new_RL_entry(conn, args[4], msn_decode_URL(args[5]));
++  }
++
++  ext_new_list_entry(conn, args[2], args[4]);
++  ext_latest_serial(conn, atoi(args[3]));
++}
++
++void msn_handle_REM(msnconn * conn, char ** args, int numargs)
++{
++  ext_del_list_entry(conn, args[2], args[4]);
++  ext_latest_serial(conn, atoi(args[3]));
++}
++
++
++void msn_handle_BLP(msnconn * conn, char ** args, int numargs)
++{
++  ext_got_BLP(conn, args[3][0]);
++  ext_latest_serial(conn, atoi(args[3]));
++}
++
++void msn_handle_GTC(msnconn * conn, char ** args, int numargs)
++{
++  ext_got_GTC(conn, args[3][0]);
++  ext_latest_serial(conn, atoi(args[3]));
++}
++
++void msn_handle_REA(msnconn * conn, char ** args, int numargs)
++{
++  ext_latest_serial(conn, atoi(args[2]));
++  ext_got_friendlyname(conn, msn_decode_URL(args[4]));
++}
++
++void msn_handle_CHL(msnconn * conn, char ** args, int numargs)
++{
++  md5_state_t state;
++  md5_byte_t digest[16];
++  int a;
++
++  md5_init(&state);
++  md5_append(&state, (md5_byte_t *)(args[2]), strlen(args[2]));
++  md5_append(&state, (md5_byte_t *)"VT6PX?UQTM4WM%YR", 16);
++
++  md5_finish(&state, digest);
++
++  sprintf(buf, "QRY %d PROD0038W!61ZTF9 32\r\n", next_trid++ );
++
++  write(conn->sock, buf, strlen(buf));
++
++  for(a=0; a<16; a++)
++  {
++    sprintf(buf, "%02x", digest[a]);
++    write(conn->sock, buf, strlen(buf));
++  }
++}
++
++void msn_handle_OUT(msnconn * conn, char ** args, int numargs)
++{
++  if(numargs>1)
++  {
++    if(!strcmp(args[1], "OTH"))
++    {
++      ext_show_error(conn, "You have logged onto MSN twice at once. Your MSN session will now terminate.");
++    } else if(!strcmp(args[1], "SSD")) {
++      ext_show_error(conn, "This MSN server is going down for maintenance. Your MSN session will now terminate.");
++    } else {
++      sprintf(buf, "The MSN server has terminated the connection with an unknown reason code. Please report this code: %s", args[1]);
++      ext_show_error(conn, buf);
++    }
++  }
++  msn_clean_up(conn);
++}
++
++void msn_filetrans_reject(invitation_ftp * inv)
++{
++   message * msg=new message;
++
++   sprintf(buf, "Invitation-Command: CANCEL\r\nInvitation-Cookie: %s\r\nCancel-Code: REJECT\r\n",
++     inv->cookie);
++   msg->body=msn_permstring(buf);
++   msg->content=msn_permstring("text/x-msmsgsinvite; charset=UTF-8");
++   msn_send_IM(inv->conn, NULL, msg);
++   delete msg;
++
++   #ifdef MSNDEBUG
++   printf("Rejecting file transfer\n");
++   #endif
++
++   msn_del_from_llist(inv->conn->invitations_in, inv);
++}
++
++void msn_filetrans_accept(invitation_ftp * inv, const char * dest)
++{
++   message * msg=new message;
++
++   delete inv->filename;
++   inv->filename=msn_permstring(dest);
++   sprintf(buf, "Invitation-Command: ACCEPT\r\nInvitation-Cookie: %s\r\nLaunch-Application: FALSE\r\nRequest-Data: IP-Address\r\n\r\n",
++     inv->cookie);
++   msg->body=msn_permstring(buf);
++   msg->content=msn_permstring("text/x-msmsgsinvite; charset=UTF-8");
++   msn_send_IM(inv->conn, NULL, msg);
++   delete msg;
++
++   #ifdef MSNDEBUG
++   printf("Accepting file transfer\n");
++   #endif
++}
++
++void msn_filetrans_cancel(invitation_ftp * inv)
++{
++  llist * l;
++  msnconn * conn;
++
++  // one of the two below will fail, but it will do so safely and quietly
++  msn_del_from_llist(inv->conn->invitations_in, inv);
++  msn_del_from_llist(inv->conn->invitations_out, inv);
++
++  l=connections;
++
++  while(1)
++  {
++    if(l==NULL) { delete inv; return; } // Hmm, couldn't find it...
++
++    conn=(msnconn *)l->data;
++
++    if(conn->type==CONN_FTP && ((authdata_FTP *)(conn->auth))->inv==inv)
++    { break; }
++
++    l=l->next;
++  }
++
++  authdata_FTP * auth=(authdata_FTP *)conn->auth;
++  delete auth->inv;
++  auth->inv=NULL;
++  delete auth;
++  conn->auth=NULL;
++
++  msn_clean_up(conn);
++}
++
++invitation_ftp * msn_filetrans_send(msnconn * conn, const char * path)
++{
++  struct stat st_info;
++
++  if(stat(path, &st_info)<0)
++  { ext_show_error(conn, "Could not open file"); return NULL; }
++
++  invitation_ftp * inv=new invitation_ftp;
++
++  inv->app=APP_FTP;
++  inv->cookie=new char[64];
++  sprintf(inv->cookie, "%d", rand());
++  inv->other_user=NULL;
++  inv->conn=conn;
++
++  inv->filename=msn_permstring(path);
++  inv->filesize=st_info.st_size;
++
++  message * msg=new message;
++  char * basename;
++
++  basename=inv->filename+strlen(inv->filename);
++
++  while(basename>=inv->filename && *basename!='/' && *basename!='\\')
++  {
++    basename--;
++  }
++
++  basename++; // it will always be 1 char before the start of the string
++
++  msg->content=msn_permstring("text/x-msmsgsinvite; charset=UTF-8");
++
++  sprintf(buf, "Application-Name: File transfer\r\nApplication-GUID: {5D3E02AB-6190-11d3-BBBB-00C04F795683}\r\nInvitation-Command: INVITE\r\nInvitation-Cookie: %s\r\nApplication-File: %s\r\nApplication-FileSize: %lu\r\n\r\n",
++    inv->cookie, basename, inv->filesize);
++
++  msg->body=msn_permstring(buf);
++
++  msn_send_IM(conn, NULL, msg);
++
++  msn_add_to_llist(conn->invitations_out, inv);
++
++  delete msg;
++
++  ext_filetrans_progress(inv, "Negotiating connection", 0, 0);
++
++  return inv;
++}
++
++#define szUser          info->username
++#define szPassword      info->password
++
++int msn_login_read( int nSock, char *buf, int nMax )
++{
++        return cw_read( nSock, buf, nMax, 0 );
++}
++
++int msn_login_wait( int nSocket, char *szCommand )
++{
++	int nRet = 0;
++	
++	while ( !nRet )
++		nRet = read( nSocket, szCommand, 1000 );
++	
++	#ifdef MSNDEBUG
++	printf("<< %s", szCommand );
++	#endif
++	
++	return 1;
++}
++
++void msn_login_write1( int nSocket, char *szString, char *szArg )
++{
++	char szWrite[ 1000 ];
++
++	// ext_debug( szString );
++	// ext_debug( szArg );
++
++	memset( szWrite, 0, 999 );
++	sprintf( szWrite, "%s %s\r\n", szString, szArg );
++	
++	// ext_debug( szWrite );
++
++	cw_write( nSocket, szWrite, strlen( szWrite ), 0 );
++}
++
++void msn_login_write( int nSocket, char *szString )
++{
++	char szWrite[ 1000 ];
++
++	memset( szWrite, 0, 1000 );
++	sprintf( szWrite, "%s\r\n", szString );
++	
++	cw_write( nSocket, szWrite, strlen( szWrite ), 0 );
++} 
++
++int msn_login_connect( int nPort, char *szAddress )
++{
++	return ext_connect_socket( szAddress, nPort );
++}
++
++int msn_login_ssl_write( int nSock, char *str )
++{
++        return cw_write( nSock, str, strlen( str ), 1 );
++}
++
++int msn_login_ssl_read( int nSock, char *buf, int nMax )
++{
++        return cw_read( nSock, buf, nMax, 1 );
++}
++
++int msn_login_close( int nSock )
++{
++        return cw_close( nSock );
++}
++
++int msn_login_ssl_connect( int nPort, char *szAddr )
++{
++	return ext_connect_socket_ssl( szAddr, nPort );
++}
++
++int msn_login_get_server( char *str, char *filter, char *Server, char *Site )
++{
++        char *c, *c1, *c2;
++
++        c = strstr( str, filter );
++        if ( NULL == c )
++             return 0;
++        // Skip the "Filter="-part.
++        c++;
++        c += strlen( filter );
++        c1 = strchr( c, '/' );
++        if ( NULL == c1 )
++             return 0;
++        c2 = strchr( c1, ',' );
++        if ( NULL == c2 )
++             return 0;
++
++        strncpy( Server, c, (unsigned long)c1 - (unsigned long)c );
++        strncpy( Site, c1, (unsigned long)c2 - (unsigned long)c1 );
++
++        return 1;
++}
++
++int msnAuth( char *lc, char *ticket, char *user, char *password )
++{
++        int     nexus;                  // Passport Login Nexus
++        int     logins;			// Login Server
++        char    result[ 5000 ];
++	char    result2[ 1000 ];
++        char    Server[ 100 ];		// e.g. www.server.com
++        char    Site[ 100 ];		// e.g. /site.html
++        char    String[ 800 ];
++        int     i;
++        char    mail[ 255 ];
++        char    name[ 255 ];
++
++        memset( mail, 0, 255 );
++        memset( name, 0, 255 );
++
++        for ( i = 0; i < strlen( user ); i++ )
++        {
++                if ( user[i] == '@' )
++                {
++                        strncpy( name, user, i );
++                        strcpy( mail, (char*)( (unsigned long)user + i + 1 ) );
++                        break;
++                }
++        }        
++
++        memset( Server, 0, 100 );
++        memset( Site, 0, 100 );
++
++        nexus = msn_login_ssl_connect( 443, "nexus.passport.com" );
++        msn_login_ssl_write( nexus, "GET /rdr/pprdr.asp HTTP/1.0\r\n\r\n" );
++        msn_login_ssl_read( nexus, result, 800 );
++        msn_login_close( nexus );
++        msn_login_get_server( result, "DALogin", Server, Site );
++
++        #ifdef MSNDEBUG
++        printf("Connecting to server '%s' .. site '%s'\n", Server, Site );
++        #endif
++
++	for ( ; ; )
++	{
++	        // Connect to Login Server
++	        logins = msn_login_ssl_connect( 443, Server );
++	        memset( String, 0, 800 );
++	        sprintf( String, "GET %s HTTP/1.1\r\n"
++	        		 "Authorization: Passport1.4 OrgVerb=GET,OrgURL=http%%3A%%2F%%2Fmessenger%%2Emsn%%2Ecom,sign-in=%s%%40%s,pwd=%s,%s\r\n"
++	     	  		 "Host: %s\r\n\r\n", 
++	        		 Site, name, mail, password, lc, Server );
++	
++	        #ifdef MSNDEBUG
++		printf("Writing: \n%s\n", String );
++	        #endif
++	
++		msn_login_ssl_write( logins, String );
++	
++		memset( result, 0, 5000 );
++		memset( result2, 0, 1000 );
++		
++		msn_login_ssl_read( logins, result, 5000 );
++		msn_login_ssl_read( logins, result2, 1000 );
++	
++		strcat( result, result2 );
++	
++	        if ( strstr( result, "200 OK" ) )
++	        {
++	        	char *tick;
++	        	char *c3, *c4;
++	        	// Okay.
++	        	
++	        	tick = strstr( result, "t=" );
++	        	if ( NULL == tick )
++	        	{
++	                        #ifdef MSNDEBUG
++	        		printf("No t= found in response.\n");
++	                        #endif
++	        		return 0;
++	        	}
++	        
++	        	tick += 2;
++	        	
++	        	c4 = strstr( tick, "," );
++	
++			strncpy( ticket, tick, (unsigned long)c4 - (unsigned long)tick - 1 );        	
++	
++			//msn_login_close( logins );
++	        	return 1;
++	        }
++	        
++	        if ( strstr( result, "302 Found") && strstr( result, "redir" ) && strstr( result, "Location: " ) )
++	        {
++	        	// Redirection.
++	        	char *c3, *c4;
++	        	        	
++	        	c3 = strstr( result, "Location: " );
++	        	c3 += 10;
++	
++			c3 = strstr( c3, "https://" );
++			c3 += 8;
++			
++			c4 = strstr( c3, "/" );
++			memset( Server, 0, 100);
++			strncpy( Server, c3, (unsigned long)c4 - (unsigned long)c3 );
++			strncpy( Site, c4, (unsigned long)strchr( c4, '\r' ) - (unsigned long)c4 );
++		
++			// printf("Redirection to server [%s] - Site [%s]\n", Server, Site );
++			msn_login_close( logins );
++			continue;
++	        }
++	        
++	        break;
++	}	      
++        
++        // printf("Error\n");
++        return 0;
++}
++
++int msn_connect_v8_error( connectinfo *info, msnconn *conn, char *szErr )
++{
++        ext_show_error( NULL, szErr );
++        delete info;
++
++        if ( conn->sock != -1 )
++        {
++                ext_unregister_sock( conn->sock );
++                close( conn->sock );
++                conn->sock = -1;
++        }
++
++        return -1;
++}
++
++int msn_connect_v8( connectinfo *info, msnconn *conn, int *nNextTrid )
++{
++	int             ds;               // Dispatch Server
++	char            result[ 1000 ];
++	char            *c;
++	char            szIp[ 20 ];
++	char            szPort[ 20 ];
++	int             nPort;
++	char   		lc[ 400 ];
++ 	char   		ticket[ 2000 ];
++	
++	memset( result, 0, 500 );
++	
++  	ext_debug("MSNp8: finding login server");
++	
++	// ds = msn_login_connect( 1863, "messenger.hotmail.com" );
++        ds = conn->sock;
++
++	// >> VER 1 MSNP8 CVR0\r\n
++	msn_login_write( ds, "VER 1 MSNP8 CVR0" );
++	msn_login_wait( ds, result );
++        
++	if ( !strstr( result, "VER 1" ) )
++                return msn_connect_v8_error( info, conn, "Protocol error (didn't receive VER 1)" );
++	
++	// >> CVR 2 0x0409 win 4.10 i386 MSNMSGR 5.0.0544 MSMSGS something@something.com\r\n
++	// ext_debug( szUser );
++
++	msn_login_write1( ds, "CVR 2 0x0409 winnt 5.1 i386 MSNMSGR  5.0.0540 MSMSGS", szUser );
++
++	msn_login_wait( ds, result );
++        
++	if ( !strstr( result, "CVR 2" ) )
++                return msn_connect_v8_error( info, conn, "Protocol error (didn't receive CVR 2)" );
++
++	// >> USR 3 TWN I something@something.com\r\n
++	msn_login_write1( ds, "USR 3 TWN I", szUser );
++	msn_login_wait( ds, result );
++	if ( !strstr( result, "XFR 3 NS " ) )
++                return msn_connect_v8_error( info, conn, "Protocol error (didn't receive XFR 3)" );
++
++        // Read MSN Server IP from message.
++	c = strstr( result, "NS ");
++	c += 3;
++	memset( szIp, 0, 20 );
++	memset( szPort, 0, 20 );
++	strncpy( szIp, c, (unsigned long)strchr( c, ':' ) - (unsigned long)c );
++	c = strchr( c, ':' ); c++;
++	strncpy( szPort, c, (unsigned long)strchr( c, ' ' ) - (unsigned long)c );
++	nPort = atoi( szPort );
++
++        // Close current socket.
++	msn_login_close( ds );
++        ext_unregister_sock( ds );
++        conn->sock = -1;
++
++        #ifdef MSNDEBUG
++	printf("* Connecting to IP `%s' port %d *\n", szIp, nPort );
++        #endif
++
++  	ext_debug("MSNp8: found.. connecting");
++
++        // Try to connect to other server.
++	ds = msn_login_connect( nPort, szIp );
++	if ( ds <= 0 )
++                return msn_connect_v8_error( info, conn, "Error connecting to specified MSN Server" );
++
++        // OK. Register the socket.
++        conn->sock = ds;
++        ext_register_sock( ds, 1, 0 );
++
++	// >> VER 4 MSNP8 CVR0\r\n
++	msn_login_write( ds, "VER 4 MSNP8 CVR0" );
++	msn_login_wait( ds, result );
++        
++	if ( !strstr( result, "VER 4" ) )
++                return msn_connect_v8_error( info, conn, "Protocol error (didn't receive VER 4)" );
++	
++	// >> CVR 5 0x0409 win 4.10 i386 MSNMSGR 5.0.0544 MSMSGS something@something.com\r\n
++        msn_login_write1( ds, "CVR 5 0x0409 winnt 5.1 i386 MSNMSGR  5.0.0540 MSMSGS", szUser );
++	msn_login_wait( ds, result );
++        
++	if ( !strstr( result, "CVR 5" ) )
++                return msn_connect_v8_error( info, conn, "Protocol error (didn't receive CVR 5)" );
++
++	// >> USR 6 TWN I something@something.com\r\n
++	msn_login_write1( ds, "USR 6 TWN I", szUser );
++	msn_login_wait( ds, result );
++	
++	// << USR 6 TWN S something@something.com lc=....,....=...\r\n
++	if ( !strstr( result, "TWN S" ) )
++                return msn_connect_v8_error( info, conn, "Protocol error (didn't receive TWS S)" );
++
++	memset( lc, 0, 400 );
++	c = strstr( result, "TWN S " );
++	c+=6;
++
++	strncpy( lc, c, (unsigned long)strchr(c, '\r')  - (unsigned long)c );
++
++        #ifdef MSNDEBUG
++	printf("LC-etc string = `%s'\n", lc );
++        #endif
++
++	memset( ticket, 0, 2000 );
++	
++  	ext_debug("MSNp8: doing SSL auth");
++	
++	if ( ! msnAuth( lc, ticket, szUser, szPassword ) )
++	{
++	        // printf("Error #6\n");
++                return 0;
++	}
++
++  	ext_debug("MSNp8: OK.. logging in");
++
++        #ifdef MSNDEBUG
++	printf("Ticket = `%s'\n", ticket );
++        #endif
++	
++	memset( result, 0, 500 );
++	sprintf( result, "USR 7 TWN S t=%s", ticket );
++
++        // >> USR 7 TWN S t=<ticket>
++	msn_login_write( ds, result );
++	memset( result, 0, 500 );
++	msn_login_wait( ds, result );
++        
++	if ( !strstr( result, "USR 7 OK") )
++	{
++                if ( result[ 0 ] >= '0' && result[ 0 ] <= '9' )
++                {
++                        char *err;
++                        int  nCode = 0;
++                        // We received an error code.
++
++                        err = strchr( result, ' ' );
++                        if ( NULL == err )
++                                nCode = atoi( result );
++                        else {
++                                *err = '\0';
++                                nCode = atoi( result );
++                        }
++                        if ( nCode <= 0 )
++                           return msn_connect_v8_error( info, conn, "Protocol error (Invalid response after USR 7)" );
++                        return nCode;
++                }
++                
++                // Invalid response.
++                return msn_connect_v8_error( info, conn, "Protocol error (Invalid response after USR 7)" );
++	}
++
++        // We are now connected to the MSN Server
++        
++	// msn_login_write( ds, "OUT" );
++	// msn_login_close( ds );
++
++        // << USR 7 OK something@something.com Something%20Friendly%Nick 1 0
++        {
++                char *szFriendly;
++                char *cEnd;
++                int  i;
++
++                szFriendly = result;
++                
++                for ( i = 0; i < 4; i++ )
++                {
++                        szFriendly = strchr( szFriendly, ' ' );
++
++                        if ( NULL == szFriendly )
++                        {
++                                ext_got_friendlyname( conn, "Unknown nickname" );
++                                return 0;
++                        }
++                        
++                        szFriendly++;
++                }
++
++                cEnd = strchr( szFriendly, ' ');
++                if ( NULL != cEnd )
++                     *cEnd = '\0';
++
++		// ext_debug( msn_decode_URL( szFriendly ) );
++                ext_got_friendlyname( conn, msn_decode_URL( szFriendly ) );
++        }
++
++        *nNextTrid = 8;
++        
++        // No error.
++	return 0;
++}
++
++void msn_connect(msnconn * conn, const char * server, int port)
++{
++  int result;
++  
++  conn->ready=0;
++
++  if(conn->type==CONN_SB)
++  {
++    authdata_SB * auth=(authdata_SB *)conn->auth;
++
++    if((conn->sock=ext_connect_socket(server, port))==-1)
++    {
++      ext_show_error(conn, "Could not connect to switchboard server");
++      return;
++    }
++
++    ext_register_sock(conn->sock, 1, 0);
++
++    if(auth->sessionID==NULL)
++    {
++      sprintf(buf, "USR %d %s %s\r\n", next_trid, auth->username, auth->cookie);
++      write(conn->sock, buf, strlen(buf));
++
++      msn_add_callback(conn, msn_SBconn_3, next_trid, NULL);
++    } else {
++      sprintf(buf, "ANS %d %s %s %s\r\n", next_trid, auth->username, auth->cookie, auth->sessionID);
++      write(conn->sock, buf, strlen(buf));
++
++      ext_new_connection(conn);
++      conn->ready=1;
++      msn_add_callback(conn, msn_SB_ans, next_trid, NULL);
++    }
++
++    next_trid++;
++
++    return;
++  } // Otherwise, it's a Notification Server (NS)
++
++  connectinfo * info;
++
++  info=new connectinfo;
++
++  // The following is necessary as username and password may be temp variables
++  // that will no longer exist when the next function is called
++  info->username=msn_permstring( ((authdata_NS *)conn->auth)->username);
++  info->password=msn_permstring( ((authdata_NS *)conn->auth)->password);
++
++  conn->ready=0;
++  if((conn->sock=ext_connect_socket(server, port))==-1)
++  {
++    ext_show_error(conn, "Could not connect to MSN server");
++    return;
++  }
++
++  ext_register_sock(conn->sock, 1, 0);
++
++  // Okay, now try to connect.
++
++  ext_debug("MSNp8: connecting to MSN.. this could take a few seconds");
++
++  result = msn_connect_v8( info, conn, &next_trid );
++
++  if ( 0 != result )
++  {
++        // Error code.
++
++        if ( result > 0 )
++  {
++                msn_show_verbose_error( conn, result );
++    delete info;
++                msn_clean_up( conn );
++                conn->sock = -1;
++
++        } // else: connection failed completely. msn_connect_v8 already took care of destroying the connection
++
++  }
++        else
++  {
++
++        // We received no error code. Everything went ok!
++  delete info;
++
++	ext_debug("MSNp8: OK");
++
++        conn->ready = 1;
++        ext_new_connection( conn );
++  }
++}
++
++void msn_SB_ans(msnconn * conn, int trid, char ** args, int numargs, callback_data * data)
++{
++  if(!strcmp(args[0], "ANS") && !strcmp(args[2], "OK"))
++  { return; }
++
++  if(isdigit(args[0][0]))
++  {
++    msn_del_callback(conn, trid);
++    msn_show_verbose_error(conn, atoi(args[0]));
++    msn_clean_up(conn);
++    return;
++  }
++
++  if(!strcmp(args[0], "IRO"))
++  {
++    if(!strcmp(args[4], ((authdata_SB *)conn->auth)->username)) { return; }
++    msn_add_to_llist(conn->users, new char_data(msn_permstring(args[4])));
++    ext_user_joined(conn, args[4], msn_decode_URL(args[5]), 1);
++    if(!strcmp(args[2], args[3]))
++    {
++      msn_del_callback(conn, trid);
++    }
++  }
++}
++
++void msn_set_state(msnconn * conn, const char * state)
++{
++  sprintf(buf, "CHG %d %s %d\r\n", next_trid, state, MSN_VERSION_ID );
++  write(conn->sock, buf, strlen(buf));
++  next_trid++;
++}
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/msn_core.h centericq-4.9.10-modif/blip-0.1/msn_core.h
+--- centericq-4.9.10/blip-0.1/msn_core.h	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/msn_core.h	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,355 @@
++/* msn_core.h  - prototypes for msn_core.C */
++#ifndef MSN_CORE_H
++#define MSN_CORE_H
++
++class llist_data // inherit it
++{};
++
++class llist
++{
++  public:
++  llist_data * data;
++  llist * next;
++  llist * prev;
++
++  llist() { data=NULL; next=NULL; prev=NULL; }
++  ~llist() { if(data!=NULL) { delete data; } if(next!=NULL) { delete next; } }
++};
++
++class char_data : public llist_data
++{
++  public:
++  char * c;
++  char_data(char * tc) { c=tc; }
++  ~char_data() { if(c!=NULL) { delete c; } }
++};
++
++class callback_data
++{};
++
++class callback : public llist_data
++{
++  public:
++  int trid;
++  void (*func)(struct msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++  callback_data * data; // just gets passed
++};
++
++// Intermediate steps in synchronisation
++class syncinfo : public callback_data
++{
++  public:
++
++  llist * fl;
++  llist * rl;
++  llist * al;
++  llist * bl;
++
++  unsigned int complete;
++
++  int serial;
++  int nContacts;
++  int nGroups;
++  int nFound;
++
++  char *last_user_handled;
++
++  char blp;
++  char gtc;
++
++  syncinfo() { nFound = 0; nContacts = 0; blp='A'; gtc='A'; fl=rl=al=bl=NULL; complete=0; serial=0; }
++  ~syncinfo()
++  {
++    if(fl!=NULL) { delete fl; }
++    if(rl!=NULL) { delete rl; }
++    if(al!=NULL) { delete al; }
++    if(bl!=NULL) { delete bl; }
++  }
++};
++
++class message : public llist_data // This class encapsulates all that you need to know (tm) about a MSG
++{
++  public:
++
++  // Raw stuff
++  char * header; // MIME
++  const char * body;
++
++  // Parsed stuff
++  char * font;
++  char * colour;
++  int bold;
++  int italic;
++  int underline;
++  int fontsize;
++
++  char * content; // Content-type
++
++  message() { header=NULL; font=NULL; content=NULL; colour=NULL; }
++};
++
++class phonedata : public llist_data
++{
++  public:
++  char * title;
++  char * number;
++
++  phonedata() { title=number=NULL; }
++  ~phonedata() { if(title!=NULL) { delete title; } if(number!=NULL) { delete number; } }
++};
++
++class userdata : public llist_data
++{
++  public:
++  char * username;
++  char * friendlyname;
++
++  llist * phone;
++
++  userdata() { username=friendlyname=NULL; phone=NULL; }
++  ~userdata()
++  {
++    if(username!=NULL) { delete username; }
++    if(friendlyname!=NULL) { delete friendlyname; }
++    if(phone!=NULL) { delete phone; }
++  }
++};
++
++class authdata
++{};
++
++
++class msnconn : public llist_data
++{
++  public:
++  int sock; // Socket (durr...)
++  int type; // one of the #defines below
++  int sync; // syncing
++  int ready;
++
++  syncinfo *sync_info;
++  llist * users; // Users in this session - only for SB connections
++  llist * invitations_out; // invitations extended but not responded to
++  llist * invitations_in; // invitations received but not responded to
++  llist * callbacks;
++  authdata * auth;
++
++  msnconn() { sync = 0; users=NULL; callbacks=NULL; invitations_out=NULL; invitations_in=NULL; }
++  ~msnconn()
++  {
++    if(users!=NULL) { delete users; }
++    if(invitations_in!=NULL) { delete invitations_in; }
++    if(invitations_out!=NULL) { delete invitations_out; }
++    if(callbacks!=NULL) { delete callbacks; }
++  }
++};
++
++#define CONN_NS  1 // Notification Server (also Dispatch, as it does exactly the same thing)
++#define CONN_SB  2 // Switchboard Server
++#define CONN_FTP 3 // MSN file transfer
++
++class authdata_NS : public authdata
++{
++  public:
++  char * username;
++  char * password;
++
++  authdata_NS() { username=password=NULL; }
++  ~authdata_NS() { if(username!=NULL) { delete username; delete password; } }
++};
++
++class authdata_SB : public authdata
++{
++  public:
++  char * username;
++  char * sessionID;
++  char * cookie;
++  char * rcpt;  // recipient of the below
++  message * msg; // to be sent as soon as connection is complete and someone joins
++  void * tag; // for SB connections without an initial message
++
++  authdata_SB() { username=sessionID=cookie=NULL; }
++  ~authdata_SB()
++  { if(username!=NULL) { delete username; delete sessionID; delete cookie; } }
++};
++
++class invitation : public llist_data
++{
++  public:
++  int app;
++  char * cookie;
++  char * other_user;
++  msnconn * conn;
++
++  invitation() { cookie=other_user=NULL; }
++  ~invitation() { if(cookie!=NULL) { delete cookie; } if(other_user!=NULL) { delete other_user; } }
++};
++
++#define APP_FTP 1       // NOTE: this is MSN file transfer, which is NOTHING to do with ordinary FTP!
++
++class invitation_ftp : public invitation
++{
++  public:
++  char * filename;
++  long unsigned filesize;
++
++  invitation_ftp() { filename=NULL; }
++  ~invitation_ftp()
++    { if(filename!=NULL) { delete filename; } }
++};
++
++
++class authdata_FTP : public authdata
++{
++  public:
++  char * cookie;
++  char * username;
++  invitation_ftp * inv;
++  int fd;
++  unsigned long bytes_done;
++  int num_ignore;
++  int direction;
++  int connected;
++
++  authdata_FTP() { cookie=username=NULL; inv=NULL; fd=-1; bytes_done=num_ignore=connected=0; }
++  ~authdata_FTP()
++  {
++    if(cookie!=NULL) { delete cookie; }
++    if(username!=NULL) { delete username; }
++    if(inv!=NULL) { delete inv; }
++  }
++};
++
++#define MSNFTP_SEND 1
++#define MSNFTP_RECV 2
++
++
++extern llist * connections;
++extern int next_trid;
++
++#define BUF_SIZE 1024
++extern char buf[]; // Used for anything temporary
++
++void msn_init(msnconn * conn, const char * username, const char * password);
++
++void msn_show_verbose_error(msnconn * conn, int errcode);
++
++void msn_connect(msnconn * conn, const char * server, int port);
++
++void msn_invite_user(msnconn * conn, char * rcpt);
++
++void msn_send_IM(msnconn * conn, const char * rcpt, const char * msg);
++
++void msn_send_IM(msnconn * conn, const char * rcpt, message * msg);
++
++void msn_send_typing(msnconn * conn);
++
++void msn_filetrans_accept(invitation_ftp * inv, const char * dest);
++
++void msn_filetrans_reject(invitation_ftp * inv);
++
++invitation_ftp * msn_filetrans_send(msnconn * conn, const char * path);
++
++void msn_sync_lists(msnconn * conn, int version);
++
++#define LST_FL  1
++#define LST_RL  2
++#define LST_AL  4
++#define LST_BL  8
++
++#define COMPLETE_BLP 16
++#define COMPLETE_GTC 32
++
++void msn_set_friendlyname(msnconn * conn, const char * friendlyname);
++
++void msn_sync_lists(msnconn * conn, int version);
++void msn_add_to_list(msnconn * conn, const char * lst, const char * user);
++void msn_del_from_list(msnconn * conn, const char * lst, const char * user);
++void msn_set_GTC(msnconn * conn, char c);
++void msn_set_BLP(msnconn * conn, char c);
++void msn_syncdata(msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++void msn_phonedata(msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++void msn_check_rl(msnconn * conn, syncinfo * info);
++
++void msn_connect_and_send(msnconn * nsconn, char * dest, char * msg);
++
++void msn_set_state(msnconn * conn, const char * state);
++
++// Intermediate steps in switchboard connection:
++class conninfo_SB : public callback_data
++{
++  public:
++  authdata_SB * auth;
++};
++
++void msn_new_SB(msnconn * nsconn, void * tag);
++void msn_request_SB(msnconn * nsconn, const char * rcpt, message * msg, void * tag);
++
++void msn_SBconn_2(msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++void msn_SBconn_3(msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++
++void msn_handle_incoming(int sock, int readable, int writable);
++
++void msn_handle_filetrans_incoming(msnconn * conn, int readable, int writable);
++
++void msn_handle_close(int sock);
++
++void msn_handle_default(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_MSG(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_invite(msnconn * conn, char * from, char * friendly, char * mime, char * body);
++
++void msn_handle_new_invite(msnconn * conn, char * from, char * friendly, char * mime, char * body);
++
++void msn_recv_file(invitation_ftp * inv, char * dest);
++
++char * msn_find_in_mime(char * mime, char * header);
++
++void msn_send_file(invitation_ftp * inv, char * msg_body);
++
++void msn_handle_NAK(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_JOI(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_BYE(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_RNG(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_statechange(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_ADD(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_REM(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_BLP(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_GTC(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_REA(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_CHL(msnconn * conn, char ** args, int numargs);
++
++void msn_handle_OUT(msnconn * conn, char ** args, int numargs);
++
++
++
++// Intermediate steps in connection:
++class connectinfo : public callback_data
++{
++  public:
++  char * username;
++  char * password;
++  connectinfo() { username=password=NULL; }
++  ~connectinfo()
++  { if(username!=NULL) { delete username; } if(password!=NULL) { delete password; } }
++};
++
++void msn_connect_2(msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++void msn_connect_3(msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++void msn_connect_4(msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++
++// Connecting to switchboards:
++void msn_SB_ans(msnconn * conn, int trid, char ** args, int numargs, callback_data * data);
++
++#endif // MSN_CORE_H
+diff -bBdNrw -U5 centericq-4.9.10/blip-0.1/msn_interface.h centericq-4.9.10-modif/blip-0.1/msn_interface.h
+--- centericq-4.9.10/blip-0.1/msn_interface.h	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/blip-0.1/msn_interface.h	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,92 @@
++#ifndef __MSN_INTERFACE_H__
++#define __MSN_INTERFACE_H__
++
++/* msn_interface.h - functions that talk to the outside world */
++
++/*
++	void ext_show_error(char * msg);
++
++	Purpose:        Displays an error
++	Arguments:
++	  msg           The error message
++	Return:         Nothing
++*/
++
++void ext_register_sock(int s, int read, int write);
++void ext_unregister_sock(int s);
++
++void ext_show_error(msnconn * conn, const char * msg);
++
++void ext_buddy_set(msnconn * conn, const char * buddy, const char * friendlyname, const char * state);
++
++void ext_buddy_offline(msnconn * conn, const char * buddy);
++
++void ext_got_friendlyname(msnconn * conn, const char * friendlyname);
++
++void ext_got_info(msnconn * conn, syncinfo * data);
++
++void ext_debug( char *msg );
++
++void ext_latest_serial(msnconn * conn, int serial);
++
++void ext_got_GTC(msnconn * conn, char c);
++
++void ext_got_BLP(msnconn * conn, char c);
++
++void ext_new_RL_entry(msnconn * conn, const char * username, const char * friendlyname);
++
++void ext_new_list_entry(msnconn * conn, const char * lst, const char * username);
++
++void ext_del_list_entry(msnconn * conn, const char * lst, const char * username);
++
++void ext_got_SB(msnconn * conn, void * tag);
++
++void ext_user_joined(msnconn * conn, const char * username, const char * friendlyname, int is_initial);
++
++void ext_user_left(msnconn * conn, const char * username);
++
++void ext_got_IM(msnconn * conn, const char * username, const char * friendlyname, message * msg);
++
++void ext_IM_failed(msnconn * conn);
++
++void ext_typing_user(msnconn * conn, const char * username, const char * friendlyname);
++
++void ext_initial_email(msnconn * conn, int unread_inbox, int unread_folders);
++
++void ext_new_mail_arrived(msnconn * conn, const char * from, const char * subject);
++
++void ext_filetrans_invite(msnconn * conn, const char * username, const char * friendlyname, invitation_ftp * inv);
++
++void ext_filetrans_progress(invitation_ftp * inv, const char * status, unsigned long recv, unsigned long total);
++
++void ext_filetrans_failed(invitation_ftp * inv, int error, const char * message);
++
++void ext_filetrans_success(invitation_ftp * inv);
++
++void ext_new_connection(msnconn * conn);
++
++void ext_closing_connection(msnconn * conn);
++
++void ext_changed_state(msnconn * conn, const char * state);
++
++/*
++	int connect_socket(char * server, int port);
++
++	Purpose:        Makes a TCP socket, connects it to the specified server and port,
++			and then registers it for
++	Arguments:
++	  server        The server name
++	  port          The TCP port to connect to
++	Return:         Nothing
++*/
++int ext_connect_socket(const char * server, int port);
++
++int ext_connect_socket_ssl(const char * server, int port);
++
++int ext_server_socket(int port);
++
++char * ext_get_IP(void);
++
++void ext_protocol_log(const char *buf, int readev, int writeev);
++
++#endif
+diff -bBdNrw -U5 centericq-4.9.10/config.h.in centericq-4.9.10-modif/config.h.in
+--- centericq-4.9.10/config.h.in	2003-12-13 15:09:23.000000000 +0100
++++ centericq-4.9.10-modif/config.h.in	2004-02-06 22:31:47.000000000 +0100
+@@ -236,10 +236,12 @@
+ #undef BUILD_RSS
+ 
+ /* build the integrated livejournal client */
+ #undef BUILD_LJ
+ 
++#define BUILD_MSN 1
++
+ /* add konst's id by default */
+ #undef BUILD_KONST
+ 
+ /* Define as const if the declaration of iconv() needs const. */
+ #undef ICONV_CONST
+diff -bBdNrw -U5 centericq-4.9.10/configure centericq-4.9.10-modif/configure
+--- centericq-4.9.10/configure	2004-01-16 21:40:32.000000000 +0100
++++ centericq-4.9.10-modif/configure	2004-02-06 22:34:43.000000000 +0100
+@@ -2862,10 +2862,16 @@
+   BUILD_LJ_FALSE='#'
+ else
+   BUILD_LJ_TRUE='#'
+   BUILD_LJ_FALSE=
+ fi
++BUILD_MSN_TRUE=
++BUILD_MSN_FALSE='#'
++
++cat >> confdefs.h <<\EOF
++#define BUILD_MSN 1 
++EOF
+ 
+ if test "$build_yahoo" = "yes"; then
+     cat >> confdefs.h <<\EOF
+ #define BUILD_YAHOO 1
+ EOF
+@@ -4879,11 +4885,11 @@
+ 
+     
+   
+   
+ 
+-subdirs="firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1"
++subdirs="blip-0.1 firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1"
+ 
+ trap '' 1 2 15
+ cat > confcache <<\EOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+@@ -5040,10 +5046,12 @@
+ s%@LIBGNUTLS_EXTRA_CFLAGS@%$LIBGNUTLS_EXTRA_CFLAGS%g
+ s%@LIBGNUTLS_EXTRA_LIBS@%$LIBGNUTLS_EXTRA_LIBS%g
+ s%@CXXCPP@%$CXXCPP%g
+ s%@LIBICONV@%$LIBICONV%g
+ s%@LTLIBICONV@%$LTLIBICONV%g
++s%@BUILD_MSN_TRUE@%$BUILD_MSN_TRUE%g
++s%@BUILD_MSN_FALSE@%$BUILD_MSN_FALSE%g
+ s%@BUILD_YAHOO_TRUE@%$BUILD_YAHOO_TRUE%g
+ s%@BUILD_YAHOO_FALSE@%$BUILD_YAHOO_FALSE%g
+ s%@BUILD_AIM_TRUE@%$BUILD_AIM_TRUE%g
+ s%@BUILD_AIM_FALSE@%$BUILD_AIM_FALSE%g
+ s%@BUILD_IRC_TRUE@%$BUILD_IRC_TRUE%g
+@@ -5423,11 +5431,11 @@
+       ;;
+     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+     esac
+   done
+ 
+-  for ac_config_dir in firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1; do
++  for ac_config_dir in blip-0.1 firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1; do
+ 
+     # Do not complain, so a configure script can configure whichever
+     # parts of a large source tree are present.
+     if test ! -d $srcdir/$ac_config_dir; then
+       continue
+diff -bBdNrw -U5 centericq-4.9.10/src/Makefile.in centericq-4.9.10-modif/src/Makefile.in
+--- centericq-4.9.10/src/Makefile.in	2004-01-16 21:40:32.000000000 +0100
++++ centericq-4.9.10-modif/src/Makefile.in	2004-02-06 22:31:47.000000000 +0100
+@@ -90,15 +90,15 @@
+ RANLIB = @RANLIB@
+ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
+ 
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/hooks -I$(top_srcdir)/firetalk-0.1 -I$(top_srcdir)/kkconsui-0.1/include -I$(top_srcdir)/kkstrtext-0.1 -I$(top_srcdir)/libicq2000-0.1 -I$(top_srcdir)/libjabber-0.1 -I$(top_srcdir)/libyahoo2-0.1 -I$(top_srcdir)/kksystr-0.1/include -I$(top_srcdir)/connwrap-0.1 -I$(top_srcdir)/intl
++INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/hooks -I$(top_srcdir)/firetalk-0.1 -I$(top_srcdir)/kkconsui-0.1/include -I$(top_srcdir)/kkstrtext-0.1 -I$(top_srcdir)/libicq2000-0.1 -I$(top_srcdir)/libjabber-0.1 -I$(top_srcdir)/libyahoo2-0.1 -I$(top_srcdir)/kksystr-0.1/include -I$(top_srcdir)/connwrap-0.1 -I$(top_srcdir)/intl -I$(top_srcdir)/blip-0.1
+ bin_PROGRAMS = centericq
+ centericq_SOURCES = centericq.cc icqcontact.cc icqgroups.cc eventmanager.cc icqdialogs.cc icqhist.cc imexternal.cc imcontact.cc imlogger.cc accountmanager.cc icqcontacts.cc icqmlist.cc imcontroller.cc icqconf.cc imevents.cc icqface.cc centermain.cc icqgroup.cc
+-centericq_LDFLAGS = -L$(top_srcdir)/firetalk-0.1 -L$(top_srcdir)/kkconsui-0.1 -L$(top_srcdir)/kkstrtext-0.1 -L$(top_srcdir)/libicq2000-0.1 -L$(top_srcdir)/libjabber-0.1 -L$(top_srcdir)/libyahoo2-0.1 -L$(top_srcdir)/kksystr-0.1 -L$(top_srcdir)/connwrap-0.1
+-centericq_LDADD = $(top_srcdir)/src/hooks/libhooks.a  -lfiretalk -lkkconsui -lkkstrtext -llibicq2000 -llibjabber -llibyahoo2 -lkksystr -lconnwrap @INTLLIBS@
++centericq_LDFLAGS = -L$(top_srcdir)/firetalk-0.1 -L$(top_srcdir)/kkconsui-0.1 -L$(top_srcdir)/kkstrtext-0.1 -L$(top_srcdir)/libicq2000-0.1 -L$(top_srcdir)/libjabber-0.1 -L$(top_srcdir)/libyahoo2-0.1 -L$(top_srcdir)/kksystr-0.1 -L$(top_srcdir)/connwrap-0.1 -L$(top_srcdir)/blip-0.1
++centericq_LDADD = $(top_srcdir)/src/hooks/libhooks.a -lblip -lfiretalk -lkkconsui -lkkstrtext -llibicq2000 -llibjabber -llibyahoo2 -lkksystr -lconnwrap @INTLLIBS@
+ SUBDIRS = hooks
+ EXTRA_DIST = centericq.cc icqcontact.cc icqgroups.cc eventmanager.cc icqdialogs.cc icqhist.cc imexternal.cc imcontact.cc imlogger.cc accountmanager.cc icqcontacts.cc icqmlist.cc imcontroller.cc icqconf.cc imevents.cc icqface.cc centermain.cc icqgroup.cc icqmlist.h imcontroller.h icqcommon.h icqcontacts.h centericq.h icqgroup.h imcontact.h accountmanager.h eventmanager.h imevents.h icqcontact.h imlogger.h icqconf.h icqface.h icqgroups.h icqhist.h imexternal.h
+ AUTOMAKE_OPTIONS = foreign
+ AM_CPPFLAGS = -DSHARE_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(datadir)/locale\"
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+diff -bBdNrw -U5 centericq-4.9.10/src/hooks/Makefile.in centericq-4.9.10-modif/src/hooks/Makefile.in
+--- centericq-4.9.10/src/hooks/Makefile.in	2004-01-16 21:40:32.000000000 +0100
++++ centericq-4.9.10-modif/src/hooks/Makefile.in	2004-02-06 22:31:47.000000000 +0100
+@@ -90,13 +90,13 @@
+ RANLIB = @RANLIB@
+ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
+ 
+-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/hooks -I$(top_srcdir)/firetalk-0.1 -I$(top_srcdir)/kkconsui-0.1/include -I$(top_srcdir)/kkstrtext-0.1 -I$(top_srcdir)/libicq2000-0.1 -I$(top_srcdir)/libjabber-0.1 -I$(top_srcdir)/libyahoo2-0.1 -I$(top_srcdir)/kksystr-0.1/include -I$(top_srcdir)/connwrap-0.1 -I$(top_srcdir)/intl
++INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/hooks -I$(top_srcdir)/firetalk-0.1 -I$(top_srcdir)/kkconsui-0.1/include -I$(top_srcdir)/kkstrtext-0.1 -I$(top_srcdir)/libicq2000-0.1 -I$(top_srcdir)/libjabber-0.1 -I$(top_srcdir)/libyahoo2-0.1 -I$(top_srcdir)/kksystr-0.1/include -I$(top_srcdir)/connwrap-0.1 -I$(top_srcdir)/intl -I$(top_srcdir)/blip-0.1
+ noinst_LIBRARIES = libhooks.a
+-libhooks_a_SOURCES = yahoohook.cc jabberhook.cc aimhook.cc icqhook.cc irchook.cc abstracthook.cc rsshook.cc HTTPClient.cc ljhook.cc
++libhooks_a_SOURCES = yahoohook.cc jabberhook.cc aimhook.cc icqhook.cc irchook.cc abstracthook.cc rsshook.cc HTTPClient.cc ljhook.cc msnhook.cc
+ EXTRA_DIST = yahoohook.cc jabberhook.cc aimhook.cc icqhook.cc irchook.cc abstracthook.cc rsshook.cc HTTPClient.cc ljhook.cc yahoohook.h aimhook.h jabberhook.h icqhook.h irchook.h abstracthook.h rsshook.h HTTPClient.h ljhook.h
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ CONFIG_HEADER = ../../config.h
+ CONFIG_CLEAN_FILES = 
+ LIBRARIES =  $(noinst_LIBRARIES)
+@@ -106,11 +106,11 @@
+ CPPFLAGS = @CPPFLAGS@
+ LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@
+ libhooks_a_LIBADD = 
+ libhooks_a_OBJECTS =  yahoohook.o jabberhook.o aimhook.o icqhook.o \
+-irchook.o abstracthook.o rsshook.o HTTPClient.o ljhook.o
++irchook.o abstracthook.o rsshook.o HTTPClient.o ljhook.o msnhook.o
+ AR = ar
+ CXXFLAGS = @CXXFLAGS@
+ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+ CXXLD = $(CXX)
+ CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+@@ -121,11 +121,11 @@
+ 
+ TAR = gtar
+ GZIP_ENV = --best
+ DEP_FILES =  .deps/HTTPClient.P .deps/abstracthook.P .deps/aimhook.P \
+ .deps/icqhook.P .deps/irchook.P .deps/jabberhook.P .deps/ljhook.P \
+-.deps/rsshook.P .deps/yahoohook.P
++.deps/rsshook.P .deps/yahoohook.P .deps/msnhook.P
+ SOURCES = $(libhooks_a_SOURCES)
+ OBJECTS = $(libhooks_a_OBJECTS)
+ 
+ all: all-redirect
+ .SUFFIXES:
+diff -bBdNrw -U5 centericq-4.9.10/src/hooks/abstracthook.cc centericq-4.9.10-modif/src/hooks/abstracthook.cc
+--- centericq-4.9.10/src/hooks/abstracthook.cc	2003-12-11 23:41:32.000000000 +0100
++++ centericq-4.9.10-modif/src/hooks/abstracthook.cc	2004-02-06 22:31:47.000000000 +0100
+@@ -22,10 +22,11 @@
+ *
+ */
+ 
+ #include "abstracthook.h"
+ 
++#include "msnhook.h"
+ #include "icqhook.h"
+ #include "yahoohook.h"
+ #include "aimhook.h"
+ #include "irchook.h"
+ #include "jabberhook.h"
+@@ -328,10 +329,13 @@
+ abstracthook &gethook(protocolname pname) {
+     static abstracthook abshook(infocard);
+ 
+     switch(pname) {
+ 	case icq: return ihook;
++#ifdef BUILD_MSN
++	case msn: return mhook;
++#endif
+ #ifdef BUILD_YAHOO
+ 	case yahoo: return yhook;
+ #endif
+ #ifdef BUILD_AIM
+ 	case aim: return ahook;
+diff -bBdNrw -U5 centericq-4.9.10/src/hooks/msnhook.cc centericq-4.9.10-modif/src/hooks/msnhook.cc
+--- centericq-4.9.10/src/hooks/msnhook.cc	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/src/hooks/msnhook.cc	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,801 @@
++/*
++*
++* centericq MSN protocol handling class
++* $Id: msnhook.cc,v 1.67 2003/09/30 11:38:43 konst Exp $
++*
++* Copyright (C) 2001 by Konstantin Klyagin <konst@konst.org.ua>
++*
++* This program is free software; you can redistribute it and/or modify
++* it under the terms of the GNU General Public License as published by
++* the Free Software Foundation; either version 2 of the License, or (at
++* your option) any later version.
++*
++* This program is distributed in the hope that it will be useful, but
++* WITHOUT ANY WARRANTY; without even the implied warranty of
++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++* General Public License for more details.
++*
++* You should have received a copy of the GNU General Public License
++* along with this program; if not, write to the Free Software
++* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
++* USA
++*
++*/
++
++#include "icqcommon.h"
++
++#ifdef BUILD_MSN
++
++#include "msnhook.h"
++#include "icqconf.h"
++#include "icqface.h"
++#include "icqcontacts.h"
++#include "accountmanager.h"
++#include "eventmanager.h"
++#include "imlogger.h"
++#include "connwrap.h"
++
++#include "msn_bittybits.h"
++
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <netdb.h>
++#include <arpa/inet.h>
++
++msnhook mhook;
++
++static string nicknormalize(const string &nick) {
++    if(nick.find("@") == -1) return nick + "@hotmail.com";
++    return nick;
++}
++
++static string nicktodisp(const string &nick) {
++    int pos;
++    string r = nick;
++
++    if((pos = r.find("@")) != -1)
++    if(r.substr(pos+1) == "hotmail.com")
++	r.erase(pos);
++
++    return r;
++}
++
++struct st2imr {
++    char *name;
++    imstatus st;
++};
++
++const st2imr st2im[] = {
++    { "FLN", offline },
++    { "NLN", available },
++    { "HDN", invisible },
++    { "BSY", dontdisturb },
++    { "PHN", occupied },
++    { "AWY", away },
++    { "BRB", away },
++    { "LUN", notavail },
++    { "IDL", away },
++    { 0, offline }
++};
++
++static imstatus msn2imstatus(const string &sname) {
++    for(const st2imr *sa = st2im; sa->name; sa++)
++	if(sname == sa->name)
++	    return sa->st;
++
++    return offline;
++}
++
++static const char *stat2name(imstatus st) {
++    for(const st2imr *sa = st2im; sa->name; sa++)
++	if(st == sa->st)
++	    return sa->name;
++
++    return "NLN";
++}
++
++// ----------------------------------------------------------------------------
++
++msnhook::msnhook(): abstracthook(msn) {
++    ourstatus = offline;
++    fonline = false;
++
++//    fcapabs.insert(hookcapab::synclist);
++    fcapabs.insert(hookcapab::changedetails);
++    fcapabs.insert(hookcapab::directadd);
++//    fcapabs.insert(hookcapab::files);
++}
++
++msnhook::~msnhook() {
++}
++
++void msnhook::init() {
++    manualstatus = conf.getstatus(msn);
++}
++
++void msnhook::connect() {
++    icqconf::imaccount account = conf.getourid(msn);
++
++    face.log(_("+ [msn] connecting to the server"));
++
++    flogged = false;
++    fonline = true;
++
++    msn_init(&conn, nicknormalize(account.nickname).c_str(), account.password.c_str());
++    msn_connect(&conn, account.server.c_str(), account.port);
++
++    fonline = true;
++    flogged = true;
++}
++
++void msnhook::disconnect() {
++    msn_clean_up(&conn);
++}
++
++void msnhook::exectimers() {
++}
++
++void msnhook::main() {
++    vector<int>::const_iterator i;
++    fd_set rs, ws;
++    struct timeval tv;
++    int hsock;
++
++    FD_ZERO(&rs);
++    FD_ZERO(&ws);
++
++    tv.tv_sec = tv.tv_usec = 0;
++    hsock = 0;
++
++    for(i = rfds.begin(); i != rfds.end(); ++i) {
++	FD_SET(*i, &rs);
++	hsock = max(hsock, *i);
++    }
++
++    for(i = wfds.begin(); i != wfds.end(); ++i) {
++	FD_SET(*i, &ws);
++	hsock = max(hsock, *i);
++    }
++
++    if(select(hsock+1, &rs, &ws, 0, &tv) > 0) {
++	for(i = rfds.begin(); i != rfds.end(); ++i)
++	    if(FD_ISSET(*i, &rs)) {
++		msn_handle_incoming(*i, 1, 0);
++		return;
++	    }
++
++	for(i = wfds.begin(); i != wfds.end(); ++i)
++	    if(FD_ISSET(*i, &ws)) {
++		msn_handle_incoming(*i, 0, 1);
++		return;
++	    }
++    }
++}
++
++void msnhook::getsockets(fd_set &rf, fd_set &wf, fd_set &efds, int &hsocket) const {
++    vector<int>::const_iterator i;
++
++    for(i = rfds.begin(); i != rfds.end(); ++i) {
++	hsocket = max(hsocket, *i);
++	FD_SET(*i, &rf);
++    }
++
++    for(i = wfds.begin(); i != wfds.end(); ++i) {
++	hsocket = max(hsocket, *i);
++	FD_SET(*i, &wf);
++    }
++}
++
++bool msnhook::isoursocket(fd_set &rf, fd_set &wf, fd_set &efds) const {
++    vector<int>::const_iterator i;
++
++    for(i = rfds.begin(); i != rfds.end(); ++i)
++	if(FD_ISSET(*i, &rf))
++	    return true;
++
++    for(i = wfds.begin(); i != wfds.end(); ++i)
++	if(FD_ISSET(*i, &wf))
++	    return true;
++
++    return false;
++}
++
++bool msnhook::online() const {
++    return fonline;
++}
++
++bool msnhook::logged() const {
++    return fonline && flogged;
++}
++
++bool msnhook::isconnecting() const {
++    return fonline && !flogged;
++}
++
++bool msnhook::enabled() const {
++    return true;
++}
++
++bool msnhook::send(const imevent &ev) {
++    string text;
++
++    if(ev.gettype() == imevent::message) {
++	const immessage *m = static_cast<const immessage *>(&ev);
++	if(m) text = m->gettext();
++
++    } else if(ev.gettype() == imevent::url) {
++	const imurl *m = static_cast<const imurl *>(&ev);
++	if(m) text = m->geturl() + "\n\n" + m->getdescription();
++
++    } else if(ev.gettype() == imevent::file) {
++	const imfile *m = static_cast<const imfile *>(&ev);
++	vector<imfile::record> files = m->getfiles();
++	vector<imfile::record>::const_iterator ir;
++
++	for(ir = files.begin(); ir != files.end(); ++ir) {
++	    imfile::record r;
++	    invitation_ftp *p;
++
++	    r.fname = ir->fname;
++	    r.size = ir->size;
++
++	    imfile fr(ev.getcontact(), imevent::outgoing, "", vector<imfile::record>(1, r));
++
++	    if(p = msn_filetrans_send(&conn, ir->fname.c_str()))
++		transferinfo[fr].first = p;
++	}
++
++	return true;
++    }
++
++    icqcontact *c = clist.get(ev.getcontact());
++    text = siconv(text, conf.getrussian(msn) ? "koi8-u" : conf.getdefcharset(), "utf8");
++
++    if(c)
++    if(c->getstatus() != offline || !c->inlist()) {
++	msn_send_IM(&conn, nicknormalize(ev.getcontact().nickname).c_str(), text.c_str());
++	return true;
++    }
++
++    return false;
++}
++
++void msnhook::sendnewuser(const imcontact &ic) {
++    if(logged()) {
++	icqcontact *c;
++	imcontact icc(nicktodisp(ic.nickname), msn);
++
++	if(icc.nickname != ic.nickname)
++	if(c = clist.get(ic)) {
++	    c->setdesc(icc);
++	    c->setnick(icc.nickname);
++	    c->setdispnick(icc.nickname);
++	}
++
++	msn_add_to_list(&conn, "FL", nicknormalize(ic.nickname).c_str());
++    }
++
++    requestinfo(ic);
++}
++
++void msnhook::setautostatus(imstatus st) {
++    if(st != offline) {
++	if(getstatus() == offline) {
++	    connect();
++	} else {
++	    logger.putourstatus(msn, ourstatus, st);
++	    msn_set_state(&conn, stat2name(ourstatus = st));
++	}
++    } else {
++	if(getstatus() != offline) {
++	    disconnect();
++	}
++    }
++}
++
++imstatus msnhook::getstatus() const {
++    return online() ? ourstatus : offline;
++}
++
++void msnhook::removeuser(const imcontact &ic) {
++    removeuser(ic, true);
++}
++
++void msnhook::removeuser(const imcontact &ic, bool report) {
++    if(online()) {
++	if(report)
++	    face.log(_("+ [msn] removing %s from the contacts"), ic.nickname.c_str());
++
++	msn_del_from_list(&conn, "FL", nicknormalize(ic.nickname).c_str());
++    }
++}
++
++void msnhook::requestinfo(const imcontact &ic) {
++    icqcontact *c = clist.get(ic);
++
++    if(!c) {
++	c = clist.get(contactroot);
++	c->clear();
++    }
++
++    icqcontact::moreinfo m = c->getmoreinfo();
++    icqcontact::basicinfo b = c->getbasicinfo();
++
++    b.email = nicknormalize(ic.nickname);
++    m.homepage = "http://members.msn.com/" + b.email;
++
++    if(ic.nickname == conf.getourid(msn).nickname)
++	c->setnick(friendlynicks[ic.nickname]);
++
++    c->setmoreinfo(m);
++    c->setbasicinfo(b);
++}
++
++void msnhook::lookup(const imsearchparams &params, verticalmenu &dest) {
++    if(params.reverse) {
++	vector<pair<string, string> >::const_iterator i = slst["RL"].begin();
++
++	while(i != slst["RL"].end()) {
++	    icqcontact *c = new icqcontact(imcontact(nicktodisp(i->first), msn));
++	    c->setnick(i->second);
++
++	    dest.additem(conf.getcolor(cp_clist_msn), c, (string) " " + i->first);
++	    ++i;
++	}
++	face.findready();
++
++	face.log(_("+ [msn] reverse users listing finished, %d found"),
++	    slst["RL"].size());
++
++	dest.redraw();
++    }
++}
++
++vector<icqcontact *> msnhook::getneedsync() {
++    int i;
++    vector<icqcontact *> r;
++    bool found;
++
++    for(i = 0; i < clist.count; i++) {
++	icqcontact *c = (icqcontact *) clist.at(i);
++
++	if(c->getdesc().pname == msn) {
++	    vector<pair<string, string> >::const_iterator fi = slst["FL"].begin();
++
++	    for(found = false; fi != slst["FL"].end() && !found; ++fi)
++		found = c->getdesc().nickname == fi->first;
++
++	    if(!found)
++		r.push_back(c);
++	}
++    }
++
++    return r;
++}
++
++void msnhook::sendupdateuserinfo(const icqcontact &c) {
++    msn_set_friendlyname(&conn, c.getnick().c_str());
++}
++
++void msnhook::checkfriendly(icqcontact *c, const string friendlynick, bool forcefetch) {
++    string oldnick = c->getnick();
++    string newnick = unmime(friendlynick);
++
++    c->setnick(newnick);
++
++    if(forcefetch || (oldnick != newnick && c->getdispnick() == oldnick) || oldnick.empty()) {
++	c->setdispnick(newnick);
++	face.relaxedupdate();
++    }
++}
++
++void msnhook::checkinlist(imcontact ic) {
++    icqcontact *c = clist.get(ic);
++    vector<icqcontact *> notremote = getneedsync();
++
++    if(c)
++    if(c->inlist())
++    if(find(notremote.begin(), notremote.end(), c) != notremote.end())
++	mhook.sendnewuser(ic);
++}
++
++bool msnhook::knowntransfer(const imfile &fr) const {
++    return transferinfo.find(fr) != transferinfo.end();
++}
++
++void msnhook::replytransfer(const imfile &fr, bool accept, const string &localpath) {
++    if(accept) {
++	transferinfo[fr].second = localpath;
++
++	if(transferinfo[fr].second.substr(transferinfo[fr].second.size()-1) != "/")
++	    transferinfo[fr].second += "/";
++
++	transferinfo[fr].second += justfname(fr.getfiles().begin()->fname);
++	msn_filetrans_accept(transferinfo[fr].first, transferinfo[fr].second.c_str());
++
++    } else {
++	msn_filetrans_reject(transferinfo[fr].first);
++	transferinfo.erase(fr);
++
++    }
++}
++
++void msnhook::aborttransfer(const imfile &fr) {
++    msn_filetrans_reject(transferinfo[fr].first);
++
++    face.transferupdate(fr.getfiles().begin()->fname, fr,
++	icqface::tsCancel, 0, 0);
++
++    transferinfo.erase(fr);
++}
++
++bool msnhook::getfevent(invitation_ftp *fhandle, imfile &fr) {
++    map<imfile, pair<invitation_ftp *, string> >::const_iterator i = transferinfo.begin();
++
++    while(i != transferinfo.end()) {
++	if(i->second.first == fhandle) {
++	    fr = i->first;
++	    return true;
++	}
++	++i;
++    }
++
++    return false;
++}
++
++// ----------------------------------------------------------------------------
++
++static void log(const string &s) {
++#ifdef DEBUG
++    face.log(s);
++#endif
++}
++
++int ext_debug( char *str )
++{
++    log( str );
++    return 0;
++}
++
++void ext_register_sock(int s, int reading, int writing) {
++    log("ext_register_sock");
++    if(reading) mhook.rfds.push_back(s);
++    if(writing) mhook.wfds.push_back(s);
++}
++
++void ext_unregister_sock(int s) {
++    log("ext_unregister_sock");
++    vector<int>::iterator i;
++
++    i = find(mhook.rfds.begin(), mhook.rfds.end(), s);
++    if(i != mhook.rfds.end()) mhook.rfds.erase(i);
++
++    i = find(mhook.wfds.begin(), mhook.wfds.end(), s);
++    if(i != mhook.wfds.end()) mhook.wfds.erase(i);
++}
++
++void ext_got_friendlyname(msnconn * conn, const char * friendlyname) {
++    log("ext_got_friendlyname");
++
++    if(friendlyname)
++    if(strlen(friendlyname))
++	mhook.friendlynicks[conf.getourid(msn).nickname] = friendlyname;
++}
++
++void ext_got_info(msnconn *conn, syncinfo *info) {
++    log("ext_got_info");
++
++    userdata *ud;
++    llist *lst, *pl;
++    imcontact ic;
++
++    for(lst = info->fl; lst; lst = lst->next) {
++	ud = (userdata *) lst->data;
++
++	mhook.slst["FL"].push_back(make_pair(ud->username, ud->friendlyname));
++
++	ic = imcontact(nicktodisp(ud->username), msn);
++	icqcontact *c = clist.get(ic);
++	if(!c) c = clist.addnew(ic, false);
++
++	icqcontact::basicinfo bi = c->getbasicinfo();
++	icqcontact::workinfo wi = c->getworkinfo();
++
++	for(pl = ud->phone; pl; pl = pl->next) {
++	    phonedata *pd = (phonedata *) pl->data;
++	    string title = pd->title ? pd->title : "";
++
++	    if(pd->number)
++	    if(strlen(pd->number)) {
++		if(title == "PHH") bi.phone = pd->number; else
++		if(title == "PHW") wi.phone = pd->number; else
++		if(title == "PHM") bi.cellular = pd->number;
++	    }
++	}
++
++	c->setbasicinfo(bi);
++	c->setworkinfo(wi);
++    }
++
++    for(lst = info->rl; lst; lst = lst->next) {
++	ud = (userdata *) lst->data;
++	mhook.slst["RL"].push_back(make_pair(ud->username, ud->friendlyname));
++    }
++
++    mhook.setautostatus(mhook.ourstatus);
++}
++
++void ext_latest_serial(msnconn * conn, int serial) {
++    log("ext_latest_serial");
++}
++
++void ext_got_GTC(msnconn * conn, char c) {
++    log("ext_got_GTC");
++}
++
++void ext_got_BLP(msnconn * conn, char c) {
++    log("ext_got_BLP");
++}
++
++void ext_new_RL_entry(msnconn *conn, const char *username, const char *friendlyname) {
++    log("ext_new_RL_entry");
++    msn_add_to_list(&mhook.conn, "AL", username);
++
++    imcontact ic(nicktodisp(username), msn);
++    mhook.checkinlist(ic);
++    em.store(imnotification(ic, _("The user has added you to his/her contact list")));
++}
++
++void ext_new_list_entry(msnconn *conn, const char *lst, const char *username) {
++    log("ext_new_list_entry");
++    mhook.slst[lst].push_back(make_pair(username, string()));
++}
++
++void ext_del_list_entry(msnconn *conn, const char *lst, const char *username) {
++    log("ext_del_list_entry");
++
++    vector<pair<string, string> >::iterator i = mhook.slst[lst].begin();
++    while(i != mhook.slst[lst].end()) {
++	if(i->first == username) {
++	    mhook.slst[lst].erase(i);
++	    i = mhook.slst[lst].begin();
++	} else {
++	    ++i;
++	}
++    }
++}
++
++void ext_show_error(msnconn * conn, const char * msg) {
++    log("ext_show_error");
++    log(msg);
++}
++
++void ext_buddy_set(msnconn * conn, const char * buddy, const char * friendlyname, const char * status) {
++    log("ext_buddy_set");
++    imcontact ic(nicktodisp(buddy), msn);
++    icqcontact *c = clist.get(ic);
++    bool forcefetch;
++
++    if(forcefetch = !c)
++	c = clist.addnew(ic, false);
++
++    if(friendlyname)
++	mhook.checkfriendly(c, friendlyname, forcefetch);
++
++    logger.putonline(ic, c->getstatus(), msn2imstatus(status));
++    c->setstatus(msn2imstatus(status));
++}
++
++void ext_buddy_offline(msnconn * conn, const char * buddy) {
++    log("ext_buddy_offline");
++    ext_buddy_set(conn, buddy, 0, "FLN");
++}
++
++void ext_got_SB(msnconn * conn, void * tag) {
++    log("ext_got_SB");
++}
++
++void ext_user_joined(msnconn *conn, const char *username, const char *friendlyname, int is_initial) {
++    log("ext_user_joined");
++}
++
++void ext_user_left(msnconn *conn, const char *username) {
++    log("ext_user_left");
++}
++
++void ext_got_IM(msnconn *conn, const char *username, const char *friendlyname, message *msg) {
++    log("ext_got_IM");
++    imcontact ic(nicktodisp(username), msn);
++
++    mhook.checkinlist(ic);
++
++    string text = siconv(msg->body, "utf8", conf.getrussian(msn) ? "koi8-u" : conf.getdefcharset());
++    em.store(immessage(ic, imevent::incoming, text));
++}
++
++void ext_IM_failed(msnconn *conn) {
++    log("ext_IM_failed");
++}
++
++void ext_typing_user(msnconn *conn, const char *username, const char *friendlyname) {
++    log("ext_typing_user");
++    icqcontact *c = clist.get(imcontact(nicktodisp(username), msn));
++    if(c) c->setlasttyping(timer_current);
++}
++
++void ext_initial_email(msnconn *conn, int unread_inbox, int unread_folders) {
++    log("ext_initial_email");
++
++    face.log(_("+ [msn] unread e-mail: %d in inbox, %d in folders"),
++	unread_inbox, unread_folders);
++}
++
++void ext_new_mail_arrived(msnconn *conn, const char *from, const char *subject) {
++    log("ext_new_mail_arrived");
++
++    face.log(_("+ [msn] e-mail from %s, %s"), from, subject);
++    clist.get(contactroot)->playsound(imevent::email);
++}
++
++void ext_filetrans_invite(msnconn *conn, const char *username, const char *friendlyname, invitation_ftp *inv) {
++    log("ext_filetrans_invite");
++
++    if(!mhook.fcapabs.count(hookcapab::files))
++	return;
++
++    imfile::record r;
++    r.fname = inv->filename;
++    r.size = inv->filesize;
++
++    imcontact ic(nicktodisp(username), msn);
++    mhook.checkinlist(ic);
++
++    imfile fr(ic, imevent::incoming, "", vector<imfile::record>(1, r));
++
++    mhook.transferinfo[fr].first = inv;
++    em.store(fr);
++
++    face.transferupdate(inv->filename, fr, icqface::tsInit, inv->filesize, 0);
++}
++
++void ext_filetrans_progress(invitation_ftp *inv, const char *status, unsigned long sent, unsigned long total) {
++    log("ext_filetrans_progress");
++    imfile fr;
++
++    if(mhook.getfevent(inv, fr)) {
++	face.transferupdate(fr.getfiles().begin()->fname, fr,
++	    icqface::tsProgress, total, sent);
++    }
++}
++
++void ext_filetrans_failed(invitation_ftp *inv, int error, const char *message) {
++    log("ext_filetrans_failed");
++    imfile fr;
++
++    if(mhook.getfevent(inv, fr)) {
++	face.transferupdate(fr.getfiles().begin()->fname, fr, icqface::tsError, 0, 0);
++	mhook.transferinfo.erase(fr);
++    }
++}
++
++void ext_filetrans_success(invitation_ftp *inv) {
++    log("ext_filetrans_success");
++    imfile fr;
++
++    if(mhook.getfevent(inv, fr)) {
++	face.transferupdate(fr.getfiles().begin()->fname, fr, icqface::tsFinish, 0, 0);
++	mhook.transferinfo.erase(fr);
++    }
++}
++
++void ext_new_connection(msnconn *conn) {
++    log("ext_new_connection");
++    if(conn->type == CONN_NS) {
++	msn_sync_lists(conn, 0);
++	logger.putourstatus(msn, offline, mhook.ourstatus = mhook.manualstatus);
++	mhook.flogged = true;
++	face.log(_("+ [msn] logged in"));
++	face.update();
++    }
++}
++
++void ext_closing_connection(msnconn *conn) {
++    log("ext_closing_connection");
++    if(conn->type == CONN_NS) {
++	mhook.rfds.clear();
++	mhook.wfds.clear();
++	logger.putourstatus(msn, mhook.getstatus(), mhook.ourstatus = offline);
++	clist.setoffline(msn);
++	mhook.fonline = false;
++	mhook.slst.clear();
++	face.log(_("+ [msn] disconnected"));
++	face.update();
++    }
++}
++
++void ext_changed_state(msnconn *conn, const char *state) {
++    log("ext_changed_state");
++}
++
++int ext_do_connect_socket(const char *hostname, int port, int ssl) {
++    struct sockaddr_in sa;
++    struct hostent *hp;
++    int a, s;
++    string msgerr = _("+ [msn] cannot connect: ");
++
++    hp = gethostbyname(hostname);
++    if(!hp) {
++	face.log(msgerr + _("could not resolve hostname"));
++	errno = ECONNREFUSED;
++	return -1;
++    }
++
++    memset(&sa, 0, sizeof(sa));
++    memcpy((char *) &sa.sin_addr, hp->h_addr, hp->h_length);
++    sa.sin_family = hp->h_addrtype;
++    sa.sin_port = htons((u_short) port);
++
++    if((s = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0)
++	return -1;
++
++    if(cw_connect(s, (struct sockaddr *) &sa, sizeof(sa), ssl) < 0) {
++	face.log(msgerr + _("verify the hostname and port"));
++	close(s);
++	return -1;
++    }
++
++    return s;
++}
++
++int ext_connect_socket_ssl(const char *hostname, int port) {
++        log("ext_connect_socket_ssl");
++        return ext_do_connect_socket(hostname, port, 1);
++}
++
++int ext_connect_socket(const char *hostname, int port) {
++        log("ext_connect_socket");
++        return ext_do_connect_socket(hostname, port, 0);
++}
++
++int ext_server_socket(int port) {
++    log("ext_server_socket");
++    int s;
++    struct sockaddr_in addr;
++
++    if((s = socket(AF_INET, SOCK_STREAM, 0)) < 0)
++	return -1;
++
++    memset(&addr, 0, sizeof(addr));
++    addr.sin_family = AF_INET;
++    addr.sin_port = htons(port);
++
++    if(bind(s, (sockaddr *) &addr, sizeof(addr)) < 0 || listen(s, 1) < 0) {
++	close(s);
++	return -1;
++    }
++
++    return s;
++}
++
++char *ext_get_IP() {
++    log("ext_get_IP");
++    struct hostent *hn;
++    char buf2[1024];
++
++    gethostname(buf2, 1024);
++    hn = gethostbyname(buf2);
++
++    return inet_ntoa(*((struct in_addr*) hn->h_addr));
++}
++
++void ext_protocol_log(const char *buf, int readev, int writeev) {
++    if(readev) {
++	log(string("[IN] ") + buf);
++    } else if(writeev) {
++	log(string("[OUT] ") + buf);
++    }
++}
++
++#endif
+diff -bBdNrw -U5 centericq-4.9.10/src/hooks/msnhook.h centericq-4.9.10-modif/src/hooks/msnhook.h
+--- centericq-4.9.10/src/hooks/msnhook.h	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.9.10-modif/src/hooks/msnhook.h	2004-02-06 22:31:47.000000000 +0100
+@@ -0,0 +1,89 @@
++#ifndef __MSNHOOK_H__
++#define __MSNHOOK_H__
++
++#include "abstracthook.h"
++
++#ifdef BUILD_MSN
++
++#include "msn_core.h"
++
++class msnhook : public abstracthook {
++
++    friend void ext_register_sock(int s, int reading, int writing);
++    friend void ext_unregister_sock(int s);
++    friend void ext_new_connection(msnconn *conn);
++    friend void ext_closing_connection(msnconn * conn);
++    friend void ext_buddy_set(msnconn *conn, const char *buddy, const char *friendlyname, const char *status);
++    friend void ext_got_info(msnconn *conn, syncinfo *info);
++    friend void ext_got_friendlyname(msnconn *conn, const char *friendlyname);
++    friend void ext_new_RL_entry(msnconn *conn, const char *username, const char *friendlyname);
++    friend void ext_new_list_entry(msnconn *conn, const char *lst, const char *username);
++    friend void ext_del_list_entry(msnconn *conn, const char *lst, const char *username);
++    friend void ext_got_IM(msnconn *conn, const char *username, const char *friendlyname, message *msg);
++    friend void ext_filetrans_invite(msnconn *conn, const char *username, const char *friendlyname, invitation_ftp *inv);
++    friend void ext_typing_user(msnconn *conn, const char *username, const char *friendlyname);
++    friend void ext_filetrans_progress(invitation_ftp *inv, const char *status, unsigned long sent, unsigned long total);
++    friend void ext_filetrans_failed(invitation_ftp *inv, int error, const char *message);
++    friend void ext_filetrans_success(invitation_ftp *inv);
++
++    protected:
++	imstatus ourstatus;
++	bool fonline, flogged;
++	msnconn conn;
++
++	vector<int> rfds, wfds;
++	map<string, string> friendlynicks;
++	map<string, vector<pair<string, string> > > slst;
++	map<imfile, pair<invitation_ftp *, string> > transferinfo;
++
++	void checkfriendly(icqcontact *c, const string friendlynick,
++	    bool forcefetch = false);
++
++	void checkinlist(imcontact ic);
++
++	void removeuser(const imcontact &ic, bool report);
++	bool getfevent(invitation_ftp *fhandle, imfile &fr);
++
++    public:
++	msnhook();
++	~msnhook();
++
++	void init();
++
++	void connect();
++	void disconnect();
++	void exectimers();
++	void main();
++
++	void getsockets(fd_set &rf, fd_set &wf, fd_set &ef, int &hsocket) const;
++	bool isoursocket(fd_set &rf, fd_set &wf, fd_set &ef) const;
++
++	bool online() const;
++	bool logged() const;
++	bool isconnecting() const;
++	bool enabled() const;
++
++	bool send(const imevent &ev);
++
++	void sendnewuser(const imcontact &c);
++	void removeuser(const imcontact &ic);
++	void requestinfo(const imcontact &ic);
++
++	void sendupdateuserinfo(const icqcontact &c);
++
++	void setautostatus(imstatus st);
++	imstatus getstatus() const;
++
++	void lookup(const imsearchparams &params, verticalmenu &dest);
++	vector<icqcontact *> getneedsync();
++
++	bool knowntransfer(const imfile &fr) const;
++	void replytransfer(const imfile &fr, bool accept, const string &localpath = string());
++	void aborttransfer(const imfile &fr);
++};
++
++extern msnhook mhook;
++
++#endif
++
++#endif
+diff -bBdNrw -U5 centericq-4.9.10/src/imcontroller.cc centericq-4.9.10-modif/src/imcontroller.cc
+--- centericq-4.9.10/src/imcontroller.cc	2003-12-11 23:41:31.000000000 +0100
++++ centericq-4.9.10-modif/src/imcontroller.cc	2004-02-06 22:31:47.000000000 +0100
+@@ -26,10 +26,11 @@
+ #include "icqface.h"
+ #include "icqhook.h"
+ #include "yahoohook.h"
+ #include "aimhook.h"
+ #include "irchook.h"
++#include "msnhook.h"
+ #include "jabberhook.h"
+ #include "icqcontacts.h"
+ #include "eventmanager.h"
+ 
+ #define clr(c)     conf.getcolor(c)
--- centericq-4.20.0.orig/debian/patches/connwrap.dpatch
+++ centericq-4.20.0/debian/patches/connwrap.dpatch
@@ -0,0 +1,74 @@
+#! /bin/sh -e
+## msn.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: Fix segfault when connecting to msn
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0 ;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.9.10/connwrap-0.1/connwrap.c centericq-4.9.10-modif/connwrap-0.1/connwrap.c
+--- centericq-4.9.19/connwrap-0.1/connwrap.c	2003-09-30 09:25:46.000000000 +0200
++++ centericq-4.9.10-modif/connwrap-0.1/connwrap.c	2004-02-24 19:59:21.000000000 +0100
+@@ -1,10 +1,11 @@
+ #include "connwrap.h"
+ 
+ #include <netdb.h>
+ #include <string.h>
+ #include <netinet/in.h>
++#include <stdio.h>
+ 
+ #ifdef HAVE_OPENSSL
+ 
+ #define OPENSSL_NO_KRB5 1
+ #include <openssl/ssl.h>
+@@ -63,10 +64,12 @@
+ 
+ static void delsock(int fd) {
+     int i, nsockcount;
+     sslsock *nsocks;
+ 
++    if (sockcount > 1)
++      {
+     nsockcount = 0;
+     nsocks = (sslsock *) malloc(sizeof(sslsock)*(sockcount-1));
+ 
+     for(i = 0; i < sockcount; i++) {
+ 	if(socks[i].fd != fd) {
+@@ -75,14 +78,22 @@
+ 	    SSL_free(socks[i].ssl);
+ 	}
+     }
+ 
+     free(socks);
+-
+     socks = nsocks;
+     sockcount = nsockcount;
+ }
++    else
++      {
++	if (socks)
++	  free(socks);
++	socks = 0;
++	sockcount = 0;
++      }
++    
++}
+ 
+ #endif
+ 
+ static char *bindaddr = 0;
+ 
--- centericq-4.20.0.orig/debian/patches/icqface_segv.dpatch
+++ centericq-4.20.0/debian/patches/icqface_segv.dpatch
@@ -0,0 +1,53 @@
+#! /bin/sh -e
+## msn.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: Fix segfault when pressing 'c' key on 'Online' or 'Offline' tree 
+## DP: item
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0
+	       chmod +x blip-0.1/missing;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+--- centericq/src/icqface.cc	2004-01-15 22:25:31.000000000 +0100
++++ centericq-modif/src/icqface.cc	2004-02-24 20:58:59.000000000 +0100
+@@ -2876,12 +2876,11 @@
+ 
+     set<hookcapab::enumeration> capab;
+ 
+     face.extk = 0;
+ 
+-    if(c)
+-    if(c->getdesc() != contactroot) {
++    if(c && c->getdesc() != contactroot) {
+ 	capab = gethook(c->getdesc().pname).getCapabs();
+     }
+ 
+     switch(k) {
+ 	case '?':
+@@ -2920,11 +2919,11 @@
+ 	case 'c':
+ 	case 'C':
+ 	    if(capab.count(hookcapab::contacts))
+ 		face.extk = ACT_CONTACT;
+ 
+-	    if(c->getdesc().pname == rss)
++	    if(c && c->getdesc().pname == rss)
+ 		face.extk = ACT_PING;
+ 
+ 	    break;
+ 
+ 	case 'f':
--- centericq-4.20.0.orig/debian/patches/connwrap2.dpatch
+++ centericq-4.20.0/debian/patches/connwrap2.dpatch
@@ -0,0 +1,42 @@
+#! /bin/sh -e
+## msn.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: Fix segfault when connecting to msn
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0
+	       chmod +x blip-0.1/missing;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+--- centericq-4.9.19.orig/connwrap-0.1/connwrap.c	2004-03-17 
+21:57:03.000000000 +0100
++++ centericq-4.9.19/connwrap-0.1/connwrap.c	2004-03-17 
+21:57:32.000000000 +0100
+@@ -37,11 +37,14 @@
+     return 0;
+ }
+ 
+ static sslsock *addsock(int fd) {
+     sslsock *p;
++    if (socks)
+     socks = (sslsock *) realloc(socks, sizeof(sslsock)*++sockcount);
++    else
++      socks = (sslsock *) malloc(sizeof(sslsock)*++sockcount);    
+ 
+     p = &socks[sockcount-1];
+ 
+     if(!ctx) {
+ 	SSL_library_init();
--- centericq-4.20.0.orig/debian/patches/browser.dpatch
+++ centericq-4.20.0/debian/patches/browser.dpatch
@@ -0,0 +1,203 @@
+#! /bin/sh -e
+## browser.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: Allow user to select HTTP browser
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.11.0.orig/src/icqconf.cc centericq-4.11.0/src/icqconf.cc
+--- centericq-4.11.0.orig/src/icqconf.cc	2004-08-05 23:31:22.000000000 +0200
++++ centericq-4.11.0/src/icqconf.cc	2004-08-05 23:35:10.000000000 +0200
+@@ -380,10 +380,11 @@
+ 
+     if(f.is_open()) {
+ 	mailcheck = askaway = false;
+ 	savepwd = bidi = true;
+ 	setsmtphost("");
++	setbrowser("");
+ 	setpeertopeer(0, 65535);
+ 
+ 	while(!f.eof()) {
+ 	    getstring(f, buf);
+ 	    rbuf = buf;
+@@ -400,10 +401,11 @@
+ 	    if(param == "socksusername") socksuser = buf; else
+ 	    if(param == "sockspass") sockspass = buf; else
+ 	    if((param == "usegroups") || (param == "group1")) fgroupmode = group1; else
+ 	    if(param == "group2") fgroupmode = group2; else
+ 	    if(param == "smtp") setsmtphost(buf); else
++	    if(param == "browser") setbrowser(browser); else
+ 	    if(param == "http_proxy") sethttpproxyhost(buf); else
+ 	    if(param == "log") makelog = true; else
+ 	    if(param == "proxy_connect") proxyconnect = true; else
+ 	    if(param == "proxy_ssl") proxyssl = true; else
+ 	    if(param == "chatmode") initmultiproto(chatmode, buf, true); else
+@@ -502,10 +504,11 @@
+ 	    if(!getbidi()) f << "nobidi" << endl;
+ 	    if(logtimestamps) f << "logtimestamps" << endl;
+ 	    if(logonline) f << "logonline" << endl;
+ 
+ 	    f << "smtp\t" << getsmtphost() << ":" << getsmtpport() << endl;
++	    f << "browser\t" << getbrowser() << endl;
+ 
+ 	    if(!gethttpproxyhost().empty())
+ 		if (!gethttpproxyuser().empty())
+ 		    f << "http_proxy\t" << gethttpproxyuser() << ":" << gethttpproxypasswd() << "@" << gethttpproxyhost() << ":" << gethttpproxyport() << endl;
+ 		else
+@@ -719,21 +722,18 @@
+ 	fi.close();
+     }
+ }
+ 
+ void icqconf::loadactions() {
+-    string fname = getconfigfname("actions"), buf, name, browser;
++    string fname = getconfigfname("actions"), buf, name;
++    
+     ifstream f;
+     bool cont;
+ 
+     if(access(fname.c_str(), F_OK)) {
+ 	buf = getenv("PATH") ? getenv("PATH") : "";
+ 
+-	if(pathfind(browser = "mozilla", buf, X_OK).empty()) {
+-	    browser = "netscape";
+-	}
+-
+ 	ofstream of(fname.c_str());
+ 
+ 	if(of.is_open()) {
+ 	    of << "# This file contains external actions configuration for centericq" << endl;
+ 	    of << "# Every line should look like: <action> <command>" << endl;
+@@ -1334,10 +1334,17 @@
+ 	    }
+ 	}
+     }
+ }
+ 
++void icqconf::setbrowser(const string &abrowser) {
++  if (!abrowser.empty())
++    browser = abrowser;
++  else
++    browser = "mozilla";
++}
++
+ void icqconf::setsmtphost(const string &asmtphost) {
+     int pos;
+ 
+     smtphost = "";
+     smtpport = 0;
+@@ -1386,10 +1393,14 @@
+     }
+ 
+     setproxy();
+ }
+ 
++string icqconf::getbrowser() const {
++  return browser.empty() ? "mozilla" : browser;
++}
++
+ string icqconf::getsmtphost() const {
+     return smtphost.empty() ? "localhost" : smtphost;
+ }
+ 
+ unsigned int icqconf::getsmtpport() const {
+diff -bBdNrw -U5 centericq-4.11.0.orig/src/icqconf.h centericq-4.11.0/src/icqconf.h
+--- centericq-4.11.0.orig/src/icqconf.h	2004-08-05 23:31:22.000000000 +0200
++++ centericq-4.11.0/src/icqconf.h	2004-08-05 23:36:23.000000000 +0200
+@@ -132,11 +132,11 @@
+ 	bool entersends[protocolname_size];
+ 	bool nonimonline[protocolname_size];
+ 
+ 	string sockshost, socksuser, sockspass, basedir, argv0, smtphost,
+ 	    bindhost, httpproxyhost, httpproxyuser, httpproxypasswd,
+-	    fromcharset, tocharset;
++	    fromcharset, tocharset, browser;
+ 
+ 	map<string, string> actions;
+ 
+ 	regsound rs;
+ 	regcolor rc;
+@@ -237,10 +237,13 @@
+ 
+ 	string getsmtphost() const;
+ 	unsigned int getsmtpport() const;
+ 	void setsmtphost(const string &asmtphost);
+ 
++	string getbrowser() const;
++	void setbrowser(const string &abrowser);
++
+ 	string gethttpproxyhost() const;
+ 	unsigned int gethttpproxyport() const;
+ 	void sethttpproxyhost(const string &ahttpproxyhost);
+ 	string gethttpproxyuser() const;
+ 	string gethttpproxypasswd() const;
+diff -bBdNrw -U5 centericq-4.11.0.orig/src/icqdialogs.cc centericq-4.11.0/src/icqdialogs.cc
+--- centericq-4.11.0.orig/src/icqdialogs.cc	2004-08-05 23:31:22.000000000 +0200
++++ centericq-4.11.0/src/icqdialogs.cc	2004-08-05 23:37:44.000000000 +0200
+@@ -1088,10 +1088,11 @@
+     int nopt, n, i, b, nconf, ncomm, aaway, ana, noth, nfeat, ncl;
+     protocolname pname;
+     string tmp, phidden;
+ 
+     string smtp = conf.getsmtphost() + ":" + i2str(conf.getsmtpport());
++    string browser = conf.getbrowser();
+ 
+     bool quote = conf.getquote();
+     bool savepwd = conf.getsavepwd();
+     bool hideoffl = conf.gethideoffline();
+     bool antispam = conf.getantispam();
+@@ -1230,10 +1231,11 @@
+ 
+ 	t.addleaff(i, 0, 29, _(" Always online non-IM contacts for : %s"), tmp.c_str());
+ 
+ 	i = t.addnode(_(" Communications "));
+ 	t.addleaff(i, 0, 19, _(" SMTP server : %s "), smtp.c_str());
++	t.addleaff(i, 0, 30, _(" HTTP browser : %s "), browser.c_str());
+ 	t.addleaff(i, 0, 24, _(" HTTP proxy server : %s "), httpproxy.c_str());
+ 
+ 	if(!httpproxy.empty())
+ 	    t.addleaff(i, 0, 11, _(" Proxy only for HTTP (rss and lj) : %s "), stryesno(!proxyconnect));
+ 
+@@ -1370,10 +1372,15 @@
+ 			if(input.getlastkey() == '\r') iconvlang = convlanguages.begin();
+ 			break;
+ 		    case 29:
+ 			selectproto(nonimonline, spnonIM);
+ 			break;
++		    case 30:
++			tmp = inputstr(_("HTTP browser to use: "), browser);
++			if(!tmp.empty()) browser = browser;
++		        break;
++
+ 		}
+ 		break;
+ 	    case 1:
+ 		finished = success = true;
+ 		conf.setquote(quote);
+@@ -1407,10 +1414,11 @@
+ 		    conf.setgroupmode(gmode);
+ 		    clist.rearrange();
+ 		}
+ 
+ 		conf.setsmtphost(smtp);
++		conf.setbrowser(browser);
+ 		conf.sethttpproxyhost(httpproxy);
+ 		conf.save();
+ 		break;
+ 	}
+     }
--- centericq-4.20.0.orig/debian/patches/libgadu.dpatch
+++ centericq-4.20.0/debian/patches/libgadu.dpatch
@@ -0,0 +1,109 @@
+#! /bin/sh -e
+## libgadu.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: allow use of libgnutls in libgadu
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0 ;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.10.0.orig/libgadu-0.1/events.c centericq-4.10.0.modif/libgadu-0.1/events.c
+--- centericq-4.10.0.orig/libgadu-0.1/events.c	2004-06-10 21:20:08.000000000 +0200
++++ centericq-4.10.0.modif/libgadu-0.1/events.c	2004-07-01 07:20:37.000000000 +0200
+@@ -36,12 +36,11 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <time.h>
+ #include <unistd.h>
+ #ifdef __GG_LIBGADU_HAVE_OPENSSL
+-#  include <openssl/err.h>
+-#  include <openssl/x509.h>
++#  include <gnutls/openssl.h>
+ #endif
+ 
+ #include "compat.h"
+ #include "libgadu.h"
+ 
+@@ -1223,11 +1222,11 @@
+ 
+ 					break;
+ 				} else {
+ 					char buf[1024];
+ 
+-					ERR_error_string_n(ERR_get_error(), buf, sizeof(buf));
++					ERR_error_string(ERR_get_error(), buf);
+ 
+ 					gg_debug(GG_DEBUG_MISC, "// gg_watch_fd() SSL_connect() bailed out: %s\n", buf);
+  
+ 					e->type = GG_EVENT_CONN_FAILED;
+ 					e->event.failure = GG_FAILURE_TLS;
+diff -bBdNrw -U5 centericq-4.10.0.orig/libgadu-0.1/libgadu.c centericq-4.10.0.modif/libgadu-0.1/libgadu.c
+--- centericq-4.10.0.orig/libgadu-0.1/libgadu.c	2004-03-31 00:44:07.000000000 +0200
++++ centericq-4.10.0.modif/libgadu-0.1/libgadu.c	2004-07-01 07:20:37.000000000 +0200
+@@ -41,12 +41,11 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ #ifdef __GG_LIBGADU_HAVE_OPENSSL
+ #define OPENSSL_NO_KRB5 1
+-#  include <openssl/err.h>
+-#  include <openssl/rand.h>
++#  include <gnutls/openssl.h>
+ #endif
+ 
+ #include "compat.h"
+ #include "libgadu.h"
+ 
+@@ -740,21 +739,21 @@
+ 		}
+ 
+ 		sess->ssl_ctx = SSL_CTX_new(TLSv1_client_method());
+ 
+ 		if (!sess->ssl_ctx) {
+-			ERR_error_string_n(ERR_get_error(), buf, sizeof(buf));
++			ERR_error_string(ERR_get_error(), buf);
+ 			gg_debug(GG_DEBUG_MISC, "// gg_login() SSL_CTX_new() failed: %s\n", buf);
+ 			goto fail;
+ 		}
+ 
+ 		SSL_CTX_set_verify(sess->ssl_ctx, SSL_VERIFY_NONE, NULL);
+ 
+ 		sess->ssl = SSL_new(sess->ssl_ctx);
+ 
+ 		if (!sess->ssl) {
+-			ERR_error_string_n(ERR_get_error(), buf, sizeof(buf));
++			ERR_error_string(ERR_get_error(), buf);
+ 			gg_debug(GG_DEBUG_MISC, "// gg_login() SSL_new() failed: %s\n", buf);
+ 			goto fail;
+ 		}
+ #else
+ 		gg_debug(GG_DEBUG_MISC, "// gg_login() client requested TLS but no support compiled in\n");
+diff -bBdNrw -U5 centericq-4.10.0.orig/libgadu-0.1/libgadu.h centericq-4.10.0.modif/libgadu-0.1/libgadu.h
+--- centericq-4.10.0.orig/libgadu-0.1/libgadu.h	2004-06-10 21:20:08.000000000 +0200
++++ centericq-4.10.0.modif/libgadu-0.1/libgadu.h	2004-07-01 07:21:04.000000000 +0200
+@@ -41,11 +41,11 @@
+ 
+ #ifndef OPENSSL_NO_KRB5
+ #define OPENSSL_NO_KRB5 1
+ #endif
+ 
+-#include <openssl/ssl.h>
++#include <gnutls/openssl.h>
+ #endif
+ 
+ /*
+  * typedef uin_t
+  *
--- centericq-4.20.0.orig/debian/patches/00list
+++ centericq-4.20.0/debian/patches/00list
@@ -0,0 +1,7 @@
+emacs-improve
+makefile_src
+browser
+libgadu
+icqface_help
+msg_esc
+gpg
--- centericq-4.20.0.orig/debian/patches/icqface_help.dpatch
+++ centericq-4.20.0/debian/patches/icqface_help.dpatch
@@ -0,0 +1,33 @@
+#! /bin/sh -e
+## msn.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: Fix typo in --help command
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0 ;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+--- centericq-4.9.12-orig/src/icqconf.cc	2004-05-09 03:36:53.000000000 +0200
++++ centericq-4.9.12/src/icqconf.cc	2004-05-09 03:37:29.000000000 +0200
+@@ -1268,7 +1268,7 @@
+     cout << endl << _("Events sending options:") << endl;
+     cout << _("  -s, --send <event type>  event type; can be msg, sms or url") << endl;
+     cout << _("  -S, --status <status>    change the current IM status") << endl;
+-    cout << _("  -p, --proto <protocol>   protocol type; can be icq, yahoo, aim, irc, jabber or lj") << endl;
++    cout << _("  -p, --proto <protocol>   protocol type; can be icq, yahoo, msn, aim, irc, jab, rss, lj, gg or infocard") << endl;
+ 
+     cout << _("  -t, --to <destination>   destination UIN or nick (depends on protocol)") << endl;
+     cout << _("  -n, --number <phone#>    mobile number to send an event to (sms only)") << endl;
--- centericq-4.20.0.orig/debian/patches/msn_disconnect.dpatch
+++ centericq-4.20.0/debian/patches/msn_disconnect.dpatch
@@ -0,0 +1,69 @@
+#! /bin/sh -e
+## msn.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: apply patch from Paul Hampson <Paul.Hampson@anu.edu.au> to fix 
+## DP: MSN server disconnection
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+          echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+          exit 1;;
+esac
+
+exit 0
+--- centericq-4.10.0.orig/libmsn-0.1/msn/notificationserver.cpp	2004-07-19 21:07:20.000000000 +0200
++++ centericq-4.10.0/libmsn-0.1/msn/notificationserver.cpp 2004-07-19 21:10:20.000000000 +0200
+@@ -375,7 +375,7 @@
+     {
+ 	assert(connectionStatus >= NS_CONNECTED);
+ 	std::ostringstream buf_;
+-	buf_ << "ADD " << trid++ << " " << "FL" << " " << buddyName << " " << buddyName <<  groupID << "\r\n";
++	buf_ << "ADD " << trid++ << " " << "FL" << " " << buddyName << " " << buddyName <<  " " << groupID << "\r\n";
+ 	write(buf_);
+     }
+     
+@@ -383,7 +383,7 @@
+     {
+ 	assert(connectionStatus >= NS_CONNECTED);
+ 	std::ostringstream buf_;
+-	buf_ << "REM " << trid++ << " " << "FL" << " " << buddyName << groupID << "\r\n";
++	buf_ << "REM " << trid++ << " " << "FL" << " " << buddyName << " " << groupID << "\r\n";
+ 	write(buf_);
+     }
+     
+@@ -391,7 +391,7 @@
+     {
+ 	assert(connectionStatus >= NS_CONNECTED);
+ 	std::ostringstream buf_;
+-	buf_ << "ADG " << trid++ << encodeURL(groupName) << " " << 0 << "\r\n";
++	buf_ << "ADG " << trid++ << " " << encodeURL(groupName) << " " << 0 << "\r\n";
+ 	write(buf_);        
+     }
+     
+@@ -399,7 +399,7 @@
+     {
+ 	assert(connectionStatus >= NS_CONNECTED);
+ 	std::ostringstream buf_;
+-	buf_ << "RMG " << trid++ << groupID << "\r\n";
++	buf_ << "RMG " << trid++ << " " << groupID << "\r\n";
+ 	write(buf_);
+     }
+     
+@@ -407,7 +407,7 @@
+     {
+ 	assert(connectionStatus >= NS_CONNECTED);
+ 	std::ostringstream buf_;
+-	buf_ << "REG " << trid++ << groupID << " " << encodeURL(newGroupName) << " " << 0 << "\r\n";
++	buf_ << "REG " << trid++ << " " << groupID << " " << encodeURL(newGroupName) << " " << 0 << "\r\n";
+ 	write(buf_);
+     }
+     
--- centericq-4.20.0.orig/debian/patches/msg_esc.dpatch
+++ centericq-4.20.0/debian/patches/msg_esc.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+## msn.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: replace 'esc' msg by 'esc-esc'
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+          echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+          exit 1;;
+esac
+
+exit 0
+--- centericq-4.10.0.orig/src/icqface.cc	2004-07-19 21:01:19.000000000 +0200
++++ centericq-4.9.10/src/icqface.cc	2004-07-19 21:00:47.000000000 +0200
+@@ -3035,7 +3035,7 @@
+     else if(icqconf::keys[i].key == 9)
+ 	return "tab";
+     else if(icqconf::keys[i].key == 27)
+-	return "esc";
++	return "esc-esc";
+     else if(icqconf::keys[i].key == 331)
+ 	return "insert";
+     else if(icqconf::keys[i].key == KEY_DC)
--- centericq-4.20.0.orig/debian/patches/error-gcc34.dpatch
+++ centericq-4.20.0/debian/patches/error-gcc34.dpatch
@@ -0,0 +1,1588 @@
+#! /bin/sh -e
+## msn.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: apply patch to fix gcc 3.4 error
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+diff -bBdNrw -U5 centericq-4.12.0.orig/libicq2000-0.1/libicq2000/sigslot.h centericq-4.12.0/libicq2000-0.1/libicq2000/sigslot.h
+--- centericq-4.12.0.orig/libicq2000-0.1/libicq2000/sigslot.h	2004-02-11 00:51:44.000000000 +0100
++++ centericq-4.12.0/libicq2000-0.1/libicq2000/sigslot.h	2004-10-18 22:59:53.000000000 +0200
+@@ -743,12 +743,12 @@
+ 	class _connection0 : public _connection_base0<mt_policy>
+ 	{
+ 	public:
+ 		_connection0()
+ 		{
+-			pobject = NULL;
+-			pmemfun = NULL;
++			this->pobject = NULL;
++			this->pmemfun = NULL;
+ 		}
+ 
+ 		_connection0(dest_type* pobject, void (dest_type::*pmemfun)())
+ 		{
+ 			m_pobject = pobject;
+@@ -784,12 +784,12 @@
+ 	class _connection1 : public _connection_base1<arg1_type, mt_policy>
+ 	{
+ 	public:
+ 		_connection1()
+ 		{
+-			pobject = NULL;
+-			pmemfun = NULL;
++			this->pobject = NULL;
++			this->pmemfun = NULL;
+ 		}
+ 
+ 		_connection1(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type))
+ 		{
+ 			m_pobject = pobject;
+@@ -825,12 +825,12 @@
+ 	class _connection2 : public _connection_base2<arg1_type, arg2_type, mt_policy>
+ 	{
+ 	public:
+ 		_connection2()
+ 		{
+-			pobject = NULL;
+-			pmemfun = NULL;
++			this->pobject = NULL;
++			this->pmemfun = NULL;
+ 		}
+ 
+ 		_connection2(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, arg2_type))
+ 		{
+ 			m_pobject = pobject;
+@@ -887,27 +887,27 @@
+ 			void connect(dest_type* pclass, void (dest_type::*pmemfun)())
+ 		{
+ 			lock_block<mt_policy> lock(this);
+ 			_connection0<dest_type, mt_policy>* conn
+ 			    = new _connection0<dest_type, mt_policy>(pclass, pmemfun);
+-			m_connected_slots.push_back(conn);
++			this->m_connected_slots.push_back(conn);
+ 			pclass->signal_connect(this);
+ 		}
+ 
+ 		void connect(signal0<mt_policy>& chainsig)
+ 		{
+ 			lock_block<mt_policy> lock(this);
+ 			_sig_connection0<mt_policy>* conn = new _sig_connection0<mt_policy>(chainsig);
+-			m_connected_slots.push_back(conn);
++			this->m_connected_slots.push_back(conn);
+ 			chainsig.signal_connect(this);
+ 		}
+ 
+ 		void emit()
+ 		{
+ 			lock_block<mt_policy> lock(this);
+-			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
+-			typename connections_list::const_iterator itEnd = m_connected_slots.end();
++			typename _signal_base0< mt_policy >::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
++			typename _signal_base0< mt_policy >::connections_list::const_iterator itEnd = this->m_connected_slots.end();
+ 
+ 			while(it != itEnd)
+ 			{
+ 				itNext = it;
+ 				++itNext;
+@@ -919,12 +919,12 @@
+ 		}
+ 
+ 		void operator()()
+ 		{
+ 			lock_block<mt_policy> lock(this);
+-			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
+-			typename connections_list::const_iterator itEnd = m_connected_slots.end();
++			typename _signal_base0< mt_policy >::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
++			typename _signal_base0< mt_policy >::connections_list::const_iterator itEnd = this->m_connected_slots.end();
+ 
+ 			while(it != itEnd)
+ 			{
+ 				itNext = it;
+ 				++itNext;
+@@ -955,27 +955,27 @@
+ 			void connect(dest_type* pclass, void (dest_type::*pmemfun)(arg1_type))
+ 		{
+ 			lock_block<mt_policy> lock(this);
+ 			_connection1<dest_type, arg1_type, mt_policy>* conn
+ 			    = new _connection1<dest_type, arg1_type, mt_policy>(pclass, pmemfun);
+-			m_connected_slots.push_back(conn);
++			this->m_connected_slots.push_back(conn);
+ 			pclass->signal_connect(this);
+ 		}
+ 
+ 		void connect(signal1<arg1_type, mt_policy>& chainsig)
+ 		{
+ 			lock_block<mt_policy> lock(this);
+ 			_sig_connection1<arg1_type, mt_policy>* conn = new _sig_connection1<arg1_type, mt_policy>(chainsig);
+-			m_connected_slots.push_back(conn);
++			this->m_connected_slots.push_back(conn);
+ 			chainsig.signal_connect(this);
+ 		}
+ 
+ 		void emit(arg1_type a1)
+ 		{
+ 			lock_block<mt_policy> lock(this);
+-			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
+-			typename connections_list::const_iterator itEnd = m_connected_slots.end();
++			typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
++			typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
+ 
+ 			while(it != itEnd)
+ 			{
+ 				itNext = it;
+ 				++itNext;
+@@ -987,12 +987,12 @@
+ 		}
+ 
+ 		void operator()(arg1_type a1)
+ 		{
+ 			lock_block<mt_policy> lock(this);
+-			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
+-			typename connections_list::const_iterator itEnd = m_connected_slots.end();
++			typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
++			typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
+ 
+ 			while(it != itEnd)
+ 			{
+ 				itNext = it;
+ 				++itNext;
+@@ -1023,27 +1023,27 @@
+ 			void connect(dest_type* pclass, void (dest_type::*pmemfun)(arg1_type, arg2_type))
+ 		{
+ 			lock_block<mt_policy> lock(this);
+ 			_connection2<dest_type, arg1_type, arg2_type, mt_policy>* conn
+ 			    = new _connection2<dest_type, arg1_type, arg2_type, mt_policy>(pclass, pmemfun);
+-			m_connected_slots.push_back(conn);
++			this->m_connected_slots.push_back(conn);
+ 			pclass->signal_connect(this);
+ 		}
+ 
+ 		void connect(signal2<arg1_type, arg2_type, mt_policy>& chainsig)
+ 		{
+ 			lock_block<mt_policy> lock(this);
+ 			_sig_connection2<arg1_type, arg2_type, mt_policy>* conn = new _sig_connection2<arg1_type, arg2_type, mt_policy>(chainsig);
+-			m_connected_slots.push_back(conn);
++			this->m_connected_slots.push_back(conn);
+ 			chainsig.signal_connect(this);
+ 		}
+ 
+ 		void emit(arg1_type a1, arg2_type a2)
+ 		{
+ 			lock_block<mt_policy> lock(this);
+-			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
+-			typename connections_list::const_iterator itEnd = m_connected_slots.end();
++			typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
++			typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
+ 
+ 			while(it != itEnd)
+ 			{
+ 				itNext = it;
+ 				++itNext;
+@@ -1055,12 +1055,12 @@
+ 		}
+ 
+ 		void operator()(arg1_type a1, arg2_type a2)
+ 		{
+ 			lock_block<mt_policy> lock(this);
+-			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
+-			typename connections_list::const_iterator itEnd = m_connected_slots.end();
++			typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
++			typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
+ 
+ 			while(it != itEnd)
+ 			{
+ 				itNext = it;
+ 				++itNext;
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/accountmanager.cc centericq-4.12.0/src/accountmanager.cc
+--- centericq-4.12.0.orig/src/accountmanager.cc	2004-07-09 01:52:48.000000000 +0200
++++ centericq-4.12.0/src/accountmanager.cc	2004-10-18 22:59:53.000000000 +0200
+@@ -45,11 +45,11 @@
+     return account;
+ }
+ 
+ void accountmanager::exec() {
+     dialogbox db;
+-    protocolname pname;
++    int pname;
+     icqconf::imaccount account;
+     int n, b, i, citem, action, pos;
+     set<hookcapab::enumeration> capab;
+     string spname, tmp;
+     bool fin;
+@@ -73,19 +73,19 @@
+     treeview &t = *db.gettree();
+ 
+     for(fin = false; !fin; ) {
+ 	t.clear();
+ 
+-	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	    account = conf.getourid(pname);
++	for(pname = icq; pname != protocolname_size; pname += 1) {
++	    account = conf.getourid((protocolname)pname);
+ 
+ 	    if(pname != rss)
+-	    if(gethook(pname).enabled() || !account.empty()) {
+-		account = conf.getourid(pname);
+-		n = t.addnode(0, 0, 0, " " + conf.getprotocolname(pname) + " ");
+-		citem = ((int) (pname)+1) * 100;
+-		capab = gethook(pname).getCapabs();
++	    if(gethook((protocolname)pname).enabled() || !account.empty()) {
++		account = conf.getourid((protocolname)pname);
++		n = t.addnode(0, 0, 0, " " + conf.getprotocolname((protocolname)pname) + " ");
++		citem = (pname+1) * 100;
++		capab = gethook((protocolname)pname).getCapabs();
+ 
+ 		if(!account.empty()) {
+ 		    tmp = "";
+ 
+ 		    if(!account.server.empty() && account.port)
+@@ -152,13 +152,13 @@
+ 	if(!fin)
+ 	if(citem) {
+ 	    pname = (protocolname) (citem/100-1);
+ 	    action = citem-(citem/100)*100;
+ 
+-	    spname = conf.getprotocolname(pname);
+-	    account = conf.getourid(pname);
+-	    abstracthook &hook = gethook(pname);
++	    spname = conf.getprotocolname((protocolname)pname);
++	    account = conf.getourid((protocolname)pname);
++	    abstracthook &hook = gethook((protocolname)pname);
+ 
+ 	    switch(action) {
+ 		case 1:
+ 		    tmp = face.inputstr(spname + _(" user name: "), account.nickname);
+ 		    if(face.getlastinputkey() != KEY_ESC && !tmp.empty()) account.nickname = tmp;
+@@ -188,11 +188,11 @@
+ 		    imcontrol.updateinfo(account);
+ 		    break;
+ 
+ 		case 8:
+ 		    if(!hook.online()) {
+-			account = icqconf::imaccount(pname);
++			account = icqconf::imaccount((protocolname)pname);
+ 		    } else {
+ 			face.status(_("You have to disconnect the service first!"));
+ 		    }
+ 		    break;
+ 
+@@ -213,13 +213,13 @@
+ 			}
+ 		    }
+ 		    break;
+ 
+ 		case 10:
+-		    if(face.edit(tmp = conf.getawaymsg(pname),
++		    if(face.edit(tmp = conf.getawaymsg((protocolname)pname),
+ 		    spname + ": " + _("away message"))) {
+-			conf.setawaymsg(pname, tmp);
++			conf.setawaymsg((protocolname)pname, tmp);
+ 		    }
+ 		    break;
+ 
+ 		case 11:
+ 		    account.additional["importfriends"] =
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/centericq.cc centericq-4.12.0/src/centericq.cc
+--- centericq-4.12.0.orig/src/centericq.cc	2004-07-27 09:38:32.000000000 +0200
++++ centericq-4.12.0/src/centericq.cc	2004-10-19 00:09:35.000000000 +0200
+@@ -69,12 +69,12 @@
+ 	char *p = getenv("LANG");
+ 
+ 	if(p)
+ 	if(rus = (((string) p).substr(0, 2) == "ru")) {
+ 	    conf.setcharsets("cp1251", "koi8-r");
+-	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+-		conf.setcpconvert(pname, true);
++	    for(int pname = icq; pname != protocolname_size; pname += 1)
++		conf.setcpconvert((protocolname)pname, true);
+ 	}
+ 
+ 	if(updateconf()) {
+ 	    manager.exec();
+ #ifdef BUILD_KONST
+@@ -116,24 +116,24 @@
+ void centericq::defaultcontacts(bool rus) {
+     clist.addnew(imcontact(17502151, icq), false);
+ }
+ 
+ bool centericq::checkpasswords() {
+-    protocolname pname;
++    int pname;
+     icqconf::imaccount ia;
+     bool r;
+ 
+     r = regmode = true;
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	if(gethook(pname).enabled() && !gethook(pname).getCapabs().count(hookcapab::optionalpassword)) {
+-	    if(!(ia = conf.getourid(pname)).empty()) {
++    for(pname = icq; pname != protocolname_size; pname += 1) {
++      if(!gethook((protocolname)pname).getCapabs().count(hookcapab::optionalpassword)) {
++	if(!(ia = conf.getourid((protocolname)pname)).empty()) {
+ 		if(ia.password.empty()) {
+ 		    conf.setsavepwd(false);
+ 
+ 		    ia.password = face.inputstr("[" +
+-			conf.getprotocolname(pname) + "] " +
++			conf.getprotocolname((protocolname)pname) + "] " +
+ 			_("password: "), "", '*');
+ 
+ 		    if(ia.password.empty()) {
+ 			r = false;
+ 			break;
+@@ -148,14 +148,14 @@
+     regmode = false;
+     return r;
+ }
+ 
+ void centericq::inithooks() {
+-    protocolname pname;
++    int pname;
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	gethook(pname).init();
++    for(pname = icq; pname != protocolname_size; pname += 1) {
++	gethook((protocolname)pname).init();
+     }
+ }
+ 
+ void centericq::mainloop() {
+     bool finished = false, r;
+@@ -839,29 +839,29 @@
+ 	}
+     }
+ }
+ 
+ void centericq::rereadstatus() {
+-    protocolname pname;
++    int pname;
+     icqconf::imaccount ia;
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	ia = conf.getourid(pname);
++    for(pname = icq; pname != protocolname_size; pname += 1) {
++	ia = conf.getourid((protocolname)pname);
+ 
+ 	if(!ia.empty()) {
+ 	    char cst;
+-	    imstatus st;
+-	    string fname = conf.getconfigfname((string) "status-" + conf.getprotocolname(pname));
++	    int st;
++	    string fname = conf.getconfigfname((string) "status-" + conf.getprotocolname((protocolname)pname));
+ 	    ifstream f(fname.c_str());
+ 
+ 	    if(f.is_open()) {
+ 		f >> cst, f.close(), f.clear();
+ 		unlink(fname.c_str());
+ 
+-		for(st = offline; st != imstatus_size; (int) st += 1) {
++		for(st = offline; st != imstatus_size; st += 1) {
+ 		    if(imstatus2char[st] == cst) {
+-			gethook(pname).setstatus(st);
++			gethook((protocolname)pname).setstatus((imstatus)st);
+ 			break;
+ 		    }
+ 		}
+ 	    }
+ 	}
+@@ -1364,11 +1364,11 @@
+ bool centericq::idle(int options ) {
+     bool keypressed, online, fin;
+     fd_set rfds, wfds, efds;
+     struct timeval tv;
+     int hsockfd;
+-    protocolname pname;
++    int pname;
+ 
+     for(keypressed = fin = false; !keypressed && !fin; ) {
+ 	timer_keypress = lastkeypress();
+ 
+ 	FD_ZERO(&rfds);
+@@ -1379,12 +1379,12 @@
+ 	online = false;
+ 
+ 	if(!regmode) {
+ 	    exectimers();
+ 
+-	    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-		abstracthook &hook = gethook(pname);
++	    for(pname = icq; pname != protocolname_size; pname += 1) {
++		abstracthook &hook = gethook((protocolname)pname);
+ 
+ 		if(hook.online()) {
+ 		    hook.getsockets(rfds, wfds, efds, hsockfd);
+ 		    online = true;
+ 		}
+@@ -1398,12 +1398,12 @@
+ 
+ 	if(FD_ISSET(0, &rfds)) {
+ 	    keypressed = true;
+ 	    time(&timer_keypress);
+ 	} else {
+-	    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-		abstracthook &hook = gethook(pname);
++	    for(pname = icq; pname != protocolname_size; pname += 1) {
++		abstracthook &hook = gethook((protocolname)pname);
+ 
+ 		if(hook.online())
+ 		if(hook.isoursocket(rfds, wfds, efds)) {
+ 		    hook.main();
+ 		    fin = fin || (options & HIDL_SOCKEXIT);
+@@ -1414,11 +1414,11 @@
+ 
+     return keypressed;
+ }
+ 
+ void centericq::setauto(imstatus astatus) {
+-    protocolname pname;
++    int pname;
+     imstatus stcurrent;
+     static bool autoset = false;
+     bool nautoset, changed = false;
+ 
+     if(astatus == available && !autoset) return;
+@@ -1428,12 +1428,12 @@
+     if(autoset && (astatus == available)) {
+ 	face.log(_("+ the user is back"));
+ 	nautoset = false;
+     }
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	abstracthook &hook = gethook(pname);
++    for(pname = icq; pname != protocolname_size; pname += 1) {
++	abstracthook &hook = gethook((protocolname)pname);
+ 	stcurrent = hook.getstatus();
+ 
+ 	if(hook.logged())
+ 	switch(stcurrent) {
+ 	    case invisible:
+@@ -1441,11 +1441,11 @@
+ 		break;
+ 
+ 	    default:
+ 		if(autoset && (astatus == available)) {
+ 		    face.log(_("+ [%s] status restored"),
+-			conf.getprotocolname(pname).c_str());
++			conf.getprotocolname((protocolname)pname).c_str());
+ 
+ 		    hook.restorestatus();
+ 		    nautoset = false;
+ 		    changed = true;
+ 		} else {
+@@ -1456,11 +1456,11 @@
+ 		    if(!autoset || (autoset && (stcurrent == away))) {
+ 			hook.setautostatus(astatus);
+ 			nautoset = changed = true;
+ 
+ 			face.log(_("+ [%s] automatically set %s"),
+-			    conf.getprotocolname(pname).c_str(),
++			    conf.getprotocolname((protocolname)pname).c_str(),
+ 			    astatus == away ? _("away") : _("n/a"));
+ 		    }
+ 		}
+ 		break;
+ 	}
+@@ -1473,11 +1473,11 @@
+ }
+ 
+ #define MINCK0(x, y)       (x ? (y ? (x > y ? y : x) : x) : y)
+ 
+ void centericq::exectimers() {
+-    protocolname pname;
++    int pname;
+     int paway, pna;
+     bool fonline = false;
+ 
+     time(&timer_current);
+ 
+@@ -1485,47 +1485,47 @@
+     *
+     * Execute regular actions for all the hooks.
+     *
+     */
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	if(!conf.getourid(pname).empty() || (pname == rss)) {
+-	    abstracthook &hook = gethook(pname);
++    for(pname = icq; pname != protocolname_size; pname += 1) {
++	if(!conf.getourid((protocolname)pname).empty() || (pname == rss)) {
++	    abstracthook &hook = gethook((protocolname)pname);
+ 
+ 	    /*
+ 	    *
+ 	    * A hook's own action goes first.
+ 	    *
+ 	    */
+ 
+ 	    hook.exectimers();
+ 
+-	    if(timer_current-reconnect[pname].timer > reconnect[pname].period) {
++	    if(timer_current-reconnect[(protocolname)pname].timer > reconnect[(protocolname)pname].period) {
+ 		/*
+ 		*
+ 		* Any need to try auto re-connecting?
+ 		*
+ 		*/
+ 
+ 		if(!hook.logged()) {
+-		    reconnect[pname].timer = timer_current;
++		    reconnect[(protocolname)pname].timer = timer_current;
+ 
+-		    if(reconnect[pname].period < 180)
+-			reconnect[pname].period += reconnect[pname].period/2;
++		    if(reconnect[(protocolname)pname].period < 180)
++			reconnect[(protocolname)pname].period += reconnect[(protocolname)pname].period/2;
+ 
+ 		    if(hook.online()) {
+ 			hook.disconnect();
+ 
+-		    } else if(conf.getstatus(pname) != offline) {
++		    } else if(conf.getstatus((protocolname)pname) != offline) {
+ 			if(conf.enoughdiskspace() && !manager.isopen()) {
+ 			    hook.connect();
+ 			}
+ 
+ 		    }
+ 		} else {
+ 		    fonline = true;
+-		    reconnect[pname] = reconnectInfo();
++		    reconnect[(protocolname)pname] = reconnectInfo();
+ 		}
+ 	    }
+ 	}
+     }
+ 
+@@ -1579,12 +1579,12 @@
+ 	checkconfigs();
+ 	conf.checkdiskspace();
+ 
+ 	if(!conf.enoughdiskspace()) {
+ 	    if(fonline) {
+-		for(pname = icq; pname != protocolname_size; (int) pname += 1)
+-		    gethook(pname).disconnect();
++		for(pname = icq; pname != protocolname_size; pname += 1)
++		    gethook((protocolname)pname).disconnect();
+ 
+ 		face.log(_("! free disk space is less than 10k, going offline"));
+ 		face.log(_("! otherwise we can lose events and configuration"));
+ 	    }
+ 	} else {
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/centericq.cc.rej centericq-4.12.0/src/centericq.cc.rej
+--- centericq-4.12.0.orig/src/centericq.cc.rej	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.12.0/src/centericq.cc.rej	2004-10-18 22:59:53.000000000 +0200
+@@ -0,0 +1,76 @@
++***************
++*** 118,137 ****
++  }
++  
++  bool centericq::checkpasswords() {
++-     protocolname pname;
++      icqconf::imaccount ia;
++      bool r;
++  
++      r = regmode = true;
++  
++-     for(pname = icq; pname != protocolname_size; (int) pname += 1) {
++- 	if(!gethook(pname).getCapabs().count(hookcapab::optionalpassword)) {
++- 	    if(!(ia = conf.getourid(pname)).empty()) {
++  		if(ia.password.empty()) {
++  		    conf.setsavepwd(false);
++  
++  		    ia.password = face.inputstr("[" +
++- 			conf.getprotocolname(pname) + "] " +
++  			_("password: "), "", '*');
++  
++  		    if(ia.password.empty()) {
++--- 118,137 ----
++  }
++  
++  bool centericq::checkpasswords() {
+++     int pname;
++      icqconf::imaccount ia;
++      bool r;
++  
++      r = regmode = true;
++  
+++     for(pname = icq; pname != protocolname_size; pname += 1) {
+++ 	if(!gethook((protocolname)pname).getCapabs().count(hookcapab::optionalpassword)) {
+++ 	    if(!(ia = conf.getourid((protocolname)pname)).empty()) {
++  		if(ia.password.empty()) {
++  		    conf.setsavepwd(false);
++  
++  		    ia.password = face.inputstr("[" +
+++ 			conf.getprotocolname((protocolname)pname) + "] " +
++  			_("password: "), "", '*');
++  
++  		    if(ia.password.empty()) {
++***************
++*** 1507,1521 ****
++  		*/
++  
++  		if(!hook.logged()) {
++- 		    time(&reconnect[pname].timer);
++  
++- 		    if(reconnect[pname].period < 180)
++- 			reconnect[pname].period += reconnect[pname].period/2;
++  
++  		    if(hook.online()) {
++  			hook.disconnect();
++  
++- 		    } else if(conf.getstatus(pname) != offline) {
++  			if(conf.enoughdiskspace() && !manager.isopen()) {
++  			    hook.connect();
++  			}
++--- 1507,1521 ----
++  		*/
++  
++  		if(!hook.logged()) {
+++ 		    time(&reconnect[(protocolname)pname].timer);
++  
+++ 		    if(reconnect[(protocolname)pname].period < 180)
+++ 			reconnect[(protocolname)pname].period += reconnect[(protocolname)pname].period/2;
++  
++  		    if(hook.online()) {
++  			hook.disconnect();
++  
+++ 		    } else if(conf.getstatus((protocolname)pname) != offline) {
++  			if(conf.enoughdiskspace() && !manager.isopen()) {
++  			    hook.connect();
++  			}
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/hooks/abstracthook.cc centericq-4.12.0/src/hooks/abstracthook.cc
+--- centericq-4.12.0.orig/src/hooks/abstracthook.cc	2004-07-21 00:16:40.000000000 +0200
++++ centericq-4.12.0/src/hooks/abstracthook.cc	2004-10-18 22:59:53.000000000 +0200
+@@ -69,13 +69,13 @@
+ }
+ 
+ void abstracthook::setstatus(imstatus st) {
+     setautostatus(manualstatus = st);
+ 
+-    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	if(&gethook(pname) == this) {
+-	    conf.savestatus(pname, manualstatus);
++    for(int pname = icq; pname != protocolname_size; pname += 1) {
++	if(&gethook((protocolname)pname) == this) {
++	    conf.savestatus((protocolname)pname, manualstatus);
+ 	    break;
+ 	}
+     }
+ }
+ 
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/icqconf.cc centericq-4.12.0/src/icqconf.cc
+--- centericq-4.12.0.orig/src/icqconf.cc	2004-10-18 22:59:20.000000000 +0200
++++ centericq-4.12.0/src/icqconf.cc	2004-10-18 23:23:15.000000000 +0200
+@@ -50,11 +50,11 @@
+     hideoffline = antispam = makelog = askaway = logtimestamps =
+ 	logonline = emacs = proxyssl = proxyconnect = notitles = false;
+ 
+     savepwd = mailcheck = fenoughdiskspace = true;
+ 
+-    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
++    for(int pname = icq; pname != protocolname_size; pname += 1) {
+ 	chatmode[pname] = true;
+ 	cpconvert[pname] = entersends[pname] = nonimonline[pname] = false;
+     }
+ 
+     basedir = (string) getenv("HOME") + "/.centericq/";
+@@ -374,11 +374,11 @@
+ 
+ void icqconf::loadmainconfig() {
+     string fname = getconfigfname("config"), buf, param, rbuf;
+     ifstream f(fname.c_str());
+     imaccount im;
+-    protocolname pname;
++    int pname;
+ 
+     if(f.is_open()) {
+ 	mailcheck = askaway = false;
+ 	savepwd = bidi = true;
+ 	setsmtphost("");
+@@ -420,24 +420,24 @@
+ 	    if(param == "tocharset") tocharset = buf; else
+ 	    if(param == "ptp") {
+ 		ptpmin = atoi(getword(buf, "-").c_str());
+ 		ptpmax = atoi(buf.c_str());
+ 	    } else {
+-		for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-		    buf = getprotocolname(pname);
++		for(pname = icq; pname != protocolname_size; pname += 1) {
++		    buf = getprotocolname((protocolname)pname);
+ 		    if(param.substr(0, buf.size()) == buf) {
+-			im = getourid(pname);
++			im = getourid((protocolname)pname);
+ 			im.read(rbuf);
+ 			setourid(im);
+ 		    }
+ 		}
+ 	    }
+ 	}
+ 
+ 	if(fromcharset.empty() && tocharset.empty())
+-	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	    if(getcpconvert(pname)) {
++	for(pname = icq; pname != protocolname_size; pname += 1) {
++	    if(getcpconvert((protocolname)pname)) {
+ 		fromcharset = "cp1251";
+ 		tocharset = "koi8-r";
+ 		break;
+ 	    }
+ 	}
+@@ -473,30 +473,30 @@
+ 	    if(getantispam()) f << "antispam" << endl;
+ 	    if(getmailcheck()) f << "mailcheck" << endl;
+ 	    if(getaskaway()) f << "askaway" << endl;
+ 
+ 	    param = "";
+-	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+-		if(getchatmode(pname)) param += (string) " " + conf.getprotocolname(pname);
++	    for(int pname = icq; pname != protocolname_size; pname += 1)
++		if(getchatmode((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
+ 	    if(!param.empty())
+ 		f << "chatmode" << param << endl;
+ 
+ 	    param = "";
+-	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+-		if(getentersends(pname)) param += (string) " " + conf.getprotocolname(pname);
++	    for(int pname = icq; pname != protocolname_size; pname += 1)
++		if(getentersends((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
+ 	    if(!param.empty())
+ 		f << "entersends" << param << endl;
+ 
+ 	    param = "";
+-	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+-		if(getnonimonline(pname)) param += (string) " " + conf.getprotocolname(pname);
++	    for(int pname = icq; pname != protocolname_size; pname += 1)
++		if(getnonimonline((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
+ 	    if(!param.empty())
+ 		f << "nonimonline" << param << endl;
+ 
+ 	    param = "";
+-	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+-		if(getcpconvert(pname)) param += (string) " " + conf.getprotocolname(pname);
++	    for(int pname = icq; pname != protocolname_size; pname += 1)
++		if(getcpconvert((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
+ 	    if(!param.empty())
+ 		f << "convert" << param << endl;
+ 
+ 	    f << "fromcharset\t" << fromcharset << endl;
+ 	    f << "tocharset\t" << tocharset << endl;
+@@ -600,11 +600,11 @@
+ 
+ void icqconf::loadsounds() {
+     string tname = getconfigfname("sounds"), buf, suin, skey;
+     int n, ffuin, i;
+     icqcontact *c;
+-    imevent::imeventtype it;
++    int it;
+ 
+     typedef pair<imevent::imeventtype, string> eventsound;
+     vector<eventsound> soundnames;
+     vector<eventsound>::iterator isn;
+ 
+@@ -615,12 +615,12 @@
+     soundnames.push_back(eventsound(imevent::email, "email"));
+ 
+     for(i = 0; i < clist.count; i++) {
+ 	c = (icqcontact *) clist.at(i);
+ 
+-	for(it = imevent::message; it != imevent::imeventtype_size; (int) it += 1) {
+-	    c->setsound(it, "");
++	for(it = imevent::message; it != imevent::imeventtype_size; it += 1) {
++	    c->setsound((imevent::imeventtype)it, "");
+ 	}
+     }
+ 
+     if(access(tname.c_str(), F_OK)) {
+ 	ofstream fo(tname.c_str());
+@@ -691,34 +691,34 @@
+ 		if((i = suin.find("_")) != -1) {
+ 		    skey = suin.substr(0, i);
+ 		    suin.erase(0, i+1);
+ 
+ 		    imcontact ic;
+-		    protocolname pname;
++		    int pname;
+ 
+-		    for(pname = icq; pname != protocolname_size && skey != getprotocolname(pname); (int) pname += 1);
++		    for(pname = icq; pname != protocolname_size && skey != getprotocolname((protocolname)pname); pname += 1);
+ 
+ 		    if(pname != protocolname_size) {
+ 			if(suin == "*") {
+ 			    for(i = 0; i < clist.count; i++) {
+ 				c = (icqcontact *) clist.at(i);
+ 
+-				if(c->getdesc().pname == pname) c->setsound(it, buf);
++				if(c->getdesc().pname == pname) c->setsound((imevent::imeventtype)it, buf);
+ 			    }
+ 			} else {
+-			    if(pname == icq) ic = imcontact(strtoul(suin.c_str(), 0, 0), pname);
+-				else ic = imcontact(suin, pname);
++			    if(pname == icq) ic = imcontact(strtoul(suin.c_str(), 0, 0), (protocolname)pname);
++				else ic = imcontact(suin, (protocolname)pname);
+ 
+ 			    c = clist.get(ic);
+ 			}
+ 		    }
+ 		}
+ 	    } else {
+ 		c = clist.get(contactroot);
+ 	    }
+ 
+-	    if(c) c->setsound(it, buf);
++	    if(c) c->setsound((imevent::imeventtype)it, buf);
+ 	}
+ 
+ 	fi.close();
+     }
+ }
+@@ -1006,22 +1006,22 @@
+ 
+     return pprefixes[pname];
+ }
+ 
+ imstatus icqconf::getstatus(protocolname pname) {
+-    imstatus st = available;
++    int st = available;
+     map<string, string>::iterator ia;
+     imaccount a = getourid(pname);
+ 
+     if((ia = a.additional.find("status")) != a.additional.end()) {
+ 	if(!ia->second.empty()) {
+-	    for(st = offline; st != imstatus_size && imstatus2char[st] != ia->second[0]; (int) st += 1);
++	    for(st = offline; st != imstatus_size && imstatus2char[st] != ia->second[0]; st += 1);
+ 	    if(st == imstatus_size) st = available;
+ 	}
+     }
+ 
+-    return st;
++    return (imstatus)st;
+ }
+ 
+ void icqconf::savestatus(protocolname pname, imstatus st) {
+     imaccount im = getourid(pname);
+     im.additional["status"] = string(1, imstatus2char[st]);
+@@ -1099,12 +1099,12 @@
+ 	} else if((args == "-v") || (args == "--version")) {
+ 	    cout << PACKAGE << " " << VERSION << endl
+ 		<< "Written by Konstantin Klyagin." << endl
+ 		<< "Built-in protocols are:";
+ 
+-	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+-		if(gethook(pname).enabled()) cout << " " << conf.getprotocolname(pname);
++	    for(int pname = icq; pname != protocolname_size; pname += 1)
++		if(gethook((protocolname)pname).enabled()) cout << " " << conf.getprotocolname((protocolname)pname);
+ 
+ 	    cout << endl << endl
+ 		<< "This is free software; see the source for copying conditions.  There is NO" << endl
+ 		<< "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." << endl;
+ 
+@@ -1150,15 +1150,15 @@
+ 	    cout << _("event sending error: only UINs are allowed with icq protocol") << endl;
+ 	    exit(1);
+ 	}
+ 	cdest = imcontact(strtoul(dest.c_str(), 0, 0), icq);
+     } else {
+-	protocolname pname;
++	int pname;
+ 
+-	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	    if(getprotocolname(pname) == proto) {
+-		cdest = imcontact(dest, pname);
++	for(pname = icq; pname != protocolname_size; pname += 1) {
++	    if(getprotocolname((protocolname)pname) == proto) {
++		cdest = imcontact(dest, (protocolname)pname);
+ 		break;
+ 	    }
+ 	}
+ 
+ 	if(pname == protocolname_size) {
+@@ -1231,19 +1231,19 @@
+ 	}
+     }
+ }
+ 
+ void icqconf::externalstatuschange(char st, const string &proto) const {
+-    imstatus imst;
+-    protocolname pname;
++    int imst;
++    int pname;
+ 
+     if(st) {
+-	for(pname = icq; pname != protocolname_size; (int) pname += 1)
+-	    if(getprotocolname(pname) == proto)
++	for(pname = icq; pname != protocolname_size; pname += 1)
++	    if(getprotocolname((protocolname)pname) == proto)
+ 		break;
+ 
+-	for(imst = offline; imst != imstatus_size; (int) imst += 1)
++	for(imst = offline; imst != imstatus_size; imst += 1)
+ 	    if(imstatus2char[imst] == st)
+ 		break;
+ 
+ 	try {
+ 	    if(pname != protocolname_size) {
+@@ -1319,20 +1319,20 @@
+     fgroupmode = amode;
+ }
+ 
+ void icqconf::initmultiproto(bool p[], string buf, bool excludenochat) {
+     string w;
+-    protocolname pname;
++    int pname;
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1)
++    for(pname = icq; pname != protocolname_size; pname += 1)
+ 	p[pname] = buf.empty();
+ 
+     while(!(w = getword(buf)).empty()) {
+-	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	    if(getprotocolname(pname) == w) {
++	for(pname = icq; pname != protocolname_size; pname += 1) {
++	    if(getprotocolname((protocolname)pname) == w) {
+ 		if(excludenochat) {
+-		    p[pname] = !gethook(pname).getCapabs().count(hookcapab::nochat);
++		    p[pname] = !gethook((protocolname)pname).getCapabs().count(hookcapab::nochat);
+ 		} else {
+ 		    p[pname] = true;
+ 		}
+ 		break;
+ 	    }
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/icqconf.cc.rej centericq-4.12.0/src/icqconf.cc.rej
+--- centericq-4.12.0.orig/src/icqconf.cc.rej	1970-01-01 01:00:00.000000000 +0100
++++ centericq-4.12.0/src/icqconf.cc.rej	2004-10-18 22:59:53.000000000 +0200
+@@ -0,0 +1,66 @@
++***************
++*** 1214,1229 ****
++  }
++  
++  void icqconf::externalstatuschange(char st, const string &proto) const {
++-     imstatus imst;
++-     protocolname pname;
++      int rpid;
++  
++      if(st) {
++- 	for(pname = icq; pname != protocolname_size; (int) pname += 1)
++- 	    if(getprotocolname(pname) == proto)
++  		break;
++  
++- 	for(imst = offline; imst != imstatus_size; (int) imst += 1)
++  	    if(imstatus2char[imst] == st)
++  		break;
++  
++--- 1214,1229 ----
++  }
++  
++  void icqconf::externalstatuschange(char st, const string &proto) const {
+++     int imst;
+++     int pname;
++      int rpid;
++  
++      if(st) {
+++ 	for(pname = icq; pname != protocolname_size; pname += 1)
+++ 	    if(getprotocolname((protocolname)pname) == proto)
++  		break;
++  
+++ 	for(imst = offline; imst != imstatus_size; imst += 1)
++  	    if(imstatus2char[imst] == st)
++  		break;
++  
++***************
++*** 1289,1302 ****
++  
++  void icqconf::initmultiproto(bool p[], string buf) {
++      string w;
++-     protocolname pname;
++  
++-     for(pname = icq; pname != protocolname_size; (int) pname += 1)
++  	p[pname] = buf.empty();
++  
++      while(!(w = getword(buf)).empty()) {
++- 	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
++- 	    if(getprotocolname(pname) == w) {
++  		p[pname] = true;
++  		break;
++  	    }
++--- 1289,1302 ----
++  
++  void icqconf::initmultiproto(bool p[], string buf) {
++      string w;
+++     int pname;
++  
+++     for(pname = icq; pname != protocolname_size; pname += 1)
++  	p[pname] = buf.empty();
++  
++      while(!(w = getword(buf)).empty()) {
+++ 	for(pname = icq; pname != protocolname_size; pname += 1) {
+++ 	    if(getprotocolname((protocolname)pname) == w) {
++  		p[pname] = true;
++  		break;
++  	    }
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/icqcontact.cc centericq-4.12.0/src/icqcontact.cc
+--- centericq-4.12.0.orig/src/icqcontact.cc	2004-09-28 00:17:31.000000000 +0200
++++ centericq-4.12.0/src/icqcontact.cc	2004-10-18 22:59:53.000000000 +0200
+@@ -46,12 +46,14 @@
+     lastread = fhistoffset = 0;
+     status = offline;
+     finlist = true;
+     congratulated = false;
+ 
+-    for(ie = imevent::message; ie != imevent::imeventtype_size; (int) ie += 1)
+-	sound[ie] = "";
++    int int_ie;
++    for(int_ie = imevent::message; int_ie != imevent::imeventtype_size; int_ie += 1)
++	sound[(imevent::imeventtype)int_ie] = "";
++    ie = (imevent::imeventtype)int_ie;
+ 
+     cdesc = adesc;
+ 
+     switch(cdesc.pname) {
+ 	case infocard:
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/icqdialogs.cc centericq-4.12.0/src/icqdialogs.cc
+--- centericq-4.12.0.orig/src/icqdialogs.cc	2004-10-18 22:59:20.000000000 +0200
++++ centericq-4.12.0/src/icqdialogs.cc	2004-10-18 22:59:53.000000000 +0200
+@@ -172,17 +172,17 @@
+ 
+     string tname, act;
+     imsearchparams ts;
+ 
+     if(subj != fsrss) {
+-	for(protocolname apname = icq; apname != protocolname_size; (int) apname += 1) {
++	for(int apname = icq; apname != protocolname_size; apname += 1) {
+ 	    if(subj == fschannel)
+-	    if(!gethook(apname).getCapabs().count(hookcapab::conferencing))
++	    if(!gethook((protocolname)apname).getCapabs().count(hookcapab::conferencing))
+ 		continue;
+ 
+-	    if(gethook(apname).logged() || apname == infocard) {
+-		penabled.push_back(apname);
++	    if(gethook((protocolname)apname).logged() || apname == infocard) {
++		penabled.push_back((protocolname)apname);
+ 	    }
+ 	}
+ 
+ 	if(penabled.empty()) {
+ 	    log(_("+ you must be logged in first"));
+@@ -935,12 +935,12 @@
+ void icqface::selectgender(imgender &f) {
+     verticalmenu m(conf.getcolor(cp_dialog_menu), conf.getcolor(cp_dialog_selected));
+     m.setwindow(textwindow(4, LINES-8, 20, LINES-4, conf.getcolor(cp_dialog_menu)));
+     m.idle = &menuidle;
+ 
+-    for(imgender i = genderUnspec; i != imgender_size; (int) i += 1) {
+-	m.additemf(0, (int) i, " %s", strgender(i));
++    for(int i = genderUnspec; i != imgender_size; i += 1) {
++	m.additemf(0, i, " %s", strgender((imgender)i));
+ 	if(i == f) m.setpos(m.getcount()-1);
+     }
+ 
+     int i = m.open();
+     m.close();
+@@ -951,17 +951,17 @@
+ void icqface::selectagerange(ICQ2000::AgeRange &r) {
+     verticalmenu m(conf.getcolor(cp_dialog_menu), conf.getcolor(cp_dialog_selected));
+     m.setwindow(textwindow(4, LINES-8, 18, LINES-3, conf.getcolor(cp_dialog_menu)));
+     m.idle = &menuidle;
+ 
+-    for(ICQ2000::AgeRange i = ICQ2000::RANGE_NORANGE; i <= ICQ2000::RANGE_60_ABOVE; (int) i += 1) {
+-	const char *p = stragerange(i);
++    for(int i = ICQ2000::RANGE_NORANGE; i <= ICQ2000::RANGE_60_ABOVE; i += 1) {
++	const char *p = stragerange((ICQ2000::AgeRange)i);
+ 
+ 	if(i == ICQ2000::RANGE_NORANGE)
+ 	    p = _("none");
+ 
+-	m.additemf(0, (int) i, " %s", p);
++	m.additemf(0, i, " %s", p);
+ 	if(i == r) m.setpos(m.getcount()-1);
+     }
+ 
+     int i = m.open();
+     m.close();
+@@ -1069,26 +1069,26 @@
+     unblockmainscreen();
+     return flist.count;
+ }
+ 
+ void icqface::multichange(bool conv[], bool newstate) {
+-    protocolname pname;
++    int pname;
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1)
+-	if((!conf.getourid(pname).empty() || pname == rss) && conv[pname]) break;
++    for(pname = icq; pname != protocolname_size; pname += 1)
++	if((!conf.getourid((protocolname)pname).empty() || pname == rss) && conv[pname]) break;
+ 
+     if(pname == protocolname_size || !newstate) {
+-	for(pname = icq; pname != protocolname_size; (int) pname += 1)
+-	    if(!conf.getourid(pname).empty() || pname == rss)
++	for(pname = icq; pname != protocolname_size; pname += 1)
++	    if(!conf.getourid((protocolname)pname).empty() || pname == rss)
+ 		conv[pname] = newstate;
+     }
+ }
+ 
+ bool icqface::updateconf(icqconf::regsound &s, icqconf::regcolor &c) {
+     bool finished, success, hasany;
+     int nopt, n, i, b, nconf, ncomm, aaway, ana, noth, nfeat, ncl;
+-    protocolname pname;
++    int pname;
+     string tmp, phidden;
+ 
+     string smtp = conf.getsmtphost() + ":" + i2str(conf.getsmtpport());
+     string browser = conf.getbrowser();
+ 
+@@ -1133,19 +1133,19 @@
+     icqconf::groupmode gmode = conf.getgroupmode();
+ 
+     bool chatmode[protocolname_size], conv[protocolname_size],
+ 	entersends[protocolname_size], nonimonline[protocolname_size];
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	chatmode[pname] = conf.getchatmode(pname);
+-	entersends[pname] = conf.getentersends(pname);
+-	conv[pname] = conf.getcpconvert(pname);
+-	nonimonline[pname] = conf.getnonimonline(pname);
++    for(pname = icq; pname != protocolname_size; pname += 1) {
++	chatmode[pname] = conf.getchatmode((protocolname)pname);
++	entersends[pname] = conf.getentersends((protocolname)pname);
++	conv[pname] = conf.getcpconvert((protocolname)pname);
++	nonimonline[pname] = conf.getnonimonline((protocolname)pname);
+     }
+ 
+-    for(hasany = false, pname = icq; pname != protocolname_size && !hasany; (int) pname += 1)
+-	hasany = !conf.getourid(pname).empty();
++    for(hasany = false, pname = icq; pname != protocolname_size && !hasany; pname += 1)
++	hasany = !conf.getourid((protocolname)pname).empty();
+ 
+     dialogbox db;
+ 
+     finished = success = false;
+ 
+@@ -1183,14 +1183,14 @@
+     #endif
+ 	t.addleaff(i, 0, 23, _(" Enable emacs bindings in text editor : %s "), stryesno(emacs));
+ 
+ 	i = t.addnode(_(" Codepages conversion "));
+ 
+-	for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
++	for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
+ 	if(conv[pname])
+-	if(!conf.getourid(pname).empty() || pname == rss)
+-	    tmp += conf.getprotocolname(pname) + " ";
++	if(!conf.getourid((protocolname)pname).empty() || pname == rss)
++	    tmp += conf.getprotocolname((protocolname)pname) + " ";
+ 
+ 	t.addleaff(i, 0, 26, _(" Switch to language preset : %s "), iconvlang->c_str());
+ 	t.addleaff(i, 0, 27, _(" Remote charset : %s "), convertfrom.c_str());
+ 	t.addleaff(i, 0, 28, _(" Local charset : %s "), convertto.c_str());
+ 
+@@ -1206,30 +1206,30 @@
+ 	t.addleaff(i, 0, 15, _(" Check the local mailbox : %s "), stryesno(mailcheck));
+ 	t.addleaff(i, 0, 13, _(" Remember passwords : %s "), stryesno(savepwd));
+ 	t.addleaff(i, 0,  7, _(" Edit away message on status change : %s "), stryesno(askaway));
+ 
+ 	if(hasany) {
+-	    for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
+-		if(chatmode[pname] && !conf.getourid(pname).empty())
+-		    tmp += conf.getprotocolname(pname) + " ";
++	    for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
++		if(chatmode[pname] && !conf.getourid((protocolname)pname).empty())
++		    tmp += conf.getprotocolname((protocolname)pname) + " ";
+ 
+ 	    t.addleaff(i, 0, 16, _(" Chat messaging mode for : %s"), tmp.c_str());
+ 
+-	    for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
+-		if(entersends[pname] && !conf.getourid(pname).empty())
+-		    tmp += conf.getprotocolname(pname) + " ";
++	    for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
++		if(entersends[pname] && !conf.getourid((protocolname)pname).empty())
++		    tmp += conf.getprotocolname((protocolname)pname) + " ";
+ 
+ 	    t.addleaff(i, 0, 25, _(" Enter key sends message for : %s"), tmp.c_str());
+ 
+ 	} else {
+ 	    t.addleaff(i, 0, 16, _(" Chat messaging mode : %s "), stryesno(chatmode[icq]));
+ 	    t.addleaff(i, 0, 25, _(" Enter key sends message : %s "), stryesno(entersends[icq]));
+ 
+ 	}
+ 
+-	for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
+-	    if(nonimonline[pname]) tmp += conf.getprotocolname(pname) + " ";
++	for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
++	    if(nonimonline[pname]) tmp += conf.getprotocolname((protocolname)pname) + " ";
+ 
+ 	t.addleaff(i, 0, 29, _(" Always online non-IM contacts for : %s"), tmp.c_str());
+ 
+ 	i = t.addnode(_(" Communications "));
+ 	t.addleaff(i, 0, 19, _(" SMTP server : %s "), smtp.c_str());
+@@ -1272,11 +1272,11 @@
+ 			    c == icqconf::rcdark ? icqconf::rcblue :
+ 				icqconf::rcdontchange;
+ 			break;
+ 		    case 3:
+ 			if(hasany) selectproto(conv, spIMplusRSS); else
+-			    for(pname = icq; pname != protocolname_size; (int) pname += 1)
++			    for(pname = icq; pname != protocolname_size; pname += 1)
+ 				conv[pname] = !conv[pname];
+ 			break;
+ 		    case 4:
+ 			tmp = inputstr(_("Auto Away period (0 - disable): "), i2str(aaway));
+ 			if(!tmp.empty()) aaway = atol(tmp.c_str());
+@@ -1294,11 +1294,11 @@
+ 		    case 13: savepwd = !savepwd; break;
+ 		    case 14: antispam = !antispam; break;
+ 		    case 15: mailcheck = !mailcheck; break;
+ 		    case 16:
+ 			if(hasany) selectproto(chatmode); else
+-			    for(pname = icq; pname != protocolname_size; (int) pname += 1)
++			    for(pname = icq; pname != protocolname_size; pname += 1)
+ 				chatmode[pname] = !chatmode[pname];
+ 			break;
+ 
+ 		    case 17:
+ 			gmode =
+@@ -1334,11 +1334,11 @@
+ 		    case 24:
+ 			httpproxy = inputstr(_("HTTP proxy server hostname: "), httpproxy);
+ 			break;
+ 		    case 25:
+ 			if(hasany) selectproto(entersends); else
+-			    for(pname = icq; pname != protocolname_size; (int) pname += 1)
++			    for(pname = icq; pname != protocolname_size; pname += 1)
+ 				entersends[pname] = !entersends[pname];
+ 			break;
+ 		    case 26:
+ 			iconvlang++;
+ 			if(iconvlang == convlanguages.end())
+@@ -1393,17 +1393,17 @@
+ 		conf.setmakelog(makelog);
+ 		conf.setaskaway(askaway);
+ 		conf.setproxyconnect(proxyconnect);
+ 		conf.setcharsets(convertfrom, convertto);
+ 
+-		for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-		    conf.setchatmode(pname, chatmode[pname]);
+-		    conf.setentersends(pname, entersends[pname]);
+-		    conf.setnonimonline(pname, nonimonline[pname]);
++		for(pname = icq; pname != protocolname_size; pname += 1) {
++		    conf.setchatmode((protocolname)pname, chatmode[pname]);
++		    conf.setentersends((protocolname)pname, entersends[pname]);
++		    conf.setnonimonline((protocolname)pname, nonimonline[pname]);
+ 
+ 		    bool bconv = conv[pname] && (!convertfrom.empty() || !convertto.empty());
+-		    conf.setcpconvert(pname, bconv || !hasany);
++		    conf.setcpconvert((protocolname)pname, bconv || !hasany);
+ 		}
+ 
+ 		conf.setbidi(bidi);
+ 		conf.setlogoptions(logtimestamps, logonline);
+ 
+@@ -1432,42 +1432,42 @@
+ void icqface::selectproto(bool prots[], spmode mode) {
+     static int saveelem = 0;
+     int i, protmax;
+     bool r, finished = false;
+ 
+-    protocolname pname;
++    int pname;
+     protocolname tempprots[protocolname_size];
+     bool aprots[protocolname_size];
+ 
+     i = 0;
+     memcpy(aprots, prots, sizeof(aprots));
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
++    for(pname = icq; pname != protocolname_size; pname += 1) {
+ 	if(mode == spnonIM) {
+ 	    if(pname != infocard)
+-	    if(!gethook(pname).getCapabs().count(hookcapab::nochat))
++	    if(!gethook((protocolname)pname).getCapabs().count(hookcapab::nochat))
+ 		continue;
+ 
+ 	    if(pname == livejournal)
+ 		continue;
+ 
+ 	} else {
+ 	    if(mode != spIMplusRSS || pname != rss)
+ 	    if(pname != livejournal || mode == spIMonly) {
+-		if(gethook(pname).getCapabs().count(hookcapab::nochat))
++		if(gethook((protocolname)pname).getCapabs().count(hookcapab::nochat))
+ 		    continue;
+ 
+-		if(conf.getourid(pname).empty())
++		if(conf.getourid((protocolname)pname).empty())
+ 		    continue;
+ 
+ 	    }
+ 
+-	    if(!gethook(pname).enabled())
++	    if(!gethook((protocolname)pname).enabled())
+ 		continue;
+ 	}
+ 
+-	tempprots[i++] = pname;
++	tempprots[i++] = (protocolname)pname;
+     }
+ 
+     protmax = i;
+ 
+     vector<imstatus> mst;
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/icqface.cc centericq-4.12.0/src/icqface.cc
+--- centericq-4.12.0.orig/src/icqface.cc	2004-10-18 22:59:20.000000000 +0200
++++ centericq-4.12.0/src/icqface.cc	2004-10-18 22:59:53.000000000 +0200
+@@ -203,20 +203,20 @@
+     update();
+ }
+ 
+ void icqface::showtopbar() {
+     string buf;
+-    protocolname pname;
++    int pname;
+     icqconf::imaccount ia;
+ 
+-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	ia = conf.getourid(pname);
++    for(pname = icq; pname != protocolname_size; pname += 1) {
++	ia = conf.getourid((protocolname)pname);
+ 
+ 	if(!ia.empty()) {
+ 	    buf += " ";
+-	    buf += conf.getprotocolname(pname) + ":";
+-	    buf += imstatus2char[gethook(pname).getstatus()];
++	    buf += conf.getprotocolname((protocolname)pname) + ":";
++	    buf += imstatus2char[gethook((protocolname)pname).getstatus()];
+ //            buf += ">";
+ 	}
+     }
+ 
+     attrset(conf.getcolor(cp_status));
+@@ -1303,11 +1303,11 @@
+     passinfo = savepassinfo;
+ }
+ 
+ void icqface::makeprotocolmenu(verticalmenu &m) {
+     icqconf::imaccount ia;
+-    protocolname ipname;
++    int ipname;
+ 
+     static const string pitems[protocolname_size] = {
+ 	_(" [icq] ICQ network"),
+ 	_(" [yahoo] YAIM"),
+ 	_(" [msn] M$ Messenger"),
+@@ -1318,15 +1318,15 @@
+ 	_(" [lj] LiveJournal"),
+ 	_(" [gg] Gadu-Gadu"),
+ 	""
+     };
+ 
+-    for(ipname = icq; ipname != protocolname_size; (int) ipname += 1) {
+-	ia = conf.getourid(ipname);
++    for(ipname = icq; ipname != protocolname_size; ipname += 1) {
++	ia = conf.getourid((protocolname)ipname);
+ 
+ 	if(!ia.empty()) {
+-	    m.additem(0, ipname, pitems[ipname]);
++	    m.additem(0, (protocolname)ipname, pitems[ipname]);
+ 	}
+     }
+ }
+ 
+ bool icqface::changestatus(vector<protocolname> &pnames, imstatus &st) {
+@@ -1334,24 +1334,25 @@
+     bool r, alrlogged = false;
+     verticalmenu m(conf.getcolor(cp_main_text), conf.getcolor(cp_main_selected));
+ 
+     vector<imstatus> mst;
+     vector<imstatus>::iterator im;
+-    protocolname pname, onechoice;
++    int pname;
++    protocolname onechoice;
+ 
+     m.setwindow(textwindow(sizeWArea.x1, sizeWArea.y1, sizeWArea.x1+27,
+ 	sizeWArea.y1+9, conf.getcolor(cp_main_text)));
+ 
+     m.idle = &menuidle;
+ 
+-    for(protcount = 0, pname = icq; pname != protocolname_size; (int) pname += 1) {
+-	if(!conf.getourid(pname).empty()) {
++    for(protcount = 0, pname = icq; pname != protocolname_size; pname += 1) {
++	if(!conf.getourid((protocolname)pname).empty()) {
+ 	    protcount++;
+-	    onechoice = pname;
++	    onechoice = (protocolname)pname;
+ 	}
+ 
+-	alrlogged = alrlogged || gethook(pname).getstatus() != offline;
++	alrlogged = alrlogged || gethook((protocolname)pname).getstatus() != offline;
+     }
+ 
+     if(protcount < 2) {
+ 	i = 1;
+ 	choice = onechoice;
+@@ -1370,19 +1371,19 @@
+     }
+ 
+     if(r = i) {
+ 	switch(choice) {
+ 	    case -1:
+-		for(pname = icq; pname != protocolname_size; (int) pname += 1)
+-		    if(!conf.getourid(pname).empty())
+-			pnames.push_back(pname);
++		for(pname = icq; pname != protocolname_size; pname += 1)
++		    if(!conf.getourid((protocolname)pname).empty())
++			pnames.push_back((protocolname)pname);
+ 		break;
+ 	    case -2:
+-		for(pname = icq; pname != protocolname_size; (int) pname += 1)
+-		    if(!conf.getourid(pname).empty())
+-		    if(gethook(pname).getstatus() != offline)
+-			pnames.push_back(pname);
++		for(pname = icq; pname != protocolname_size; pname += 1)
++		    if(!conf.getourid((protocolname)pname).empty())
++		    if(gethook((protocolname)pname).getstatus() != offline)
++			pnames.push_back((protocolname)pname);
+ 		break;
+ 	    default:
+ 		pnames.push_back((protocolname) choice);
+ 		break;
+ 	}
+@@ -1656,13 +1657,13 @@
+ 	cs == csvisible     ? _("Visible list") :
+ 	cs == csinvisible   ? _("Invisible list") : "");
+ 
+     set<protocolname> ps;
+     if(cs == csvisible || cs == csinvisible) {
+-	for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+-	    if(gethook(pname).getCapabs().count(hookcapab::visibility))
+-		ps.insert(pname);
++	for(int pname = icq; pname != protocolname_size; pname += 1)
++	    if(gethook((protocolname)pname).getCapabs().count(hookcapab::visibility))
++		ps.insert((protocolname)pname);
+     }
+ 
+     lst.fillmenu(db.getmenu(), cs);
+ 
+     while(db.open(i, b)) {
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/icqgroup.cc centericq-4.12.0/src/icqgroup.cc
+--- centericq-4.12.0.orig/src/icqgroup.cc	2003-11-22 20:14:33.000000000 +0100
++++ centericq-4.12.0/src/icqgroup.cc	2004-10-18 22:59:53.000000000 +0200
+@@ -80,8 +80,8 @@
+ 
+ void icqgroup::rename(const string &aname) {
+     string oldname = name;
+     name = aname;
+ 
+-    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+-	gethook(pname).renamegroup(oldname, name);
++    for(int pname = icq; pname != protocolname_size; pname += 1)
++	gethook((protocolname)pname).renamegroup(oldname, name);
+ }
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/imevents.cc centericq-4.12.0/src/imevents.cc
+--- centericq-4.12.0.orig/src/imevents.cc	2004-04-11 18:32:28.000000000 +0200
++++ centericq-4.12.0/src/imevents.cc	2004-10-18 22:59:53.000000000 +0200
+@@ -60,15 +60,15 @@
+ 
+ imevent::~imevent() {
+ }
+ 
+ imevent::imeventtype imevent::gettype() const {
+-    return type;
++    return (imevent::imeventtype)type;
+ }
+ 
+ imevent::imdirection imevent::getdirection() const {
+-    return direction;
++    return (imevent::imdirection)direction;
+ }
+ 
+ imcontact imevent::getcontact() const {
+     return contact;
+ }
+@@ -109,18 +109,18 @@
+ 
+     getstring(f, rdbuf);
+     if(rdbuf == "\f")
+ 	getstring(f, rdbuf);
+ 
+-    for(direction = incoming; direction != imdirection_size; (int) direction += 1)
++    for(direction = incoming; direction != imdirection_size; direction += 1)
+ 	if(sdirection[direction] == rdbuf) break;
+ 
+     getstring(f, rdbuf);
+     type = imeventtype_size;
+ 
+     if(rdbuf != "") {
+-	for(type = message; type != imeventtype_size; (int) type += 1)
++	for(type = message; type != imeventtype_size; type += 1)
+ 	    if(seventtype[type] == rdbuf) break;
+     }
+ 
+     getstring(f, rdbuf);
+     timestamp = strtoul(rdbuf.c_str(), 0, 0);
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/imevents.h centericq-4.12.0/src/imevents.h
+--- centericq-4.12.0.orig/src/imevents.h	2004-02-21 17:15:05.000000000 +0100
++++ centericq-4.12.0/src/imevents.h	2004-10-18 22:59:53.000000000 +0200
+@@ -28,12 +28,12 @@
+ 	    incoming, outgoing, imdirection_size
+ 	};
+ 
+     protected:
+ 	imcontact contact;
+-	imeventtype type;
+-	imdirection direction;
++	int type;
++	int direction;
+ 	time_t senttimestamp;
+ 	time_t timestamp;
+ 
+ 	string readblock(ifstream &f);
+ 
+diff -bBdNrw -U5 centericq-4.12.0.orig/src/imexternal.cc centericq-4.12.0/src/imexternal.cc
+--- centericq-4.12.0.orig/src/imexternal.cc	2004-03-20 17:49:08.000000000 +0100
++++ centericq-4.12.0/src/imexternal.cc	2004-10-18 22:59:53.000000000 +0200
+@@ -391,24 +391,24 @@
+ 
+ 	    param = getword(buf);
+ 
+ 	    if(param == "event") {
+ 		while(!(param = getword(buf)).empty()) {
+-		    for(imevent::imeventtype et = imevent::message; et != imevent::imeventtype_size; (int) et += 1) {
+-			if((param == geteventname(et))
++		    for(int et = imevent::message; et != imevent::imeventtype_size;  et += 1) {
++			if((param == geteventname((imevent::imeventtype)et))
+ 			|| (param == "all")) {
+-			    event.insert(et);
++			    event.insert((imevent::imeventtype)et);
+ 			}
+ 		    }
+ 		}
+ 
+ 	    } else if(param == "proto") {
+ 		while(!(param = getword(buf)).empty()) {
+-		    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
+-			if((param == conf.getprotocolname(pname))
++		    for(int pname = icq; pname != protocolname_size; pname += 1) {
++			if((param == conf.getprotocolname((protocolname)pname))
+ 			|| (param == "all")) {
+-			    proto.insert(pname);
++			    proto.insert((protocolname)pname);
+ 			}
+ 		    }
+ 		}
+ 
+ 	    } else if(param == "status") {
--- centericq-4.20.0.orig/debian/patches/u_disapears.dpatch
+++ centericq-4.20.0/debian/patches/u_disapears.dpatch
@@ -0,0 +1,59 @@
+#! /bin/sh -e
+## u_disapears.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: 'u' disappearing issue
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+          echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+          exit 1;;
+esac
+
+exit 0
+--- centericq-4.13.0.orig/kkstrtext-0.1/kkstrtext.cc	2004-12-18 21:58:31.000000000 +0100
++++ centericq-4.13.0/kkstrtext-0.1/kkstrtext.cc	2004-12-26 03:18:15.000000000 +0100
+@@ -1,7 +1,7 @@
+ /*
+ *
+ * kkstrtext string related and text processing routines
+-* $Id: kkstrtext.cc,v 1.38 2004/06/24 08:31:22 konst Exp $
++* $Id: kkstrtext.cc,v 1.42 2004/12/26 02:18:15 konst Exp $
+ *
+ * Copyright (C) 1999-2004 by Konstantin Klyagin <konst@konst.org.ua>
+ *
+@@ -1059,6 +1059,9 @@
+     for(string::const_iterator i = s.begin(); i != s.end(); ++i) {
+ 	if(!isalpha(*i) && !isdigit(*i)) bprint = true;
+ 
++char cc = *i;
++const char *rr = r.c_str();
++
+ 	if(bspec) {
+ 	    spec += *i;
+ 
+@@ -1107,9 +1110,13 @@
+ 		break;
+ 
+ 	    case 'u':
+-		if(pre == '\\') {
+-		    unichar = "";
+-		    bunicode = true;
++		if(!bparen && bprint) {
++		    if(pre == '\\') {
++			unichar = "";
++			bunicode = true;
++		    } else {
++			r += *i;
++		    }
+ 		}
+ 		break;
+ 
--- centericq-4.20.0.orig/debian/patches/mem_leaks.dpatch
+++ centericq-4.20.0/debian/patches/mem_leaks.dpatch
@@ -0,0 +1,73 @@
+#! /bin/sh -e
+## mem_leaks.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: fix memory leak in RSS module
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+          echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+          exit 1;;
+esac
+
+exit 0
+--- centericq-4.13.0.orig/src/hooks/rsshook.cc	2004-11-12 15:55:51.000000000 +0100
++++ centericq-4.13.0/src/hooks/rsshook.cc	2004-12-24 19:33:07.000000000 +0100
+@@ -1,7 +1,7 @@
+ /*
+ *
+ * centericq rss handling class
+-* $Id: rsshook.cc,v 1.22 2004/11/11 13:42:05 konst Exp $
++* $Id: rsshook.cc,v 1.23 2004/12/24 18:33:07 konst Exp $
+ *
+ * Copyright (C) 2003 by Konstantin Klyagin <konst@konst.org.ua>
+ *
+@@ -418,6 +418,11 @@
+ 		}
+ 	    }
+ 	}
++
++	while(!events.empty()) {
++	    delete events.back();
++	    events.pop_back();
++	}
+     }
+ 
+     if(c->inlist() && c->getdesc() != contactroot) {
+--- centericq-4.13.0.orig/src/icqface.cc	2004-12-19 02:13:37.000000000 +0100
++++ centericq-4.13.0/src/icqface.cc	2004-12-25 00:42:45.000000000 +0100
+@@ -1,7 +1,7 @@
+ /*
+ *
+ * centericq user interface class
+-* $Id: icqface.cc,v 1.234 2004/11/12 14:41:45 konst Exp $
++* $Id: icqface.cc,v 1.237 2004/12/24 23:42:45 konst Exp $
+ *
+ * Copyright (C) 2001-2004 by Konstantin Klyagin <konst@konst.org.ua>
+ *
+@@ -2472,7 +2472,7 @@
+     }
+ 
+     while(events.size() > chatlines) {
+-	delete events.front();
++	delete *events.begin();
+ 	events.erase(events.begin());
+     }
+ 
+@@ -2514,7 +2514,7 @@
+ 	}
+ 
+ 	delete events.back();
+-	events.erase(events.end()-1);
++	events.pop_back();
+     }
+ 
+     chatmargin = sizeWArea.y1+chatlines;
--- centericq-4.20.0.orig/debian/patches/gpg.dpatch
+++ centericq-4.20.0/debian/patches/gpg.dpatch
@@ -0,0 +1,325 @@
+#! /bin/sh -e
+## gpg.dpatch by Julien LEMOINE <speedblue@debian.org>
+##
+## DP: fix Jabber/PGP decrypt problem when receiving multiple <x> tags 
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
+ent"
+                exit 1;;
+esac
+
+exit 0
+--- centericq-4.20.0/src/icqconf.cc	2005-01-27 00:52:47.000000000 +0100
++++ centericq-4.20.0/src/icqconf.cc	2005-02-13 13:10:55.000000000 +0100
+@@ -1,7 +1,7 @@
+ /*
+ *
+ * centericq configuration handling routines
+-* $Id: icqconf.cc,v 1.139 2005/01/26 23:52:47 konst Exp $
++* $Id: icqconf.cc,v 1.140 2005/02/13 12:10:55 iulica Exp $
+ *
+ * Copyright (C) 2001-2004 by Konstantin Klyagin <konst@konst.org.ua>
+ *
+@@ -237,6 +237,8 @@
+ 	    of << "bind contact\ti\tignore" << endl;
+ 	    of << "bind contact\t\\as\tquickfind" << endl;
+ 	    of << "bind contact\t/\tquickfind" << endl << endl;
++	    of << "bind contact\t\\cn\tnext_chat" << endl;
++	    of << "bind contact\t\\cb\tprev_chat" << endl;
+ 	    of << "bind history\t/\tsearch" << endl;
+ 	    of << "bind history\ts\tsearch" << endl;
+ 	    of << "bind history\tn\tsearch_again" << endl;
+@@ -246,6 +248,8 @@
+ 	    of << "bind editor\t<esc>\tquit" << endl;
+ 	    of << "bind editor\t\\cp\tmultiple_recipients" << endl;
+ 	    of << "bind editor\t\\co\thistory" << endl;
++	    of << "bind editor\t\\cn\tnext_chat" << endl;
++	    of << "bind editor\t\\cb\tprev_chat" << endl;
+ 	    of << "bind editor\t\\a?\tinfo" << endl;
+ 	    of << "bind editor\t<F2>\tshow_urls" << endl;
+ 	    of << "bind editor\t<F9>\tfullscreen" << endl << endl;
+@@ -341,6 +345,8 @@
+ 	    if(param == "quit") k.action = key_quit; else
+ 	    if(param == "change_status") k.action = key_change_status; else
+ 	    if(param == "history") k.action = key_history; else
++	    if(param == "next_chat") k.action = key_next_chat; else
++	    if(param == "prev_chat") k.action = key_prev_chat; else
+ 	    if(param == "fetch_away_message") k.action = key_fetch_away_message; else
+ 	    if(param == "user_menu") k.action = key_user_menu; else
+ 	    if(param == "general_menu") k.action = key_general_menu; else
+--- centericq-4.20.0/src/icqcontact.cc	2005-01-27 00:52:48.000000000 +0100
++++ centericq-4.20.0/src/icqcontact.cc	2005-02-13 13:10:55.000000000 +0100
+@@ -1,7 +1,7 @@
+ /*
+ *
+ * centericq single IM contact class
+-* $Id: icqcontact.cc,v 1.104 2005/01/26 23:52:48 konst Exp $
++* $Id: icqcontact.cc,v 1.105 2005/02/13 12:10:55 iulica Exp $
+ *
+ * Copyright (C) 2001-2004 by Konstantin Klyagin <konst@konst.org.ua>
+ *
+@@ -47,6 +47,7 @@
+     status = offline;
+     finlist = true;
+     congratulated = false;
++    openedforchat = false;
+ 
+     for(ie = imevent::message; ie != imevent::imeventtype_size; ie++)
+ 	sound[ie] = "";
+--- centericq-4.20.0/src/icqdialogs.cc	2005-02-03 01:08:07.000000000 +0100
++++ centericq-4.20.0/src/icqdialogs.cc	2005-02-03 03:02:37.000000000 +0100
+@@ -1,7 +1,7 @@
+ /*
+ *
+ * centericq user interface class, dialogs related part
+-* $Id: icqdialogs.cc,v 1.149 2005/01/27 00:27:42 konst Exp $
++* $Id: icqdialogs.cc,v 1.150 2005/02/03 02:02:37 konst Exp $
+ *
+ * Copyright (C) 2001-2004 by Konstantin Klyagin <konst@konst.org.ua>
+ *
+--- centericq-4.20.0/src/icqface.cc	2005-02-03 00:26:11.000000000 +0100
++++ centericq-4.20.0/src/icqface.cc	2005-02-14 22:40:04.000000000 +0100
+@@ -1,7 +1,7 @@
+ /*
+ *
+ * centericq user interface class
+-* $Id: icqface.cc,v 1.241 2005/02/01 00:12:58 konst Exp $
++* $Id: icqface.cc,v 1.246 2005/02/14 21:40:04 iulica Exp $
+ *
+ * Copyright (C) 2001-2004 by Konstantin Klyagin <konst@konst.org.ua>
+ *
+@@ -447,9 +447,42 @@
+     return r;
+ }
+ 
++/* called to prepare the next chat contact, returns true if it found one, false otherwise
++   parameter is true if its next chat contact or false if is the previous
++ */
++bool icqface::next_chat(bool next) {
++  find_next_action = (next ? 1:-1);
++  if (last_selected) last_selected->setopenedforchat(false);
++  return true;
++}
++
++icqcontact *icqface::find_next_chat() {
++  if (find_next_action == 0) return 0;
++  int i;
++  if (last_selected){
++    for(i = 0; i < clist.count && clist.at(i) != last_selected; i++)
++      ;
++    i += find_next_action;
++  }
++  else i = find_next_action == 1 ? 0 : clist.count -1;
++
++  icqcontact *c;
++  for (; i < clist.count && i >= 0; i += find_next_action){
++    c = (icqcontact *) clist.at(i);
++    if (c->isopenedforchat() || c->hasevents()) {
++      find_next_action = 0;
++      extk = ACT_MSG;
++      return c;
++    }
++  }
++  
++  find_next_action = 0;
++  return 0;
++}
++
+ icqcontact *icqface::mainloop(int &action) {
+     int i, curid;
+-    icqcontact *c = 0; icqgroup *g;
++    icqcontact *c = 0, *c1 = 0; icqgroup *g;
+     bool fin;
+ 
+     for(fin = false; !fin; ) {
+@@ -457,10 +490,14 @@
+ 
+ 	/* Obtain the (icqcontact *) from the treeview. If a node is
+ 	   selected, throw out the contact and obtain the correct (icqgroup *). */
++	
++	if (!(c = c1 = find_next_chat())){ //check if next_chat was called from inside a chat window
++	    last_selected = 0; // next_chat (if called) was called from contacts menu so there was no last selected contact
++	    c = (icqcontact *) mcontacts->open(&i);
++	    if ((c1 = find_next_chat())) c = c1; //check if next_chat was called from contacts menu
++        }
+ 
+-	c = (icqcontact *) mcontacts->open(&i);
+-
+-	if(mcontacts->isnode(i) && c) {
++	if(!c1 && c && mcontacts->isnode(i)) {
+ 	    c = 0;
+ 	    g = (icqgroup *) mcontacts->getref(mcontacts->getid(mcontacts->menu.getpos()));
+ 	} else {
+@@ -529,7 +566,7 @@
+ 	    break;
+ 	}
+     }
+-
++    if (c) last_selected = c;
+     return c;
+ }
+ 
+@@ -694,7 +731,7 @@
+ 	if(c->getstatus() == offline) {
+ 	    mcontacts->addleaff(nnode,
+ 		c->hasevents() ? conf.getcolor(cp_main_highlight) : conf.getprotcolor(c->getdesc().pname),
+-		c, "%s%s ", c->hasevents() ? "#" : c->getpostponed().empty() ? " " : ">", dnick.c_str());
++		c, "%s%s ", c->hasevents() ? "#" : c->getpostponed().empty() ? (c->isopenedforchat() ? "*" : " ") : ">", dnick.c_str());
+ 
+ 	} else {
+ 	    char *fmt = "%s[%c]%s%s ";
+@@ -711,7 +748,7 @@
+ 
+ 	    mcontacts->addleaff(nnode,
+ 		c->hasevents() ? conf.getcolor(cp_main_highlight) : conf.getprotcolor(c->getdesc().pname),
+-		c, fmt, c->hasevents() ? "#" : " ", shortstatus,
++		c, fmt, c->hasevents() ? "#" : (c->isopenedforchat() ? "*" : " "), shortstatus,
+ 		c->getpostponed().empty() ? " " : ">", dnick.c_str());
+ 
+ 	}
+@@ -2620,6 +2657,7 @@
+     chatlastread = 0;
+     inchat = true;
+     passinfo = ic;
++    c->setopenedforchat(true);
+ 
+     muins.clear();
+     muins.push_back(passinfo);
+@@ -2666,6 +2704,7 @@
+ 	c->setpostponed(editdone ? "" : p.get());
+     }
+ 
++    c->toggleopenedforchat();
+     c->save();
+     restoreworkarea();
+     status("@");
+@@ -3196,6 +3235,16 @@
+ 	    face.extk = ACT_HISTORY;
+ 	    break;
+ 
++	case key_next_chat:
++	    face.extk = ACT_DUMMY;
++	    face.next_chat(true);
++	    break;
++            
++	case key_prev_chat:
++	    face.extk = ACT_DUMMY;
++	    face.next_chat(false);
++	    break;
++
+ 	case key_add: face.extk = ACT_ADD; break;
+ 
+ 	case key_send_contact:
+@@ -3323,6 +3372,14 @@
+ 	case key_history:
+ 	    cicq.history(face.passinfo);
+ 	    break;
++	case key_prev_chat:
++	    face.editdone = false;
++	    face.next_chat(false);
++	    return -1;
++	case key_next_chat:
++	    face.editdone = false;
++	    face.next_chat(true);
++	    return -1;
+ 	case key_info:
+ 	    cicq.userinfo(face.passinfo);
+ 	    break;
+@@ -3379,8 +3436,8 @@
+ }
+ 
+ int icqface::fullscreenkeys(textbrowser &m, int k) {
+-    switch(k) {
+-	case KEY_F(9):
++    switch(face.key2action(k, section_editor)) {
++	case key_fullscreen:
+ 	    return 0;
+     }
+ 
+--- centericq-4.20.0/src/centericq.h	2004-06-12 16:09:27.000000000 +0200
++++ centericq-4.20.0/src/centericq.h	2005-02-13 13:10:55.000000000 +0100
+@@ -84,7 +84,8 @@
+ 	void readevents(const imcontact cont);
+ 
+ 	void history(const imcontact &cont);
+-
++	bool next_chat(bool next = false);
++  
+ 	bool sendevent(const imevent &ev, icqface::eventviewresult r);
+ };
+ 
+--- centericq-4.20.0/src/icqconf.h	2005-01-16 13:59:57.000000000 +0100
++++ centericq-4.20.0/src/icqconf.h	2005-02-13 13:10:55.000000000 +0100
+@@ -71,6 +71,8 @@
+     key_quickfind,
+     key_search,
+     key_search_again,
++    key_next_chat,
++    key_prev_chat,
+     key_show_urls,
+     key_rss_check,
+     key_multiple_recipients,
+--- centericq-4.20.0/src/icqcontact.h	2005-01-23 14:01:39.000000000 +0100
++++ centericq-4.20.0/src/icqcontact.h	2005-02-13 13:10:55.000000000 +0100
+@@ -70,7 +70,7 @@
+ 	imstatus status;
+ 
+ 	int fupdated, groupid, fhistoffset;
+-	bool finlist, congratulated, modified, fhasevents, usepgpkey;
++	bool finlist, congratulated, modified, fhasevents, usepgpkey, openedforchat;
+ 	time_t lastread, lastseen, lasttyping;
+ 
+ 	string sound[imevent::imeventtype_size];
+@@ -122,6 +122,9 @@
+ 
+ 	bool hasevents() const { return fhasevents; }
+ 	void sethasevents(bool n) { fhasevents = n; }
++	bool isopenedforchat() const { return openedforchat; }
++	bool setopenedforchat(bool n) { openedforchat = n; }
++	bool toggleopenedforchat() { openedforchat = !openedforchat; }
+ 
+ 	string getnick() const;
+ 	string getdispnick() const;
+--- centericq-4.20.0/src/icqface.h	2005-02-03 00:30:25.000000000 +0100
++++ centericq-4.20.0/src/icqface.h	2005-02-14 22:09:35.000000000 +0100
+@@ -26,7 +26,7 @@
+     ACT_FILE, ACT_GROUPMOVE, ACT_ORG_GROUPS, ACT_HIDEOFFLINE, ACT_FETCHAWAY,
+     ACT_EMAIL, ACT_AUTH, ACT_CONTACT, ACT_VERSION, ACT_JOIN, ACT_LEAVE,
+     ACT_CONFER, ACT_TRANSFERS, ACT_JOINDIALOG, ACT_EXTERN, ACT_RSS, ACT_LJ,
+-    ACT_MASS_MOVE, ACT_PGPKEY, ACT_PGPSWITCH
++    ACT_MASS_MOVE, ACT_PGPKEY, ACT_PGPSWITCH, ACT_DUMMY
+ };
+ 
+ extern class centericq cicq;
+@@ -92,6 +92,9 @@
+ 
+ 	imcontact passinfo;
+ 	const imevent *passevent;
++  
++	icqcontact *last_selected;
++	int find_next_action;
+ 
+ 	struct filetransferitem {
+ 	    string fname;
+@@ -202,6 +205,10 @@
+ 	void relaxedupdate();
+ 	bool updaterequested();
+ 
++  
++	icqcontact *find_next_chat();
++	bool next_chat(bool next = true);
++  
+ 	icqcontact *mainloop(int &action);
+ 	void fillcontactlist();
+ 
--- centericq-4.20.0.orig/debian/rules
+++ centericq-4.20.0/debian/rules
@@ -0,0 +1,133 @@
+#!/usr/bin/make -f
+#                                                       -*- makefile -*-
+# debian/rules file for the Debian/GNU Linux centericq package
+# Copyright 2002-2003 by Julien LEMOINE <speedblue@debian.org>
+
+#include dpatch makefile
+include /usr/share/dpatch/dpatch.make
+
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CXXFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  CXXFLAGS += -O0
+else
+  CXXFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+  INSTALL_PROGRAM += -s
+endif
+
+source          := $(shell head -1 debian/changelog | \
+                        perl -nle 'm/^([a-z]+)/ and print $$1')
+package         := $(shell head -1 debian/changelog | \
+                        perl -nle 'm/^(\S+)\s+/ and print $$1')
+version         := $(shell head -1 debian/changelog | \
+                        perl -nle 'm/\S+\s+\((\S+)-\S+\)/ and print $$1')
+major           := $(shell head -1 debian/changelog | perl -nle \
+                        'm/\S+\s+\((\d\.\d)\.\d+-\S+\)/ and print $$1')
+pcommon=$(package)-common
+pfribidi=$(package)-fribidi
+putf8=$(package)-utf8
+
+config.status: configure
+	dh_testdir
+	cp centericq.1 centericq-fribidi.1
+	cp centericq.1 centericq-utf8.1
+	CFLAGS="$(CXXFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure	\
+	--host=$(DEB_HOST_GNU_TYPE)				\
+	--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr		\
+	--mandir=\$${prefix}/share/man				\
+	--infodir=\$${prefix}/share/info			\
+	--with-included-gettext --with-ssl 			\
+	|| cat config.log
+
+build: patch build-stamp
+
+build-stamp: config.status
+	dh_testdir
+#build centericq
+	$(MAKE)
+	mv src/centericq src/centericq-normal
+#build centericq-utf8
+	cd kkconsui-0.1; $(MAKE) clean
+	perl -pi -e "s:<ncurses.h>:<ncursesw/ncurses.h>:" 	\
+	  kkconsui-0.1/include/conscommon.h
+	perl -pi -e "s/lncurses/lncursesw/" src/Makefile
+	$(MAKE)
+	mv src/centericq src/centericq-utf8
+	perl -pi -e "s:<ncursesw/ncurses.h>:<ncurses.h>:" 	\
+	  kkconsui-0.1/include/conscommon.h
+	perl -pi -e "s/lncursesw/lncurses/" src/Makefile
+#build centericq-fribidi
+	cd kkconsui-0.1; $(MAKE) distclean
+	CFLAGS="$(CXXFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure	\
+	--host=$(DEB_HOST_GNU_TYPE)				\
+	--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr		\
+	--mandir=\$${prefix}/share/man				\
+	--infodir=\$${prefix}/share/info			\
+	--with-included-gettext --with-fribidi=/usr --with-ssl
+	$(MAKE)
+	mv src/centericq src/centericq-fribidi
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	-$(MAKE) distclean
+	rm -f build-stamp intl/libintl.h config.cache		\
+        config.guess config.log config.status config.sub	\
+	config.h config.sub src/centericq-normal		\
+	src/centericq-fribidi centericq-fribidi.1 		\
+	src/centericq-utf8 centericq-utf8.1			\
+	po/centericq.pot po/cat-id-tbl.c po/*.gmo
+	find ./ -name config.status -print | xargs rm || true
+	find ./ -name config.log -print | xargs rm || true
+	-test -r /usr/share/misc/config.sub && 			\
+	  cp -f /usr/share/misc/config.sub config.sub &&	\
+	  cp -f /usr/share/misc/config.sub kkconsui-0.1/config.sub
+	-test -r /usr/share/misc/config.guess && 		\
+	  cp -f /usr/share/misc/config.guess config.guess &&	\
+	  cp -f /usr/share/misc/config.guess kkconsui-0.1/config.guess
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	$(MAKE) install-data prefix=$(CURDIR)/debian/$(pcommon)/usr
+	mv src/centericq-normal src/centericq
+	install -m 755 src/centericq $(CURDIR)/debian/$(package)/usr/bin/
+	install -m 755 src/centericq-fribidi $(CURDIR)/debian/$(pfribidi)/usr/bin
+	install -m 755 src/centericq-utf8 $(CURDIR)/debian/$(putf8)/usr/bin
+	rm -rf $(CURDIR)/debian/$(pcommon)/usr/share/man/man1/
+	rm -rf $(CURDIR)/debian/$(pcommon)/usr/include
+	install -m 755 misc/cicqconv $(CURDIR)/debian/$(pcommon)/usr/bin
+	install -m 755 misc/cicqsync $(CURDIR)/debian/$(pcommon)/usr/bin
+
+binary-indep: build install
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installman -p$(pcommon) misc/cicqconv.1 misc/cicqsync.1
+	dh_installman -p$(package) centericq.1
+	dh_installman -p$(pfribidi) centericq-fribidi.1
+	dh_installman -p$(putf8) centericq-utf8.1
+	dh_installchangelogs ChangeLog
+	dh_installexamples debian/external.example
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- centericq-4.20.0.orig/config.sub
+++ centericq-4.20.0/config.sub
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2001-06-08'
+timestamp='2002-03-07'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,8 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -117,7 +118,7 @@
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -223,26 +224,36 @@
 case $basic_machine in
 	# Recognize the basic CPU types without company name.
 	# Some are omitted here because they have special meanings below.
-	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
-	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
-		| pyramid | mn10200 | mn10300 | tron | a29k \
-		| 580 | i960 | h8300 \
-		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
-		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
-		| hppa64 \
-		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
-		| alphaev6[78] \
-		| we32k | ns16k | clipper | i370 | sh | sh[34] \
-		| powerpc | powerpcle \
-		| 1750a | dsp16xx | pdp10 | pdp11 \
-		| mips16 | mips64 | mipsel | mips64el \
-		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
-		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
-		| mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \
-		| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
-		| v850 | c4x \
-		| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
-		| pj | pjl | h8500 | z8k)
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dsp16xx \
+	| fr30 \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
+	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
+	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+	| mipsisa32 | mipsisa64 \
+	| mn10200 | mn10300 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
 		basic_machine=$basic_machine-unknown
 		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
@@ -265,31 +276,45 @@
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
-	# FIXME: clean up the formatting here.
-	vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
-	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
-	      | xmp-* | ymp-* \
-	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
-	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
-	      | hppa2.0n-* | hppa64-* \
-	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
-	      | alphaev6[78]-* \
-	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
-	      | clipper-* | orion-* \
-	      | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \
-	      | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
-	      | mips16-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-* \
-	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
-	      | mipstx39-* | mipstx39el-* | mcore-* \
-	      | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
-	      | [cjt]90-* \
-	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
-	      | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
-	      | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c54x-* \
+	| clipper-* | cydra-* \
+	| d10v-* | d30v-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| m32r-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+	| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+	| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
+	| ymp-* \
+	| z8k-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -352,6 +377,10 @@
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -372,16 +401,8 @@
 		basic_machine=c38-convex
 		os=-bsd
 		;;
-	cray | ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	cray2)
-		basic_machine=cray2-cray
-		os=-unicos
-		;;
-	[cjt]90)
-		basic_machine=${basic_machine}-cray
+	cray | j90)
+		basic_machine=j90-cray
 		os=-unicos
 		;;
 	crds | unos)
@@ -396,6 +417,14 @@
 	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
 		basic_machine=mips-dec
 		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
 		basic_machine=m68k-motorola
@@ -576,14 +605,6 @@
 		basic_machine=m68k-atari
 		os=-mint
 		;;
-	mipsel*-linux*)
-		basic_machine=mipsel-unknown
-		os=-linux-gnu
-		;;
-	mips*-linux*)
-		basic_machine=mips-unknown
-		os=-linux-gnu
-		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 		;;
@@ -598,6 +619,10 @@
 		basic_machine=m68k-rom68k
 		os=-coff
 		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
 	msdos)
 		basic_machine=i386-pc
 		os=-msdos
@@ -677,6 +702,10 @@
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
 		os=-ose
@@ -702,7 +731,7 @@
         pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
-	pentium | p5 | k5 | k6 | nexgen)
+	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
 	pentiumpro | p6 | 6x86 | athlon)
@@ -711,7 +740,7 @@
 	pentiumii | pentium2)
 		basic_machine=i686-pc
 		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentiumpro-* | p6-* | 6x86-* | athlon-*)
@@ -735,6 +764,16 @@
 	ppcle-* | powerpclittle-*)
 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
+	ppc64)	basic_machine=powerpc64-unknown
+	        ;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+	        ;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	ps2)
 		basic_machine=i386-ibm
 		;;
@@ -752,6 +791,12 @@
 	rtpc | rtpc-*)
 		basic_machine=romp-ibm
 		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
 	sa29200)
 		basic_machine=a29k-amd
 		os=-udi
@@ -763,7 +808,7 @@
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
-	sparclite-wrs)
+	sparclite-wrs | simso-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
 		;;
@@ -821,7 +866,7 @@
 	sun386 | sun386i | roadrunner)
 		basic_machine=i386-sun
 		;;
-	sv1)
+        sv1)
 		basic_machine=sv1-cray
 		os=-unicos
 		;;
@@ -829,8 +874,16 @@
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
+	t3d)
+		basic_machine=alpha-cray
+		os=-unicos
+		;;
 	t3e)
-		basic_machine=t3e-cray
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
 		os=-unicos
 		;;
 	tic54x | c54x*)
@@ -843,6 +896,10 @@
 	tx39el)
 		basic_machine=mipstx39el-unknown
 		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
@@ -893,13 +950,13 @@
 		basic_machine=i386-pc
 		os=-windows32-msvcrt
 		;;
-	xmp)
-		basic_machine=xmp-cray
-		os=-unicos
-		;;
         xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
 	z8k-*-coff)
 		basic_machine=z8k-unknown
 		os=-sim
@@ -920,13 +977,6 @@
 	op60c)
 		basic_machine=hppa1.1-oki
 		;;
-	mips)
-		if [ x$os = x-linux-gnu ]; then
-			basic_machine=mips-unknown
-		else
-			basic_machine=mips-mips
-		fi
-		;;
 	romp)
 		basic_machine=romp-ibm
 		;;
@@ -946,9 +996,12 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4)
+	sh3 | sh4 | sh3eb | sh4eb)
 		basic_machine=sh-unknown
 		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
 	sparc | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
@@ -1035,7 +1088,9 @@
 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1087,12 +1142,18 @@
 	-acis*)
 		os=-aos
 		;;
+	-atheos*)
+		os=-atheos
+		;;
 	-386bsd)
 		os=-bsd
 		;;
 	-ctix* | -uts*)
 		os=-sysv
 		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
 	-ns2 )
 	        os=-nextstep2
 		;;
@@ -1167,6 +1228,7 @@
 	arm*-semi)
 		os=-aout
 		;;
+	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
 		;;
@@ -1197,6 +1259,9 @@
 	mips*-*)
 		os=-elf
 		;;
+	or32-*)
+		os=-coff
+		;;
 	*-tti)	# must be before sparc entry or we get the wrong os.
 		os=-sysv3
 		;;
@@ -1358,6 +1423,9 @@
 				;;
 			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
 				;;
 		esac
 		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
--- centericq-4.20.0.orig/config.guess
+++ centericq-4.20.0/config.guess
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2001-07-12'
+timestamp='2002-03-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -24,8 +24,9 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
@@ -97,7 +98,7 @@
 
 set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
  ,,)    echo "int dummy(){}" > $dummy.c ;
-	for c in cc gcc c89 ; do
+	for c in cc gcc c89 c99 ; do
 	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
 	  if test $? = 0 ; then
 	     CC_FOR_BUILD="$c"; break ;
@@ -127,29 +128,29 @@
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
-	# Netbsd (nbsd) targets should (where applicable) match one or
+	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
 	# compatibility and a consistent mechanism for selecting the
 	# object file format.
-	# Determine the machine/vendor (is the vendor relevant).
-	case "${UNAME_MACHINE}" in
-	    amiga) machine=m68k-unknown ;;
-	    arm32) machine=arm-unknown ;;
-	    atari*) machine=m68k-atari ;;
-	    sun3*) machine=m68k-sun ;;
-	    mac68k) machine=m68k-apple ;;
-	    macppc) machine=powerpc-apple ;;
-	    hp3[0-9][05]) machine=m68k-hp ;;
-	    ibmrt|romp-ibm) machine=romp-ibm ;;
-	    *) machine=${UNAME_MACHINE}-unknown ;;
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE}" in
-	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep __ELF__ >/dev/null
@@ -172,6 +173,45 @@
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     alpha:OSF1:*:*)
 	if test $UNAME_RELEASE = "V4.0"; then
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -227,6 +267,9 @@
 			2-307)
 				UNAME_MACHINE="alphaev67"
 				;;
+			2-1307)
+				UNAME_MACHINE="alphaev68"
+				;;
 		esac
 	fi
 	rm -f $dummy.s $dummy
@@ -244,29 +287,11 @@
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
 	exit 0;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
 	exit 0 ;;
-    arc64:OpenBSD:*:*)
-	echo mips64el-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hkmips:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
 	exit 0 ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
@@ -316,7 +341,7 @@
 	echo m68k-sun-sunos${UNAME_RELEASE}
 	exit 0 ;;
     sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
@@ -330,9 +355,6 @@
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
 	exit 0 ;;
-    atari*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -359,18 +381,6 @@
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
         exit 0 ;;
-    sun3*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
 	exit 0 ;;
@@ -387,6 +397,7 @@
 	echo clipper-intergraph-clix${UNAME_RELEASE}
 	exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
@@ -408,7 +419,6 @@
 	  exit (-1);
 	}
 EOF
-	eval $set_cc_for_build
 	$CC_FOR_BUILD $dummy.c -o $dummy \
 	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 	  && rm -f $dummy.c $dummy && exit 0
@@ -478,6 +488,7 @@
 	exit 0 ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
 		sed 's/^		//' << EOF >$dummy.c
 		#include <sys/systemcfg.h>
 
@@ -489,7 +500,6 @@
 			exit(0);
 			}
 EOF
-		eval $set_cc_for_build
 		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
 		rm -f $dummy.c $dummy
 		echo rs6000-ibm-aix3.2.5
@@ -500,7 +510,7 @@
 	fi
 	exit 0 ;;
     *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
@@ -540,10 +550,8 @@
 	    9000/31? )            HP_ARCH=m68000 ;;
 	    9000/[34]?? )         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
-              case "${HPUX_REV}" in
-                11.[0-9][0-9])
-                  if [ -x /usr/bin/getconf ]; then
-                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                     case "${sc_cpu_version}" in
                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@@ -552,12 +560,13 @@
                         case "${sc_kernel_bits}" in
                           32) HP_ARCH="hppa2.0n" ;;
                           64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
                         esac ;;
                     esac
-                  fi ;;
-              esac
-              if [ "${HP_ARCH}" = "" ]; then
-              sed 's/^              //' << EOF >$dummy.c
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
 
               #define _HPUX_SOURCE
               #include <stdlib.h>
@@ -590,11 +599,10 @@
                   exit (0);
               }
 EOF
-	eval $set_cc_for_build
-	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-	rm -f $dummy.c $dummy
-	fi ;;
+		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+		    rm -f $dummy.c $dummy
+		fi ;;
 	esac
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
@@ -603,6 +611,7 @@
 	echo ia64-hp-hpux${HPUX_REV}
 	exit 0 ;;
     3050*:HI-UX:*:*)
+	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
 	int
@@ -628,7 +637,6 @@
 	  exit (0);
 	}
 EOF
-	eval $set_cc_for_build
 	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
 	rm -f $dummy.c $dummy
 	echo unknown-hitachi-hiuxwe2
@@ -658,9 +666,6 @@
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
 	exit 0 ;;
-    hppa*:OpenBSD:*:*)
-	echo hppa-unknown-openbsd
-	exit 0 ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
         exit 0 ;;
@@ -679,9 +684,6 @@
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
         exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
@@ -703,18 +705,12 @@
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 	exit 0 ;;
@@ -727,9 +723,6 @@
     *:FreeBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit 0 ;;
@@ -739,6 +732,9 @@
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit 0 ;;
+    x86:Interix*:3*)
+	echo i386-pc-interix3
+	exit 0 ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -764,20 +760,37 @@
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     mips:Linux:*:*)
-	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
-	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
-	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
-	esac
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	rm -f $dummy.c
+	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
 	;;
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-gnu
 	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit 0 ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -786,7 +799,7 @@
 	  PCA57) UNAME_MACHINE=alphapca56 ;;
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
         esac
 	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
@@ -819,7 +832,8 @@
 	# The BFD linker knows what the default object file format is, so
 	# first see if it will tell us. cd to the root directory to prevent
 	# problems with other programs or directories called `ld' in the path.
-	ld_supported_targets=`cd /; ld --help 2>&1 \
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
 			 | sed -ne '/supported targets:/!d
 				    s/[ 	][ 	]*/ /g
 				    s/.*supported targets: *//
@@ -842,33 +856,30 @@
 		exit 0 ;;
 	esac
 	# Determine whether the default compiler is a.out or elf
-	cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-#  if __GLIBC__ >= 2
-    printf ("%s-pc-linux-gnu\n", argv[1]);
-#  else
-    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-#  endif
-# else
-   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-#else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
 	eval $set_cc_for_build
-	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 	;;
     i*86:DYNIX/ptx:4*:*)
@@ -947,7 +958,7 @@
 	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -993,8 +1004,8 @@
 		echo ns32k-sni-sysv
 	fi
 	exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <Richard.M.Bartel@ccMail.Census.GOV>
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
         exit 0 ;;
     *:UNIX_System_V:4*:FTX*)
@@ -1006,6 +1017,10 @@
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
 	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
 	exit 0 ;;
@@ -1044,15 +1059,17 @@
 	echo `uname -p`-apple-darwin${UNAME_RELEASE}
 	exit 0 ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	if test "${UNAME_MACHINE}" = "x86pc"; then
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
 	exit 0 ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit 0 ;;
-    NSR-[KW]:NONSTOP_KERNEL:*:*)
+    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
 	exit 0 ;;
     *:NonStop-UX:*:*)
@@ -1098,11 +1115,18 @@
     *:ITS:*:*)
 	echo pdp10-unknown-its
 	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
+eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
@@ -1217,7 +1241,6 @@
 }
 EOF
 
-eval $set_cc_for_build
 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
 rm -f $dummy.c $dummy
 
