[Chinese-commits] [zh-autoconvert] 22/26: Add old and new patches in debian/patches/

Anthony Fok foka at debian.org
Wed Nov 18 00:27:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

foka pushed a commit to branch master
in repository zh-autoconvert.

commit 24877d8b90d1f8bc9c2c6516dbd77fa0760ebd3b
Author: Anthony Fok <foka at debian.org>
Date:   Tue Nov 17 15:54:22 2015 -0700

    Add old and new patches in debian/patches/
    
    Old patches from 0.3.16-3 (2009-02-19):
    
     - 001-build-static-library.patch
     - 002-chdir-before-symlink.patch
     - 003-strip-binaries.patch
     - 004-delete-empty-default-label-for-gcc-3.4.patch
     - 005-move-plugins-to-usr-lib.patch
     - 006-add-exit.patch
     - 007-migrate-xchat-plugins-to-gtk2.patch
    
    New patches for the pending 0.3.16-4 (2015-11-17):
    
     - 008-add-missing-includes.patch
     - 009-add-placeholder-README-for-lib.patch
     - 010-create-destination-directories-in-Makefile.patch
     - 011-do-not-strip-binaries.patch
     - 012-hardening.patch
     - 013-fix-xchat-plugin-compile-warnings.patch
     - 014-convert-comments-to-utf8.patch
     - 015-convert-docs-to-utf8.patch
---
 debian/patches/001-build-static-library.patch      |  43 ++
 debian/patches/002-chdir-before-symlink.patch      |  19 +
 debian/patches/003-strip-binaries.patch            |  36 ++
 ...04-delete-empty-default-label-for-gcc-3.4.patch |  53 ++
 debian/patches/005-move-plugins-to-usr-lib.patch   |  25 +
 debian/patches/006-add-exit.patch                  |  22 +
 .../007-migrate-xchat-plugins-to-gtk2.patch        |  26 +
 debian/patches/008-add-missing-includes.patch      |  82 +++
 .../009-add-placeholder-README-for-lib.patch       |  15 +
 ...reate-destination-directories-in-Makefile.patch |  23 +
 debian/patches/011-do-not-strip-binaries.patch     |  34 ++
 debian/patches/012-hardening.patch                 |  98 ++++
 .../013-fix-xchat-plugin-compile-warnings.patch    | 549 +++++++++++++++++++++
 debian/patches/014-convert-comments-to-utf8.patch  | 156 ++++++
 debian/patches/015-convert-docs-to-utf8.patch      | 308 ++++++++++++
 debian/patches/series                              |  15 +
 16 files changed, 1504 insertions(+)

diff --git a/debian/patches/001-build-static-library.patch b/debian/patches/001-build-static-library.patch
new file mode 100644
index 0000000..16cc1c1
--- /dev/null
+++ b/debian/patches/001-build-static-library.patch
@@ -0,0 +1,43 @@
+Description: Extend hzconvert/Makefile to build static library too
+ Committed after 2001-02-06 (0.3.9-1) but on or before 2001-07-18 (0.3.13-3).
+Author: Yu Guanghui <ygh at debian.org>
+Origin: vender
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/hzconvert/Makefile
++++ b/hzconvert/Makefile
+@@ -1,22 +1,26 @@
+ CC=gcc -I../include
+-CFLAGS=-O2 -Wall -g
++CFLAGS=-O2 -Wall -g -D_REENTRANT
+ SHARED_LIB=libhz.so
+ SHARED_LIB_MAJOR=$(SHARED_LIB).0
+ SHARED_LIB_MINOR=$(SHARED_LIB_MAJOR).0
+ OBJS=b2g.o b2u.o g2u.o hz2gb.o b2g_tables.o b2u_tables.o g2u_tables.o io.o unicode.o judge.o judge3.o gbpercent.o b5percent.o search.o 
++STATIC_OBJS=b2g.static.o b2u.static.o g2u.static.o hz2gb.static.o b2g_tables.static.o b2u_tables.static.o g2u_tables.static.o io.static.o unicode.static.o judge.static.o judge3.static.o gbpercent.static.o b5percent.static.o search.static.o 
+ 
+-%.o: %.c
++%.o:%.c
+ 	$(CC) -fPIC $(CFLAGS) -c $<
+ 
+-all: libhzconvert
++%.static.o:%.c
++	$(CC)  $(CFLAGS) -c $< -o $*.static.o
+ 
+-libhzconvert: $(OBJS)
+-	ar rs  ../lib/libhz.a $(OBJS)
++all: share-lib static-lib
++
++share-lib: $(OBJS)
+ 	gcc -fPIC -shared -Wl,-soname,$(SHARED_LIB_MAJOR) -o ../lib/$(SHARED_LIB_MINOR)  $(OBJS) -ldl
+ 	rm -f ../lib/$(SHARED_LIB_MAJOR)
+ 	rm -f ../lib/$(SHARED_LIB)
+ 	cd ../lib;ln -s $(SHARED_LIB_MINOR) $(SHARED_LIB_MAJOR)
+ 	cd ../lib;ln -s $(SHARED_LIB_MAJOR) $(SHARED_LIB)
+-
++static-lib: $(STATIC_OBJS)
++	ar rs  ../lib/libhz.a $(STATIC_OBJS)
+ clean:
+ 	rm -f *.o *~ ../lib/lib*
diff --git a/debian/patches/002-chdir-before-symlink.patch b/debian/patches/002-chdir-before-symlink.patch
new file mode 100644
index 0000000..d4212c3
--- /dev/null
+++ b/debian/patches/002-chdir-before-symlink.patch
@@ -0,0 +1,19 @@
+Description: Change directory before creating autob5 symlink
+ For better code readability perhaps?
+ .
+ Committed after 2001-02-06 (0.3.9-1) but on or before 2001-07-18 (0.3.13-3).
+Author: Yu Guanghui <ygh at debian.org>
+Origin: vendor
+Forwarded: no
+Reviewed-by: Anthony Fok <foka at debian.org>
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -38,4 +38,4 @@
+ 	install -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/share/zh-autoconvert
+ 	install -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/share/zh-autoconvert
+ 	install -m 644 include/*.h  $(DESTDIR)/usr/include
+-	ln -s autogb $(DESTDIR)/usr/bin/autob5
++	cd $(DESTDIR)/usr/bin; ln -s autogb $(DESTDIR)/usr/bin/autob5
diff --git a/debian/patches/003-strip-binaries.patch b/debian/patches/003-strip-binaries.patch
new file mode 100644
index 0000000..5cf348c
--- /dev/null
+++ b/debian/patches/003-strip-binaries.patch
@@ -0,0 +1,36 @@
+Description: Strip binaries during install in Makefile
+ This patch is no longer the right way to strip binaries because it
+ precludes the use of DEB_BUILD_OPTIONS=nostrip (See Bug#438364).
+ .
+ Nevertheless, this patch is kept to preserve history, 
+ to be reverted in the new 011-do-not-strip-binaries.patch
+ that fixes #438364.
+ .
+ Committed after 2001-02-06 (0.3.9-1) but on or before 2001-07-18 (0.3.13-3).
+Author: Yu Guanghui <ygh at debian.org>
+Origin: vendor
+Forwarded: not-needed
+Reviewed-by: Anthony Fok <foka at debian.org>
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -30,12 +30,12 @@ install-home:
+ 	ln -s $(HOME)/bin/autogb $(HOME)/bin/autob5
+ 	chmod 755 $(HOME)/bin/autogb 
+ install:
+-	install -m 755 autogb $(DESTDIR)/usr/bin
+-	install -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib
++	install -s -m 755 autogb $(DESTDIR)/usr/bin
++	install -s -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib
+ 	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0.0 libhz.so.0
+ 	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0 libhz.so
+-	install -m 755 lib/libhz.a $(DESTDIR)/usr/lib
+-	install -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/share/zh-autoconvert
+-	install -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/share/zh-autoconvert
++	install -s -m 755 lib/libhz.a $(DESTDIR)/usr/lib
++	install -s -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/share/zh-autoconvert
++	install -s -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/share/zh-autoconvert
+ 	install -m 644 include/*.h  $(DESTDIR)/usr/include
+ 	cd $(DESTDIR)/usr/bin; ln -s autogb $(DESTDIR)/usr/bin/autob5
diff --git a/debian/patches/004-delete-empty-default-label-for-gcc-3.4.patch b/debian/patches/004-delete-empty-default-label-for-gcc-3.4.patch
new file mode 100644
index 0000000..19bbe4b
--- /dev/null
+++ b/debian/patches/004-delete-empty-default-label-for-gcc-3.4.patch
@@ -0,0 +1,53 @@
+Description: Delete empty default labels to make it build with gcc-3.4
+ Fixes Bug#264156: "FTBFS with gcc-3.4: label at end of compound statement"
+ reported by Andreas Jochens <aj at andaco.de> on 2004-08-07.
+ .
+ Committed to zh-autoconvert (0.3.14-2) on 2004-08-07.
+Author: Andreas Jochens <aj at andaco.de>
+Origin: vendor, 
+Bug-Debian: https://bugs.debian.org/264156
+Forwarded: no
+Reviewed-by: Yu Guanghui <ygh at debian.org>
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/contrib/xchat-plugins/xchat-autob5.c
++++ b/contrib/xchat-plugins/xchat-autob5.c
+@@ -88,8 +88,6 @@ int	autob5_chanmsg (struct server *serv,
+ 			PrintText(sess," Big\n");
+ #endif
+ 			break;
+-		default:
+-			;
+ 	}
+ 
+ 	XP_CALLNEXT(chanmsg_next, serv, channel, from, text, a, c);
+@@ -127,8 +125,6 @@ int	autob5_privmsg (struct server *serv,
+ 			PrintText(sess," Big\n");
+ #endif
+ 			break;
+-		default:
+-			;
+ 	}
+ 
+ 	XP_CALLNEXT(privmsg_next, serv, from, ip, text, a, c);
+--- a/contrib/xchat-plugins/xchat-autogb.c
++++ b/contrib/xchat-plugins/xchat-autogb.c
+@@ -88,8 +88,6 @@ int	autogb_chanmsg (struct server *serv,
+ 			PrintText(sess," Big\n");
+ #endif
+ 			break;
+-		default:
+-			;
+ 	}
+ 
+ 	XP_CALLNEXT(chanmsg_next, serv, channel, from, text, a, c);
+@@ -127,8 +125,6 @@ int	autogb_privmsg (struct server *serv,
+ 			PrintText(sess," Big\n");
+ #endif
+ 			break;
+-		default:
+-			;
+ 	}
+ 
+ 	XP_CALLNEXT(privmsg_next, serv, from, ip, text, a, c);
diff --git a/debian/patches/005-move-plugins-to-usr-lib.patch b/debian/patches/005-move-plugins-to-usr-lib.patch
new file mode 100644
index 0000000..8fff002
--- /dev/null
+++ b/debian/patches/005-move-plugins-to-usr-lib.patch
@@ -0,0 +1,25 @@
+Description: Move architecture-dependent files to /usr/lib
+ Fixes Bug#392406: "ships architecture-dependent files in /usr/share"
+ reported by "Sam Hocevar (Debian packages)" <sam+deb at zoy.org> on 2006-10-11.
+ .
+ Committed to zh-autoconvert (0.3.16-2) on 2006-10-12.
+Author: Yu Guanghui <ygh at debian.org>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/392406
+Forwarded: no
+Reviewed-by: Anthony Fok <foka at debian.org>
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -35,7 +35,7 @@
+ 	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0.0 libhz.so.0
+ 	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0 libhz.so
+ 	install -s -m 755 lib/libhz.a $(DESTDIR)/usr/lib
+-	install -s -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/share/zh-autoconvert
+-	install -s -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/share/zh-autoconvert
++	install -s -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/lib/zh-autoconvert
++	install -s -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/lib/zh-autoconvert
+ 	install -m 644 include/*.h  $(DESTDIR)/usr/include
+ 	cd $(DESTDIR)/usr/bin; ln -s autogb $(DESTDIR)/usr/bin/autob5
diff --git a/debian/patches/006-add-exit.patch b/debian/patches/006-add-exit.patch
new file mode 100644
index 0000000..fbfb3c8
--- /dev/null
+++ b/debian/patches/006-add-exit.patch
@@ -0,0 +1,22 @@
+Description: Add exit(0) after fflush(0) to avoid Error 56 on PowerPC
+ Fixes Bug#355842: "zh-autoconvert: autogb does not exit correctly on
+ ppc machine" reported by Jutta Wrage <jw at witch.westfalen.de> on 2006-03-08.
+ .
+ Committed to zh-autoconvert (0.3.16-1) on 2006-08-09.
+Author: Yu Guanghui <ygh at debian.org>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/355842
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- zh-autoconvert-0.3.16.orig/autogb.c
++++ zh-autoconvert-0.3.16/autogb.c
+@@ -142,5 +142,7 @@ int main(int argc,char*argv[])
+ 		}
+ 		pbuf=&buff[2];
+ 	}while((count=read(0,pbuf,MAX_BUFFER))>0);
++
+ 	fflush(0);
++	exit(0);
+ }
diff --git a/debian/patches/007-migrate-xchat-plugins-to-gtk2.patch b/debian/patches/007-migrate-xchat-plugins-to-gtk2.patch
new file mode 100644
index 0000000..b3e9ba9
--- /dev/null
+++ b/debian/patches/007-migrate-xchat-plugins-to-gtk2.patch
@@ -0,0 +1,26 @@
+Description: Update XChat plugin Makefile to use GTK+-2.0
+ Fixes Bug#516056: "zh-autoconvert: Gtk1.2 about to be removed from Debian"
+ reported by Barry deFreese <bdefreese at debian.org> on 2009-02-18.
+ .
+ Committed to zh-autoconvert (0.3.16-3) on 2009-02-19.
+Author: Yu Guanghui <ygh at debian.org>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/516056
+Forwarded: no
+Reviewed-by: Anthony Fok <foka at debian.org>
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/contrib/xchat-plugins/Makefile
++++ b/contrib/xchat-plugins/Makefile
+@@ -5,8 +5,8 @@
+ 
+ all:xchat-autogb.so xchat-autob5.so
+ xchat-autogb.so:	xchat-autogb.c
+-	$(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autogb.so -o $@ $< -lhz -lc `gtk-config --cflags`
++	$(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autogb.so -o $@ $< -lhz -lc `pkg-config --cflags gtk+-2.0`
+ xchat-autob5.so:	xchat-autob5.c
+-	$(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autob5.so -o $@ $< -lhz  -lc `gtk-config --cflags`
++	$(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autob5.so -o $@ $< -lhz  -lc `pkg-config --cflags gtk+-2.0`
+ clean:
+ 	rm -rf *~ xchat-autogb.so xchat-autob5.so
diff --git a/debian/patches/008-add-missing-includes.patch b/debian/patches/008-add-missing-includes.patch
new file mode 100644
index 0000000..f6fe1e5
--- /dev/null
+++ b/debian/patches/008-add-missing-includes.patch
@@ -0,0 +1,82 @@
+Description: Add missing includes that cause warnings or errors
+ Committed to zh-autoconvert (0.3.16-4) on 2015-11-17.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/hzconvert/b2u.c
++++ b/hzconvert/b2u.c
+@@ -23,6 +23,8 @@
+  *1999.10
+  */       
+ //$Header: /home/prog/autoconvert/hzconvert/b2u.c,v 1.6 2001/04/28 01:45:46 ygh Exp $
++
++#include <string.h>
+ #include "hz.h"
+ 
+ #define	BtoU_bad1 0xa1
+--- a/hzconvert/g2u.c
++++ b/hzconvert/g2u.c
+@@ -24,6 +24,7 @@
+  */       
+ //$Header: /home/prog/autoconvert/hzconvert/g2u.c,v 1.4 2001/04/28 01:45:46 ygh Exp $
+ 
++#include <string.h>
+ #include "hz.h"
+ 
+ #define	GtoU_bad1 0xa1
+--- a/hzconvert/unicode.c
++++ b/hzconvert/unicode.c
+@@ -24,6 +24,7 @@
+  */       
+ //$Header: /home/prog/autoconvert/hzconvert/unicode.c,v 1.5 2001/04/28 01:45:46 ygh Exp $
+ 
++#include <string.h>
+ #include "hz.h"
+ 
+ /*** UTF8 => UNICODE ***/
+--- a/contrib/xchat-plugins/xchat-autob5.c
++++ b/contrib/xchat-plugins/xchat-autob5.c
+@@ -1,6 +1,7 @@
+ #define USE_PLUGIN
+ 
+ #include <stdio.h>
++#include <string.h>
+ #include "xchat.h"
+ #include "plugin.h"
+ #include "../../include/hz.h"
+--- a/contrib/xchat-plugins/xchat-autogb.c
++++ b/contrib/xchat-plugins/xchat-autogb.c
+@@ -1,6 +1,7 @@
+ #define USE_PLUGIN
+ 
+ #include <stdio.h>
++#include <string.h>
+ #include "xchat.h"
+ #include "plugin.h"
+ #include "../../include/hz.h"
+--- a/hzconvert/judge.c
++++ b/hzconvert/judge.c
+@@ -25,7 +25,9 @@
+ */
+ 
+ //$Header: /home/prog/autoconvert/hzconvert/judge.c,v 1.2 2000/08/31 03:11:08 ygh Exp $
++
+ #include <stdio.h>
++#include <string.h>
+ 
+ #include "hz.h"
+ 
+--- a/autogb.c
++++ b/autogb.c
+@@ -26,6 +26,8 @@
+ //$Header: /home/prog/autoconvert/autogb.c,v 1.7 2001/04/23 14:18:06 ygh Exp $
+ 
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <getopt.h>
+ #include "hz.h"
+ 
diff --git a/debian/patches/009-add-placeholder-README-for-lib.patch b/debian/patches/009-add-placeholder-README-for-lib.patch
new file mode 100644
index 0000000..01878d2
--- /dev/null
+++ b/debian/patches/009-add-placeholder-README-for-lib.patch
@@ -0,0 +1,15 @@
+Description: Add lib/README to keep the lib/ directory available during build
+ This is to counter the fact that Git does not store empty directories.
+ .
+ Committed to zh-autoconvert (0.3.16-4) on 2015-11-17.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- /dev/null
++++ b/lib/README
+@@ -0,0 +1,2 @@
++This file serves as a placeholder to ensure the lib/ directory exists
++to hold the newly compiled libhz files during build.
diff --git a/debian/patches/010-create-destination-directories-in-Makefile.patch b/debian/patches/010-create-destination-directories-in-Makefile.patch
new file mode 100644
index 0000000..5a43df0
--- /dev/null
+++ b/debian/patches/010-create-destination-directories-in-Makefile.patch
@@ -0,0 +1,23 @@
+Description: Create destination usr/* directories in Makefile
+ As a necessary change for the upgrade from debhelper 1 to 9.
+ .
+ Committed to zh-autoconvert (0.3.16-4) on 2015-11-17.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -30,6 +30,10 @@
+ 	ln -s $(HOME)/bin/autogb $(HOME)/bin/autob5
+ 	chmod 755 $(HOME)/bin/autogb 
+ install:
++	install -d $(DESTDIR)/usr/bin
++	install -d $(DESTDIR)/usr/lib
++	install -d $(DESTDIR)/usr/include
++	install -d $(DESTDIR)/usr/lib/zh-autoconvert
+ 	install -s -m 755 autogb $(DESTDIR)/usr/bin
+ 	install -s -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib
+ 	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0.0 libhz.so.0
diff --git a/debian/patches/011-do-not-strip-binaries.patch b/debian/patches/011-do-not-strip-binaries.patch
new file mode 100644
index 0000000..2294886
--- /dev/null
+++ b/debian/patches/011-do-not-strip-binaries.patch
@@ -0,0 +1,34 @@
+Description: Do not strip binaries during install in Makefile
+ This patch allows the Debian build scripts to determine whether or not
+ to strip binaries at build time, allowing the freedom to use
+ DEB_BUILD_OPTIONS=nostrip again.  Reverts 003-strip-binaries.patch.
+ .
+ Fixes Bug#438364: "zh-autoconvert: not handling nostrip build option
+ (policy 10.1)" reported by Danjou <acid at debian.org> on 2007-08-16.
+ .
+ Committed to zh-autoconvert (0.3.16-4) on 2015-11-17.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/438364
+Forwarded: no
+Last-Update: 2015-11-17
+--- a/Makefile
++++ b/Makefile
+@@ -34,12 +34,12 @@
+ 	install -d $(DESTDIR)/usr/lib
+ 	install -d $(DESTDIR)/usr/include
+ 	install -d $(DESTDIR)/usr/lib/zh-autoconvert
+-	install -s -m 755 autogb $(DESTDIR)/usr/bin
+-	install -s -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib
++	install -m 755 autogb $(DESTDIR)/usr/bin
++	install -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib
+ 	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0.0 libhz.so.0
+ 	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0 libhz.so
+-	install -s -m 755 lib/libhz.a $(DESTDIR)/usr/lib
+-	install -s -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/lib/zh-autoconvert
+-	install -s -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/lib/zh-autoconvert
++	install -m 755 lib/libhz.a $(DESTDIR)/usr/lib
++	install -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/lib/zh-autoconvert
++	install -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/lib/zh-autoconvert
+ 	install -m 644 include/*.h  $(DESTDIR)/usr/include
+ 	cd $(DESTDIR)/usr/bin; ln -s autogb $(DESTDIR)/usr/bin/autob5
diff --git a/debian/patches/012-hardening.patch b/debian/patches/012-hardening.patch
new file mode 100644
index 0000000..64ff922
--- /dev/null
+++ b/debian/patches/012-hardening.patch
@@ -0,0 +1,98 @@
+Description: Revise Makefiles to allow hardening buildflags to work
+ With helpful hints from "Debian: how to use blhc to solve hardening issues
+ when packaging" at http://eriberto.pro.br/blog/?p=2222
+ and from https://wiki.debian.org/HardeningWalkthrough
+ .
+ Committed to zh-autoconvert (0.3.16-4) on 2015-11-17.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,6 @@
+-
+-CC=gcc
+-CFLAG=-O2 -g -Wall -Iinclude
+-LIBS= -Llib -lhz
++CC ?= gcc
++CFLAGS := -O2 -g -Wall -Iinclude $(CFLAGS)
++LIBS = -Llib -lhz
+ 
+ .PHONY: all hzlib clean install-home install
+ 
+@@ -10,13 +9,13 @@
+ autob5: autogb
+ 	rm -f autob5;ln -s autogb autob5
+ autogb:autogb.c  hzlib
+-	$(CC) $(CFLAG) $(LIBS) autogb.c -lhz -o autogb
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBS) autogb.c -lhz -o autogb
+ autogb-static:autogb.c  hzlib
+-	$(CC) $(CFLAG) autogb.c lib/libhz.a -o autogb
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) autogb.c lib/libhz.a -o autogb
+ hzlib:
+-	cd hzconvert;make
++	cd hzconvert; make -e
+ xchat-plugins: 
+-	cd contrib/xchat-plugins;make
++	cd contrib/xchat-plugins; make -e
+ clean:
+ 	rm -f autob5 autogb *.o *~
+ 	rm -f include/*~
+--- a/hzconvert/Makefile
++++ b/hzconvert/Makefile
+@@ -1,5 +1,6 @@
+-CC=gcc -I../include
+-CFLAGS=-O2 -Wall -g -D_REENTRANT
++CC ?= gcc
++CFLAGS := -O2 -Wall -g -D_REENTRANT $(CFLAGS)
++INCLUDES += -I../include
+ SHARED_LIB=libhz.so
+ SHARED_LIB_MAJOR=$(SHARED_LIB).0
+ SHARED_LIB_MINOR=$(SHARED_LIB_MAJOR).0
+@@ -7,15 +8,15 @@
+ STATIC_OBJS=b2g.static.o b2u.static.o g2u.static.o hz2gb.static.o b2g_tables.static.o b2u_tables.static.o g2u_tables.static.o io.static.o unicode.static.o judge.static.o judge3.static.o gbpercent.static.o b5percent.static.o search.static.o 
+ 
+ %.o:%.c
+-	$(CC) -fPIC $(CFLAGS) -c $<
++	$(CC) -fPIC $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $<
+ 
+ %.static.o:%.c
+-	$(CC)  $(CFLAGS) -c $< -o $*.static.o
++	$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.static.o
+ 
+ all: share-lib static-lib
+ 
+ share-lib: $(OBJS)
+-	gcc -fPIC -shared -Wl,-soname,$(SHARED_LIB_MAJOR) -o ../lib/$(SHARED_LIB_MINOR)  $(OBJS) -ldl
++	$(CC) -fPIC -shared -Wl,-soname,$(SHARED_LIB_MAJOR) -o ../lib/$(SHARED_LIB_MINOR)  $(OBJS) -ldl $(LDFLAGS)
+ 	rm -f ../lib/$(SHARED_LIB_MAJOR)
+ 	rm -f ../lib/$(SHARED_LIB)
+ 	cd ../lib;ln -s $(SHARED_LIB_MINOR) $(SHARED_LIB_MAJOR)
+--- a/contrib/xchat-plugins/Makefile
++++ b/contrib/xchat-plugins/Makefile
+@@ -1,12 +1,15 @@
+-LDFLAGS = -g
+-CFLAGS = -Wall
+-CC = gcc
+-LIBS= -L../../lib
++LDFLAGS += -g
++CFLAGS := -Wall $(CFLAGS)
++CC ?= gcc
++LIBS = -L../../lib
++
++all: xchat-autogb.so xchat-autob5.so
+ 
+-all:xchat-autogb.so xchat-autob5.so
+ xchat-autogb.so:	xchat-autogb.c
+-	$(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autogb.so -o $@ $< -lhz -lc `pkg-config --cflags gtk+-2.0`
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autogb.so -o $@ $< -lhz -lc `pkg-config --cflags gtk+-2.0`
++
+ xchat-autob5.so:	xchat-autob5.c
+-	$(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autob5.so -o $@ $< -lhz  -lc `pkg-config --cflags gtk+-2.0`
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autob5.so -o $@ $< -lhz  -lc `pkg-config --cflags gtk+-2.0`
++
+ clean:
+ 	rm -rf *~ xchat-autogb.so xchat-autob5.so
diff --git a/debian/patches/013-fix-xchat-plugin-compile-warnings.patch b/debian/patches/013-fix-xchat-plugin-compile-warnings.patch
new file mode 100644
index 0000000..8e9cfbb
--- /dev/null
+++ b/debian/patches/013-fix-xchat-plugin-compile-warnings.patch
@@ -0,0 +1,549 @@
+Description: Fix autogb/autob5 XChat plugin compiler warnings
+ Update XChat plugin header files to that found in
+ .
+     http://xchat.org/files/source/1.8.9/xchat-1.8.9.tar.bz2
+ .
+ with minor modifications to resolve compiler warnings, though
+ it is irrelevant now that XChat 1.8.9 is over 13 years old
+ and XChat 2.x has long since moved to a new and incompatible
+ plugin API.
+ .
+ Committed to zh-autoconvert (0.3.16-4) on 2015-11-17.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/contrib/xchat-plugins/plugin.h
++++ b/contrib/xchat-plugins/plugin.h
+@@ -11,8 +11,9 @@
+ 		XP_CHANSETKEY, XP_CHANSETLIMIT, XP_CHANHOP, XP_CHANOP, XP_CHANVOICE,
+ 		XP_CHANBAN, XP_CHANRMKEY, XP_CHANRMLIMIT, XP_CHANDEHOP, XP_CHANDEOP,
+ 		XP_CHANDEVOICE, XP_CHANUNBAN, XP_CHANEXEMPT, XP_CHANRMEXEMPT,
+-		XP_CHANINVITE, XP_CHANRMINVITE, XP_INBOUND, XP_TE_JOIN,
+-		XP_TE_CHANACTION, XP_TE_CHANMSG, XP_TE_PRIVMSG, XP_TE_CHANGENICK,
++		XP_CHANINVITE, XP_CHANRMINVITE, XP_INBOUND, XP_HIGHLIGHT,
++		XP_TE_JOIN, XP_TE_CHANACTION, XP_TE_HCHANACTION, XP_TE_CHANMSG,
++		XP_TE_HCHANMSG, XP_TE_PRIVMSG, XP_TE_CHANGENICK,
+ 		XP_TE_NEWTOPIC, XP_TE_TOPIC, XP_TE_KICK, XP_TE_PART, XP_TE_CHANDATE,
+ 		XP_TE_TOPICDATE, XP_TE_QUIT, XP_TE_PINGREP, XP_TE_NOTICE, XP_TE_UJOIN,
+ 		XP_TE_UCHANMSG, XP_TE_DPRIVMSG, XP_TE_UCHANGENICK, XP_TE_UKICK,
+@@ -27,29 +28,29 @@
+ 		XP_TE_MOTDSKIP, XP_TE_SERVTEXT, XP_TE_INVITED, XP_TE_USERSONCHAN,
+ 		XP_TE_NICKCLASH, XP_TE_NICKFAIL, XP_TE_UKNHOST, XP_TE_CONNFAIL,
+ 		XP_TE_CONNECT, XP_TE_CONNECTED, XP_TE_SCONNECT, XP_TE_DISCON,
+-		XP_TE_NODCC, XP_TE_DELNOTIFY, XP_TE_ADDNOTIFY, XP_TE_WINTYPE,
++		XP_TE_NODCC, XP_TE_DELNOTIFY, XP_TE_ADDNOTIFY,
+ 		XP_TE_CHANMODES, XP_TE_RAWMODES, XP_TE_KILL, XP_TE_DCCSTALL,
+ 		XP_TE_DCCTOUT, XP_TE_DCCCHATF, XP_TE_DCCFILEERR, XP_TE_DCCRECVERR,
+ 		XP_TE_DCCRECVCOMP, XP_TE_DCCCONFAIL, XP_TE_DCCCON, XP_TE_DCCSENDFAIL,
+ 		XP_TE_DCCSENDCOMP, XP_TE_DCCOFFER, XP_TE_DCCABORT, XP_TE_DCCIVAL,
+-		XP_TE_DCCCHATREOFFER, XP_TE_DCCCHATOFFERING, XP_TE_DCCDRAWOFFER,
++		XP_TE_DCCCHATREOFFER, XP_TE_DCCCHATOFFERING,
+ 		XP_TE_DCCCHATOFFER, XP_TE_DCCRESUMEREQUEST, XP_TE_DCCSENDOFFER,
+ 		XP_TE_DCCGENERICOFFER, XP_TE_NOTIFYONLINE, XP_TE_NOTIFYNUMBER,
+ 		XP_TE_NOTIFYEMPTY, XP_TE_NOCHILD, XP_TE_ALREADYPROCESS,
+ 		XP_TE_SERVERLOOKUP, XP_TE_SERVERCONNECTED, XP_TE_SERVERERROR,
+ 		XP_TE_SERVERGENMESSAGE, XP_TE_FOUNDIP, XP_TE_DCCRENAME, XP_TE_CTCPSEND,
+-		XP_TE_MSGSEND, XP_TE_NOTICESEND, XP_TE_WALLOPS, XP_HIGHLIGHT,
++		XP_TE_MSGSEND, XP_TE_NOTICESEND, XP_TE_WALLOPS,
+ 		XP_TE_IGNOREHEADER, XP_TE_IGNORELIST, XP_TE_IGNOREFOOTER,
+ 		XP_TE_IGNOREADD, XP_TE_IGNOREREMOVE, XP_TE_RESOLVINGUSER,
+ 		XP_TE_IGNOREEMPTY, XP_TE_IGNORECHANGE, XP_TE_NOTIFYOFFLINE,
+ 		XP_TE_MALFORMED_FROM, XP_TE_MALFORMED_PACKET, XP_TE_PARTREASON,
+ 		XP_TE_UPARTREASON, XP_TE_NEWMAIL, XP_TE_MOTD, XP_TE_PINGTIMEOUT,
+-		XP_TE_UINVITE,
+-		XP_IF_SEND, XP_IF_RECV,
++		XP_TE_UINVITE, XP_TE_BANLIST, XP_TE_CHANLISTHEAD, XP_TE_NOTIFYHEAD,
++		XP_TE_DCCHEAD,
++		XP_IF_SEND, XP_IF_RECV, XP_TE_CHANNOTICE, 
+ 		NUM_XP
+ };
+ 
+-
+ #define	EMIT_SIGNAL(s, a, b, c, d, e, f) (fire_signal(s, a, b, c, d, e, f))
+ /* #define XP_CALLNEXT(s, a, b, c, d, e, f)  if (s != NULL) return s(a, b, c, d, e, f); return 0; */
+ /* #define XP_CALLNEXT_ANDSET(s, a, b, c, d, e, f) if (s != NULL) s(a, b, c, d, e, f); return 1; */
+@@ -57,7 +58,6 @@
+ #define XP_CALLNEXT(s, a, b, c, d, e, f) return 0;
+ #define XP_CALLNEXT_ANDSET(s, a, b, c, d, e, f) return 1;
+ 
+-extern int current_signal;
+ 
+ #ifdef USE_PLUGIN
+ 
+@@ -99,12 +99,24 @@
+ 	struct pevt_stage1 *next;
+ };
+ 
+-#ifndef	PLUGIN_C
+-/* extern int (*sighandler[NUM_XP]) (void *, void *, void *, void *, void *, char); */
++#ifndef PLUGIN_C
++int fire_signal (int, void *, void *, void *, void *, void *, char);
++#endif
++
++extern int current_signal;
+ extern void *signal_data;
+-extern struct xp_signal *sigroots[NUM_XP];
+-extern int fire_signal (int, void *, void *, void *, void *, void *, char);
++extern GSList *sigroots[NUM_XP];
++extern struct module *modules;
+ 
+-#endif
++int module_command (char *cmd, struct session *sess, char *tbuf,
++									char *word[], char *word_eol[]);
++int module_load (char *name, struct session *sess);
++int module_list (struct session *sess, char *tbuf, char *word[],
++								char *word_eol[]);
++int module_unload (char *name, struct session *sess);
++void module_setup (void);
++void signal_setup (void);
++void unhook_signal (struct xp_signal *);
++int hook_signal (struct xp_signal *);
+ 
+ #endif /* PLUGIN_H */
+--- /dev/null
++++ b/contrib/xchat-plugins/text.h
+@@ -0,0 +1,20 @@
++
++struct text_event
++{
++	char *name;
++	char **help;
++	char *def;
++	int num_args;
++	char *sound;
++};
++
++void PrintText (session *sess, char *text);
++void end_logging (int fd);
++void setup_logging (session *sess);
++void load_text_events (void);
++void pevent_save (char *fn);
++void printevent_setup (void);
++int pevt_build_string (char *input, char **output, int *max_arg);
++int text_event (int i);
++int pevent_load (char *filename);
++void pevent_make_pntevts (void);
+--- a/contrib/xchat-plugins/xchat.h
++++ b/contrib/xchat-plugins/xchat.h
+@@ -2,23 +2,12 @@
+ #include "../../config.h"
+ #endif
+ 
+-#ifndef PACKAGE				/* fixes prob compiling on RH5.2, *shrug* */
+-#define PACKAGE "xchat"
+-#endif
+-#ifndef VERSION
+-#define VERSION "1.5.3"
+-#endif
+-
+ #ifdef USE_MYGLIB
+ #include "../fe-text/myglib.h"
+ #else
+ #include <glib.h>
+ #endif
+-#include <time.h>
+-#include <sys/types.h>
+-#include <sys/socket.h>
+-#include <netinet/in.h>
+-#include <arpa/inet.h>
++#include <time.h>			/* need time_t */
+ 
+ #include "history.h"
+ 
+@@ -27,10 +16,14 @@
+ #endif
+ 
+ #ifdef USE_DEBUG
+-#define malloc xchat_malloc
+-#define realloc xchat_realloc
+-#define free xchat_free
+-#define strdup xchat_strdup
++#define malloc(n) xchat_malloc(n, __FILE__, __LINE__)
++#define realloc(n, m) xchat_realloc(n, m, __FILE__, __LINE__)
++#define free(n) xchat_free(n, __FILE__, __LINE__)
++#define strdup(n) xchat_strdup(n, __FILE__, __LINE__)
++void *xchat_malloc (int size, char *file, int line);
++void *xchat_strdup (char *str, char *file, int line);
++void xchat_free (void *buf, char *file, int line);
++void *xchat_realloc (char *old, int len, char *file, int line);
+ #endif
+ 
+ #ifdef SOCKS
+@@ -47,24 +40,59 @@
+ 
+ #ifdef __EMX__						  /* for o/s 2 */
+ #define OFLAGS O_BINARY
++#define strcasecmp stricmp
++#define strncasecmp strnicmp
++#define PATH_MAX MAXPATHLEN
++#define FILEPATH_LEN_MAX MAXPATHLEN
++#else
++#ifdef WIN32
++#define OFLAGS O_BINARY
++#define sleep(t) _sleep(t*1000)
++#include <direct.h>
++#define	F_OK	0
++#define	X_OK	1
++#define	W_OK	2
++#define	R_OK	4
++#ifndef S_ISDIR
++#define	S_ISDIR(m)	((m) & _S_IFDIR)
++#endif
++#define NETWORK_PRIVATE
+ #else
+ #define OFLAGS 0
+ #endif
++#endif
+ 
+-#define FONTNAMELEN		127
+-#define PATHLEN			255
+-#define NICKLEN			64				/* including the NULL, so 63 really */
+-#define CHANLEN			202
++#define FONTNAMELEN	127
++#define PATHLEN		255
++#define NICKLEN		64				/* including the NULL, so 63 really */
++#define CHANLEN		202
++#define PDIWORDS		32
+ 
+ #define safe_strcpy(dest,src,len)	strncpy(dest,src,len); \
+ 												dest[len-1] = 0;
+ 
++#if defined(ENABLE_NLS) && !defined(_)
++#  include <libintl.h>
++#  define _(x) gettext(x)
++#  ifdef gettext_noop
++#    define N_(String) gettext_noop (String)
++#  else
++#    define N_(String) (String)
++#  endif
++#endif
++#if !defined(_)
++#  define N_(String) (String)
++#  define _(x) (x)
++#endif
++
+ struct nbexec
+ {
+-	int myfd, childfd;
++	int myfd;
+ 	int childpid;
+ 	int tochannel;					  /* making this int keeps the struct 4-byte aligned */
+ 	int iotag;
++	char *linebuf;
++	int buffill;
+ 	struct session *sess;
+ };
+ 
+@@ -78,23 +106,28 @@
+ 	char nick_suffix[4];			/* Only ever holds a one-character string. */
+ 	char awayreason[256];
+ 	char quitreason[256];
++	char partreason[256];
+ 	char font_normal[FONTNAMELEN + 1];
+ 	char dialog_font_normal[FONTNAMELEN + 1];
++	char font_shell[FONTNAMELEN + 1];
+ 	char doubleclickuser[256];
+ 	char sounddir[PATHLEN + 1];
+ 	char soundcmd[PATHLEN + 1];
+ 	char background[PATHLEN + 1];
+ 	char background_dialog[PATHLEN + 1];
+ 	char dccdir[PATHLEN + 1];
+-	char bluestring[64];
++	char bluestring[300];
+ 	char dnsprogram[72];
+ 	char hostname[127];
++	char cmdchar[4];
+ 	char trans_file[256];
+ 	char logmask[256];
++	char stamp_format[64];
++	char timestamp_log_format[64];
+ 
+ 	char proxy_host[64];
+ 	int proxy_port;
+-	int proxy_type;		/* 0 = disabled, 1 = socks4, 3 = wingate */
++	int proxy_type; /* 0=disabled, 1=wingate 2=socks4, 3=socks5, 4=http */
+ 
+ 	int first_dcc_send_port;
+ 	int last_dcc_send_port;
+@@ -125,10 +158,14 @@
+ 	int bantype;
+ 	int userlist_sort;
+ 	int nu_color;
+-	int bt_color;
+ 	unsigned long local_ip;
+ 	unsigned long dcc_ip;
++	char dcc_ip_str[16];
+ 
++	unsigned int mainwindow_save;
++	unsigned int perc_color;
++	unsigned int perc_ascii;
++	unsigned int hilightnick;
+ 	unsigned int use_trans;
+ 	unsigned int nopanel;
+ 	unsigned int autosave;
+@@ -140,34 +177,41 @@
+ 	unsigned int servernotice;
+ 	unsigned int wallops;
+ 	unsigned int skipmotd;
+-	unsigned int away;
+ 	unsigned int autorejoin;
+ 	unsigned int colorednicks;
+-	unsigned int nochanmodebuttons;
+-	unsigned int nouserlistbuttons;
+-   unsigned int showhostname_in_userlist;
++	unsigned int chanmodebuttons;
++	unsigned int userlistbuttons;
++	unsigned int userlist_icons;
++	unsigned int showhostname_in_userlist;
+ 	unsigned int nickcompletion;
+ 	unsigned int old_nickcompletion;
+ 	unsigned int tabchannels;
+-	unsigned int nopaned;
++	unsigned int paned_userlist;
+ 	unsigned int autodccchat;
+ 	unsigned int autodccsend;
+ 	unsigned int autoresume;
+-	unsigned int noautoopendccsendwindow;
+-	unsigned int noautoopendccrecvwindow;
+-	unsigned int noautoopendccchatwindow;
++	unsigned int autoopendccsendwindow;
++	unsigned int autoopendccrecvwindow;
++	unsigned int autoopendccchatwindow;
+ 	unsigned int transparent;
+ 	unsigned int tint;
+ 	unsigned int dialog_transparent;
+ 	unsigned int dialog_tint;
++	unsigned int dialog_width;
++	unsigned int dialog_height;
+ 	unsigned int stripcolor;
+ 	unsigned int timestamp;
+ 	unsigned int fastdccsend;
++	unsigned int dcc_send_fillspaces;
++	unsigned int dcc_remove;
+ 	unsigned int skipserverlist;
+ 	unsigned int filterbeep;
+ 	unsigned int beepmsg;
++	unsigned int beepchans;
++	unsigned int truncchans;
+ 	unsigned int privmsgtab;
+ 	unsigned int logging;
++	unsigned int timestamp_logs;
+ 	unsigned int newtabstofront;
+ 	unsigned int dccwithnick;
+ 	unsigned int hilitenotify;
+@@ -176,14 +220,18 @@
+ 	unsigned int panelize_hide;
+ 	unsigned int panel_vbox;
+ 	unsigned int raw_modes;
+-	unsigned int no_server_logs;
+ 	unsigned int show_away_once;
+ 	unsigned int show_away_message;
+-	unsigned int nouserhost;
++	unsigned int auto_unmark_away;
++	unsigned int userhost;
+ 	unsigned int use_server_tab;
++	unsigned int notices_tabs;
+ 	unsigned int style_namelistgad;
+ 	unsigned int style_inputbox;
+ 	unsigned int windows_as_tabs;
++#ifdef USE_JCODE
++	unsigned int kanji_conv;
++#endif
+ 	unsigned int use_fontset;
+ 	unsigned int indent_nicks;
+ 	unsigned int show_separator;
+@@ -195,7 +243,6 @@
+ 	unsigned int wordwrap;
+ 	unsigned int dialog_wordwrap;
+ 	unsigned int mail_check;
+-	unsigned int double_buffer;
+ 	unsigned int throttle;
+ 	unsigned int fudgeservernotice;
+ 	unsigned int topicbar;
+@@ -203,6 +250,7 @@
+ 	unsigned int hidemenu;
+ 	unsigned int perlwarnings;
+ 	unsigned int lagometer;
++	unsigned int throttlemeter;
+ 	unsigned int hebrew;
+ 	unsigned int limitedtabhighlight;
+ 	unsigned int pingtimeout;
+@@ -212,15 +260,23 @@
+ 	unsigned int inputgad_superfocus;
+ 	unsigned int nickgad;
+ 	unsigned int channelbox;
++	unsigned int persist_chans;
+ 
+ 	unsigned int ctcp_number_limit;	/*flood */
+ 	unsigned int ctcp_time_limit;	/*seconds of floods */
+ 
+ 	unsigned int msg_number_limit;	/*same deal */
+ 	unsigned int msg_time_limit;
+-
+ };
+ 
++/* Session types */
++#define SESS_SERVER	1
++#define SESS_CHANNEL	2
++#define SESS_DIALOG	3
++#define SESS_SHELL	4
++#define SESS_NOTICES	5
++#define SESS_SNOTICES	6
++
+ struct session
+ {
+ 	struct server *server;
+@@ -230,7 +286,6 @@
+ 	char willjoinchannel[CHANLEN];	  /* /join done for this channel */
+ 	char channelkey[64];			  /* XXX correct max length? */
+ 	int limit;						  /* channel user limit */
+-	int channelflags;				  /* channel flags (bitmap) */
+ 	int logfd;
+ 
+ 	char lastnick[NICKLEN];			  /* last nick you /msg'ed */
+@@ -243,6 +298,10 @@
+ 	int total;							/* num. of users in channel */
+ 
+ 	char *quitreason;
++	char *topic;
++	char *current_modes;					/* free() me */
++
++	int mode_timeout_tag;
+ 
+ 	struct session *lastlog_sess;
+ 	struct setup *setup;
+@@ -251,18 +310,16 @@
+ 	struct session_gui *gui;		/* initialized by fe_new_window */
+ 
+ 	int userlisthidden;
+-	int is_shell:1;
++	int type;
+ 	int is_tab:1;			/* is this a tab or toplevel window? */
+-	int is_dialog:1;
+-	int is_server:1;		/* for use_server_tab feature */
+ 	int new_data:1;		/* new data avail? (red tab) */
+-	int nick_said:1;		/* your nick mentioned? (green tab) */
++	int nick_said:1;		/* your nick mentioned? (blue tab) */
+ 	int ignore_date:1;
+ 	int ignore_mode:1;
+ 	int ignore_names:1;
+ 	int end_of_names:1;
+ 	int doing_who:1;		/* /who sent on this channel */
+- 	int highlight_tab:1;	/* Highlight the channel tab (red-style) */
++	int highlight_tab:1;	/* Highlight the channel tab (red-style) */
+ };
+ 
+ typedef struct session session;
+@@ -271,6 +328,8 @@
+ {
+ 	int port;
+ 	int sok;
++	int sok4;
++	int sok6;
+ #ifdef USE_OPENSSL
+ 	SSL *ssl;
+ 	int ssl_do_connect_tag;
+@@ -288,26 +347,38 @@
+ 	char password[86];
+ 	char nick[NICKLEN];
+ 	char linebuf[522];				/* RFC says 512 including \r\n */
+-	int pos;
++	char *last_away_reason;
++	int pos;								/* current position in linebuf */
+ 	int nickcount;
+ 
++	char *chantypes;					/* for 005 numeric - free me */
++	char *chanmodes;					/* for 005 numeric - free me */
++	char *nick_prefixes;				/* e.g. "*@%+" */
++	char *nick_modes;					/* e.g. "aohv" */
++	char *bad_nick_prefixes;		/* for ircd that doesn't give the modes */
++	int modes_per_line;				/* 6 on undernet, 4 on efnet etc... */
++
++	char *eom_cmd;						/* end-of-motd command, free it! */
++
+ 	GSList *outbound_queue;
+-	time_t last_send;
+-	int bytes_sent;				  /* this second only */
++	int next_send;						/* cptr->since in ircu */
++	int sendq_len;						/* queue size */
+ 
+ 	struct session *front_session;
+ 
+ 	struct server_gui *gui;		  /* initialized by fe_new_server */
+ 
+-	int ctcp_counter;				  /*flood */
++	unsigned int ctcp_counter;	  /*flood */
+ 	time_t ctcp_last_time;
+ 
+-	int msg_counter;				  /*counts the msg tab opened in a certain time */
++	unsigned int msg_counter;	  /*counts the msg tab opened in a certain time */
+ 	time_t msg_last_time;
+ 
+ 	/*time_t connect_time;*/				/* when did it connect? */
+ 	time_t lag_sent;
+ 	time_t ping_recv;					/* when we last got a ping reply */
++	time_t away_time;					/* when we were marked away */
++	char *network;
+ 
+ 	int motd_skipped:1;
+ 	int connected:1;
+@@ -319,7 +390,11 @@
+ 	int end_of_motd:1;			  /* end of motd reached (logged in) */
+ 	int sent_quit:1;				  /* sent a QUIT already? */
+ 	int is_newtype:1;		/* undernet and dalnet need /list >0,<10000 */
+-	int six_modes:1;		/* undernet allows 6 modes per line */
++	int is_away:1;
++	int reconnect_away:1;		/* whether to reconnect in is_away state */
++	int dont_use_proxy:1;		/* to proxy or not to proxy */
++	int supports_watch:1;		/* supports the WATCH command */
++	int bad_prefix:1;				/* gave us a bad PREFIX= 005 number */
+ };
+ 
+ typedef struct server server;
+@@ -342,3 +417,12 @@
+ 	char nick[NICKLEN];
+ 	char *message;
+ };
++
++/* not just for popups, but used for usercommands, ctcp replies,
++   userlist buttons etc */
++
++struct popup
++{
++	char *cmd;
++	char *name;
++};
+--- a/contrib/xchat-plugins/history.h
++++ b/contrib/xchat-plugins/history.h
+@@ -8,6 +8,7 @@
+ 	int realpos;
+ };
+ 
+-
+ void history_add (struct history *his, char *text);
+ void history_free (struct history *his);
++char *history_up (struct history *his);
++char *history_down (struct history *his);
+--- a/contrib/xchat-plugins/xchat-autogb.c
++++ b/contrib/xchat-plugins/xchat-autogb.c
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include "xchat.h"
++#include "text.h"
+ #include "plugin.h"
+ #include "../../include/hz.h"
+ 
+--- a/contrib/xchat-plugins/xchat-autob5.c
++++ b/contrib/xchat-plugins/xchat-autob5.c
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include "xchat.h"
++#include "text.h"
+ #include "plugin.h"
+ #include "../../include/hz.h"
+ 
diff --git a/debian/patches/014-convert-comments-to-utf8.patch b/debian/patches/014-convert-comments-to-utf8.patch
new file mode 100644
index 0000000..4578faa
--- /dev/null
+++ b/debian/patches/014-convert-comments-to-utf8.patch
@@ -0,0 +1,156 @@
+Description: Convert comments in C source code from GB2312 to UTF-8
+ Committed to zh-autoconvert (0.3.16-4) on 2015-11-17.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/autogb.c
++++ b/autogb.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at debian.org>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at debian.org>
+ 
+ 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
+--- a/hzconvert/b2g.c
++++ b/hzconvert/b2g.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
+--- a/hzconvert/b2g_tables.c
++++ b/hzconvert/b2g_tables.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
+--- a/hzconvert/b2u.c
++++ b/hzconvert/b2u.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
+--- a/hzconvert/g2u.c
++++ b/hzconvert/g2u.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
+--- a/hzconvert/g2u_tables.c
++++ b/hzconvert/g2u_tables.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
+--- a/hzconvert/hz2gb.c
++++ b/hzconvert/hz2gb.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
+--- a/hzconvert/hztogb.c
++++ b/hzconvert/hztogb.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
+--- a/hzconvert/io.c
++++ b/hzconvert/io.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
+--- a/hzconvert/judge.c
++++ b/hzconvert/judge.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at debian.org>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at debian.org>
+ 
+ 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
+@@ -41,7 +41,7 @@
+ 	char HZ_END[]="~}";
+ 
+ 
+-/* first we look up "��"  and "��" ,both gb and big5
++/* first we look up "我"  and "的" ,both gb and big5
+  * in the text.
+  */
+ 	for(phz=buff;phz<(buff+count);phz++){
+@@ -66,7 +66,7 @@
+ 		if(strstr(buff,HZ_START)!=NULL && strstr(buff,HZ_END)!=NULL){
+ 			return HZ_CODE;
+ 		}
+-		/*There is not "��" and "��" in the text
++		/*There is not "我" and "的" in the text
+ 		 *So we test the text with a 400 words table.
+ 		 */
+ 		return j_code3(buff,count);		
+--- a/hzconvert/judge3.c
++++ b/hzconvert/judge3.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 2000 �ڹ�� <ygh at debian.org>
++Copyright (C) 2000 于广辉 <ygh at debian.org>
+ 
+ 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
+--- a/hzconvert/search.c
++++ b/hzconvert/search.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at debian.org>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at debian.org>
+ 
+ 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
+--- a/hzconvert/unicode.c
++++ b/hzconvert/unicode.c
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at dlut.edu.cn>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at dlut.edu.cn>
+ 
+ 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
diff --git a/debian/patches/015-convert-docs-to-utf8.patch b/debian/patches/015-convert-docs-to-utf8.patch
new file mode 100644
index 0000000..0451c33
--- /dev/null
+++ b/debian/patches/015-convert-docs-to-utf8.patch
@@ -0,0 +1,308 @@
+Description: Convert documentation text from GB2312 to UTF-8
+ Committed to zh-autoconvert (0.3.16-4) on 2015-11-17.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,13 +1,13 @@
+-����һЩ����gcc��չ����������л law at redhat.com�IJ�������
++修正一些依赖gcc扩展的特征,感谢 law at redhat.com的补丁程序。
+ 					Yu Guanghui <ygh at debian.org>
+ 					2004.03.22
+ 
+-��չb2g table, ��лHsieh Yu-T'ing <victor at cirx.org.anti-spam>�IJ�������.
++扩展b2g table, 感谢Hsieh Yu-T'ing <victor at cirx.org.anti-spam>的补丁程序.
+ Autoconvert 0.3.14 Release.
+ 					Yu Guanghui <ygh at debian.org>
+ 					2003.12.12
+ __
+-����License�ļ�, ����hztty����İ�Ȩ����.
++更改License文件, 加入hztty代码的版权声明.
+ Autoconvert 0.3.13 Release.
+ 
+ 					Yu Guanghui <ygh at debian.org>
+@@ -26,87 +26,87 @@
+ 					Yu Guanghui <ygh at debian.org>
+ 					2000.01.08
+ __
+-big5��uniת��ģ������,�����ֹ�ת����������������.
+-					�ڹ��
++big5的uni转换模块修正,现在手工转换可以正常工作了.
++					于广辉
+ 					Yu guanghui <ygh at debian.org>
+ 					2000.11.28
+ __
+-��������µ�ת�����, ͨ����������㷨�Զ�������˵�ת��ģ��.
+-����big5��uniģ��������,��Ҫ��һ���޸�.
+-					�ڹ��
++基本完成新的转换框架, 通过广度优先算法自动组合适宜的转换模块.
++但是big5的uni模块有问题,需要进一步修改.
++					于广辉
+ 					Yu Guanghui <ygh at debian.org>
+ 					2000.11.28
+ --
+-����һ��xchat��gb/big5�Զ�ת��plugins��
+-					�ڹ��
++加入一个xchat的gb/big5自动转码plugins。
++					于广辉
+ 					Yu Guanghui <ygh at debian.org>
+ 					2000.11.25
+ __
+-�����ַ��жϺ���,Ha Shao<hashao at china.com>�ṩ��
+-����ָ�������ַ�����
++更新字符判断函数,Ha Shao<hashao at china.com>提供。
++增加指定输入字符功能
+ 
+-					  �ڹ��
++					  于广辉
+ 					  Yu Guanghui <ygh at debian.org>
+ 					  2000.8.31
+ __
+-����һ���ʼ�MIMEת���ű�,���Դ���MIME������ʼ�����͸���.
+-��лAnthory Fok<foka at debian.org>�ṩԭʼ�ű�.
++加入一个邮件MIME转换脚本,可以处理MIME编码的邮件主题和附件.
++感谢Anthory Fok<foka at debian.org>提供原始脚本.
+ 
+-					     �ڹ��
++					     于广辉
+ 					     Yu Guanghui<ygh at dlut.edu.cn>
+ 					     2000.6.14
+ __
+ only split hzconvert to libhz
+-					     �ڹ��
++					     于广辉
+                                              Yu Guanghui<ygh at dlut.edu.cn>
+                                              2000.1.5
+ __
+-�����˵��������8192�ֽ�ʱ���ܳ��ְ�����ֵ�bug.
+-����ʹ��hztty��hz2gb������ԭ���ĵĺ���������ȷ�������8192�ֽڵ������
+-��autogb,autob5�ϲ���һ����������,�ó���������
+-					      �ڹ��
++改正了当输入大于8192字节时可能出现半个汉字的bug.
++重新使用hztty的hz2gb函数,原来的的函数不能正确处理大于8192字节的情况。
++把autogb,autob5合并到一个程序里面,用程序名区别。
++					      于广辉
+ 					      Yu Guanghui<ygh at dlut.edu.cn>
+ 					      1999.12.28
+ __
+-�Ľ���GB/Big5������ʶ�𷽷�,�ڸ�Ƶ��ͳ�ƵĻ����������˻��ڶԺ���
+-����ֱ��ͳ�Ƶı���ʶ�𷽷�.
+-					      �ڹ��
++改进了GB/Big5的智能识别方法,在高频词统计的基础上增加了基于对汉字
++编码直接统计的备用识别方法.
++					      于广辉
+ 					      Yu Guanghui<ygh at dlut.edu.cn>
+ 					      1999.11.20
+ __
+-�޸�hz2gb������һ��bug.
+-hz��gb/big5ת��������
++修复hz2gb函数中一个bug.
++hz到gb/big5转换正常了
+ 						
+-					       �ڹ��
++					       于广辉
+ 					       Yu Guanghui<ygh at dlut.edu.cn>
+ 					       1999.10.21  
+ --
+-��ֲ�� hztty-2.0�IJ��ִ���,ֱ�ӽ��к�������,����Ҫ�ⲿת��������.
+-��д�� hz��gbת�����ֵĴ���,�ijɺ�������.
+-û����hztty��hz2gb����,hztty��hztogb̫����,û�б�Ҫ.
++移植了 hztty-2.0的部分代码,直接进行函数调用,不需要外部转换程序了.
++重写了 hz到gb转换部分的代码,改成函数形势.
++没有用hztty的hz2gb程序,hztty的hztogb太繁琐,没有必要.
+ 
+-						�ڹ��
++						于广辉
+                                                 Yu Guanghui<ygh at dlut.edu.cn>
+ 						1999.10.20
+ --
+ 
+-��Ϊutf-convert�İ�Ȩ����,�����ڰ��O����hc������gb/big5����ת��.
+-�޸�һ����ɵ��ж������ʱ(base64)�޷������bug.
++因为utf-convert的版权问题,所以在包里集成了hc用来做gb/big5编码转换.
++修复一个造成当有多个附件时(base64)无法解码的bug.
+ 
+ 						
+-                                                �ڹ��
++                                                于广辉
+                                                 Yu Guanghui<ygh at dlut.edu.cn>
+ 						1999.10.14
+ --
+-ǰһ��debian chinese��Ҷ�ʹ��GB,BIG5,HZ�����˺ó�һ��ʱ��,�Ͳ�����
+-д�������Զ����hz,gb,chinese��ת�����뷨.�����������д�ıȽϴ�æ,
+-ֻ�ǿ��Թ�������,�϶��в���bug��.����ֻ�������³��ȱȽϳ���ʱ�����
+-��ȷ����.���ٹ�һ��ʱ���ٸĽ���,����ʵ��ûʱ����.
++前一阵debian chinese大家对使用GB,BIG5,HZ讨论了好长一段时间,就产生了
++写个程序自动完成hz,gb,chinese的转换的想法.不过这个程序写的比较匆忙,
++只是可以工作而以,肯定有不少bug的.而且只有在文章长度比较长的时候才能
++正确处理.等再过一段时间再改进吧,现在实在没时间了.
+ 
+-��Ҫutf-converter packages
++需要utf-converter packages
+ 
+ 
+-						�ڹ��
++						于广辉
+ 						Yu Guanghui<ygh at dlut.edu.cn>
+ 						1999.5.29
+ 
+--- a/LICENSE
++++ b/LICENSE
+@@ -1,6 +1,6 @@
+ /*
+ AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter
+-Copyright (C) 1999  �ڹ��  Yu Guanghui <ygh at debian.org>
++Copyright (C) 1999  于广辉  Yu Guanghui <ygh at debian.org>
+ 
+ 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
+--- a/Readme
++++ b/Readme
+@@ -1,27 +1,27 @@
+ 
+ 			AutoConvert
+ 
+-    AutoConvert��һ�����ֱ����Զ�ʶ��ת���ij���,Ŀǰ�������Զ�ʶ��GB/Big5/HZ
+-    ����,����ת��gb/big5/hz/uni/utf7/utf8����.���ı�����1000��ʱ,��GB/Big5��
+-    ʶ��׼ȷ�ʽӽ�100%.HZʶ����Ҳ����100%.
++    AutoConvert是一个汉字编码自动识别转换的程序,目前他可以自动识别GB/Big5/HZ
++    编码,可以转换gb/big5/hz/uni/utf7/utf8编码.当文本超过1000字时,对GB/Big5的
++    识别准确率接近100%.HZ识别率也近似100%.
+ 
+-    ������������Ŀ��,Ҳ�������������;�������procmail�Ե����ʼ����к���
+-    �����Զ�ת��.
++    这个程序最初的目的,也是它现在最大用途就是配合procmail对电子邮件进行汉字
++    编码自动转换.
+ 
+-    AutoConvert���ڻ��ܼ�,���ܴ���GB/Big5/HZ��ϱ���.
++    AutoConvert现在还很简单,不能处理GB/Big5/HZ混合编码.
+ 
+-    AutoConvert���÷��ܼ�,��autoconvertĿ¼��,make�Ϳ�����.
+-    make install���԰� autogb,autob5 ������ $HOME/binĿ¼.
+-    ��procmail.example����procmail�Ϳ�����.
++    AutoConvert的用法很简单,在autoconvert目录下,make就可以了.
++    make install可以把 autogb,autob5 拷贝到 $HOME/bin目录.
++    按procmail.example设置procmail就可以了.
+ 
+-    autogb,autob5��ֱ�Ӵ�stdin��,�����stdout, ������Ӳ���, ���Զ��ж�����
+-    ����,Ȼ�����ת��.Ҳ����ͨ��������ָ�����롢������롣
++    autogb,autob5都直接从stdin读,输出到stdout, 如果不加参数, 将自动判断输入
++    编码,然后进行转换.也可以通过命令行指定输入、输出编码。
+ 
+ 
+     URL: 
+     banyan.dlut.edu.cn/~ygh
+     ftp.dlut.edu.cn/pub/PEOPLE/saka/
+ 
+-    							�ڹ��<ygh at debian.org>
++    							于广辉<ygh at debian.org>
+ 
+ 							2000.11.29
+--- a/TODO
++++ b/TODO
+@@ -1 +1 @@
+-���Զ�unicode��������ж�.
++尝试对unicode编码进行判断.
+--- a/doc/API
++++ b/doc/API
+@@ -1,9 +1,9 @@
+ FIX ME: Add more example
+ 
+-����ͨ��libhz�ṩ�������ӿں�������libhz�⡣
+-1��j_code�Ա�������ж�
+-2��hz_setupĿǰ�������ڲ�ת��ģ���������·�����������Լ����ⲿģ�顣
+-3��hz_search���ת��ģ�飬��ʼ��ת��ģ��
+-4��Ҳ���Ե���hz_init���³�ʼ��ģ��
+-5��hz_convertִ��ת��
++建议通过libhz提供的三个接口函数调用libhz库。
++1、j_code对编码进行判断
++2、hz_setup目前用来把内部转换模块加入搜索路径,将来可以加入外部模块。
++3、hz_search组合转换模块,初始化转换模块
++4、也可以调用hz_init重新初始化模快
++5、hz_convert执行转换
+ 
+--- a/doc/libhz.txt
++++ b/doc/libhz.txt
+@@ -1,50 +1,50 @@
+-		libhz ʹ�ü��
++		libhz 使用简介
+ 		
+-libhz�ṩ��gb/big5/hz�Զ�ʶ���gb,big5,hz,utf8,utf7,unicode֮���ת��������
+-����
+-include/hz.h   /*ͷ�ļ�*/
+-lib/libhz.a    /*��̬��*/
+-lib/libhz.so   /*�����*/
++libhz提供了gb/big5/hz自动识别和gb,big5,hz,utf8,utf7,unicode之间的转换函数。
++其中:
++include/hz.h   /*头文件*/
++lib/libhz.a    /*静态库*/
++lib/libhz.so   /*共享库*/
+ 
+-Example: gb/big/hzʶ��
++Example: gb/big/hz识别
+ 
+-incode=j_code(pbuf,count);�벻Ҫֱ��ʹ��j_code3��.
+-pbuf��Ҫ�DZ���ַ�����count��Ҫʶ����ַ�����
+-����ֵ��hz.h���涨�塣
++incode=j_code(pbuf,count);请不要直接使用j_code3等.
++pbuf是要是别的字符串,count是要识别的字符数。
++返回值在hz.h里面定义。
+ 
+ 
+-Example�� gb->big5ת��
++Example: gb->big5转换
+ 
+-����һ: ֱ�ӵ���ת������
++方法一: 直接调用转换函数
+ ...
+-gb2big_init();   /*��ʼ��*/
++gb2big_init();   /*初始化*/
+ 
+-...		/*ѭ��,����pbuf��,Ȼ��ת��*/
++...		/*循环,读到pbuf里,然后转换*/
+ gb2big(pbuf,&count,0) 
+-...		/*ѭ������*/
++...		/*循环结束*/
+ 
+-���� pbuf��ָ��Ҫת�����ַ�����ָ�룬pbufǰ����һ���ַ��Ŀռ�,count��Ҫת����
+-�ַ�����0��ָ��ʹ�õڼ���buffer.
++其中 pbuf是指向要转换的字符串的指针,pbuf前保留一个字符的空间,count是要转换的
++字符数,0是指定使用第几个buffer.
+ 
+-ʹ��buffer��ԭ����Ϊ�˷�ֹpbuf�������ְ���֣������ְ����ʱ�������־ͻ���
+-buffer���汣�棬�´ε���gb2bigʱ�������־ͻᱻ��ӵ�ǰ�档ע�⣬������16��buffer
++使用buffer的原因是为了防止pbuf的最后出现半个字,当出现半个字时,这半个字就会在
++buffer里面保存,下次调用gb2big时,这半个字就会被添加到前面。注意,可以有16个buffer
+ (0-15).
+-��������ʹ�÷���Ҳ���ơ�
++其他函数使用方法也类似。
+ 
+-������: ʹ��hz_search()��hz_convert()���
+-�Ƽ�ʹ�����ַ���, search�����������ʵ�ת������, convert���ת������.
++方法二: 使用hz_search()和hz_convert()组合
++推荐使用这种方法, search可以组合最合适的转换函数, convert完成转换过程.
+ 
+ hz_setup();
+-��ʼ��ģ�����ݿ�, ��������������ⲿģ��.
++初始化模块数据库, 将来会允许调用外部模块.
+ ...
+ dist=search(incode,outcode,8);
+-dist����Ҫ��ϵ�ת�������ĸ���, �������0�����޷����ת��. 8��ʾ������8��
+-ת������.
++dist是需要组合的转换函数的个数, 如果等于0表明无法完成转换. 8表示最多组合8个
++转换函数.
+ ...
+ ps=convert(pbuf,&count,0);
+-���ת������, convert��������˳�������Ϻõĺ���.
+-pbuf�����봮, countΪת���ַ���, 0��ʾʹ���ڲ��Ĵ浥Ԫ����.
+-����ַ�����convert�������д���.
++完成转换过程, convert可以自行顺序调用组合好的函数.
++pbuf是输入串, count为转换字符数, 0表示使用内部寄存单元号码.
++半个字符问题convert可以自行处理.
+ 
+ 
+ 						Yu Guanghui
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ca708e1
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,15 @@
+001-build-static-library.patch
+002-chdir-before-symlink.patch
+003-strip-binaries.patch
+004-delete-empty-default-label-for-gcc-3.4.patch
+005-move-plugins-to-usr-lib.patch
+006-add-exit.patch
+007-migrate-xchat-plugins-to-gtk2.patch
+008-add-missing-includes.patch
+009-add-placeholder-README-for-lib.patch
+010-create-destination-directories-in-Makefile.patch
+011-do-not-strip-binaries.patch
+012-hardening.patch
+013-fix-xchat-plugin-compile-warnings.patch
+014-convert-comments-to-utf8.patch
+015-convert-docs-to-utf8.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/zh-autoconvert.git



More information about the Chinese-commits mailing list