Fix formatting exception in io:format.

Obtained from:	Hans Bolinder <hans.bolinder(at)ericsson.com>
This commit is contained in:
Jimmy Olgeni 2007-02-23 20:14:54 +00:00
parent b184568387
commit 54a7124a42
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=185755
4 changed files with 34 additions and 2 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= erlang
PORTVERSION= r11b3
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \

View File

@ -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,

View File

@ -7,7 +7,7 @@
PORTNAME= erlang
PORTVERSION= r11b3
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \

View File

@ -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,