diff -u nano-2.0.7/debian/control nano-2.0.7/debian/control --- nano-2.0.7/debian/control +++ nano-2.0.7/debian/control @@ -1,9 +1,10 @@ Source: nano Section: editors Priority: optional -Maintainer: Jordi Mallach +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Jordi Mallach Uploaders: Steve Langasek -Build-Depends: dpkg-dev (>= 1.13.9), libncurses5-dev, libncursesw5-dev, libslang2-dev, debhelper (>= 5.0.22) +Build-Depends: dpkg-dev (>= 1.13.9), libncurses5-dev, libncursesw5-dev, libslang2-dev, debhelper (>= 5.0.22), dpatch Standards-Version: 3.7.3.0 Homepage: http://www.nano-editor.org/ diff -u nano-2.0.7/debian/rules nano-2.0.7/debian/rules --- nano-2.0.7/debian/rules +++ nano-2.0.7/debian/rules @@ -34,7 +34,7 @@ --sysconfdir=/etc $(confflags) build: build-stamp -build-stamp: build-arch +build-stamp: patch build-arch build-arch: build-nano-stamp build-tiny-stamp build-udeb-stamp build-nano-stamp: build-nano @@ -71,7 +71,7 @@ $(MAKE) CFLAGS="$(CFTINY)" touch build-udeb-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -rf *-stamp @@ -142,2 +142,11 @@ +patch: patch-stamp +patch-stamp: + dpatch apply-all + dpatch cat-all >patch-stamp + +unpatch: + dpatch deapply-all + rm -rf patch-stamp debian/patched + binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +.PHONY: build clean binary-indep binary-arch binary install patch unpatch diff -u nano-2.0.7/debian/changelog nano-2.0.7/debian/changelog --- nano-2.0.7/debian/changelog +++ nano-2.0.7/debian/changelog @@ -1,3 +1,11 @@ +nano (2.0.7-1ubuntu1) hardy; urgency=low + + * debian/patches/01_helpwrapping: + - To avoid to freeze when fail to find blank character, + force line break. (LP: #201769, #188611) + + -- Mitsuya Shibata Thu, 13 Mar 2008 21:35:34 +0900 + nano (2.0.7-1) unstable; urgency=low * The "Volem TV3" release. only in patch2: unchanged: --- nano-2.0.7.orig/debian/patches/00list +++ nano-2.0.7/debian/patches/00list @@ -0,0 +1 @@ +01_helpwrapping only in patch2: unchanged: --- nano-2.0.7.orig/debian/patches/01_helpwrapping.dpatch +++ nano-2.0.7/debian/patches/01_helpwrapping.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_helpwrapping.dpatch by Mitsuya Shibata +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad nano-2.0.7~/src/text.c nano-2.0.7/src/text.c +--- nano-2.0.7~/src/text.c 2007-12-18 10:28:53.000000000 +0900 ++++ nano-2.0.7/src/text.c 2008-03-13 21:08:28.000000000 +0900 +@@ -800,6 +800,15 @@ + /* In fact, the whole line displays shorter than goal. */ + return cur_loc; + ++#ifndef DISABLE_HELP ++ if (newline && blank_loc <= 0) { ++ /* If blank was not found or was found only first character, ++ * force line break. */ ++ cur_loc -= line_len; ++ return cur_loc; ++ } ++#endif ++ + if (blank_loc == -1) { + /* No blank was found that was short enough. */ + bool found_blank = FALSE;