[Pkg-ocaml-maint-commits] [SCM] headache packaging branch, master, updated. debian/1.03-21-1-g1cbb2d6

Mehdi Dogguy mehdi at debian.org
Thu Jan 5 13:38:11 UTC 2012


The following commit has been merged in the master branch:
commit 1cbb2d64ac84934a499f4f63957ddd8d15579cab
Author: Mehdi Dogguy <mehdi at debian.org>
Date:   Thu Jan 5 14:21:56 2012 +0100

    Fix length of lines containing UTF8 characters (Closes: #620379)

diff --git a/debian/changelog b/debian/changelog
index a44387f..7a4b442 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+headache (1.03-22) unstable; urgency=low
+
+  * Fix length of lines containing UTF8 characters (Closes: #620379)
+
+ -- Mehdi Dogguy <mehdi at debian.org>  Thu, 05 Jan 2012 14:21:12 +0100
+
 headache (1.03-21) unstable; urgency=low
 
   [ Ralf Treinen ]
diff --git a/debian/patches/series b/debian/patches/series
index bd997d9..7f376ec 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 02_skip_begin
 03_header_width
 config_file_types
+utf8_length
diff --git a/debian/patches/utf8_length b/debian/patches/utf8_length
new file mode 100644
index 0000000..e119c1e
--- /dev/null
+++ b/debian/patches/utf8_length
@@ -0,0 +1,55 @@
+--- a/main.ml
++++ b/main.ml
+@@ -103,7 +103,7 @@
+   in
+   let header_width =
+     List.fold_left 
+-      (fun w line -> max (String.length line) w)  
++      (fun w line -> max (UTF8.length line) w)  
+       0
+       header
+   in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -51,10 +51,10 @@
+ 	$(OCAMLDEP) *.ml *.mli > Depend
+ 
+ headache: $(CMO)
+-	ocamlc -o $@ unix.cma str.cma $^
++	ocamlc -o $@ unix.cma str.cma -I +extlib extLib.cma $^
+ 
+ mkconfig: $(MKCONFIG.CMO)
+-	ocamlc -o $@ unix.cma str.cma $^
++	ocamlc -o $@ unix.cma str.cma -I +extlib extLib.cma $^
+ 
+ config_builtin.ml: config_builtin mkconfig
+ 	./mkconfig
+--- a/model.ml
++++ b/model.ml
+@@ -65,7 +65,7 @@
+ 
+ let arg_char args ?default name =
+   let s = arg_string args ?default name in
+-  if String.length s = 1 then s.[0]
++  if UTF8.length s = 1 then s.[0]
+   else raise (Error (sprintf "parameter %s expects a character" name))
+ 
+     
+@@ -103,7 +103,7 @@
+       output_string oc open_comment;
+       output_string oc margin;
+       output_string oc string;
+-      output oc white 0 (max 0 (real_width - String.length string));
++      output oc white 0 (max 0 (real_width - UTF8.length string));
+       output_string oc margin;
+       output_string oc close_comment;
+       output_char oc '\n'
+@@ -150,7 +150,7 @@
+ 	while
+           let s = input_line ic in
+             not (Str.string_match regexp_end s
+-                   (max 0 (String.length s - end_length)))
++                   (max 0 (UTF8.length s - end_length)))
+         do () done;
+ 	""
+       end

-- 
headache packaging



More information about the Pkg-ocaml-maint-commits mailing list