[Dctrl-tools-devel] [SCM] Debian control file query tools branch, master, updated. 2.14-3-g179ff87

Antti-Juhani Kaijanaho ajk at debian.org
Sat Dec 12 13:21:03 UTC 2009


The following commit has been merged in the master branch:
commit 179ff8796096d983565ebc9384abfe25712d5344
Author: Antti-Juhani Kaijanaho <ajk at debian.org>
Date:   Sat Dec 12 15:20:54 2009 +0200

    tbl-dctrl (linewrap): Force a line break where the field has one.
    
    Signed-off-by: Antti-Juhani Kaijanaho <ajk at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 9715860..b1bcb9b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@ dctrl-tools (2.15) UNRELEASED; urgency=low
 
   * tbl-dctrl: Fix field line length detection for multi-line fields
     - Reported by Gerfried Fuchs <rhonda at debian.at> out of band.
+  * tbl-dctrl (linewrap): Force a line break where the field has one.
 
- -- Antti-Juhani Kaijanaho <ajk at debian.org>  Sat, 12 Dec 2009 15:06:14 +0200
+ -- Antti-Juhani Kaijanaho <ajk at debian.org>  Sat, 12 Dec 2009 15:20:20 +0200
 
 dctrl-tools (2.14) unstable; urgency=low
 
diff --git a/tbl-dctrl/tbl-dctrl.c b/tbl-dctrl/tbl-dctrl.c
index 60026ae..e136869 100644
--- a/tbl-dctrl/tbl-dctrl.c
+++ b/tbl-dctrl/tbl-dctrl.c
@@ -98,6 +98,13 @@ size_t linewrap(char **res, char const *orig, size_t orig_len,
 
 	mblen(NULL, 0);
 	for (size_t i = 0; i < orig_len; /**/) {
+                if (orig[i] == '\n') {
+                        i++;
+                        ll = 0;
+                        INSERT('\n');
+                        num_lines++;
+                        continue;
+                }
 		if (ll == col_width) {
 			if (rv[bpr] == '\n') {
 				// no suitable breakpoint on this line,

-- 
Debian control file query tools



More information about the Dctrl-tools-devel mailing list