From 7958c306c9134211323ba2e641cf56956a9663b7 Mon Sep 17 00:00:00 2001 From: olgeni Date: Fri, 23 Feb 2007 20:14:54 +0000 Subject: Fix formatting exception in io:format. Obtained from: Hans Bolinder --- lang/erlang/Makefile | 2 +- .../files/patch-lib_stdlib_src_io__lib__pretty.erl | 16 ++++++++++++++++ lang/erlang14/Makefile | 2 +- .../files/patch-lib_stdlib_src_io__lib__pretty.erl | 16 ++++++++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 lang/erlang/files/patch-lib_stdlib_src_io__lib__pretty.erl create mode 100644 lang/erlang14/files/patch-lib_stdlib_src_io__lib__pretty.erl (limited to 'lang') diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index 5065c6f97900..a94778ac80e2 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -7,7 +7,7 @@ PORTNAME= erlang PORTVERSION= r11b3 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= lang parallel MASTER_SITES= http://www.erlang.org/download/ \ diff --git a/lang/erlang/files/patch-lib_stdlib_src_io__lib__pretty.erl b/lang/erlang/files/patch-lib_stdlib_src_io__lib__pretty.erl new file mode 100644 index 000000000000..0f3305e2fd57 --- /dev/null +++ b/lang/erlang/files/patch-lib_stdlib_src_io__lib__pretty.erl @@ -0,0 +1,16 @@ + +$FreeBSD$ + +--- lib/stdlib/src/io_lib_pretty.erl.orig ++++ lib/stdlib/src/io_lib_pretty.erl +@@ -159,7 +159,9 @@ + %% Reuse the list created by io_lib:write_binary()... + pp_binary([LT,LT,S,GT,GT], Col, Ll, Ind, LD) -> + N = max(8, Ll - Col - LD), +- [LT,LT,pp_binary(S, N, N, Ind),GT,GT]. ++ [LT,LT,pp_binary(S, N, N, Ind),GT,GT]; ++pp_binary(S, _Col, _Ll, _Ind, _LD) -> ++ S. + + pp_binary([BS, $, | S], N, N0, Ind) -> + Len = length(BS) + 1, diff --git a/lang/erlang14/Makefile b/lang/erlang14/Makefile index 5065c6f97900..a94778ac80e2 100644 --- a/lang/erlang14/Makefile +++ b/lang/erlang14/Makefile @@ -7,7 +7,7 @@ PORTNAME= erlang PORTVERSION= r11b3 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= lang parallel MASTER_SITES= http://www.erlang.org/download/ \ diff --git a/lang/erlang14/files/patch-lib_stdlib_src_io__lib__pretty.erl b/lang/erlang14/files/patch-lib_stdlib_src_io__lib__pretty.erl new file mode 100644 index 000000000000..0f3305e2fd57 --- /dev/null +++ b/lang/erlang14/files/patch-lib_stdlib_src_io__lib__pretty.erl @@ -0,0 +1,16 @@ + +$FreeBSD$ + +--- lib/stdlib/src/io_lib_pretty.erl.orig ++++ lib/stdlib/src/io_lib_pretty.erl +@@ -159,7 +159,9 @@ + %% Reuse the list created by io_lib:write_binary()... + pp_binary([LT,LT,S,GT,GT], Col, Ll, Ind, LD) -> + N = max(8, Ll - Col - LD), +- [LT,LT,pp_binary(S, N, N, Ind),GT,GT]. ++ [LT,LT,pp_binary(S, N, N, Ind),GT,GT]; ++pp_binary(S, _Col, _Ll, _Ind, _LD) -> ++ S. + + pp_binary([BS, $, | S], N, N0, Ind) -> + Len = length(BS) + 1, -- cgit