--- readline5-5.2.orig/debian/compat
+++ readline5-5.2/debian/compat
@@ -0,0 +1 @@
+4
--- readline5-5.2.orig/debian/inputrc.arrows
+++ readline5-5.2/debian/inputrc.arrows
@@ -0,0 +1,30 @@
+# This file controls the behaviour of line input editing for
+# programs that use the Gnu Readline library.
+#
+# Arrow keys in keypad mode
+#
+"\C-[OD"        backward-char
+"\C-[OC"        forward-char
+"\C-[OA"        previous-history
+"\C-[OB"        next-history
+#
+# Arrow keys in ANSI mode
+#
+"\C-[[D"        backward-char
+"\C-[[C"        forward-char
+"\C-[[A"        previous-history
+"\C-[[B"        next-history
+#
+# Arrow keys in 8 bit keypad mode
+#
+"\C-M-OD"       backward-char
+"\C-M-OC"       forward-char
+"\C-M-OA"       previous-history
+"\C-M-OB"       next-history
+#
+# Arrow keys in 8 bit ANSI mode
+#
+"\C-M-[D"       backward-char
+"\C-M-[C"       forward-char
+"\C-M-[A"       previous-history
+"\C-M-[B"       next-history
--- readline5-5.2.orig/debian/readline-common.postinst
+++ readline5-5.2/debian/readline-common.postinst
@@ -0,0 +1,16 @@
+#! /bin/sh -e
+
+install_from_default() {
+  if [ ! -f $2 ]; then
+    cp -p $1 $2
+  fi
+}
+
+if [ "$1" = "configure" ] && [ "$2" = "" ]; then
+  install_from_default /usr/share/readline/inputrc /etc/inputrc
+fi
+
+install-info --quiet --section "Miscellaneous" "Miscellaneous" \
+  --description="GNU Readline Library API" /usr/share/info/rluserman.info.gz
+
+#DEBHELPER#
--- readline5-5.2.orig/debian/rl-inputrc.dpatch
+++ readline5-5.2/debian/rl-inputrc.dpatch
@@ -0,0 +1,102 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p3 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p3 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: Support for /etc/inputrc in addition to ~/inputrc
+
+diff -ur bash.saved/lib/readline/bind.c bash/lib/readline/bind.c
+--- bash.saved/lib/readline/bind.c	2005-01-16 13:18:30.000000000 +0100
++++ bash/lib/readline/bind.c	2005-01-16 13:21:43.000000000 +0100
+@@ -713,6 +713,9 @@
+ /* The last key bindings file read. */
+ static char *last_readline_init_file = (char *)NULL;
+ 
++/* Flag to read system init file */
++static int read_system_init_file = 0;
++
+ /* The file we're currently reading key bindings from. */
+ static const char *current_readline_init_file;
+ static int current_readline_init_include_level;
+@@ -780,7 +783,7 @@
+    to the first non-null filename from this list:
+      1. the filename used for the previous call
+      2. the value of the shell variable `INPUTRC'
+-     3. ~/.inputrc
++     3. /etc/inputrc and ~/.inputrc
+    If the file existed and could be opened and read, 0 is returned,
+    otherwise errno is returned. */
+ int
+@@ -791,14 +794,31 @@
+   if (filename == 0)
+     {
+       filename = last_readline_init_file;
+-      if (filename == 0)
++      if (filename == 0) {
+         filename = sh_get_env_value ("INPUTRC");
+-      if (filename == 0)
++	read_system_init_file = 0;
++      }
++      if (filename == 0) {
+ 	filename = DEFAULT_INPUTRC;
++	read_system_init_file = 1;
++      }
+     }
+ 
+-  if (*filename == 0)
++  if (*filename == 0) {
+     filename = DEFAULT_INPUTRC;
++    read_system_init_file = 1;
++  }
++
++  if (read_system_init_file)
++    if (filename == last_readline_init_file)
++      {
++	filename = savestring (filename);
++	_rl_read_init_file (SYSTEM_INPUTRC, 0);
++	free (last_readline_init_file);
++	last_readline_init_file = filename;
++      }
++    else
++      _rl_read_init_file (SYSTEM_INPUTRC, 0);
+ 
+ #if defined (__MSDOS__)
+   if (_rl_read_init_file (filename, 0) == 0)
+Only in bash/lib/readline: bind.c.orig
+Only in bash/lib/readline: bind.c.rej
+diff -ur bash.saved/lib/readline/doc/rluser.texi bash/lib/readline/doc/rluser.texi
+--- bash.saved/lib/readline/doc/rluser.texi	2005-01-16 13:18:30.000000000 +0100
++++ bash/lib/readline/doc/rluser.texi	2005-01-16 13:21:28.000000000 +0100
+@@ -336,7 +336,8 @@
+ @ifclear BashFeatures
+ file is taken from the value of the environment variable @env{INPUTRC}.  If
+ @end ifclear
+-that variable is unset, the default is @file{~/.inputrc}.
++that variable is unset, Readline will read both @file{/etc/inputrc} and 
++@file{~/.inputrc}.
+ 
+ When a program which uses the Readline library starts up, the
+ init file is read, and the key bindings are set.
+diff -ur bash.saved/lib/readline/rlconf.h bash/lib/readline/rlconf.h
+--- bash.saved/lib/readline/rlconf.h	2005-01-16 13:18:30.000000000 +0100
++++ bash/lib/readline/rlconf.h	2005-01-16 13:21:28.000000000 +0100
+@@ -39,6 +39,7 @@
+ 
+ /* The final, last-ditch effort file name for an init file. */
+ #define DEFAULT_INPUTRC "~/.inputrc"
++#define SYSTEM_INPUTRC "/etc/inputrc"
+ 
+ /* If defined, expand tabs to spaces. */
+ #define DISPLAY_TABS
--- readline5-5.2.orig/debian/libreadline5-dev.prerm
+++ readline5-5.2/debian/libreadline5-dev.prerm
@@ -0,0 +1,6 @@
+#! /bin/sh -e
+
+install-info --quiet --remove history
+install-info --quiet --remove readline
+
+#DEBHELPER#
--- readline5-5.2.orig/debian/libreadline5-dev.postinst
+++ readline5-5.2/debian/libreadline5-dev.postinst
@@ -0,0 +1,9 @@
+#! /bin/sh -e
+
+install-info --quiet --section "Development" "Development" \
+  --description="GNU History Library" /usr/share/info/history.info.gz
+
+install-info --quiet --section "Development" "Development" \
+  --description="GNU Readline Library" /usr/share/info/readline.info.gz
+
+#DEBHELPER#
--- readline5-5.2.orig/debian/copyright
+++ readline5-5.2/debian/copyright
@@ -0,0 +1,23 @@
+This is Debian GNU/Linux's prepackaged version of the FSF's GNU
+Readline library.
+
+This package was put together by Matthias Klose <doko@debian.org>, derived
+from the bash package by Guy Maor <maor@debian.org>, from the GNU sources at
+
+	ftp.gnu.org:/pub/gnu/readline/readline-5.0.tar.gz.
+
+The GNU Readline Library 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.
+
+The GNU Readline Library 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 with
+your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with
+the Debian GNU/Linux bash source package as the file COPYING.  If not,
+write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+Boston, A 02110-1301, USA.
--- readline5-5.2.orig/debian/control
+++ readline5-5.2/debian/control
@@ -0,0 +1,137 @@
+Source: readline5
+Section: libs
+Priority: important
+Maintainer: Matthias Klose <doko@debian.org>
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 4.1), dpatch, lsb-release, libncurses5-dev, lib64ncurses5-dev [i386 powerpc sparc s390], mawk | awk, texinfo, autotools-dev, libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libc6-dev-ppc64 [powerpc], libc6-dev-i386 [amd64], libc6-dev-amd64 [i386], libc6-dev-powerpc [ppc64], lib64gcc1 [i386 powerpc sparc s390], lib32gcc1 [amd64 ppc64]
+
+Package: libreadline5
+Architecture: any
+Depends: readline-common, ${shlibs:Depends}
+Section: libs
+Priority: important
+Description: GNU readline and history libraries, run-time libraries
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+
+Package: lib64readline5
+Architecture: i386 powerpc s390 sparc
+Depends: readline-common, ${libxx:Depends}, ${shlibs:Depends}
+Section: libs
+Priority: optional
+Description: GNU readline and history libraries, run-time libraries (64-bit)
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+
+Package: readline-common
+Architecture: all
+Section: utils
+Depends: ${shlibs:Depends}
+Conflicts: libreadline5 (<< 5.0-11), libreadline-common
+Replaces: libreadline4 (<< 4.3-16), libreadline5 (<< 5.0-11), libreadline-common
+Priority: standard
+Description: GNU readline and history libraries, common files
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+
+Package: libreadline5-dev
+Architecture: any
+Depends: libreadline5 (= ${Source-Version}), libncurses5-dev
+Conflicts: libreadline-dev
+Provides: libreadline-dev
+Section: libdevel
+Priority: optional
+Description: GNU readline and history libraries, development files
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+ .
+ This package contains as well the readline documentation in info format.
+
+Package: lib64readline5-dev
+Architecture: i386 powerpc s390 sparc
+Depends: lib64readline5 (= ${Source-Version}), lib64ncurses5-dev, ${devxx:Depends}
+Provides: lib64readline-dev
+Conflicts: lib64readline-dev
+Replaces: libreadline5-dev (<< 4.1-6)
+Section: libdevel
+Priority: optional
+Description: GNU readline and history libraries, development files (64-bit)
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+
+Package: libreadline5-dbg
+Architecture: any
+Depends: libreadline5 (= ${Source-Version})
+Conflicts: libreadline-dbg
+Provides: libreadline-dbg
+Suggests: libreadline5-dev
+Section: libdevel
+Priority: extra
+Description: GNU readline and history libraries, debugging libraries
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+
+Package: rlfe
+Architecture: any
+Depends: ${shlibs:Depends}
+Section: utils
+Priority: optional
+Description: A front-end using readline to "cook" input lines for other programs
+ This tool lets you use history and line-editing in any text oriented
+ tool. This is especially useful with third-party proprietary tools that
+ cannot be distributed linked against readline. It is not perfect but it
+ works pretty well.
+ .
+ See the cle package for another program of that kind.
+
+Package: lib32readline5
+Architecture: amd64 ppc64
+Depends: readline-common, ${libxx:Depends}, ${shlibs:Depends}
+Section: libs
+Priority: optional
+Description: GNU readline and history libraries, run-time libraries (32-bit)
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+
+Package: lib32readline5-dev
+Architecture: amd64 ppc64
+Depends: lib32readline5 (= ${Source-Version}), lib32ncurses5-dev, ${devxx:Depends}
+Provides: lib32readline-dev
+Conflicts: lib32readline-dev
+Section: libdevel
+Priority: optional
+Description: GNU readline and history libraries, development files (32-bit)
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
--- readline5-5.2.orig/debian/watch
+++ readline5-5.2/debian/watch
@@ -0,0 +1,2 @@
+version=2
+ftp://ftp.gnu.org/gnu/readline/readline-([\d\.]*).tar.gz debian uupdate
--- readline5-5.2.orig/debian/rlfe.1
+++ readline5-5.2/debian/rlfe.1
@@ -0,0 +1,64 @@
+.TH RLFE 1
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+rlfe \- "cook" input lines for other programs using readline
+.SH SYNOPSIS
+.PP
+\fBrlfe\fP [\fI-l filename\fP] [\fI-a\fP] [\fI-n appname\fP] [\fI-hv\fP] [\fIcommand\fP [\fIarguments ...\fP]]
+.PP
+.SH "DESCRIPTION"
+.PP
+.B rlfe
+lets you use history and line-editing in any text oriented tool. This
+is especially useful with third-party proprietary tools that cannot be
+distributed linked against readline. It is not perfect but it works
+pretty well.
+.SH OPTIONS
+.TP
+-a
+append to the logfile (default is to overwrite).
+.TP
+-l filename
+log into file.
+.TP
+-n appname
+set the readline application name.
+.TP
+-h
+print usage string.
+.TP
+-v
+print version information.
+.SH "SEE ALSO"
+readline(3)
+.SH AUTHOR
+Per Bothner
+.SH PROBLEMS/TODO
+When running mc -c under the Linux console, mc does not recognize
+mouse clicks, which mc does when not running under fep.
+.PP
+Pasting selected text containing tabs is like hitting the tab character,
+which invokes readline completion.  We don't want this.  I don't know
+if this is fixable without integrating fep into a terminal emulator.
+.PP
+Echo suppression is a kludge, but can only be avoided with better kernel
+support: We need a tty mode to disable "real" echoing, while still
+letting the inferior think its tty driver to doing echoing.
+Stevens's book claims SCR$ and BSD4.3+ have TIOCREMOTE.
+.PP
+The latest readline may have some hooks we can use to avoid having
+to back up the prompt.
+.PP
+Desirable readline feature:  When in cooked no-echo mode (e.g. password),
+echo characters are they are types with '*', but remove them when done.
+.PP
+A synchronous output while we're editing an input line should be
+inserted in the output view.PPbefore* the input line, so that the
+lines being edited (with the prompt) float at the end of the input.
+.PP
+A "page mode" option to emulate more/less behavior:  At each page of
+output, pause for a user command.  This required parsing the output
+to keep track of line lengths.  It also requires remembering the
+output, if we want an option to scroll back, which suggests that
+this should be integrated with a terminal emulator like xterm.
--- readline5-5.2.orig/debian/readline-common.prerm
+++ readline5-5.2/debian/readline-common.prerm
@@ -0,0 +1,5 @@
+#! /bin/sh -e
+
+install-info --quiet --remove rluserman
+
+#DEBHELPER#
--- readline5-5.2.orig/debian/readline-common.postrm
+++ readline5-5.2/debian/readline-common.postrm
@@ -0,0 +1,8 @@
+#! /bin/sh -e
+
+case "$1" in
+    purge)
+	rm -f /etc/inputrc
+esac
+
+#DEBHELPER#
--- readline5-5.2.orig/debian/rules
+++ readline5-5.2/debian/rules
@@ -0,0 +1,446 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+include /usr/share/dpatch/dpatch.make
+
+soversion = 5
+libversion = $(soversion).2
+
+# architecture dependent variables
+DEB_HOST_ARCH		?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_ARCH_OS	?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+DEB_HOST_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+distribution := $(shell lsb_release -is)
+
+ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/i386/powerpc/sparc/s390/))
+  build64 = yes
+  CC64 = gcc -m64
+  gencontrol_flags = -- \
+	'-Vlibxx:Depends=libc6-$(ARCH64)' \
+	'-Vdevxx:Depends=libc6-dev-$(ARCH64)'
+  ifeq ($(DEB_HOST_ARCH),i386)
+    ARCH64 = amd64
+    HOST64 = x86_64-linux-gnu
+  endif
+  ifeq ($(DEB_HOST_ARCH),powerpc)
+    ARCH64 = ppc64
+    HOST64 = ppc64-linux-gnu
+  endif
+  ifeq ($(DEB_HOST_ARCH),sparc)
+    ARCH64 = sparc64
+    HOST64 = sparc64-linux-gnu
+  endif
+  ifeq ($(DEB_HOST_ARCH),s390)
+    ARCH64 = s390x
+    HOST64 = s390x-linux-gnu
+  endif
+endif
+
+ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/amd64/ppc64/))
+  build32 = yes
+  CC32 = gcc -m32
+  lib32dir = lib32
+  lib32devdir = usr/lib32
+  gencontrol_flags = -- \
+	'-Vlibxx:Depends=libc6-$(ARCH32)' \
+	'-Vdevxx:Depends=libc6-dev-$(ARCH32)'
+  ifeq ($(DEB_HOST_ARCH),amd64)
+    ARCH32 = i386
+    HOST32 = i486-linux-gnu
+    ifeq ($(distribution),Debian)
+      lib32dir = emul/ia32-linux/lib
+      lib32devdir = emul/ia32-linux/usr/lib
+    endif
+  endif
+  ifeq ($(DEB_HOST_ARCH),ppc64)
+    ARCH32 = powerpc
+    HOST32 = powerpc-linux-gnu
+  endif
+endif
+
+ifeq ($(DEB_HOST_ARCH_OS),netbsd)
+  CC_LINK_FLAGS =
+else
+  CC_LINK_FLAGS = -Wl,
+endif
+CC	= gcc
+
+SHELL	= bash
+
+PWD	:= $(shell pwd)
+p_rl	= libreadline$(soversion)
+p_rl32	= lib32readline$(soversion)
+p_rl64	= lib64readline$(soversion)
+p_comm	= readline-common
+p_rld	= $(p_rl)-dev
+p_rld32	= $(p_rl32)-dev
+p_rld64	= $(p_rl64)-dev
+p_rlg	= $(p_rl)-dbg
+p_doc	= $(p_rl)-doc
+p_rlfe	= rlfe
+
+d	= debian/tmp
+d32	= debian/tmp32
+d64	= debian/tmp64
+d_rl	= debian/$(p_rl)
+d_rl32	= debian/$(p_rl32)
+d_rl64	= debian/$(p_rl64)
+d_comm	= debian/$(p_comm)
+d_rld	= debian/$(p_rld)
+d_rld32	= debian/$(p_rld32)
+d_rld64	= debian/$(p_rld64)
+d_rlg	= debian/$(p_rlg)
+d_doc	= debian/$(p_doc)
+d_rlfe	= debian/$(p_rlfe)
+
+srcdir		= $(PWD)
+builddir	= $(PWD)/build
+builddir32	= $(PWD)/build32
+builddir64	= $(PWD)/build64
+
+default: build
+
+configure: dpatch configure-stamp
+configure-stamp: patch-stamp
+	dh_testdir
+	cp -p /usr/share/misc/config.* ./support/
+	rm -rf $(builddir)
+	mkdir $(builddir)
+	find . -type d | xargs chmod g-s
+	cd $(builddir) && \
+	  CC=$(CC) $(srcdir)/configure \
+		--with-curses --prefix=/usr\
+		--host=$(DEB_HOST_GNU_TYPE)
+
+ifneq ($(build32),)
+	rm -rf $(builddir32)
+	mkdir $(builddir32)
+	cd $(builddir32) && \
+	  CC="$(CC32)" $(srcdir)/configure \
+		--host=$(HOST32) --with-curses --prefix=/usr
+endif
+
+ifneq ($(build64),)
+	rm -rf $(builddir64)
+	mkdir $(builddir64)
+	cd $(builddir64) && \
+	  CC="$(CC64)" $(srcdir)/configure \
+		--host=$(HOST64) --with-curses --prefix=/usr
+endif
+
+	touch configure-stamp
+
+ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+build: build-stamp build-rlfe-stamp
+else
+build: build-stamp
+endif
+
+build-stamp: configure-stamp
+	dh_testdir
+	$(MAKE) -C $(builddir) \
+	    CFLAGS="-g -O2" \
+	    SHOBJ_CFLAGS="-fPIC -D_REENTRANT" \
+	    SHLIB_LIBS="-lncurses"
+
+ifneq ($(build32),)
+	$(MAKE) -C $(builddir32) \
+	    CC="$(CC32)" \
+	    CFLAGS="-g -O2" \
+	    SHOBJ_CFLAGS="-fPIC -D_REENTRANT" \
+	    SHOBJ_LDFLAGS='-shared' \
+	    SHLIB_XLDFLAGS='$(CC_LINK_FLAGS)-soname,`echo $$@ | sed s/\\..$$$$//`'
+endif
+
+ifneq ($(build64),)
+	$(MAKE) -C $(builddir64) \
+	    CC="$(CC64)" \
+	    CFLAGS="-g -O2" \
+	    SHOBJ_CFLAGS="-fPIC -D_REENTRANT" \
+	    SHOBJ_LDFLAGS='-shared' \
+	    SHLIB_XLDFLAGS='$(CC_LINK_FLAGS)-soname,`echo $$@ | sed s/\\..$$$$//`'
+endif
+	$(MAKE) -C $(builddir)/doc info
+
+	touch build-stamp
+
+build-rlfe-stamp: configure-stamp
+	dh_testdir
+	ln -sf libhistory.so.$(libversion) \
+	    $(builddir)/shlib/libhistory.so.$(soversion)
+	ln -sf libhistory.so.$(soversion) $(builddir)/shlib/libhistory.so
+	ln -sf libreadline.so.$(libversion) \
+	    $(builddir)/shlib/libreadline.so.$(soversion)
+	ln -sf libreadline.so.$(soversion) $(builddir)/shlib/libreadline.so
+	rm -rf $(builddir)/examples/rlfe
+	cp -a examples/rlfe $(builddir)/examples/
+	ln -sf ../../.. $(builddir)/examples/rlfe/readline
+	cd $(builddir)/examples/rlfe \
+		&& ./configure --prefix=/usr --host=$(DEB_HOST_GNU_TYPE)
+	$(MAKE) -C $(builddir)/examples/rlfe \
+	    CFLAGS="-g -O2" LDFLAGS="-g -L$(builddir)/shlib" rlfe
+	touch build-rlfe-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f configure*-stamp build*-stamp install-stamp
+	rm -rf autom4te.cache
+	rm -rf $(builddir)
+ifneq ($(build64),)
+	rm -rf $(builddir64) $(d64)
+endif
+ifneq ($(build32),)
+	rm -rf $(builddir32) $(d32)
+endif
+	rm -f doc/*.dvi
+	rm -f debian/shlibs.local
+	$(MAKE) -f debian/rules unpatch
+	rm -f patch-stamp*
+	find . -type d | xargs chmod g-s
+	rm -f support/config.guess support/config.sub
+	dh_clean
+
+install: install-stamp
+install-stamp:
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	rm -rf $(d)
+	mkdir -p $(d)/usr/bin
+	$(MAKE) -C $(builddir) install \
+	    CFLAGS="-g -O2 -D_REENTRANT" \
+	    DESTDIR=$(PWD)/$(d) \
+	    mandir=/usr/share/man \
+	    infodir=/usr/share/info
+
+	: # move $(p_rl)
+	dh_installdirs -p$(p_rl) \
+		etc \
+		lib \
+		usr/share/doc
+	cp -a $(d)/usr/lib/lib{history,readline}.so.* $(d_rl)/lib/
+#	cp -a $(d)/usr/lib/lib{history,readline}.so.$(libversion) $(d_rl)/lib/
+#	ln -s libhistory.so.$(libversion) \
+#		$(d_rl)/lib/libhistory.so.$(soversion)
+#	ln -s libreadline.so.$(libversion) \
+#		$(d_rl)/lib/libreadline.so.$(soversion)
+
+	: # move $(p_comm)
+	dh_installdirs -p$(p_comm) \
+		etc \
+		usr/share/readline \
+		usr/share/info \
+		usr/share/doc
+	mv $(d)/usr/share/man $(d_comm)/usr/share/.
+	mv $(d_comm)/usr/share/man/man3/history.3 \
+		$(d_comm)/usr/share/man/man3/history.3readline
+	mv $(d_comm)/usr/share/man/man3/readline.3 \
+		$(d_comm)/usr/share/man/man3/readline.3readline
+	mv $(d)/usr/share/info/rluserman.info $(d_comm)/usr/share/info/.
+	install -m 644 debian/inputrc $(d_comm)/usr/share/readline/
+
+	: # move $(p_rlg)
+	dh_installdirs -p$(p_rlg) \
+		usr/lib/debug \
+		usr/share/doc
+	mv $(d)/usr/lib/lib{history,readline}.so.$(libversion) \
+		$(d_rlg)/usr/lib/debug/.
+	ln -s libhistory.so.$(libversion) \
+		$(d_rlg)/usr/lib/debug/libhistory.so.$(soversion)
+	ln -s libreadline.so.$(libversion) \
+		$(d_rlg)/usr/lib/debug/libreadline.so.$(soversion)
+
+	: # move $(p_rld)
+	dh_installdirs -p$(p_rld) \
+		usr/lib \
+		usr/share/doc \
+		usr/share/info
+	ln -s /lib/libhistory.so.$(soversion) $(d_rld)/usr/lib/libhistory.so
+	ln -s /lib/libreadline.so.$(soversion) $(d_rld)/usr/lib/libreadline.so
+	mv $(d)/usr/lib/lib{history,readline}.a	$(d_rld)/usr/lib/.
+	mv $(d)/usr/include $(d_rld)/usr/.
+	mv $(d)/usr/share/info/{readline.info,history.info} \
+		$(d_rld)/usr/share/info/.
+
+	: # remove HAVE_CONFIG_H from installed headers
+	awk '/^#if defined \(HAVE_CONFIG_H\)/, /^#endif/ \
+	     {if ($$0 == "#else") print "#include <string.h>"; next} {print}' \
+	  $(d_rld)/usr/include/readline/chardefs.h \
+	  > $(d_rld)/usr/include/readline/chardefs.h.new
+	if diff -u $(d_rld)/usr/include/readline/chardefs.h \
+		$(d_rld)/usr/include/readline/chardefs.h.new; \
+	then \
+	  rm -f $(d_rld)/usr/include/readline/chardefs.h.new; \
+	else \
+	  mv -f $(d_rld)/usr/include/readline/chardefs.h.new \
+	    $(d_rld)/usr/include/readline/chardefs.h; \
+	fi
+
+	: # install $(p_rlfe)
+ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+	dh_installdirs -p$(p_rlfe) \
+	    usr/bin usr/share/man/man1 \
+	    usr/share/doc/$(p_rlfe)
+	cp -p $(builddir)/examples/rlfe/rlfe $(d_rlfe)/usr/bin/.
+	cp -p debian/rlfe.1 $(d_rlfe)/usr/share/man/man1/.
+endif
+
+ifneq ($(build32),)
+	rm -rf $(d32)
+	mkdir -p $(d32)/usr/bin
+	$(MAKE) -C $(builddir32) install \
+	    CC="$(CC32)" \
+	    CFLAGS="-g -O2 -D_REENTRANT" \
+	    SHOBJ_LDFLAGS='-shared' \
+	    SHLIB_XLDFLAGS='$(CC_LINK_FLAGS)-soname,`echo $$@ | sed s/\\..$$$$//`' \
+	    SHLIB_LIBS=-lncurses \
+	    DESTDIR=$(PWD)/$(d32) \
+	    mandir=/usr/share/man \
+	    infodir=/usr/share/info
+
+	dh_installdirs -p$(p_rl32) \
+	    $(lib32dir) \
+	    usr/share/doc
+	cp -p $(d32)/usr/lib/lib{history,readline}.so.$(libversion) \
+		$(d_rl32)/$(lib32dir)/
+	ln -s libhistory.so.$(libversion) \
+		$(d_rl32)/$(lib32dir)/libhistory.so.$(soversion)
+	ln -s libreadline.so.$(libversion) \
+		$(d_rl32)/$(lib32dir)/libreadline.so.$(soversion)
+
+	dh_installdirs -p$(p_rld32) \
+	    $(lib32devdir) \
+	    usr/share/doc
+	ln -s /$(lib32dir)/libhistory.so.$(soversion) \
+		$(d_rld32)/$(lib32devdir)/libhistory.so
+	ln -s /$(lib32dir)/libreadline.so.$(soversion) \
+		$(d_rld32)/$(lib32devdir)/libreadline.so
+	mv $(d32)/usr/lib/lib{history,readline}.a $(d_rld32)/$(lib32devdir)/.
+endif
+
+ifneq ($(build64),)
+	rm -rf $(d64)
+	mkdir -p $(d64)/usr/bin
+	$(MAKE) -C $(builddir64) install \
+	    CC="$(CC64)" \
+	    CFLAGS="-g -O2 -D_REENTRANT" \
+	    SHOBJ_LDFLAGS='-shared' \
+	    SHLIB_XLDFLAGS='$(CC_LINK_FLAGS)-soname,`echo $$@ | sed s/\\..$$$$//`' \
+	    SHLIB_LIBS=-lncurses \
+	    DESTDIR=$(PWD)/$(d64) \
+	    mandir=/usr/share/man \
+	    infodir=/usr/share/info
+
+	dh_installdirs -p$(p_rl64) \
+	    lib64 \
+	    usr/share/doc
+	dh_installdirs -p$(p_rld64) \
+	    usr/share/doc
+	cp -p $(d64)/usr/lib/lib{history,readline}.so.$(libversion) \
+		$(d_rl64)/lib64/
+	ln -s libhistory.so.$(libversion) \
+		$(d_rl64)/lib64/libhistory.so.$(soversion)
+	ln -s libreadline.so.$(libversion) \
+		$(d_rl64)/lib64/libreadline.so.$(soversion)
+
+	dh_installdirs -p$(p_rld64) \
+	    usr/lib64 \
+	    usr/share/doc
+	ln -s /lib64/libhistory.so.$(soversion) \
+		$(d_rld64)/usr/lib64/libhistory.so
+	ln -s /lib64/libreadline.so.$(soversion) \
+		$(d_rld64)/usr/lib64/libreadline.so
+	mv $(d64)/usr/lib/lib{history,readline}.a $(d_rld64)/usr/lib64/.
+endif
+
+	touch install-stamp
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	mkdir -p $(d_comm)/usr/share/lintian/overrides
+	cp -p debian/readline-common.overrides \
+		$(d_comm)/usr/share/lintian/overrides/readline-common
+	dh_installdocs -p$(p_comm) debian/inputrc.arrows
+	dh_installchangelogs -p$(p_comm)
+	dh_installdocs -p$(p_comm)
+	dh_installchangelogs -p$(p_comm)
+	dh_compress -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs -p$(p_rl) \
+		USAGE debian/inputrc.arrows
+	dh_installchangelogs -p$(p_rl) CHANGES
+	dh_installexamples -p$(p_rl) \
+		examples/Inputrc
+	mkdir -p $(d_rld)/usr/share/doc/$(p_rl)/examples
+	cp -p $(builddir)/examples/Makefile examples/*.c \
+		$(d_rld)/usr/share/doc/$(p_rl)/examples/
+	ln -sf $(p_rl) $(d_rld)/usr/share/doc/$(p_rld)
+	ln -sf $(p_rl) $(d_rlg)/usr/share/doc/$(p_rlg)
+
+ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+	dh_installdocs -p$(p_rlfe) examples/rlfe/README
+	dh_installchangelogs -p$(p_rlfe) examples/rlfe/ChangeLog
+
+	dh_fixperms -p$(p_rl) -p$(p_rld) -p$(p_rlg) -p$(p_rlfe)
+	dh_strip -p$(p_rl) -p$(p_rld) -p$(p_rlg) -p$(p_rlfe)
+	dh_compress -p$(p_rl) -p$(p_rld) -p$(p_rlg) -p$(p_rlfe) \
+		-X.c
+	dh_makeshlibs -p$(p_rl) -V '$(p_rl) (>= 5.2)'
+	cp -p debian/$(p_rl).shlibs debian/shlibs.local
+	dh_shlibdeps -p$(p_rl) -p$(p_rld) -p$(p_rlg) -p$(p_rlfe) \
+		 -L $(p_rl) -l $(d_rl)/lib
+endif
+
+ifneq ($(build32),)
+	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
+	dh_installdocs -p$(p_rl32) \
+		USAGE debian/inputrc.arrows
+	dh_installchangelogs -p$(p_rl32) CHANGES
+	ln -sf $(p_rl32) $(d_rld32)/usr/share/doc/$(p_rld32)
+	dh_compress -p$(p_rl32) -p$(p_rld32)
+	dh_fixperms -p$(p_rl32) -p$(p_rld32)
+	dh_strip -p$(p_rl32) -p$(p_rld32)
+	dh_makeshlibs -p$(p_rl32) -V '$(p_rl32) (>= 5.2)'
+	-dh_shlibdeps -p$(p_rl32) -p$(p_rld32) \
+		 -L $(p_rl32) -l $(d_rl32)/lib
+	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
+endif
+
+ifneq ($(build64),)
+	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
+	dh_installdocs -p$(p_rl64) \
+		USAGE debian/inputrc.arrows
+	dh_installchangelogs -p$(p_rl64) CHANGES
+	ln -sf $(p_rl64) $(d_rld64)/usr/share/doc/$(p_rld64)
+	dh_compress -p$(p_rl64) -p$(p_rld64)
+	dh_fixperms -p$(p_rl64) -p$(p_rld64)
+	dh_strip -p$(p_rl64) -p$(p_rld64)
+	dh_makeshlibs -p$(p_rl64) -V '$(p_rl64) (>= 5.2)'
+	-dh_shlibdeps -p$(p_rl64) -p$(p_rld64) \
+		 -L $(p_rl64) -l $(d_rl64)/lib
+	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
+endif
+
+	dh_installdeb -s
+	dh_gencontrol -s $(gencontrol_flags)
+	dh_md5sums -s
+	dh_builddeb -s
+
+binary:		binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean
+
+# Local Variables:
+# mode: makefile
+# end:
--- readline5-5.2.orig/debian/semantic.cache
+++ readline5-5.2/debian/semantic.cache
@@ -0,0 +1,15 @@
+;; Object debian/
+;; SEMANTICDB Tags save file
+(semanticdb-project-database-file "debian/"
+  :tables (list 
+   (semanticdb-table "rules"
+    :major-mode 'makefile-mode
+    :tags '(("soversion" variable (:default-value ("5")) nil [40 54]) ("libversion" variable (:default-value ("$(soversion).1")) nil [54 82]) ("build64" variable (:default-value ("yes")) nil [384 398]) ("CC64" variable (:default-value ("gcc" "-m64")) nil [400 416]) ("gencontrol_flags" variable (:default-value ("--" "'-Vlibxx:Depends=libc6-$(ARCH64)'" "'-Vdevxx:Depends=libc6-dev-$(ARCH64)'")) nil [418 518]) ("ARCH64" variable (:default-value ("amd64")) nil [553 568]) ("HOST64" variable (:default-value ("x86_64-linux-gnu")) nil [572 598]) ("ARCH64" variable (:default-value ("ppc64")) nil [644 659]) ("HOST64" variable (:default-value ("ppc64-linux-gnu")) nil [663 688]) ("ARCH64" variable (:default-value ("sparc64")) nil [732 749]) ("HOST64" variable (:default-value ("sparc64-linux-gnu")) nil [753 780]) ("ARCH64" variable (:default-value ("s390x")) nil [823 838]) ("HOST64" variable (:default-value ("s390x-linux-gnu")) nil [842 867]) ("build32" variable (:default-value ("yes")) nil [940 954]) ("CC32" variable (:default-value ("gcc" "-m32")) nil [956 972]) ("gencontrol_flags" variable (:default-value ("--" "'-Vlibxx:Depends=libc6-$(ARCH32)'" "'-Vdevxx:Depends=libc6-dev-$(ARCH32)'")) nil [974 1074]) ("ARCH32" variable (:default-value ("amd64")) nil [1110 1125]) ("HOST32" variable (:default-value ("i486-linux-gnu")) nil [1129 1153]) ("ARCH32" variable (:default-value ("powerpc")) nil [1197 1214]) ("HOST32" variable (:default-value ("powerpc-linux-gnu")) nil [1218 1245]) ("CC_LINK_FLAGS" variable nil nil [1296 1312]) ("CC_LINK_FLAGS" variable (:default-value ("-Wl,")) nil [1319 1340]) ("CC" variable (:default-value ("gcc")) nil [1346 1355]) ("SHELL" variable (:default-value ("bash")) nil [1356 1369]) ("PWD" variable (:default-value ("$(shell pwd)")) nil [1370 1390]) ("p_rl" variable (:default-value ("libreadline$(soversion)")) nil [1390 1421]) ("p_rl32" variable (:default-value ("lib32readline$(soversion)")) nil [1421 1456]) ("p_rl64" variable (:default-value ("lib64readline$(soversion)")) nil [1456 1491]) ("p_comm" variable (:default-value ("readline-common")) nil [1491 1516]) ("p_rld" variable (:default-value ("$(p_rl)-dev")) nil [1516 1536]) ("p_rld32" variable (:default-value ("$(p_rl32)-dev")) nil [1536 1560]) ("p_rld64" variable (:default-value ("$(p_rl64)-dev")) nil [1560 1584]) ("p_rlg" variable (:default-value ("$(p_rl)-dbg")) nil [1584 1604]) ("p_doc" variable (:default-value ("$(p_rl)-doc")) nil [1604 1624]) ("p_rlfe" variable (:default-value ("rlfe")) nil [1624 1638]) ("d" variable (:default-value ("debian/tmp")) nil [1639 1654]) ("d32" variable (:default-value ("debian/tmp32")) nil [1654 1673]) ("d64" variable (:default-value ("debian/tmp64")) nil [1673 1692]) ("d_rl" variable (:default-value ("debian/$(p_rl)")) nil [1692 1714]) ("d_rl32" variable (:default-value ("debian/$(p_rl32)")) nil [1714 1740]) ("d_rl64" variable (:default-value ("debian/$(p_rl64)")) nil [1740 1766]) ("d_comm" variable (:default-value ("debian/$(p_comm)")) nil [1766 1792]) ("d_rld" variable (:default-value ("debian/$(p_rld)")) nil [1792 1816]) ("d_rld32" variable (:default-value ("debian/$(p_rld32)")) nil [1816 1844]) ("d_rld64" variable (:default-value ("debian/$(p_rld64)")) nil [1844 1872]) ("d_rlg" variable (:default-value ("debian/$(p_rlg)")) nil [1872 1896]) ("d_doc" variable (:default-value ("debian/$(p_doc)")) nil [1896 1920]) ("d_rlfe" variable (:default-value ("debian/$(p_rlfe)")) nil [1920 1946]) ("srcdir" variable (:default-value ("$(PWD)")) nil [1947 1964]) ("builddir" variable (:default-value ("$(PWD)/build")) nil [1964 1988]) ("builddir32" variable (:default-value ("$(PWD)/build32")) nil [1988 2016]) ("builddir64" variable (:default-value ("$(PWD)/build64")) nil [2016 2044]) ("default" function (:arguments ("build")) nil [2045 2061]) ("configure" function (:arguments ("configure-stamp")) nil [2061 2103]) ("configure-stamp" function (:arguments ("patch-stamp")) nil [2088 2331]) ("build" function (:arguments ("build-stamp" "build-rlfe-stamp")) nil [2711 2748]) ("build-stamp" function (:arguments ("configure-stamp")) nil [2748 2908]) ("build-rlfe-stamp" function (:arguments ("configure-stamp")) nil [3453 4125]) ("clean" function nil nil [4125 4256]) ("install" function (:arguments ("install-stamp")) nil [4495 4531]) ("install-stamp" function nil nil [4518 4763]) ("binary-indep" function (:arguments ("build" "install")) nil [9268 9697]) ("binary-arch" function (:arguments ("build" "install")) nil [9697 10140]) ("binary" function (:arguments ("binary-indep" "binary-arch")) nil [11493 11528]) ("patchdir" variable (:default-value ("debian/patches")) nil [11780 11806]) ("debian_patches" variable (:default-value ("readline51-001" "readline51-002" "readline51-003" "readline51-004" "rl-inputrc" "rl-header" "rl-attribute" "rl-no-rpath" "rl-no-cross-check" "rlfe-libs")) nil [11842 12026]) ("patch" function (:arguments ("patch-stamp")) nil [12027 12059]) ("apply-patches" function (:arguments ("patch-stamp")) nil [12046 12074]) ("patch-stamp" function (:arguments ("$(foreach p,$(debian_patches),patch-stamp-$(p))")) nil [12074 12338]) ("reverse-patches" function (:arguments ("unpatch")) nil [12338 12370]) ("unpatch" function nil nil [12363 12945]) ("patch-stamp-%" function (:arguments ("$(patchdir)/%.dpatch")) nil [12945 13161]) (".PHONY" function (:arguments ("binary" "binary-arch" "binary-indep" "clean")) nil [13162 13209]))
+    :file "rules"
+    :pointmax 13252
+    )
+   )
+  :file "semantic.cache"
+  :semantic-tag-version "2.0pre3"
+  :semanticdb-version "2.0pre3"
+  )
--- readline5-5.2.orig/debian/changelog
+++ readline5-5.2/debian/changelog
@@ -0,0 +1,454 @@
+readline5 (5.2-2) unstable; urgency=low
+
+  * Apply upstream patch readline52-001 (incorrect display position
+    with multibyte characters).
+
+ -- Matthias Klose <doko@debian.org>  Tue, 19 Dec 2006 16:28:28 +0100
+
+readline5 (5.2-1) unstable; urgency=low
+
+  * New upstream version.
+  * Removed patches applied upstream: rlfe-pts, rl-inputrc.
+  * readline-common: Don't conflict with libreadine4, keep the replaces;
+    eases upgrades from MySQL 5 databases. Closes: #387966.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 28 Oct 2006 13:54:43 +0200
+
+readline5 (5.1-9) unstable; urgency=low
+
+  * Fix libc dependencies for the lib32readline5{,-dev} packages.
+    Closes: #386345.
+  * Set DEB_BUILD_GNU_TYPE. Closes: #390372.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 10 Sep 2006 21:04:52 +0000
+
+readline5 (5.1-8) unstable; urgency=low
+
+  * Build 32bit packages for amd64 and ppc64. Closes: #384198.
+  * Apply cross-compilation fixes, but keep the dependency on readline-common.
+    Closes: #358767.
+  * Fix build failure on ppc64. Closes: #361193.
+
+ -- Matthias Klose <doko@debian.org>  Mon,  4 Sep 2006 00:15:39 +0200
+
+readline5 (5.1-7) unstable; urgency=low
+
+  * Apply upstream patches 003, 004.
+  * Remove build dependency on ia32-libs-dev.
+
+ -- Matthias Klose <doko@debian.org>  Mon, 15 Mar 2006 23:39:50 +0000
+
+readline5 (5.1-6) unstable; urgency=low
+
+  * Apply upstream patch 002.
+  * Fix dangling symlinks in doc directory (closes: #346157, #346158).
+
+ -- Matthias Klose <doko@debian.org>  Tue,  7 Feb 2006 18:46:32 +0100
+
+readline5 (5.1-5) unstable; urgency=high
+
+  * Fix names of libc-dev packages in lib64readline5-dev dependencies.
+    Closes: #344723.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 30 Dec 2005 00:23:24 +0100
+
+readline5 (5.1-4) unstable; urgency=low
+
+  * Add 32/64 bit build dependencies, lib64ncurses-dev doesn't yet depend
+    on it.
+
+ -- Matthias Klose <doko@debian.org>  Thu, 22 Dec 2005 18:36:32 +0000
+
+readline5 (5.1-3) unstable; urgency=medium
+
+  * Don't call dh_shlibdeps for the lib64readline5 package.
+  * Fix build on GNU/kFreeBSD. Closes: #343323.
+  * Fix callback interface (closes: #343477).
+
+ -- Matthias Klose <doko@debian.org>  Thu, 22 Dec 2005 17:29:52 +0100
+
+readline5 (5.1-2) unstable; urgency=low
+
+  * Don't check for cross compilation, when building for 64bit biarchs.
+  * Build 64bit packages for i386 and powerpc as well.
+  * /etc/inputrc: Activate bindings for forward-/backward-word,
+    when term=rxvt. Ubuntu #18927.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 10 Dec 2005 00:03:36 +0100
+
+readline5 (5.1-1) unstable; urgency=low
+
+  * New upstream version (5.1 release).
+    - Works better with non-ASCII input (closes: #332635).
+  * readline-common conflicts/replaces libreadline-common (closes: #339452).
+
+ -- Matthias Klose <doko@debian.org>  Fri,  9 Dec 2005 21:22:24 +0100
+
+readline5 (5.0+5.1rc1-1) unstable; urgency=low
+
+  * New upstream version (5.1-rc1).
+    - Fix rlfe command line parsing (closes: #308315).
+  * Remove patches applied upstream: rl-del-backspace-policy.
+  * Remove /etc/inputrc on purge (closes: #334142).
+
+ -- Matthias Klose <doko@debian.org>  Fri, 11 Nov 2005 12:36:59 +0000
+
+readline5 (5.0+5.1b1-1) unstable; urgency=low
+
+  * New upstream version (5.1-beta1).
+
+ -- Matthias Klose <doko@debian.org>  Thu, 13 Oct 2005 16:03:09 +0200
+
+readline5 (5.0+5.1a1-1) unstable; urgency=low
+
+  * New upstream version (5.1-alpha1).
+  * Remove patches applied upstream:
+    - readline50-*, rl-setenv, rl-display, rl-self-insert, rl-examples.
+  * libreadline5 now depends on libreadline-common, now holding the
+    readline user documentation and the configuration file /etc/inputrc.
+  
+ -- Matthias Klose <doko@debian.org>  Sun, 11 Sep 2005 17:05:28 +0200
+
+readline5 (5.0-11) unstable; urgency=low
+
+  * libreadline5 now depends on readline-common, now holding the
+    readline user documentation and the configuration file /etc/inputrc.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 11 Sep 2005 20:18:27 +0000
+
+readline5 (5.0-10) unstable; urgency=low
+
+  * Update support/config.* files (closes: #290910).
+
+ -- Matthias Klose <doko@debian.org>  Sun, 23 Jan 2005 09:58:30 +0100
+
+readline5 (5.0-9) unstable; urgency=low
+
+  * Fix bug in readline's self-insert command (addresses: #290103).
+  * Fix reference to upstream version (closes: #282252).
+  * Fix re-read-init-file (C-xC-r) not to read /etc/inputrc twice,
+    but /etc/inputrc and ~/.inputrc. Thanks to Vasco Pedro.
+  * rlfe: Use Unix98 pty naming (closes: #287434).
+
+ -- Matthias Klose <doko@debian.org>  Sun, 16 Jan 2005 13:01:21 +0100
+
+readline5 (5.0-8) unstable; urgency=low
+
+  * Fix segfault in the ``reverse-search-history'' feature of the readline
+    library, if the search string matches a previously entered command (ie
+    history) and must overflow the current screen width. Addresses: #288940.
+
+ -- Matthias Klose <doko@debian.org>  Wed, 12 Jan 2005 08:11:36 +0100
+
+readline5 (5.0-7) unstable; urgency=low
+
+  * Add build dependency on autotools-dev (closes: #281429).
+
+ -- Matthias Klose <doko@debian.org>  Mon, 15 Nov 2004 22:53:33 +0100
+
+readline5 (5.0-6) unstable; urgency=low
+
+  * Build-depend on texinfo (closes: #280867).
+
+ -- Matthias Klose <doko@debian.org>  Fri, 12 Nov 2004 08:47:26 +0100
+
+readline5 (5.0-5) unstable; urgency=high
+
+  * Remove the libreadline-common package, until sarge is released.
+    Install the man pages as readline5(3) and history5(3), install the
+    user manual as rl5userman. Closes: #279366.
+
+ -- Matthias Klose <doko@debian.org>  Thu, 11 Nov 2004 08:05:15 +0100
+
+readline5 (5.0-4) unstable; urgency=low
+
+  * Fix typo in rules file.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 26 Oct 2004 07:35:50 +0200
+
+readline5 (5.0-3) unstable; urgency=low
+
+  * Prefer using setenv over putenv.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 17 Oct 2004 11:09:20 +0200
+
+readline5 (5.0-2) unstable; urgency=medium
+
+  * Remove sgid bits from directories (closes: #274667).
+  * libreadline5 now depends on libreadline-common | libreadline4 (<< 4.3-13),
+    becoming installable in sarge, but leaving out the rluserman docs,
+    which is in libreadline-common (closes: #276536).
+
+ -- Matthias Klose <doko@debian.org>  Fri, 15 Oct 2004 00:09:16 +0200
+
+readline5 (5.0-1) unstable; urgency=low
+
+  * Package maintainers: Do not build-depend on libreadline5-dev, unless you
+    want to stick your package to unstable. readline is part of base and
+    therefore frozen for sarge.
+
+  * New upstream release.
+  * Bugs fixed in this release (and the alpha/beta releases):
+    - Fixed a bug that caused the prompt to overwrite previous output when the
+      output doesn't contain a newline and the locale supports multibyte
+      characters.  This same change fixes the problem of readline redisplay
+      slowing down dramatically as the line gets longer in multibyte locales.
+      Closes: #179883.
+    - Speedups to the multibyte character redisplay code. Closes: #154063.
+    - Fixed a problem with EOF detection when using rl_event_hook.
+      Closes: #144585.
+    - Display of multibyte character in readline prompts. Closes: #195678.
+    - Broken column output in UTF-8 locale. Closes: #161750.
+    - Fix a bug in the callback read-char interface. Closes: #172849.
+  * New shared object name. Obsoletes bug about changed symbol size.
+    Closes: #153974.
+  * Exported readline functions now have a rl_ prefix. Closes: #65484.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 19 Sep 2004 11:48:34 +0200
+
+readline4 (4.3-6) unstable; urgency=low
+
+  * Fix package sections and priorities.
+  * Add support for freebsd (closes: #200537).
+  * Add package rlfe (closes: #154400).
+
+ -- Matthias Klose <doko@debian.org>  Fri, 26 Sep 2003 19:05:31 +0200
+
+readline4 (4.3-5) unstable; urgency=low
+
+  * Fix ~ command working in UTF-8 locales (closes: #175127).
+  * Apply upstream patches 001, 002, 003, 004, 005.
+  * Do not redefine __attribute__ (closes: #191209).
+
+ -- Matthias Klose <doko@debian.org>  Sun,  1 Jun 2003 09:39:44 +0200
+
+readline4 (4.3-5) unstable; urgency=low
+
+  * debian/patches/mbutil.dpatch: Fix segfault in mbutil.c.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 24 Sep 2002 13:12:12 +0200
+
+readline4 (4.3-4) unstable; urgency=medium
+
+  * Apply upstream patches:
+    - Fix segfault (closes: #154462).
+    - Fix for repeating an edit in vi mode.
+  * Build dependency on 'mawk | awk' (closes: #154462).
+
+ -- Matthias Klose <doko@debian.org>  Wed, 31 Jul 2002 20:10:44 +0200
+
+readline4 (4.3-3) unstable; urgency=high
+
+  * Do it again. Really link against ncurses library.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 21 Jul 2002 21:44:00 +0200
+
+readline4 (4.3-2) unstable; urgency=high
+
+  * Link against ncurses library.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 20 Jul 2002 18:21:40 +0200
+
+readline4 (4.3-1) unstable; urgency=low
+
+  * New upstream version:
+    - Handle multibyte characters (obsoletes and closes: #113078).
+    - Implement toggable overwrite mode (closes: #36651).
+    - Fixed the event loop to handle the case where the input file descriptor
+      is invalidated (closes: #134615).
+    - Added some default key bindings for common escape sequences produced by
+      HOME and END keys (closes: #150429).
+  * Move debug library to /usr/lib/debug.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 20 Jul 2002 12:40:06 +0200
+
+readline4 (4.2.91-1) unstable; urgency=low
+
+  * New upstream version (4.3 beta1).
+
+ -- Matthias Klose <doko@debian.org>  Fri, 31 May 2002 00:15:04 +0200
+
+readline4 (4.2a-5) unstable; urgency=low
+
+  * Adjust for netbsd linker options (closes: #130349).
+
+ -- Matthias Klose <doko@debian.org>  Sun,  3 Feb 2002 22:03:03 +0100
+
+readline4 (4.2a-4) unstable; urgency=high
+
+  * Taken from the current upstream sources: Make the symlinked directory
+    completion behavior introduced in readline-4.2a a user-settable option.
+    If `mark-symlinked-directories' is set to `on', the symlinked directory
+    completion behavior is disabled, and symlinks that point to directories
+    have a slash appended (closes: #120854, #123602).
+    Same severity as the bash upload (2.05-4), as bash depends on it.
+  * Introduced a new private (but global) variable, so the shlibs version
+    needs an update again.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 12 Jan 2002 16:00:08 +0100
+
+readline4 (4.2a-3) unstable; urgency=medium
+
+  * 4.2a has a new variable `rl_readline_version', so the shlibs version
+    needs to be upgraded to (>= 4.2a).
+  * Don't rely on HAVE_CONFIG_H macro in installed headers (closes: #125398).
+  * Upstream: The completion code now attempts to do a better job of preserving
+    the case of the word the user typed if ignoring case in completions.
+    Closes: #74861.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 21 Dec 2001 00:16:28 +0100
+
+readline4 (4.2a-2) unstable; urgency=high
+
+  * Update config.{sub,guess} from ftp://ftp.gnu.org/pub/gnu/config/.
+    Closes: #119847.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 16 Nov 2001 19:00:07 +0100
+
+readline4 (4.2a-1) unstable; urgency=low
+
+  * Final release.
+  * This is mainly a bugfix and code cleanup release (as you can see
+    from the version number as well). Fixes the following Debian reports:
+    - readline doesn't ignore null prompts anymore (closes: #105231).
+    - Don't include -I/usr/include in CFLAGS.
+  * Fix location of upstream source in copyright file (closes: #118481).
+
+ -- Matthias Klose <doko@debian.org>  Wed, 14 Nov 2001 21:56:29 +0100
+
+readline4 (4.2a-0rc1) unstable; urgency=low
+
+  * New upstream (bug fix) version, release candidate.
+
+ -- Matthias Klose <doko@debian.org>  Fri,  2 Nov 2001 10:35:55 +0100
+
+readline4 (4.2a-0beta1) unstable; urgency=low
+
+  * New upstream (bug fix) version.
+  * Move manual pages to libreadline4 package (closes: #111303).
+
+ -- Matthias Klose <doko@debian.org>  Thu, 11 Oct 2001 22:51:21 +0200
+
+readline4 (4.2-5) unstable; urgency=low
+
+  * Include stdio.h in history.h (closes: #101166).
+  * libreadline4-dbg suggests libreadline4-dev (closes: #101790).
+
+ -- Matthias Klose <doko@debian.org>  Sat, 21 Jul 2001 19:02:53 +0200
+
+readline4 (4.2-4) unstable; urgency=low
+
+  * Fix tilde.h for C++ compatibility as well.
+
+ -- Matthias Klose <doko@debian.org>  Sat,  5 May 2001 01:03:03 +0200
+
+readline4 (4.2-3) unstable; urgency=low
+
+  * Fix header for C++ compatibility (closes #95048, #95758).
+  * Fixed upstream: closes #55626, #75346.
+
+ -- Matthias Klose <doko@debian.org>  Wed,  2 May 2001 23:06:00 +0200
+
+readline4 (4.2-2) unstable; urgency=low
+
+  * Tighten shlibs dependency to >= 4.2-2.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 10 Apr 2001 00:37:22 +0200
+
+readline4 (4.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Matthias Klose <doko@debian.org>  Mon,  9 Apr 2001 18:28:54 +0200
+
+readline4 (4.2-0beta2) unstable; urgency=low
+
+  * New upstream release 4.2-beta2.
+
+ -- Matthias Klose <doko@debian.org>  Thu, 29 Mar 2001 23:18:10 +0200
+
+readline4 (4.2-0) unstable; urgency=low
+
+  * New upstream release 4.2-beta1.
+
+ -- Matthias Klose <doko@debian.org>  Tue,  6 Feb 2001 21:12:58 +0100
+
+readline4 (4.1-4) unstable; urgency=low
+
+  * Fix build error.
+
+ -- Matthias Klose <doko@debian.org>  Mon, 20 Nov 2000 23:27:16 +0100
+
+readline4 (4.1-3) unstable; urgency=low
+
+  * debian/patches/rl-hurd-build.dpatch: Build on the Hurd (fixes #75342).
+
+ -- Matthias Klose <doko@debian.org>  Sat, 18 Nov 2000 12:55:16 +0100
+
+readline4 (4.1-2) unstable; urgency=low
+
+  * Include stdio.h in readline.h (fixes #70669).
+
+ -- Matthias Klose <doko@debian.org>  Mon,  9 Oct 2000 20:35:23 +0200
+
+readline4 (4.1-1) frozen unstable; urgency=low
+
+  * Final release. Documentation fixes.
+
+ -- Matthias Klose <doko@debian.org>  Mon, 20 Mar 2000 20:08:45 +0100
+
+readline4 (4.1-0beta5db1) frozen unstable; urgency=low
+
+  * Updated beta version.
+  * debian/control: Remove libreadline4-doc suggestions (fixes #57547, #57578).
+
+ -- Matthias Klose <doko@debian.org>  Sun, 20 Feb 2000 21:10:34 +0100
+
+readline4 (4.1-0beta3db3) unstable; urgency=low
+
+  * Update rl.ctrl-char patch from Dan Jacobowitz.
+    Fixes #54805, #54639, #54612.
+
+ -- Matthias Klose <doko@debian.org>  Wed, 12 Jan 2000 10:26:51 +0100
+
+readline4 (4.1-0beta3db2) unstable; urgency=low
+
+  * debian/control: libreadline4-dev depends on libncurses5-dev.
+
+ -- Matthias Klose <doko@debian.org>  Thu,  6 Jan 2000 12:11:29 +0100
+
+readline4 (4.1-0beta3db1) unstable; urgency=low
+
+  * New upstream version.
+  * Remove three patches integrated upstream.
+  * Reports fixed in upstream version: #16797, #22480, #47525.
+  * Put rluserman.info into library package (fixes: #32075).
+  * In lib/readline/chardefs.h do not assume char is signed (fixes #53253).
+
+ -- Matthias Klose <doko@debian.org>  Sat,  1 Jan 2000 16:22:30 +0100
+
+readline4 (4.0-0.1) experimental; urgency=low
+
+  * New upstream version.
+  * Fixed upstream (closes: #22480).
+  * Separated from bash package, since readline is available as a
+    separate source package upstream. The upstream author writes:
+    "It's not appropriate to build shared libraries from the readline
+     shipped with bash.  That is designed to be linked directly into bash."
+  * Make /usr/doc compatibility links.
+  * debian/patches/conf-update.dpatch: New config files from automake
+    (closes #33745).
+  * debian/rules: Add Build-Depends.
+  * debian/rules: Install info files with default perms (closes: #49879).
+  * readline headers fixed upstream (closes: #47525).
+  * debian/etc.inputrc: Document how to enable German umlauts. Should close
+    #38397?  Should close #33168, #36077 and #42775 as well? The first report
+    (33168) contains some more information how to get xemacs to work with 8bit.
+  * Support to build on the Hurd (closes: #35769).
+    Patch from Marcus.Brinkmann@ruhr-uni-bochum.de.
+  * debian/patches/rl-del-backspace-policy.dpatch: Handle Delete/Backspace
+    keys according to Debian policy.
+  * debian/patches/rl-paren-matching.dpatch: Turn on parens matching.
+  * debian/patches/rl-shell-memleak.dpatch: Fix memory leak.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 20 Nov 1999 18:52:00 +0100
--- readline5-5.2.orig/debian/inputrc
+++ readline5-5.2/debian/inputrc
@@ -0,0 +1,66 @@
+# /etc/inputrc - global inputrc for libreadline
+# See readline(3readline) and `info rluserman' for more information.
+
+# Be 8 bit clean.
+set input-meta on
+set output-meta on
+
+# To allow the use of 8bit-characters like the german umlauts, comment out
+# the line below. However this makes the meta key not work as a meta key,
+# which is annoying to those which don't need to type in 8-bit characters.
+
+# set convert-meta off
+
+# try to enable the application keypad when it is called.  Some systems
+# need this to enable the arrow keys.
+# set enable-keypad on
+
+# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys
+
+# do not bell on tab-completion
+# set bell-style none
+# set bell-style visible
+
+# some defaults / modifications for the emacs mode
+$if mode=emacs
+
+# allow the use of the Home/End keys
+"\e[1~": beginning-of-line
+"\e[4~": end-of-line
+
+# allow the use of the Delete/Insert keys
+"\e[3~": delete-char
+"\e[2~": quoted-insert
+
+# mappings for "page up" and "page down" to step to the beginning/end
+# of the history
+# "\e[5~": beginning-of-history
+# "\e[6~": end-of-history
+
+# alternate mappings for "page up" and "page down" to search the history
+# "\e[5~": history-search-backward
+# "\e[6~": history-search-forward
+
+# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
+"\e[1;5C": forward-word
+"\e[1;5D": backward-word
+"\e[5C": forward-word
+"\e[5D": backward-word
+"\e\e[C": forward-word
+"\e\e[D": backward-word
+
+$if term=rxvt
+"\e[8~": end-of-line
+"\eOc": forward-word
+"\eOd": backward-word
+$endif
+
+# for non RH/Debian xterm, can't hurt for RH/Debian xterm
+# "\eOH": beginning-of-line
+# "\eOF": end-of-line
+
+# for freebsd console
+# "\e[H": beginning-of-line
+# "\e[F": end-of-line
+
+$endif
--- readline5-5.2.orig/debian/libreadline5.shlibs
+++ readline5-5.2/debian/libreadline5.shlibs
@@ -0,0 +1,2 @@
+libhistory	5	libreadline5 (>= 5.2)
+libreadline	5	libreadline5 (>= 5.2)
--- readline5-5.2.orig/debian/readline-common.overrides
+++ readline5-5.2/debian/readline-common.overrides
@@ -0,0 +1 @@
+readline-common: manpage-section-mismatch
--- readline5-5.2.orig/debian/patches/rl-no-rpath.dpatch
+++ readline5-5.2/debian/patches/rl-no-rpath.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rl-no-rpath.dpatch by  <doko@salsa.net.local>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't set a runtime path for linking the shared libraries
+
+@DPATCH@
+diff -urNad readline5-5.2~/support/shobj-conf readline5-5.2/support/shobj-conf
+--- readline5-5.2~/support/shobj-conf	2006-04-11 15:15:43.000000000 +0200
++++ readline5-5.2/support/shobj-conf	2006-10-28 14:21:36.000000000 +0200
+@@ -110,7 +110,7 @@
+ 	SHOBJ_LD='${CC}'
+ 	SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+ 
+-	SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
++	SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ 	SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ 	;;
+ 
--- readline5-5.2.orig/debian/patches/rl-attribute.dpatch
+++ readline5-5.2/debian/patches/rl-attribute.dpatch
@@ -0,0 +1,37 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rl-attribute.dpatch by  <doko@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Do not redefine __attribute__, define macro __rl_attribute__
+
+@DPATCH@
+diff -urNad readline5-5.2~/readline.h readline5-5.2/readline.h
+--- readline5-5.2~/readline.h	2006-08-16 21:16:59.000000000 +0200
++++ readline5-5.2/readline.h	2006-10-28 14:03:36.000000000 +0200
+@@ -373,7 +373,7 @@
+ extern int rl_crlf PARAMS((void));
+ 
+ #if defined (USE_VARARGS) && defined (PREFER_STDARG)
+-extern int rl_message (const char *, ...)  __attribute__((__format__ (printf, 1, 2)));
++extern int rl_message (const char *, ...)  __rl_attribute__((__format__ (printf, 1, 2)));
+ #else
+ extern int rl_message ();
+ #endif
+diff -urNad readline5-5.2~/rlstdc.h readline5-5.2/rlstdc.h
+--- readline5-5.2~/rlstdc.h	2003-05-30 21:08:02.000000000 +0200
++++ readline5-5.2/rlstdc.h	2006-10-28 14:03:36.000000000 +0200
+@@ -36,10 +36,10 @@
+ #  endif
+ #endif
+ 
+-#ifndef __attribute__
+-#  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+-#    define __attribute__(x)
+-#  endif
++#if defined(__GNUC__) && __GNUC__ >= 2
++#  define __rl_attribute__(x) __attribute__(x)
++#else
++#  define __rl_attribute__(x)
+ #endif
+ 
+ #endif /* !_RL_STDC_H_ */
--- readline5-5.2.orig/debian/patches/rl-no-cross-check.dpatch
+++ readline5-5.2/debian/patches/rl-no-cross-check.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rl-no-cross-check.dpatch by  <doko@salsa.net.local>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: configure: Don't check for cross compilation
+
+@DPATCH@
+diff -urNad readline5-5.2~/configure readline5-5.2/configure
+--- readline5-5.2~/configure	2006-09-28 18:04:36.000000000 +0200
++++ readline5-5.2/configure	2006-10-28 14:20:05.000000000 +0200
+@@ -1938,7 +1938,7 @@
+ echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+ # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+ # If not cross compiling, check that we can run a simple program.
+-if test "$cross_compiling" != yes; then
++if false && test "$cross_compiling" != yes; then
+   if { ac_try='./$ac_file'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
--- readline5-5.2.orig/debian/patches/rl-header.dpatch
+++ readline5-5.2/debian/patches/rl-header.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rl-header.dpatch by  <doko@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Include stdio.h in readline.h and history.h
+
+@DPATCH@
+diff -urNad readline5-5.2~/history.h readline5-5.2/history.h
+--- readline5-5.2~/history.h	2003-07-31 14:38:44.000000000 +0200
++++ readline5-5.2/history.h	2006-10-28 14:06:20.000000000 +0200
+@@ -32,6 +32,7 @@
+ #  include "rlstdc.h"
+ #  include "rltypedefs.h"
+ #else
++#  include <stdio.h>
+ #  include <readline/rlstdc.h>
+ #  include <readline/rltypedefs.h>
+ #endif
+diff -urNad readline5-5.2~/readline.h readline5-5.2/readline.h
+--- readline5-5.2~/readline.h	2006-08-16 21:16:59.000000000 +0200
++++ readline5-5.2/readline.h	2006-10-28 14:06:20.000000000 +0200
+@@ -33,6 +33,7 @@
+ #  include "keymaps.h"
+ #  include "tilde.h"
+ #else
++#  include <stdio.h>
+ #  include <readline/rlstdc.h>
+ #  include <readline/rltypedefs.h>
+ #  include <readline/keymaps.h>
--- readline5-5.2.orig/debian/patches/rl-001
+++ readline5-5.2/debian/patches/rl-001
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rl-001.dpatch by  <doko@salsa.net.local>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: In some cases, code that is intended to be used in the presence of multibyte 
+## DP: characters is called when no such characters are present, leading to incorrect 
+## DP: display position calculations and incorrect redisplay. 
+
+
+@DPATCH@
+			   READLINE PATCH REPORT
+			   =====================
+
+Readline-Release: 5.2
+Patch-ID: readline52-001
+
+Bug-Reported-by:	ebb9@byu.net
+Bug-Reference-ID:	<45540862.9030900@byu.net>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00017.html
+			http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00016.html
+
+Bug-Description:
+
+In some cases, code that is intended to be used in the presence of multibyte
+characters is called when no such characters are present, leading to incorrect
+display position calculations and incorrect redisplay.
+
+Patch:
+
+*** ../readline-5.2/display.c	Thu Sep 14 14:20:12 2006
+--- ./display.c	Mon Nov 13 17:55:57 2006
+***************
+*** 2381,2384 ****
+--- 2409,2414 ----
+    if (end <= start)
+      return 0;
++   if (MB_CUR_MAX == 1 || rl_byte_oriented)
++     return (end - start);
+  
+    memset (&ps, 0, sizeof (mbstate_t));
+
--- readline5-5.2.orig/debian/patches/00list
+++ readline5-5.2/debian/patches/00list
@@ -0,0 +1,5 @@
+rl-attribute
+rl-header
+rl-no-cross-check
+rl-no-rpath
+rl-001
--- readline5-5.2.orig/debian/rlfe.copyright
+++ readline5-5.2/debian/rlfe.copyright
@@ -0,0 +1,28 @@
+This is Debian GNU/Linux's prepackaged version of the rlfe program.
+This package was put together by Matthias Klose <doko@debian.org>.
+
+Upstream source:
+	ftp.gnu.org:/pub/gnu/readline/readline-4.3.tar.gz.
+
+Author: Per Bothner
+
+Copyright:
+
+/* A front-end using readline to "cook" input lines for Kawa.
+ *
+ * Copyright (C) 1999  Per Bothner
+ *
+ * This front-end 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.
+ *
+ * Some code from Johnson & Troan: "Linux Application Development"
+ * (Addison-Wesley, 1998) was used directly or for inspiration.
+ */
+
+You should have received a copy of the GNU General Public License with
+your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with
+the Debian GNU/Linux bash source package as the file COPYING.  If not,
+write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+Boston, MA 02110-1301, USA.
--- readline5-5.2.orig/debian/README.Debian
+++ readline5-5.2/debian/README.Debian
@@ -0,0 +1,54 @@
+A kind of FAQ for libreadline on Debian GNU/{Linux,Hurd}
+--------------------------------------------------------
+
+0. symlinked directory completion behavior
+
+   Starting with readline-4.2a, completion on symlinks that point
+   to directories does not append the slash. To restore the behaviour
+   found in readline-4.2, add to /etc/inputrc or ~/.inputrc:
+
+       set mark-symlinked-directories on
+
+1. reenable the paren matching feature in readline-4.1
+
+   Add to /etc/inputrc or ~/.inputrc:
+
+       set blink-matching-paren on
+
+2. key bindings for ESC
+
+   Consider the following .inputrc:
+
+   set editing-mode vi
+
+   keymap vi
+       "\M-[D":        backward-char
+       "\M-[C":        forward-char
+       "\M-[A":        previous-history
+       "\M-[B":        next-history
+
+   And, just to be certain, set -o reports that vi is on.
+
+   However, ESC k does not send me to the previous line.
+
+   I'm guessing that this is a conflict between bash's concept of a meta
+   keymap and its concept of vi's command-mode character -- which is to
+   say that its data structures don't properly reflect its implementation.
+
+   Note that if I remove the meta prefix, leaving lines like:
+       "[A":        previous-history
+
+   That vi command mode keys work fine, and I can use the arrow keys in vi
+   mode, *provided I'm already in command mode already*.  In other words,
+   bash is doing something wrong here such that it doesn't see the escape
+   character at the begining of the key sequence even when in vi insert mode.
+
+   Comment from the upstream author: "This guy destroyed the key binding for
+   ESC, which effectively disabled vi command mode.  It's not as simple as he
+   paints it to be -- the binding for ESC in the vi insertion keymap *must*
+   be a function because of the other things needed when switching
+   from insert mode to command mode.
+
+   If he wants to change something in vi's command mode, he needs
+   to use `set keymap vi-command' and enter key bindings without
+   the \M- prefix (as he discovered)."
--- readline5-5.2.orig/rrr
+++ readline5-5.2/rrr
@@ -0,0 +1,111 @@
+From VM Tue Dec 19 16:21:59 2006
+Content-Length: 1192
+X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
+	["1192" "Friday" "15" "December" "2006" "12:01:08" "-0500" "Chet Ramey" "chet.ramey@case.edu" nil "41" "Readline-5.2 Official Patch 1" "^From:" nil nil "12" nil nil nil nil nil nil nil nil nil]
+	nil)
+Received: from cartero.cs.tu-berlin.de (cartero.cs.tu-berlin.de [130.149.17.20])
+	by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id SAA09442
+	for <doko@cs.tu-berlin.de>; Fri, 15 Dec 2006 18:06:50 +0100 (MET)
+Received: from localhost (localhost [127.0.0.1])
+	by localhost-10025.cs.tu-berlin.de (Postfix) with ESMTP id B7AA91AA2D
+	for <doko@cs.tu-berlin.de>; Fri, 15 Dec 2006 18:06:50 +0100 (MET)
+Received: from cartero.cs.tu-berlin.de ([127.0.0.1])
+ by localhost (mail.cs.tu-berlin.de [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 07325-16 for <doko@cs.tu-berlin.de>;
+ Fri, 15 Dec 2006 18:06:46 +0100 (MET) 14822
+Received: from master.debian.org (master.debian.org [70.103.162.29])
+	by cartero.cs.tu-berlin.de (Postfix) with ESMTP
+	for <doko@cs.tu-berlin.de>; Fri, 15 Dec 2006 18:06:42 +0100 (MET)
+Received: from lists.gnu.org ([199.232.76.165])
+	by master.debian.org with esmtp (Exim 4.50)
+	id 1GvGW5-00007e-Pq
+	for doko@cs.tu-berlin.de; Fri, 15 Dec 2006 17:06:38 +0000
+Received: from localhost ([127.0.0.1] helo=lists.gnu.org)
+	by lists.gnu.org with esmtp (Exim 4.43)
+	id 1GvGW3-0001AV-BJ
+	for doko@debian.org; Fri, 15 Dec 2006 12:06:35 -0500
+Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
+	id 1GvGRS-00073b-6a
+	for bug-bash@gnu.org; Fri, 15 Dec 2006 12:01:50 -0500
+Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
+	id 1GvGRQ-000729-Qz
+	for bug-bash@gnu.org; Fri, 15 Dec 2006 12:01:48 -0500
+Received: from [199.232.76.173] (helo=monty-python.gnu.org)
+	by lists.gnu.org with esmtp (Exim 4.43)
+	id 1GvGRO-0006zn-No; Fri, 15 Dec 2006 12:01:46 -0500
+Received: from [129.22.105.34] (helo=mpv4.tis.cwru.edu)
+	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_3DES_EDE_CBC_SHA:24)
+	(Exim 4.52) id 1GvGRM-00051Q-Ul; Fri, 15 Dec 2006 12:01:45 -0500
+Received: from caleb.ins.cwru.edu (caleb.INS.CWRU.Edu [129.22.8.211])
+	by mpv4.tis.cwru.edu (MOS 3.8.2-GA) with SMTP id BWZ92380;
+	Fri, 15 Dec 2006 12:01:44 -0500 (EST)
+Message-ID: <061215170108.AA06326.SM@caleb.ins.cwru.edu>
+Read-Receipt-To: chet.ramey@case.edu
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+X-BeenThere: bug-bash@gnu.org
+X-Mailman-Version: 2.1.5
+Precedence: list
+Reply-To: chet.ramey@case.edu
+List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
+List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-bash>,
+	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://lists.gnu.org/pipermail/bug-bash>
+List-Post: <mailto:bug-bash@gnu.org>
+List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
+List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-bash>,
+	<mailto:bug-bash-request@gnu.org?subject=subscribe>
+Errors-To: bug-bash-bounces+doko=debian.org@gnu.org
+X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de (including spamassassin)
+X-Spam-Status: No, score=-2.598 required=3 addr=doko@cs.tu-berlin.de
+ tests=[BAYES_00=-2.599, UNPARSEABLE_RELAY=0.001]
+X-Spam-Score: -2.598
+X-Spam-Level: 
+From: Chet Ramey <chet.ramey@case.edu>
+Sender: bug-bash-bounces+doko=debian.org@gnu.org
+To: bug-bash@gnu.org, bug-readline@gnu.org
+Cc: chet@case.edu
+Subject: Readline-5.2 Official Patch 1
+Date: Fri, 15 Dec 2006 12:01:08 -0500
+
+			   READLINE PATCH REPORT
+			   =====================
+
+Readline-Release: 5.2
+Patch-ID: readline52-001
+
+Bug-Reported-by:	ebb9@byu.net
+Bug-Reference-ID:	<45540862.9030900@byu.net>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00017.html
+			http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00016.html
+
+Bug-Description:
+
+In some cases, code that is intended to be used in the presence of multibyte
+characters is called when no such characters are present, leading to incorrect
+display position calculations and incorrect redisplay.
+
+Patch:
+
+*** ../readline-5.2/display.c	Thu Sep 14 14:20:12 2006
+--- display.c	Mon Nov 13 17:55:57 2006
+***************
+*** 2381,2384 ****
+--- 2409,2414 ----
+    if (end <= start)
+      return 0;
++   if (MB_CUR_MAX == 1 || rl_byte_oriented)
++     return (end - start);
+  
+    memset (&ps, 0, sizeof (mbstate_t));
+
+-- 
+``The lyf so short, the craft so long to lerne.'' - Chaucer
+		       Live Strong.  No day but today.
+Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/
+
+
+_______________________________________________
+Bug-bash mailing list
+Bug-bash@gnu.org
+http://lists.gnu.org/mailman/listinfo/bug-bash
