aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/doc/src/asn1ct.xml6
-rw-r--r--lib/asn1/src/asn1ct_gen.erl16
-rw-r--r--lib/asn1/src/asn1rt_ber_bin.erl157
-rw-r--r--lib/compiler/src/sys_expand_pmod.erl30
-rw-r--r--lib/compiler/test/pmod_SUITE.erl24
-rw-r--r--lib/compiler/test/pmod_SUITE_data/pmod_basic.erl17
-rw-r--r--lib/docbuilder/vsn.mk6
-rw-r--r--lib/mnesia/doc/src/notes.xml35
-rw-r--r--lib/mnesia/src/mnesia.appup.src32
-rw-r--r--lib/mnesia/vsn.mk5
-rw-r--r--lib/os_mon/src/cpu_sup.erl37
-rw-r--r--lib/parsetools/include/yeccpre.hrl39
-rw-r--r--lib/parsetools/src/yecc.erl49
-rw-r--r--lib/parsetools/src/yeccparser.erl39
-rw-r--r--lib/percept/src/egd.erl38
-rw-r--r--lib/percept/src/egd.hrl16
-rw-r--r--lib/percept/src/egd_render.erl22
-rw-r--r--lib/percept/src/percept.erl56
-rw-r--r--lib/percept/src/percept.hrl21
-rw-r--r--lib/percept/src/percept_db.erl31
-rw-r--r--lib/percept/src/percept_html.erl52
-rw-r--r--lib/runtime_tools/src/percept_profile.erl35
-rw-r--r--lib/sasl/src/sasl.app.src12
-rw-r--r--lib/sasl/src/sasl.erl14
-rw-r--r--lib/tools/emacs/erlang-skels-old.el10
-rw-r--r--lib/tools/emacs/erlang-skels.el429
-rw-r--r--lib/wx/api_gen/wx_gen.erl33
-rw-r--r--lib/wx/doc/src/notes.xml58
-rw-r--r--lib/wx/examples/demo/demo_html_tagger.erl12
-rw-r--r--lib/wx/vsn.mk5
-rw-r--r--lib/xmerl/doc/src/notes.xml20
-rw-r--r--lib/xmerl/vsn.mk20
32 files changed, 884 insertions, 492 deletions
diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml
index 114578b1b4..8a0ae52c39 100644
--- a/lib/asn1/doc/src/asn1ct.xml
+++ b/lib/asn1/doc/src/asn1ct.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>asn1ct</title>
diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl
index f0f253be70..b9f6c46b53 100644
--- a/lib/asn1/src/asn1ct_gen.erl
+++ b/lib/asn1/src/asn1ct_gen.erl
@@ -1,26 +1,26 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%%
-module(asn1ct_gen).
-include("asn1_records.hrl").
-%%-compile(export_all).
+
-export([pgen_exports/3,
pgen_hrl/4,
gen_head/3,
@@ -1301,8 +1301,8 @@ put_chars(undefined,X) ->
put_chars(Y,X) ->
io:put_chars(Y,X).
-fopen(F, Mode) ->
- case file:open(F, Mode) of
+fopen(F, ModeList) ->
+ case file:open(F, ModeList) of
{ok, Fd} ->
Fd;
{error, Reason} ->
diff --git a/lib/asn1/src/asn1rt_ber_bin.erl b/lib/asn1/src/asn1rt_ber_bin.erl
index 71d78377d4..ab04d981b0 100644
--- a/lib/asn1/src/asn1rt_ber_bin.erl
+++ b/lib/asn1/src/asn1rt_ber_bin.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2000-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2000-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%%
@@ -179,7 +179,7 @@ restbytes2(_RemBytes,Bytes,noext) ->
exit({error,{asn1, {unexpected,Bytes}}});
restbytes2(RemBytes,Bytes,ext) ->
%% {RemBytes,0}.
- {RemBytes,size(Bytes)}.
+ {RemBytes,byte_size(Bytes)}.
@@ -256,8 +256,6 @@ skip_ExtensionAdditions(Bytes,Tags,RmB) ->
end
end.
-
-
%%===============================================================================
%%===============================================================================
%%===============================================================================
@@ -339,7 +337,7 @@ peek_tag(<<PartialTag,Buffer/binary>>, TagAck) ->
peek_tag(Buffer,<<TagAck/binary,PartialTag>>);
peek_tag(_,TagAck) ->
exit({error,{asn1, {invalid_tag,TagAck}}}).
-%%peek_tag([Tag|Buffer]) when (Tag band 31) == 31 ->
+%%peek_tag([Tag|Buffer]) when (Tag band 31) =:= 31 ->
%% [Tag band 2#11011111 | peek_tag(Buffer,[])];
%%%% single tag (tagno < 31)
%%peek_tag([Tag|Buffer]) ->
@@ -474,8 +472,7 @@ encode_tags2([Tag|Trest], BytesSoFar, LenSoFar) ->
encode_tags2([], BytesSoFar, LenSoFar) ->
{BytesSoFar,LenSoFar}.
-encode_tags1([Tag1, Tag2| Trest], Acc)
- when Tag1#tag.type == 'IMPLICIT' ->
+encode_tags1([Tag1, Tag2| Trest], Acc) when Tag1#tag.type =:= 'IMPLICIT' ->
encode_tags1([Tag1#tag{type=Tag2#tag.type,form=Tag2#tag.form}|Trest],Acc);
encode_tags1([Tag1 | Trest], Acc) ->
encode_tags1(Trest, [Tag1|Acc]);
@@ -483,7 +480,7 @@ encode_tags1([], Acc) ->
Acc. % the resulting tags are returned in reverse order
encode_one_tag(Bin) when is_binary(Bin) ->
- {Bin,size(Bin)};
+ {Bin,byte_size(Bin)};
encode_one_tag(#tag{class=Class,number=No,type=Type, form = Form}) ->
NewForm = case Type of
'EXPLICIT' ->
@@ -506,11 +503,6 @@ encode_one_tag(#tag{class=Class,number=No,type=Type, form = Form}) ->
% [encode_tag_val({NewClass, OldForm, NewTagNr}) | Buffer1].
-
-
-
-
-
%%===============================================================================
%%
%% This comment is valid for all the encode/decode functions
@@ -533,20 +525,19 @@ encode_one_tag(#tag{class=Class,number=No,type=Type, form = Form}) ->
%% This version does not consider Explicit tagging of the open type. It
%% is only left because of backward compatibility.
encode_open_type(Val) when is_list(Val) ->
- {Val,size(list_to_binary(Val))};
+ {Val, byte_size(list_to_binary(Val))};
encode_open_type(Val) ->
- {Val, size(Val)}.
+ {Val, byte_size(Val)}.
%%
encode_open_type(Val, []) when is_list(Val) ->
- {Val,size(list_to_binary(Val))};
-encode_open_type(Val,[]) ->
- {Val, size(Val)};
+ {Val, byte_size(list_to_binary(Val))};
+encode_open_type(Val, []) ->
+ {Val, byte_size(Val)};
encode_open_type(Val, Tag) when is_list(Val) ->
- encode_tags(Tag,Val,size(list_to_binary(Val)));
-encode_open_type(Val,Tag) ->
- encode_tags(Tag,Val, size(Val)).
-
+ encode_tags(Tag, Val, byte_size(list_to_binary(Val)));
+encode_open_type(Val, Tag) ->
+ encode_tags(Tag, Val, byte_size(Val)).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -652,8 +643,6 @@ decode_boolean2(Buffer, _) ->
exit({error,{asn1, {decode_boolean, Buffer}}}).
-
-
%%===========================================================================
%% Integer, ITU_T X.690 Chapter 8.3
@@ -664,7 +653,7 @@ decode_boolean2(Buffer, _) ->
%%===========================================================================
encode_integer(C, Val, []) when is_integer(Val) ->
- {EncVal,Len}=encode_integer(C, Val),
+ {EncVal,Len} = encode_integer(C, Val),
dotag_universal(?N_INTEGER,EncVal,Len);
encode_integer(C, Val, Tag) when is_integer(Val) ->
dotag(Tag, ?N_INTEGER, encode_integer(C, Val));
@@ -674,10 +663,9 @@ encode_integer(_, Val, _) ->
exit({error,{asn1, {encode_integer, Val}}}).
-
encode_integer(C, Val, NamedNumberList, Tag) when is_atom(Val) ->
- case lists:keysearch(Val, 1, NamedNumberList) of
- {value,{_, NewVal}} ->
+ case lists:keyfind(Val, 1, NamedNumberList) of
+ {_, NewVal} ->
dotag(Tag, ?N_INTEGER, encode_integer(C, NewVal));
_ ->
exit({error,{asn1, {encode_integer_namednumber, Val}}})
@@ -688,8 +676,6 @@ encode_integer(C, Val, _NamedNumberList, Tag) ->
dotag(Tag, ?N_INTEGER, encode_integer(C, Val)).
-
-
encode_integer(_C, Val) ->
Bytes =
if
@@ -716,7 +702,6 @@ encode_integer_neg(N, Acc) ->
%% (Buffer, Range, NamedNumberList, HasTag, TotalLen) -> {Integer, Remain, RemovedBytes}
%%===============================================================================
-
decode_integer(Buffer, Range, Tags, OptOrMand) ->
NewTags = new_tags(Tags,#tag{class=?UNIVERSAL,number=?N_INTEGER}),
decode_integer_notag(Buffer, Range, [], NewTags, OptOrMand).
@@ -748,8 +733,8 @@ resolve_named_value(Result={Val,Buffer,RemBytes},NamedNumberList) ->
case NamedNumberList of
[] -> Result;
_ ->
- NewVal = case lists:keysearch(Val, 2, NamedNumberList) of
- {value,{NamedVal, _}} ->
+ NewVal = case lists:keyfind(Val, 2, NamedNumberList) of
+ {NamedVal, _} ->
NamedVal;
_ ->
Val
@@ -778,10 +763,10 @@ check_integer_constraint(Result={Val, _Buffer,_},Range) ->
%% encode enumerated value
%%============================================================================
-encode_enumerated(Val, []) when is_integer(Val)->
+encode_enumerated(Val, []) when is_integer(Val) ->
{EncVal,Len} = encode_integer(false,Val),
dotag_universal(?N_ENUMERATED,EncVal,Len);
-encode_enumerated(Val, DoTag) when is_integer(Val)->
+encode_enumerated(Val, DoTag) when is_integer(Val) ->
dotag(DoTag, ?N_ENUMERATED, encode_integer(false,Val));
encode_enumerated({Name,Val}, DoTag) when is_atom(Name) ->
encode_enumerated(Val, DoTag).
@@ -797,11 +782,11 @@ encode_enumerated(C, Val, {NamedNumberList,ExtList}, DoTag) when is_atom(Val) ->
end;
encode_enumerated(C, Val, NamedNumberList, DoTag) when is_atom(Val) ->
- case lists:keysearch(Val, 1, NamedNumberList) of
- {value, {_, NewVal}} when DoTag == []->
+ case lists:keyfind(Val, 1, NamedNumberList) of
+ {_, NewVal} when DoTag =:= [] ->
{EncVal,Len} = encode_integer(C,NewVal),
dotag_universal(?N_ENUMERATED,EncVal,Len);
- {value, {_, NewVal}} ->
+ {_, NewVal} ->
dotag(DoTag, ?N_ENUMERATED, encode_integer(C, NewVal));
_ ->
exit({error,{asn1, {enumerated_not_in_range, Val}}})
@@ -874,8 +859,8 @@ decode_enumerated_notag(Buffer, Range, NNList, Tags, OptOrMand) ->
decode_enumerated1(Val, NamedNumberList) ->
%% it must be a named integer
- case lists:keysearch(Val, 2, NamedNumberList) of
- {value,{NamedVal, _}} ->
+ case lists:keyfind(Val, 2, NamedNumberList) of
+ {NamedVal, _} ->
NamedVal;
_ ->
{asn1_enum,Val}
@@ -1220,32 +1205,32 @@ encode_bin_bit_string(C,{Unused,BinBits},_NamedBitList,DoTag)->
remove_unused_then_dotag(DoTag,StringType,Unused,BinBits) ->
case Unused of
- 0 when (size(BinBits) == 0),DoTag==[] ->
+ 0 when (byte_size(BinBits) =:= 0), DoTag =:= [] ->
%% time optimization of next case
{[StringType,1,0],3};
- 0 when (size(BinBits) == 0) ->
+ 0 when (byte_size(BinBits) =:= 0) ->
dotag(DoTag,StringType,{<<0>>,1});
- 0 when DoTag==[]-> % time optimization of next case
+ 0 when DoTag =:= [] -> % time optimization of next case
dotag_universal(StringType,[Unused|[BinBits]],size(BinBits)+1);
% {LenEnc,Len} = encode_legth(size(BinBits)+1),
% {[StringType,LenEnc,[Unused|BinBits]],size(BinBits)+1+Len+1};
0 ->
dotag(DoTag,StringType,<<Unused,BinBits/binary>>);
- Num when DoTag == [] -> % time optimization of next case
- N = (size(BinBits)-1),
+ Num when DoTag =:= [] -> % time optimization of next case
+ N = byte_size(BinBits) - 1,
<<BBits:N/binary,LastByte>> = BinBits,
dotag_universal(StringType,
[Unused,BBits,(LastByte bsr Num) bsl Num],
- size(BinBits)+1);
+ byte_size(BinBits) + 1);
% {LenEnc,Len} = encode_legth(size(BinBits)+1),
% {[StringType,LenEnc,[Unused,BBits,(LastByte bsr Num) bsl Num],
% 1+Len+size(BinBits)+1};
Num ->
- N = (size(BinBits)-1),
+ N = byte_size(BinBits) - 1,
<<BBits:N/binary,LastByte>> = BinBits,
dotag(DoTag,StringType,{[Unused,binary_to_list(BBits) ++
[(LastByte bsr Num) bsl Num]],
- 1+size(BinBits)})
+ byte_size(BinBits) + 1})
end.
@@ -1291,8 +1276,8 @@ encode_bit_string_named(C, [FirstVal | RestVal], NamedBitList, DoTag) ->
get_all_bitposes([{bit,ValPos}|Rest], NamedBitList, Ack) ->
get_all_bitposes(Rest, NamedBitList, [ValPos | Ack ]);
get_all_bitposes([Val | Rest], NamedBitList, Ack) when is_atom(Val) ->
- case lists:keysearch(Val, 1, NamedBitList) of
- {value, {_ValName, ValPos}} ->
+ case lists:keyfind(Val, 1, NamedBitList) of
+ {_ValName, ValPos} ->
get_all_bitposes(Rest, NamedBitList, [ValPos | Ack]);
_ ->
exit({error,{asn1, {bitstring_namedbit, Val}}})
@@ -1320,10 +1305,6 @@ make_and_set_list(Len, [], XPos) ->
[0 | make_and_set_list(Len - 1, [], XPos + 1)].
-
-
-
-
%%=================================================================
%% Encode bit string for lists of ones and zeroes
%%=================================================================
@@ -1342,7 +1323,7 @@ encode_bit_string_bits(C, BitListVal, _NamedBitList, DoTag) when is_list(BitList
encode_constr_bit_str_bits(Constr,BitListVal,DoTag);
Size ->
case length(BitListVal) of
- BitSize when BitSize == Size ->
+ BitSize when BitSize =:= Size ->
encode_bitstring(BitListVal);
BitSize when BitSize < Size ->
PaddedList =
@@ -1399,7 +1380,7 @@ encode_constr_bit_str_bits({Min,Max},BitListVal,_DoTag) ->
%% as the most significant elements followed by padded zero elements
pad_bit_list(Size,BitListVal) ->
Tail = lists:duplicate(Size,0),
- lists:append(BitListVal,Tail).
+ BitListVal ++ Tail.
%%=================================================================
%% Do the actual encoding
@@ -1513,7 +1494,6 @@ decode_bitstring2(Len, Unused,
%% Decode the bitlist to names
%%----------------------------------------
-
decode_bitstring_NNL(BitList,NamedNumberList) ->
decode_bitstring_NNL(BitList,NamedNumberList,0,[]).
@@ -1523,15 +1503,15 @@ decode_bitstring_NNL([],_,_No,Result) ->
decode_bitstring_NNL([B|BitList],[{Name,No}|NamedNumberList],No,Result) ->
if
- B == 0 ->
+ B =:= 0 ->
decode_bitstring_NNL(BitList,NamedNumberList,No+1,Result);
true ->
decode_bitstring_NNL(BitList,NamedNumberList,No+1,[Name|Result])
end;
decode_bitstring_NNL([1|BitList],NamedNumberList,No,Result) ->
- decode_bitstring_NNL(BitList,NamedNumberList,No+1,[{bit,No}|Result]);
+ decode_bitstring_NNL(BitList,NamedNumberList,No+1,[{bit,No}|Result]);
decode_bitstring_NNL([0|BitList],NamedNumberList,No,Result) ->
- decode_bitstring_NNL(BitList,NamedNumberList,No+1,Result).
+ decode_bitstring_NNL(BitList,NamedNumberList,No+1,Result).
%%============================================================================
@@ -1542,18 +1522,18 @@ decode_bitstring_NNL([0|BitList],NamedNumberList,No,Result) ->
%% the function does not check this because it takes to much time
%%============================================================================
encode_octet_string(_C, OctetList, []) when is_binary(OctetList) ->
- dotag_universal(?N_OCTET_STRING,OctetList,size(OctetList));
+ dotag_universal(?N_OCTET_STRING,OctetList,byte_size(OctetList));
encode_octet_string(_C, OctetList, DoTag) when is_binary(OctetList) ->
- dotag(DoTag, ?N_OCTET_STRING, {OctetList,size(OctetList)});
+ dotag(DoTag, ?N_OCTET_STRING, {OctetList,byte_size(OctetList)});
encode_octet_string(_C, OctetList, DoTag) when is_list(OctetList) ->
case length(OctetList) of
- Len when DoTag == [] ->
+ Len when DoTag =:= [] ->
dotag_universal(?N_OCTET_STRING,OctetList,Len);
Len ->
dotag(DoTag, ?N_OCTET_STRING, {OctetList,Len})
end;
-% encode_octet_string(C, OctetList, DoTag) when is_list(OctetList) ->
-% dotag(DoTag, ?N_OCTET_STRING, {OctetList,length(OctetList)});
+%% encode_octet_string(C, OctetList, DoTag) when is_list(OctetList) ->
+%% dotag(DoTag, ?N_OCTET_STRING, {OctetList,length(OctetList)});
encode_octet_string(C, {Name,OctetList}, DoTag) when is_atom(Name) ->
encode_octet_string(C, OctetList, DoTag).
@@ -1565,7 +1545,7 @@ encode_octet_string(C, {Name,OctetList}, DoTag) when is_atom(Name) ->
%% Octet string is decoded as a restricted string
%%============================================================================
decode_octet_string(Buffer, Range, Tags, TotalLen, OptOrMand) ->
-% NewTags = new_tags(HasTag,#tag{class=?UNIVERSAL,number=?N_OCTET_STRING}),
+%% NewTags = new_tags(HasTag,#tag{class=?UNIVERSAL,number=?N_OCTET_STRING}),
decode_restricted_string(Buffer, Range, ?N_OCTET_STRING,
Tags, TotalLen, [], OptOrMand,old).
@@ -1753,17 +1733,17 @@ decode_relative_oid_notag(Buffer, Tags, OptOrMand) ->
%%============================================================================
encode_restricted_string(_C, OctetList, StringType, [])
when is_binary(OctetList) ->
- dotag_universal(StringType,OctetList,size(OctetList));
+ dotag_universal(StringType, OctetList, byte_size(OctetList));
encode_restricted_string(_C, OctetList, StringType, DoTag)
when is_binary(OctetList) ->
- dotag(DoTag, StringType, {OctetList, size(OctetList)});
+ dotag(DoTag, StringType, {OctetList, byte_size(OctetList)});
encode_restricted_string(_C, OctetList, StringType, [])
when is_list(OctetList) ->
- dotag_universal(StringType,OctetList,length(OctetList));
+ dotag_universal(StringType, OctetList, length(OctetList));
encode_restricted_string(_C, OctetList, StringType, DoTag)
when is_list(OctetList) ->
dotag(DoTag, StringType, {OctetList, length(OctetList)});
-encode_restricted_string(C,{Name,OctetL},StringType,DoTag) when is_atom(Name)->
+encode_restricted_string(C,{Name,OctetL},StringType,DoTag) when is_atom(Name) ->
encode_restricted_string(C, OctetL, StringType, DoTag).
%%============================================================================
@@ -1793,23 +1773,21 @@ decode_restricted_string_tag(Buffer, Range, StringType, TagsIn, LenIn, NNList, O
LenIn, NNList, OptOrMand, BinOrOld).
-
-
check_and_convert_restricted_string(Val,StringType,Range,NamedNumberList,_BinOrOld) ->
{StrLen,NewVal} = case StringType of
- ?N_BIT_STRING when NamedNumberList /= [] ->
+ ?N_BIT_STRING when NamedNumberList =/= [] ->
{no_check,Val};
?N_BIT_STRING when is_list(Val) ->
{length(Val),Val};
?N_BIT_STRING when is_tuple(Val) ->
{(size(element(2,Val))*8) - element(1,Val),Val};
_ when is_binary(Val) ->
- {size(Val),binary_to_list(Val)};
+ {byte_size(Val),binary_to_list(Val)};
_ when is_list(Val) ->
{length(Val), Val}
end,
case Range of
- _ when StrLen == no_check ->
+ _ when StrLen =:= no_check ->
NewVal;
[] -> % No length constraint
NewVal;
@@ -1832,7 +1810,6 @@ check_and_convert_restricted_string(Val,StringType,Range,NamedNumberList,_BinOrO
NewVal
end.
-
%%=============================================================================
%% Common routines for several string types including bit string
%% handles indefinite length
@@ -1840,7 +1817,7 @@ check_and_convert_restricted_string(Val,StringType,Range,NamedNumberList,_BinOrO
decode_restricted_string_notag(Buffer, _Range, StringType, TagsIn,
- _, NamedNumberList, OptOrMand,BinOrOld) ->
+ _, NamedNumberList, OptOrMand, BinOrOld) ->
%%-----------------------------------------------------------
%% Get inner (the implicit tag or no tag) and
%% outer (the explicit tag) lengths.
@@ -1891,7 +1868,7 @@ decode_restricted_parts(Buffer, RestBytes, [], StringType, RestTags, Len, NNList
{concat_bit_binaries(AccVal, Val), AccRb+Rb};
_ when is_binary(Val),is_binary(AccVal) ->
{<<AccVal/binary,Val/binary>>,AccRb+Rb};
- _ when is_binary(Val), AccVal==[] ->
+ _ when is_binary(Val), AccVal =:= [] ->
{Val,AccRb+Rb};
_ ->
{AccVal++Val, AccRb+Rb}
@@ -1977,16 +1954,14 @@ mk_universal_string([A,B,C,D|T],Acc) ->
%% encode UTF8 string
%%============================================================================
encode_UTF8_string(_,UTF8String,[]) when is_binary(UTF8String) ->
- dotag_universal(?N_UTF8String,UTF8String,size(UTF8String));
+ dotag_universal(?N_UTF8String,UTF8String,byte_size(UTF8String));
encode_UTF8_string(_,UTF8String,DoTag) when is_binary(UTF8String) ->
- dotag(DoTag,?N_UTF8String,{UTF8String,size(UTF8String)});
+ dotag(DoTag,?N_UTF8String,{UTF8String,byte_size(UTF8String)});
encode_UTF8_string(_,UTF8String,[]) ->
dotag_universal(?N_UTF8String,UTF8String,length(UTF8String));
encode_UTF8_string(_,UTF8String,DoTag) ->
dotag(DoTag,?N_UTF8String,{UTF8String,length(UTF8String)}).
-
-
%%============================================================================
%% decode UTF8 string
%%============================================================================
@@ -2016,7 +1991,7 @@ decode_UTF8_string_notag(Buffer, Tags, OptOrMand) ->
%% encode BMP string
%%============================================================================
-encode_BMP_string(C, {Name,BMPString}, DoTag) when is_atom(Name)->
+encode_BMP_string(C, {Name,BMPString}, DoTag) when is_atom(Name) ->
encode_BMP_string(C, BMPString, DoTag);
encode_BMP_string(_C, BMPString, []) ->
OctetList = mk_BMP_list(BMPString),
@@ -2464,16 +2439,16 @@ concat_bit_binaries({U1,B1},{U2,B2}) ->
S2 = (size(B2) * 8) - U2,
PadBits = 8 - ((S1+S2) rem 8),
{PadBits, <<B1:S1/binary-unit:1,B2:S2/binary-unit:1,0:PadBits>>};
-concat_bit_binaries(L1,L2) when is_list(L1),is_list(L2) ->
+concat_bit_binaries(L1,L2) when is_list(L1), is_list(L2) ->
%% this case occur when decoding with NNL
L1 ++ L2.
get_constraint(C,Key) ->
- case lists:keysearch(Key,1,C) of
+ case lists:keyfind(Key,1,C) of
false ->
no;
- {value,{_,V}} ->
+ {_, V} ->
V
end.
@@ -2484,7 +2459,7 @@ get_constraint(C,Key) ->
new_tags([],LastTag) ->
[LastTag];
-new_tags(Tags=[#tag{type='IMPLICIT'}],_LastTag) ->
+new_tags(Tags = [#tag{type='IMPLICIT'}],_LastTag) ->
Tags;
new_tags([T1 = #tag{type='IMPLICIT'},#tag{type=T2Type}|Rest],LastTag) ->
new_tags([T1#tag{type=T2Type}|Rest],LastTag);
diff --git a/lib/compiler/src/sys_expand_pmod.erl b/lib/compiler/src/sys_expand_pmod.erl
index dbd5c1ec2f..4fee26f2a6 100644
--- a/lib/compiler/src/sys_expand_pmod.erl
+++ b/lib/compiler/src/sys_expand_pmod.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(sys_expand_pmod).
@@ -283,9 +283,13 @@ expr({cons,Line,H0,T0},St) ->
T1 = expr(T0,St),
{cons,Line,H1,T1};
expr({lc,Line,E0,Qs0},St) ->
- Qs1 = lc_quals(Qs0,St),
+ Qs1 = lc_bc_quals(Qs0,St),
E1 = expr(E0,St),
{lc,Line,E1,Qs1};
+expr({bc,Line,E0,Qs0},St) ->
+ Qs1 = lc_bc_quals(Qs0,St),
+ E1 = expr(E0,St),
+ {bc,Line,E1,Qs1};
expr({tuple,Line,Es0},St) ->
Es1 = expr_list(Es0,St),
{tuple,Line,Es1};
@@ -391,14 +395,18 @@ icr_clauses([C0|Cs],St) ->
[C1|icr_clauses(Cs,St)];
icr_clauses([],_St) -> [].
-lc_quals([{generate,Line,P0,E0}|Qs],St) ->
+lc_bc_quals([{generate,Line,P0,E0}|Qs],St) ->
+ E1 = expr(E0,St),
+ P1 = pattern(P0,St),
+ [{generate,Line,P1,E1}|lc_bc_quals(Qs,St)];
+lc_bc_quals([{b_generate,Line,P0,E0}|Qs],St) ->
E1 = expr(E0,St),
P1 = pattern(P0,St),
- [{generate,Line,P1,E1}|lc_quals(Qs,St)];
-lc_quals([E0|Qs],St) ->
+ [{b_generate,Line,P1,E1}|lc_bc_quals(Qs,St)];
+lc_bc_quals([E0|Qs],St) ->
E1 = expr(E0,St),
- [E1|lc_quals(Qs,St)];
-lc_quals([],_St) -> [].
+ [E1|lc_bc_quals(Qs,St)];
+lc_bc_quals([],_St) -> [].
fun_clauses([C0|Cs],St) ->
C1 = clause(C0,St),
diff --git a/lib/compiler/test/pmod_SUITE.erl b/lib/compiler/test/pmod_SUITE.erl
index c8919e5539..293e110c45 100644
--- a/lib/compiler/test/pmod_SUITE.erl
+++ b/lib/compiler/test/pmod_SUITE.erl
@@ -1,31 +1,31 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(pmod_SUITE).
-export([all/1,init_per_testcase/2,fin_per_testcase/2,
- basic/1]).
+ basic/1, otp_8447/1]).
-include("test_server.hrl").
all(suite) ->
test_lib:recompile(?MODULE),
- [basic].
+ [basic, otp_8447].
init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) ->
Dog = test_server:timetrap(?t:minutes(1)),
@@ -38,8 +38,8 @@ fin_per_testcase(Case, Config) when is_atom(Case), is_list(Config) ->
basic(Config) when is_list(Config) ->
?line basic_1(Config, []),
- ?line basic_1(Config, [inline]),
- ?line basic_1(Config, [{inline,500}]),
+% ?line basic_1(Config, [inline]),
+% ?line basic_1(Config, [{inline,500},inline]),
ok.
basic_1(Config, Opts) ->
@@ -78,6 +78,12 @@ basic_1(Config, Opts) ->
ok.
+otp_8447(Config) when is_list(Config) ->
+ ?line P = pmod_basic:new(foo),
+ ?line [0,0,1,1,1,0,0,1] = P:bc1(),
+ ?line <<10:4>> = P:bc2(),
+ ok.
+
compile_load(Module, Conf, Opts) ->
?line Dir = ?config(data_dir,Conf),
?line Src = filename:join(Dir, atom_to_list(Module)),
diff --git a/lib/compiler/test/pmod_SUITE_data/pmod_basic.erl b/lib/compiler/test/pmod_SUITE_data/pmod_basic.erl
index e6f4c63421..0d46cffe00 100644
--- a/lib/compiler/test/pmod_SUITE_data/pmod_basic.erl
+++ b/lib/compiler/test/pmod_SUITE_data/pmod_basic.erl
@@ -1,25 +1,26 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(pmod_basic, [Props]).
-export([lookup/1,or_props/1,prepend/1,append/1,stupid_sum/0]).
-export([bar/1,bar_bar/1]).
+-export([bc1/0, bc2/0]).
lookup(Key) ->
proplists:lookup(Key, Props).
@@ -70,3 +71,9 @@ bar(S) when S#s.a == 0 -> ok.
bar_bar(S) when is_record(S, s) -> ok;
bar_bar(_) -> error.
+
+bc1() ->
+ [A || <<A:1>> <= <<"9">> ].
+
+bc2() ->
+ << <<A:1>> || A <- [1,0,1,0] >>.
diff --git a/lib/docbuilder/vsn.mk b/lib/docbuilder/vsn.mk
index 4c782f7481..2852ebcc8b 100644
--- a/lib/docbuilder/vsn.mk
+++ b/lib/docbuilder/vsn.mk
@@ -1,6 +1,8 @@
-DOCB_VSN = 0.9.8.6
+DOCB_VSN = 0.9.8.7
-TICKETS = OTP-8201
+TICKETS = OTP-8343
+
+TICKETS_0.9.8.6 = OTP-8201
TICKETS_0.9.8.5 = OTP-7851
diff --git a/lib/mnesia/doc/src/notes.xml b/lib/mnesia/doc/src/notes.xml
index 69f2185cd8..66242398d9 100644
--- a/lib/mnesia/doc/src/notes.xml
+++ b/lib/mnesia/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>Mnesia Release Notes</title>
@@ -38,6 +38,35 @@
thus constitutes one section in this document. The title of each
section is the version number of Mnesia.</p>
+ <section><title>Mnesia 4.4.13</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Transactions could be left hanging if a node went down
+ when invoking mnesia:sync_transaction/[1,2]. Thanks Igor
+ Ribeiro Sucupira.</p>
+ <p>
+ Own Id: OTP-8402</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Igor Ribeiro Sucupira added the option to compress data
+ when copying tables between Mnesia nodes.</p>
+ <p>
+ Own Id: OTP-8406</p>
+ </item>
+ </list>
+ </section>
+
+ </section>
<section><title>Mnesia 4.4.12</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/mnesia/src/mnesia.appup.src b/lib/mnesia/src/mnesia.appup.src
index cad63bf8df..b3b9297db2 100644
--- a/lib/mnesia/src/mnesia.appup.src
+++ b/lib/mnesia/src/mnesia.appup.src
@@ -1,14 +1,30 @@
%% -*- erlang -*-
{"%VSN%",
[
+ {"4.4.12",
+ [
+ {update, mnesia, soft, soft_purge, soft_purge, []},
+ {update, mnesia_loader, soft, soft_purge, soft_purge, []},
+ {update, mnesia_monitor, soft, soft_purge, soft_purge, []},
+ {update, mnesia_tm, soft, soft_purge, soft_purge, []}
+ ]
+ },
{"4.4.11",
[
+ {update, mnesia, soft, soft_purge, soft_purge, []},
+ {update, mnesia_loader, soft, soft_purge, soft_purge, []},
+ {update, mnesia_monitor, soft, soft_purge, soft_purge, []},
+ {update, mnesia_tm, soft, soft_purge, soft_purge, []},
{update, mnesia_locker, soft, soft_purge, soft_purge, []},
{update, mnesia_controller, soft, soft_purge, soft_purge, []}
]
},
{"4.4.10",
[
+ {update, mnesia, soft, soft_purge, soft_purge, []},
+ {update, mnesia_loader, soft, soft_purge, soft_purge, []},
+ {update, mnesia_monitor, soft, soft_purge, soft_purge, []},
+ {update, mnesia_tm, soft, soft_purge, soft_purge, []},
{update, mnesia_locker, soft, soft_purge, soft_purge, []},
{update, mnesia_controller, soft, soft_purge, soft_purge, []}
]
@@ -18,14 +34,30 @@
{"4.4.7", [{restart_application, mnesia}]}
],
[
+ {"4.4.12",
+ [
+ {update, mnesia, soft, soft_purge, soft_purge, []},
+ {update, mnesia_loader, soft, soft_purge, soft_purge, []},
+ {update, mnesia_monitor, soft, soft_purge, soft_purge, []},
+ {update, mnesia_tm, soft, soft_purge, soft_purge, []}
+ ]
+ },
{"4.4.11",
[
+ {update, mnesia, soft, soft_purge, soft_purge, []},
+ {update, mnesia_loader, soft, soft_purge, soft_purge, []},
+ {update, mnesia_monitor, soft, soft_purge, soft_purge, []},
+ {update, mnesia_tm, soft, soft_purge, soft_purge, []},
{update, mnesia_locker, soft, soft_purge, soft_purge, []},
{update, mnesia_controller, soft, soft_purge, soft_purge, []}
]
},
{"4.4.10",
[
+ {update, mnesia, soft, soft_purge, soft_purge, []},
+ {update, mnesia_loader, soft, soft_purge, soft_purge, []},
+ {update, mnesia_monitor, soft, soft_purge, soft_purge, []},
+ {update, mnesia_tm, soft, soft_purge, soft_purge, []},
{update, mnesia_locker, soft, soft_purge, soft_purge, []},
{update, mnesia_controller, soft, soft_purge, soft_purge, []}
]
diff --git a/lib/mnesia/vsn.mk b/lib/mnesia/vsn.mk
index 2de3658bf3..f82bd45c72 100644
--- a/lib/mnesia/vsn.mk
+++ b/lib/mnesia/vsn.mk
@@ -1,7 +1,8 @@
-MNESIA_VSN = 4.4.12
+MNESIA_VSN = 4.4.13
-TICKETS = OTP-8250
+TICKETS = OTP-8402 OTP-8406 OTP-8250
+#TICKETS_4.4.12 = OTP-8250
#TICKETS_4.4.11 = OTP-8074
#TICKETS_4.4.10 = OTP-7928 OTP-7968 OTP-8002
#TICKETS_4.4.9 = OTP-7911
diff --git a/lib/os_mon/src/cpu_sup.erl b/lib/os_mon/src/cpu_sup.erl
index 742e20b1fa..e414e2c10b 100644
--- a/lib/os_mon/src/cpu_sup.erl
+++ b/lib/os_mon/src/cpu_sup.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(cpu_sup).
@@ -65,15 +65,10 @@
%% Contract specifications
%%----------------------------------------------------------------------
--type(util_cpus() :: 'all' | integer() | [integer()]).
--type(util_state() ::
- 'user' |
- 'nice_user' |
- 'kernel' |
- 'wait' |
- 'idle').
--type(util_value() :: {util_state(), float()} | float()).
--type(util_desc() :: {util_cpus(), util_value(), util_value(), []}).
+-type util_cpus() :: 'all' | integer() | [integer()].
+-type util_state() :: 'user' | 'nice_user' | 'kernel' | 'wait' | 'idle'.
+-type util_value() :: {util_state(), float()} | float().
+-type util_desc() :: {util_cpus(), util_value(), util_value(), []}.
%%----------------------------------------------------------------------
%% Exported functions
@@ -88,28 +83,28 @@ start_link() ->
stop() ->
gen_server:call(cpu_sup, ?quit, infinity).
--spec(nprocs/0 :: () -> integer() | {'error', any()}).
+-spec nprocs() -> integer() | {'error', any()}.
nprocs() ->
os_mon:call(cpu_sup, ?nprocs, infinity).
--spec(avg1/0 :: () -> integer() | {'error', any()}).
+-spec avg1() -> integer() | {'error', any()}.
avg1() ->
os_mon:call(cpu_sup, ?avg1, infinity).
--spec(avg5/0 :: () -> integer() | {'error', any()}).
+-spec avg5() -> integer() | {'error', any()}.
avg5() ->
os_mon:call(cpu_sup, ?avg5, infinity).
--spec(avg15/0 :: () -> integer() | {'error', any()}).
+-spec avg15() -> integer() | {'error', any()}.
avg15() ->
os_mon:call(cpu_sup, ?avg15, infinity).
--spec(util/1 :: ([ 'detailed' | 'per_cpu']) ->
- util_desc() | [util_desc()] | {'error', any()}).
+-spec util(['detailed' | 'per_cpu']) ->
+ util_desc() | [util_desc()] | {'error', any()}.
util(Args) when is_list (Args) ->
% Get arguments
@@ -126,7 +121,7 @@ util(Args) when is_list (Args) ->
util(_) ->
erlang:error(badarg).
--spec(util/0 :: () -> float()).
+-spec util() -> float().
util() ->
case util([]) of
diff --git a/lib/parsetools/include/yeccpre.hrl b/lib/parsetools/include/yeccpre.hrl
index 2ffa13d6a7..33a103d95f 100644
--- a/lib/parsetools/include/yeccpre.hrl
+++ b/lib/parsetools/include/yeccpre.hrl
@@ -1,52 +1,51 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The parser generator will insert appropriate declarations before this line.%
--type(yecc_ret() :: {'error', _} | {'ok', _}).
+-type yecc_ret() :: {'error', _} | {'ok', _}.
-spec parse(Tokens :: list()) -> yecc_ret().
parse(Tokens) ->
yeccpars0(Tokens, {no_func, no_line}, 0, [], []).
--spec(parse_and_scan/1 ::
- ({function() | {atom(), atom()}, [_]} | {atom(), atom(), [_]}) ->
- yecc_ret()).
+-spec parse_and_scan({function() | {atom(), atom()}, [_]} | {atom(), atom(), [_]}) ->
+ yecc_ret().
parse_and_scan({F, A}) -> % Fun or {M, F}
yeccpars0([], {{F, A}, no_line}, 0, [], []);
parse_and_scan({M, F, A}) ->
yeccpars0([], {{{M, F}, A}, no_line}, 0, [], []).
--spec(format_error/1 :: (any()) -> [char() | list()]).
+-spec format_error(any()) -> [char() | list()].
format_error(Message) ->
case io_lib:deep_char_list(Message) of
- true ->
- Message;
- _ ->
- io_lib:write(Message)
+ true ->
+ Message;
+ _ ->
+ io_lib:write(Message)
end.
-% To be used in grammar files to throw an error message to the parser
-% toplevel. Doesn't have to be exported!
--compile({nowarn_unused_function, return_error/2}).
--spec(return_error/2 :: (integer(), any()) -> no_return()).
+%% To be used in grammar files to throw an error message to the parser
+%% toplevel. Doesn't have to be exported!
+-compile({nowarn_unused_function,{return_error,2}}).
+-spec return_error(integer(), any()) -> no_return().
return_error(Line, Message) ->
throw({error, {Line, ?MODULE, Message}}).
@@ -85,7 +84,7 @@ yeccpars1([Token | Tokens], Tzr, State, States, Vstack) ->
yeccpars1([], {{F, A},_Line}, State, States, Vstack) ->
case apply(F, A) of
{ok, Tokens, Endline} ->
- yeccpars1(Tokens, {{F, A}, Endline}, State, States, Vstack);
+ yeccpars1(Tokens, {{F, A}, Endline}, State, States, Vstack);
{eof, Endline} ->
yeccpars1([], {no_func, Endline}, State, States, Vstack);
{error, Descriptor, _Endline} ->
@@ -118,7 +117,7 @@ yeccpars1(State1, State, States, Vstack, Token0, [], {no_func, Line}) ->
yeccpars2(State, '$end', [State1 | States], [Token0 | Vstack],
yecc_end(Line), [], {no_func, Line}).
-% For internal use only.
+%% For internal use only.
yecc_end({Line,_Column}) ->
{'$end', Line};
yecc_end(Line) ->
diff --git a/lib/parsetools/src/yecc.erl b/lib/parsetools/src/yecc.erl
index f4d76f471d..b8b2b2308c 100644
--- a/lib/parsetools/src/yecc.erl
+++ b/lib/parsetools/src/yecc.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% Yacc like LALR-1 parser generator for Erlang.
@@ -30,8 +30,8 @@
-import(lists, [append/1, append/2, concat/1, delete/2, filter/2,
flatmap/2, foldl/3, foldr/3, foreach/2, keydelete/3,
- keysearch/3, keysort/2, last/1, map/2, member/2,
- reverse/1, sort/1, usort/1]).
+ keysort/2, last/1, map/2, member/2, reverse/1,
+ sort/1, usort/1]).
-include("erl_compile.hrl").
-include("ms_transform.hrl").
@@ -297,18 +297,18 @@ options(Options0, [Key | Keys], L) when is_list(Options0) ->
false ->
Options0
end,
- V = case keysearch(Key, 1, Options) of
- {value, {Key, Filename0}} when Key =:= includefile;
- Key =:= parserfile ->
+ V = case lists:keyfind(Key, 1, Options) of
+ {Key, Filename0} when Key =:= includefile;
+ Key =:= parserfile ->
case is_filename(Filename0) of
no ->
badarg;
Filename ->
{ok, [{Key, Filename}]}
end;
- {value, {Key, Bool}} when Bool =:= true; Bool =:= false ->
- {ok, [{Key, Bool}]};
- {value, {Key, _}} ->
+ {Key, Bool} = KB when is_boolean(Bool) ->
+ {ok, [KB]};
+ {Key, _} ->
badarg;
false ->
{ok, [{Key, default_option(Key)}]}
@@ -348,8 +348,7 @@ atom_option(verbose) -> {verbose, true};
atom_option(Key) -> Key.
is_filename(T) ->
- try filename:flatten(T) of
- Filename -> Filename
+ try filename:flatten(T)
catch error: _ -> no
end.
@@ -366,8 +365,8 @@ shorten_filename(Name0) ->
start(Infilex, Options) ->
Infile = assure_extension(Infilex, ".yrl"),
- {value, {_, Outfilex0}} = keysearch(parserfile, 1, Options),
- {value, {_, Includefilex}} = keysearch(includefile, 1, Options),
+ {_, Outfilex0} = lists:keyfind(parserfile, 1, Options),
+ {_, Includefilex} = lists:keyfind(includefile, 1, Options),
Outfilex = case Outfilex0 of
[] -> filename:rootname(Infilex, ".yrl");
_ -> Outfilex0
@@ -715,14 +714,14 @@ names(Symbols) ->
map(fun(Symbol) -> Symbol#symbol.name end, Symbols).
symbol_line(Name, St) ->
- {value, #symbol{line = Line}} = symbol_search(Name, St#yecc.all_symbols),
+ #symbol{line = Line} = symbol_find(Name, St#yecc.all_symbols),
Line.
symbol_member(Symbol, Symbols) ->
- symbol_search(Symbol#symbol.name, Symbols) =/= false.
+ symbol_find(Symbol#symbol.name, Symbols) =/= false.
-symbol_search(Name, Symbols) ->
- keysearch(Name, #symbol.name, Symbols).
+symbol_find(Name, Symbols) ->
+ lists:keyfind(Name, #symbol.name, Symbols).
states_and_goto_table(St0) ->
St1 = create_symbol_table(St0),
@@ -876,8 +875,8 @@ add_warnings(SymNames, W0, St0) ->
check_rhs([#symbol{name = '$empty'}], St) ->
St;
check_rhs(Rhs, St0) ->
- case symbol_search('$empty', Rhs) of
- {value, #symbol{line = Line}} ->
+ case symbol_find('$empty', Rhs) of
+ #symbol{line = Line} ->
add_error(Line, illegal_empty, St0);
false ->
foldl(fun(Sym, St) ->
@@ -1096,10 +1095,10 @@ compute_states2([{Sym,Seed} | Seeds], N, Try, CurrState, StateTab, Tables) ->
compute_states2(Seeds, N, Try, CurrState, StateTab, Tables);
{merge, M, NewCurrent} ->
%% io:fwrite(<<"Merging with state ~w\n">>, [M]),
- Try1 = case keysearch(M, 1, Try) of
+ Try1 = case lists:keyfind(M, 1, Try) of
false ->
[{M, NewCurrent} | Try];
- {value, {_, OldCurrent}} ->
+ {_, OldCurrent} ->
case ordsets:is_subset(NewCurrent, OldCurrent) of
true ->
Try;
diff --git a/lib/parsetools/src/yeccparser.erl b/lib/parsetools/src/yeccparser.erl
index 80a6bbce0e..415547b4ce 100644
--- a/lib/parsetools/src/yeccparser.erl
+++ b/lib/parsetools/src/yeccparser.erl
@@ -16,53 +16,52 @@ line_of(Token) ->
-file("/clearcase/otp/erts/lib/parsetools/include/yeccpre.hrl", 0).
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The parser generator will insert appropriate declarations before this line.%
--type(yecc_ret() :: {'error', _} | {'ok', _}).
+-type yecc_ret() :: {'error', _} | {'ok', _}.
--spec(parse/1 :: (_) -> yecc_ret()).
+-spec parse(_) -> yecc_ret().
parse(Tokens) ->
yeccpars0(Tokens, false).
--spec(parse_and_scan/1 ::
- ({function() | {atom(), atom()}, [_]} | {atom(), atom(), [_]}) ->
- yecc_ret()).
+-spec parse_and_scan({function() | {atom(), atom()}, [_]} | {atom(), atom(), [_]}) ->
+ yecc_ret().
parse_and_scan({F, A}) -> % Fun or {M, F}
yeccpars0([], {F, A});
parse_and_scan({M, F, A}) ->
yeccpars0([], {{M, F}, A}).
--spec(format_error/1 :: (any()) -> [char() | list()]).
+-spec format_error(any()) -> [char() | list()].
format_error(Message) ->
case io_lib:deep_char_list(Message) of
- true ->
- Message;
- _ ->
- io_lib:write(Message)
+ true ->
+ Message;
+ _ ->
+ io_lib:write(Message)
end.
-% To be used in grammar files to throw an error message to the parser
-% toplevel. Doesn't have to be exported!
+%% To be used in grammar files to throw an error message to the parser
+%% toplevel. Doesn't have to be exported!
-compile({nowarn_unused_function,{return_error,2}}).
--spec(return_error/2 :: (integer(), any()) -> no_return()).
+-spec return_error(integer(), any()) -> no_return().
return_error(Line, Message) ->
throw({error, {Line, ?MODULE, Message}}).
@@ -101,7 +100,7 @@ yeccpars1([Token | Tokens], Tokenizer, State, States, Vstack) ->
yeccpars1([], {F, A}, State, States, Vstack) ->
case apply(F, A) of
{ok, Tokens, _Endline} ->
- yeccpars1(Tokens, {F, A}, State, States, Vstack);
+ yeccpars1(Tokens, {F, A}, State, States, Vstack);
{eof, _Endline} ->
yeccpars1([], false, State, States, Vstack);
{error, Descriptor, _Endline} ->
@@ -123,7 +122,7 @@ yeccpars1(State1, State, States, Vstack, Stack1, [Token | Tokens],
yeccpars1(State1, State, States, Vstack, Stack1, [], {F, A}) ->
case apply(F, A) of
{ok, Tokens, _Endline} ->
- yeccpars1(State1, State, States, Vstack, Stack1, Tokens, {F, A});
+ yeccpars1(State1, State, States, Vstack, Stack1, Tokens, {F, A});
{eof, _Endline} ->
yeccpars1(State1, State, States, Vstack, Stack1, [], false);
{error, Descriptor, _Endline} ->
diff --git a/lib/percept/src/egd.erl b/lib/percept/src/egd.erl
index 7972fde597..4fb5b6c46a 100644
--- a/lib/percept/src/egd.erl
+++ b/lib/percept/src/egd.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -46,10 +46,10 @@
%% @type color()
%% @type render_option() = {render_engine, opaque} | {render_engine, alpha}
--type(egd_image() :: pid()).
--type(point() :: {non_neg_integer(), non_neg_integer()}).
--type(render_option() :: {'render_engine', 'opaque'} | {'render_engine', 'alpha'}).
--type(color() :: {float(), float(), float(), float()}).
+-type egd_image() :: pid().
+-type point() :: {non_neg_integer(), non_neg_integer()}.
+-type render_option() :: {'render_engine', 'opaque'} | {'render_engine', 'alpha'}.
+-type color() :: {float(), float(), float(), float()}.
%%==========================================================================
%%
@@ -60,7 +60,7 @@
%% @spec create(integer(), integer()) -> egd_image()
%% @doc Creates an image area and returns its reference.
--spec(create/2 :: (Width :: integer(), Height :: integer()) -> egd_image()).
+-spec create(Width :: integer(), Height :: integer()) -> egd_image().
create(Width,Height) ->
spawn_link(fun() -> init(trunc(Width),trunc(Height)) end).
@@ -69,16 +69,17 @@ create(Width,Height) ->
%% @spec destroy(egd_image()) -> ok
%% @doc Destroys the image.
--spec(destroy/1 :: (Image :: egd_image()) -> ok).
+-spec destroy(Image :: egd_image()) -> ok.
destroy(Image) ->
cast(Image, destroy),
ok.
-%% @spec render(egd_image()) -> binary()
+%% @spec render(egd_image()) -> binary()
%% @equiv render(Image, png, [{render_engine, opaque}])
+-spec render(Image :: egd_image()) -> binary().
render(Image) ->
render(Image, png, [{render_engine, opaque}]).
@@ -94,10 +95,10 @@ render(Image, Type) ->
%% binary can either be a raw bitmap with rgb tripplets or a binary in png
%% format.
--spec(render/3 :: (
+-spec render(
Image :: egd_image(),
Type :: 'png' | 'raw_bitmap' | 'eps',
- Options :: [render_option()]) -> binary()).
+ Options :: [render_option()]) -> binary().
render(Image, Type, Options) ->
{render_engine, RenderType} = proplists:lookup(render_engine, Options),
@@ -116,11 +117,11 @@ information(Pid) ->
%% @spec line(egd_image(), point(), point(), color()) -> ok
%% @doc Creates a line object from P1 to P2 in the image.
--spec(line/4 :: (
+-spec line(
Image :: egd_image(),
P1 :: point(),
P2 :: point(),
- Color :: color()) -> 'ok').
+ Color :: color()) -> 'ok'.
line(Image, P1, P2, Color) ->
cast(Image, {line, P1, P2, Color}),
@@ -132,9 +133,8 @@ line(Image, P1, P2, Color) ->
%% Name = black | silver | gray | white | maroon | red | purple | fuchia | green | lime | olive | yellow | navy | blue | teal | aqua
%% @doc Creates a color reference.
--spec(color/1 :: (
- Value :: {byte(), byte(), byte()} | {byte(), byte(), byte(), byte()} | atom()) ->
- color()).
+-spec color(Value :: {byte(), byte(), byte()} | {byte(), byte(), byte(), byte()} | atom()) ->
+ color().
color(Color) ->
egd_primitives:color(Color).
diff --git a/lib/percept/src/egd.hrl b/lib/percept/src/egd.hrl
index 274986db65..2e8f5ebc50 100644
--- a/lib/percept/src/egd.hrl
+++ b/lib/percept/src/egd.hrl
@@ -1,24 +1,24 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
--type(rgba_float() :: {float(), float(), float(), float()}).
--type(rgba_byte() :: {byte(), byte(), byte(), byte()}).
--type(rgb() :: {byte(), byte(), byte()}).
+-type rgba_float() :: {float(), float(), float(), float()}.
+-type rgba_byte() :: {byte(), byte(), byte(), byte()}.
+-type rgb() :: {byte(), byte(), byte()}.
-record(image_object, {
type,
diff --git a/lib/percept/src/egd_render.erl b/lib/percept/src/egd_render.erl
index 4a0247dd33..7fd1072ab1 100644
--- a/lib/percept/src/egd_render.erl
+++ b/lib/percept/src/egd_render.erl
@@ -29,7 +29,8 @@
-include("egd.hrl").
-define('DummyC',0).
-binary(Image) -> binary(Image, opaque).
+binary(Image) ->
+ binary(Image, opaque).
binary(Image, Type) ->
parallel_binary(precompile(Image),Type).
@@ -42,9 +43,8 @@ parallel_binary(Image = #image{ height = Height },Type) ->
W = Image#image.width,
Bg = Image#image.background,
Os = Image#image.objects,
- erlang:list_to_binary(lists:map(fun
- (Y) -> scanline(Y, Os, {0,0,W - 1, Bg}, Type)
- end, lists:seq(1, Height)));
+ erlang:list_to_binary([scanline(Y, Os, {0,0,W - 1, Bg}, Type)
+ || Y <- lists:seq(1, Height)]);
Np ->
Pids = start_workers(Np, Type),
Handler = handle_workers(Height, Pids),
@@ -54,7 +54,9 @@ parallel_binary(Image = #image{ height = Height },Type) ->
Res
end.
-start_workers(Np, Type) -> start_workers(Np, Type, []).
+start_workers(Np, Type) ->
+ start_workers(Np, Type, []).
+
start_workers( 0, _, Pids) -> Pids;
start_workers(Np, Type, Pids) when Np > 0 ->
start_workers(Np - 1, Type, [spawn_link(fun() -> worker(Type) end)|Pids]).
@@ -90,7 +92,9 @@ init_workers(Image, Handler, [Pid|Pids]) ->
Handler ! {Pid, scan_complete},
init_workers(Image, Handler, Pids).
-handle_workers(H, Pids) -> spawn_link(fun() -> handle_workers(H, H, length(Pids)) end).
+handle_workers(H, Pids) ->
+ spawn_link(fun() -> handle_workers(H, H, length(Pids)) end).
+
handle_workers(_, 0, _) -> ok;
handle_workers(H, Hi, Np) when H > 0 ->
N = trunc(Hi/(2*Np)),
@@ -110,7 +114,9 @@ finish_workers([Pid|Pids]) ->
Pid ! {self(), done},
finish_workers(Pids).
-receive_binaries(H) -> receive_binaries(H, []).
+receive_binaries(H) ->
+ receive_binaries(H, []).
+
receive_binaries(0, Bins) -> erlang:list_to_binary(Bins);
receive_binaries(H, Bins) when H > 0 ->
receive
@@ -118,7 +124,6 @@ receive_binaries(H, Bins) when H > 0 ->
receive_binaries(H - 1, [Bin|Bins])
end.
-
scanline(Y, Os, {_,_,Width,_}=LSB, Type) ->
OLSs = parse_objects_on_line(Y-1, Width, Os),
RLSs = resulting_line_spans([LSB|OLSs],Type),
@@ -190,7 +195,6 @@ modify_layers(Layers,[{{_,Z,start},C}|Trans]) ->
modify_layers(Layers,[{{_,Z,stop },C}|Trans]) ->
modify_layers(remove_layer(Layers, Z, C), Trans).
-
add_layer([{Z1,_}=H|Layers],Z,C) when Z1 > Z ->
[H|add_layer(Layers,Z,C)];
add_layer(Layers,Z,C) ->
diff --git a/lib/percept/src/percept.erl b/lib/percept/src/percept.erl
index af1a920efd..f5e0f7e469 100644
--- a/lib/percept/src/percept.erl
+++ b/lib/percept/src/percept.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -50,7 +50,7 @@
%% @type percept_option() = procs | ports | exclusive
--type(percept_option() :: 'procs' | 'ports' | 'exclusive' | 'scheduler').
+-type percept_option() :: 'procs' | 'ports' | 'exclusive' | 'scheduler'.
%%==========================================================================
%%
@@ -85,8 +85,8 @@ stop(_State) ->
%% profiling
--spec(profile/1 :: (Filename :: string()) ->
- {'ok', port()} | {'already_started', port()}).
+-spec profile(Filename :: file:filename()) ->
+ {'ok', port()} | {'already_started', port()}.
profile(Filename) ->
percept_profile:start(Filename, [procs]).
@@ -94,10 +94,9 @@ profile(Filename) ->
%% @spec profile(Filename::string(), [percept_option()]) -> {ok, Port} | {already_started, Port}
%% @see percept_profile
--spec(profile/2 :: (
- Filename :: string(),
- Options :: [percept_option()]) ->
- {'ok', port()} | {'already_started', port()}).
+-spec profile(Filename :: file:filename(),
+ Options :: [percept_option()]) ->
+ {'ok', port()} | {'already_started', port()}.
profile(Filename, Options) ->
percept_profile:start(Filename, Options).
@@ -105,16 +104,15 @@ profile(Filename, Options) ->
%% @spec profile(Filename::string(), MFA::mfa(), [percept_option()]) -> ok | {already_started, Port} | {error, not_started}
%% @see percept_profile
--spec(profile/3 :: (
- Filename :: string(),
- Entry :: {atom(), atom(), list()},
- Options :: [percept_option()]) ->
- 'ok' | {'already_started', port()} | {'error', 'not_started'}).
+-spec profile(Filename :: file:filename(),
+ Entry :: {atom(), atom(), list()},
+ Options :: [percept_option()]) ->
+ 'ok' | {'already_started', port()} | {'error', 'not_started'}.
profile(Filename, MFA, Options) ->
percept_profile:start(Filename, MFA, Options).
--spec(stop_profile/0 :: () -> 'ok' | {'error', 'not_started'}).
+-spec stop_profile() -> 'ok' | {'error', 'not_started'}.
%% @spec stop_profile() -> ok | {'error', 'not_started'}
%% @see percept_profile
@@ -125,8 +123,8 @@ stop_profile() ->
%% @spec analyze(string()) -> ok | {error, Reason}
%% @doc Analyze file.
--spec(analyze/1 :: (Filename :: string()) ->
- 'ok' | {'error', any()}).
+-spec analyze(Filename :: file:filename()) ->
+ 'ok' | {'error', any()}.
analyze(Filename) ->
case percept_db:start() of
@@ -142,9 +140,8 @@ analyze(Filename) ->
%% Reason = term()
%% @doc Starts webserver.
--spec(start_webserver/0 :: () ->
- {'started', string(), pos_integer()} |
- {'error', any()}).
+-spec start_webserver() ->
+ {'started', string(), pos_integer()} | {'error', any()}.
start_webserver() ->
start_webserver(0).
@@ -156,9 +153,8 @@ start_webserver() ->
%% @doc Starts webserver. If port number is 0, an available port number will
%% be assigned by inets.
--spec(start_webserver/1 :: (Port :: non_neg_integer()) ->
- {'started', string(), pos_integer()} |
- {'error', any()}).
+-spec start_webserver(Port :: non_neg_integer()) ->
+ {'started', string(), pos_integer()} | {'error', any()}.
start_webserver(Port) when is_integer(Port) ->
application:load(percept),
@@ -255,20 +251,20 @@ trace_parser(Trace, {Count, Pid}) ->
find_service_pid_from_port([], _) ->
undefined;
find_service_pid_from_port([{_, Pid, Options} | Services], Port) ->
- case lists:keysearch(port, 1, Options) of
+ case lists:keyfind(port, 1, Options) of
false ->
find_service_pid_from_port(Services, Port);
- {value, {port, Port}} ->
+ {port, Port} ->
Pid
end.
find_service_port_from_pid([], _) ->
undefined;
find_service_port_from_pid([{_, Pid, Options} | _], Pid) ->
- case lists:keysearch(port, 1, Options) of
+ case lists:keyfind(port, 1, Options) of
false ->
undefined;
- {value, {port, Port}} ->
+ {port, Port} ->
Port
end;
find_service_port_from_pid([{_, _, _} | Services], Pid) ->
diff --git a/lib/percept/src/percept.hrl b/lib/percept/src/percept.hrl
index a9afceb6d1..36b6f63a4d 100644
--- a/lib/percept/src/percept.hrl
+++ b/lib/percept/src/percept.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -23,10 +23,10 @@
%%% Type definitions %%%
%%% ------------------- %%%
--type(timestamp() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}).
--type(true_mfa() :: {atom(), atom(), byte() | list()}).
--type(state() :: 'active' | 'inactive').
--type(scheduler_id() :: {'scheduler_id', non_neg_integer()}).
+-type timestamp() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}.
+-type true_mfa() :: {atom(), atom(), byte() | list()}.
+-type state() :: 'active' | 'inactive'.
+-type scheduler_id() :: {'scheduler_id', non_neg_integer()}.
%%% ------------------- %%%
%%% Records %%%
@@ -40,8 +40,7 @@
runnable_count = 0 %:: non_neg_integer()
}).
--record(
- information, {
+-record(information, {
id ,%:: pid() | port(),
name = undefined ,%:: atom() | string() | 'undefined',
entry = undefined ,%:: true_mfa() | 'undefined',
diff --git a/lib/percept/src/percept_db.erl b/lib/percept/src/percept_db.erl
index dc85fa3510..edb0d79a29 100644
--- a/lib/percept/src/percept_db.erl
+++ b/lib/percept/src/percept_db.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -72,7 +72,7 @@
%% Pid = pid()
%% @doc Starts or restarts the percept database.
--spec(start/0 :: () -> {'started', pid()} | {'restarted', pid()}).
+-spec start() -> {'started', pid()} | {'restarted', pid()}.
start() ->
case erlang:whereis(percept_db) of
@@ -92,7 +92,7 @@ start() ->
%% Pid = pid()
%% @doc Stops the percept database.
--spec(stop/0 :: () -> 'not_started' | {'stopped', pid()}).
+-spec stop() -> 'not_started' | {'stopped', pid()}.
stop() ->
case erlang:whereis(percept_db) of
@@ -392,23 +392,14 @@ consolidate_runnability_loop(Key) ->
consolidate_runnability_loop(ets:next(pdb_activity, Key)).
list_all_ts() ->
- ATs = [ Act#activity.timestamp ||
- Act <- select_query({activity, []})],
- STs = [ Act#activity.timestamp ||
- Act <- select_query({scheduler, []})],
+ ATs = [Act#activity.timestamp || Act <- select_query({activity, []})],
+ STs = [Act#activity.timestamp || Act <- select_query({scheduler, []})],
ITs = lists:flatten([
[I#information.start,
I#information.stop] ||
I <- select_query({information, all})]),
- % Filter out all undefined (non ts)
- TsList = lists:filter(
- fun(Element) ->
- case Element of
- {_,_,_} -> true;
- _ -> false
- end
- end, ATs ++ STs ++ ITs),
- TsList.
+ %% Filter out all undefined (non ts)
+ [Elem || Elem = {_,_,_} <- ATs ++ STs ++ ITs].
%% get_runnable_count(Type, State) -> RunnableCount
%% In:
diff --git a/lib/percept/src/percept_html.erl b/lib/percept/src/percept_html.erl
index ffce7a98fa..7e0ea45783 100644
--- a/lib/percept/src/percept_html.erl
+++ b/lib/percept/src/percept_html.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
-module(percept_html).
@@ -172,12 +172,12 @@ div_tag_graph() ->
width:40px;
height:40px;\"></div></div>".
--spec(url_graph/5 :: (
+-spec url_graph(
Widht :: non_neg_integer(),
Height :: non_neg_integer(),
Min :: float(),
Max :: float(),
- Pids :: [pid()]) -> string()).
+ Pids :: [pid()]) -> string().
url_graph(W, H, Min, Max, []) ->
"/cgi-bin/percept_graph/graph?range_min=" ++ term2html(float(Min))
@@ -508,10 +508,7 @@ cl_deltas([A,B|Ls], Out) -> cl_deltas([B|Ls], [B - A | Out]).
join_strings(Strings) ->
lists:flatten(Strings).
--spec(join_strings_with/2 :: (
- Strings :: [string()],
- Separator :: string()) ->
- string()).
+-spec join_strings_with(Strings :: [string()], Separator :: string()) -> string().
join_strings_with([S1, S2 | R], S) ->
join_strings_with([join_strings_with(S1,S2,S) | R], S);
@@ -522,7 +519,7 @@ join_strings_with(S1, S2, S) ->
%%% Generic erlang2html
--spec(html_table/1 :: (Rows :: [[string() | {'td' | 'th', string()}]]) -> string()).
+-spec html_table(Rows :: [[string() | {'td' | 'th', string()}]]) -> string().
html_table(Rows) -> "<table>" ++ html_table_row(Rows) ++ "</table>".
@@ -539,7 +536,7 @@ html_table_data([Data|Row]) -> "<td>" ++ Data ++ "</td>" ++ html_table_dat
--spec(table_line/1 :: (Table :: [any()]) -> string()).
+-spec table_line(Table :: [any()]) -> string().
table_line(List) -> table_line(List, ["<tr>"]).
table_line([], Out) -> lists:flatten(lists:reverse(["</tr>\n"|Out]));
@@ -548,16 +545,12 @@ table_line([Element | Elements], Out) when is_list(Element) ->
table_line([Element | Elements], Out) ->
table_line(Elements, ["<td>" ++ term2html(Element) ++ "</td>"|Out]).
--spec(term2html/1 :: (any()) -> string()).
+-spec term2html(any()) -> string().
term2html(Term) when is_float(Term) -> lists:flatten(io_lib:format("~.4f", [Term]));
term2html(Term) -> lists:flatten(io_lib:format("~p", [Term])).
--spec(mfa2html/1 :: (MFA :: {
- atom(),
- atom(),
- list() | integer()}) ->
- string()).
+-spec mfa2html(MFA :: {atom(), atom(), list() | integer()}) -> string().
mfa2html({Module, Function, Arguments}) when is_list(Arguments) ->
lists:flatten(io_lib:format("~p:~p/~p", [Module, Function, length(Arguments)]));
@@ -566,7 +559,7 @@ mfa2html({Module, Function, Arity}) when is_integer(Arity) ->
mfa2html(_) ->
"undefined".
--spec(pid2html/1 :: (Pid :: pid() | port()) -> string()).
+-spec pid2html(Pid :: pid() | port()) -> string().
pid2html(Pid) when is_pid(Pid) ->
PidString = term2html(Pid),
@@ -577,14 +570,14 @@ pid2html(Pid) when is_port(Pid) ->
pid2html(_) ->
"undefined".
--spec(image_string/1 :: (Request :: string()) -> string()).
+-spec image_string(Request :: string()) -> string().
image_string(Request) ->
"<img border=0 src=\"/cgi-bin/percept_graph/" ++
Request ++
" \">".
--spec(image_string/2 :: (atom() | string(), list()) -> string()).
+-spec image_string(atom() | string(), list()) -> string().
image_string(Request, Options) when is_atom(Request), is_list(Options) ->
image_string(image_string_head(erlang:atom_to_list(Request), Options, []));
@@ -610,13 +603,13 @@ image_string_tail(Request, [{Type, Value} | Opts], Out) ->
%%% percept conversions
--spec(pid2value/1 :: (Pid :: pid()) -> string()).
+-spec pid2value(Pid :: pid()) -> string().
pid2value(Pid) ->
String = lists:flatten(io_lib:format("~p", [Pid])),
lists:sublist(String, 2, erlang:length(String)-2).
--spec(value2pid/1 :: (Value :: string()) -> pid()).
+-spec value2pid(Value :: string()) -> pid().
value2pid(Value) ->
String = lists:flatten("<" ++ Value ++ ">"),
@@ -625,10 +618,8 @@ value2pid(Value) ->
%%% get value
--spec(get_option_value/2 :: (
- Option :: string(),
- Options :: [{string(),any()}]) ->
- {'error', any()} | bool() | pid() | [pid()] | number()).
+-spec get_option_value(Option :: string(), Options :: [{string(),any()}]) ->
+ {'error', any()} | boolean() | pid() | [pid()] | number().
get_option_value(Option, Options) ->
case catch get_option_value0(Option, Options) of
@@ -662,8 +653,7 @@ get_default_option_value(Option) ->
_ -> {error, {undefined_default_option, Option}}
end.
--spec(get_number_value/1 :: (Value :: string()) ->
- number() | {'error', 'illegal_number'}).
+-spec get_number_value(string()) -> number() | {'error', 'illegal_number'}.
get_number_value(Value) ->
% Try float
@@ -710,7 +700,7 @@ menu() ->
<li><a href=/cgi-bin/percept_html/page>overview</a></li>
</ul></div>\n".
--spec(error_msg/1 :: (Error :: string()) -> string()).
+-spec error_msg(Error :: string()) -> string().
error_msg(Error) ->
"<table width=300>
diff --git a/lib/runtime_tools/src/percept_profile.erl b/lib/runtime_tools/src/percept_profile.erl
index b333dee0cf..cdc7a0fca1 100644
--- a/lib/runtime_tools/src/percept_profile.erl
+++ b/lib/runtime_tools/src/percept_profile.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -41,7 +41,7 @@
%% @type percept_option() = procs | ports | exclusive
--type(percept_option() :: 'procs' | 'ports' | 'exclusive' | 'scheduler').
+-type percept_option() :: 'procs' | 'ports' | 'exclusive' | 'scheduler'.
%%==========================================================================
%%
@@ -52,8 +52,8 @@
%% @spec start(Filename::string()) -> {ok, Port} | {already_started, Port}
%% @equiv start(Filename, [procs])
--spec(start/1 :: (Filename :: string()) ->
- {'ok', port()} | {'already_started', port()}).
+-spec start(Filename :: file:filename()) ->
+ {'ok', port()} | {'already_started', port()}.
start(Filename) ->
profile_to_file(Filename, [procs]).
@@ -64,10 +64,9 @@ start(Filename) ->
%% All events are stored in the file given by Filename.
%% An explicit call to stop/0 is needed to stop profiling.
--spec(start/2 :: (
- Filename :: string(),
- Options :: [percept_option()]) ->
- {'ok', port()} | {'already_started', port()}).
+-spec start(Filename :: file:filename(),
+ Options :: [percept_option()]) ->
+ {'ok', port()} | {'already_started', port()}.
start(Filename, Options) ->
profile_to_file(Filename, Options).
@@ -79,11 +78,10 @@ start(Filename, Options) ->
%% No explicit call to stop/0 is needed, the profiling stops when
%% the entry function returns.
--spec(start/3 :: (
- Filename :: string(),
- Entry :: {atom(), atom(), list()},
- Options :: [percept_option()]) ->
- 'ok' | {'already_started', port()} | {'error', 'not_started'}).
+-spec start(Filename :: file:filename(),
+ Entry :: {atom(), atom(), list()},
+ Options :: [percept_option()]) ->
+ 'ok' | {'already_started', port()} | {'error', 'not_started'}.
start(Filename, {Module, Function, Args}, Options) ->
case whereis(percept_port) of
@@ -107,11 +105,11 @@ deliver_all_trace() ->
receive {Tracer, ok} -> ok end,
erlang:trace(Tracee, false, [procs]),
ok.
--spec(stop/0 :: () -> 'ok' | {'error', 'not_started'}).
%% @spec stop() -> ok | {'error', 'not_started'}
%% @doc Stops profiling.
+-spec stop() -> 'ok' | {'error', 'not_started'}.
stop() ->
erlang:system_profile(undefined, [runnable_ports, runnable_procs]),
@@ -192,5 +190,4 @@ parse_profile_options([Opt|Opts], {TOpts, POpts}) ->
});
_ ->
parse_profile_options(Opts, {TOpts, POpts})
-
end.
diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src
index cfe4b81ab6..8c814cfaf5 100644
--- a/lib/sasl/src/sasl.app.src
+++ b/lib/sasl/src/sasl.app.src
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
{application, sasl,
@@ -32,6 +32,8 @@
sasl_report,
sasl_report_tty_h,
sasl_report_file_h,
+ si,
+ si_sasl_supp,
systools,
systools_make,
systools_rc,
diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl
index 979d80159e..d1babaffff 100644
--- a/lib/sasl/src/sasl.erl
+++ b/lib/sasl/src/sasl.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(sasl).
@@ -126,13 +126,13 @@ type(_) -> all.
add_error_logger_mf(undefined) -> ok;
add_error_logger_mf({Dir, MaxB, MaxF}) ->
error_logger:add_report_handler(
- log_mf_h, log_mf_h:init(Dir, MaxB, MaxF, {sasl, pred})).
+ log_mf_h, log_mf_h:init(Dir, MaxB, MaxF, fun pred/1)).
delete_error_logger_mf(undefined) -> ok;
delete_error_logger_mf(_) ->
error_logger:delete_report_handler(log_mf_h).
-pred({_Type, GL, _Msg}) when node(GL) /= node() -> false;
+pred({_Type, GL, _Msg}) when node(GL) =/= node() -> false;
pred(_) -> true.
%%%-----------------------------------------------------------------
diff --git a/lib/tools/emacs/erlang-skels-old.el b/lib/tools/emacs/erlang-skels-old.el
index 662590a1f3..b88d7bcc4b 100644
--- a/lib/tools/emacs/erlang-skels-old.el
+++ b/lib/tools/emacs/erlang-skels-old.el
@@ -433,7 +433,7 @@ Please see the function `tempo-define-template'.")
"%% {ok, State, Timeout} |" n
"%% ignore |" n
"%% {stop, Reason}" n
- "%% Description: Initiates the server" n
+ "%% Description: Initializes the server" n
(erlang-skel-separator 2)
"init([]) ->" n>
"{ok, #state{}}." n
@@ -784,7 +784,7 @@ Please see the function `tempo-define-template'.")
"%% {ok, State, Timeout} |" n
"%% ignore |" n
"%% {stop, Reason}" n
- "%% Description: Initiates the server" n
+ "%% Description: Initializes the server" n
(erlang-skel-separator 2)
"init([]) ->" n>
"{ok, #state{}}." n
@@ -815,7 +815,7 @@ Please see the function `tempo-define-template'.")
"%% Note: This directive should only be used in test suites." n
"-compile(export_all)." n n
- "-include(\"test_server.hrl\")." n n
+ "-include_lib(\"test_server/include/test_server.hrl\")." n n
(erlang-skel-separator 2)
"%% TEST SERVER CALLBACK FUNCTIONS" n
@@ -954,7 +954,7 @@ Please see the function `tempo-define-template'.")
"%% Note: This directive should only be used in test suites." n
"-compile(export_all)." n n
- "-include(\"ct.hrl\")." n n
+ "-include_lib(\"common_test/include/ct.hrl\")." n n
(erlang-skel-separator 2)
"%% COMMON TEST CALLBACK FUNCTIONS" n
@@ -1156,7 +1156,7 @@ Please see the function `tempo-define-template'.")
'((erlang-skel-include erlang-skel-large-header)
"-compile(export_all)." n n
- "-include(\"ct.hrl\")." n n
+ "-include_lib(\"common_test/include/ct.hrl\")." n n
(erlang-skel-separator 2)
"%% Function: suite() -> Info" n
diff --git a/lib/tools/emacs/erlang-skels.el b/lib/tools/emacs/erlang-skels.el
index f92f3f1aae..355b223822 100644
--- a/lib/tools/emacs/erlang-skels.el
+++ b/lib/tools/emacs/erlang-skels.el
@@ -58,10 +58,12 @@
erlang-skel-lib erlang-skel-header)
("Corba callback" "gen-corba-cb"
erlang-skel-corba-callback erlang-skel-header)
- ("Erlang test suite TS frontend" "ts-test-suite"
+ ("Small Common Test suite" "ct-test-suite-s"
+ erlang-skel-ct-test-suite-s erlang-skel-header)
+ ("Large Common Test suite" "ct-test-suite-l"
+ erlang-skel-ct-test-suite-l erlang-skel-header)
+ ("Erlang TS test suite" "ts-test-suite"
erlang-skel-ts-test-suite erlang-skel-header)
- ("Erlang test suite CT frontend" "ct-test-suite"
- erlang-skel-ct-test-suite erlang-skel-header)
)
"*Description of all skeleton templates.
Both functions and menu entries will be created.
@@ -478,7 +480,7 @@ Please see the function `tempo-define-template'.")
(erlang-skel-separator-start 2)
"%% @private" n
"%% @doc" n
- "%% Initiates the server" n
+ "%% Initializes the server" n
"%%" n
"%% @spec init(Args) -> {ok, State} |" n
"%% {ok, State, Timeout} |" n
@@ -888,7 +890,7 @@ Please see the function `tempo-define-template'.")
(erlang-skel-separator-start 2)
"%% @private" n
"%% @doc" n
- "%% Initiates the server" n
+ "%% Initializes the server" n
"%%" n
"%% @spec init(Args) -> {ok, State} |" n
"%% {ok, State, Timeout} |" n
@@ -930,15 +932,21 @@ Please see the function `tempo-define-template'.")
"%% Note: This directive should only be used in test suites." n
"-compile(export_all)." n n
- "-include(\"test_server.hrl\")." n n
+ "-include_lib(\"test_server/include/test_server.hrl\")." n n
- "%% Test server callback functions" n
(erlang-skel-separator-start 2)
+ "%% TEST SERVER CALLBACK FUNCTIONS" n
+ (erlang-skel-separator 2)
+ n
+ (erlang-skel-separator-start 2)
+ "%%" n
"%% @doc" n
- "%% Config - [tuple()]" n
- "%% A list of key/value pairs, holding the test case configuration." n
+ "%% Initialization before the suite." n
"%%" n
- "%% Initiation before the whole suite" n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% A list of key/value pairs, holding the test case configuration." n
+ "%% Reason = term()" n
+ "%% The reason for skipping the suite." n
"%%" n
"%% Note: This function is free to add any key/value pairs to the Config" n
"%% variable, but should NOT alter/remove any existing entries." n
@@ -950,11 +958,10 @@ Please see the function `tempo-define-template'.")
(erlang-skel-separator-start 2)
"%% @doc" n
+ "%% Cleanup after the suite." n
"%% Config - [tuple()]" n
"%% A list of key/value pairs, holding the test case configuration." n
"%%" n
- "%% Cleanup after the whole suite" n
- "%%" n
"%% @spec end_per_suite(Config) -> _" n
(erlang-skel-separator-end 2)
"end_per_suite(_Config) ->" n >
@@ -962,12 +969,14 @@ Please see the function `tempo-define-template'.")
(erlang-skel-separator-start 2)
"%% @doc" n
- "%% Case - atom()" n
+ "%% Initialization before each test case" n
+ "%%" n
+ "%% TestCase - atom()" n
"%% Name of the test case that is about to be run." n
"%% Config - [tuple()]" n
"%% A list of key/value pairs, holding the test case configuration." n
- "%%" n
- "%% Initiation before each test case" n
+ "%% Reason = term()" n
+ "%% The reason for skipping the test case." n
"%%" n
"%% Note: This function is free to add any key/value pairs to the Config" n
"%% variable, but should NOT alter/remove any existing entries." n
@@ -979,13 +988,13 @@ Please see the function `tempo-define-template'.")
(erlang-skel-separator-start 2)
"%% @doc" n
- "%% Case - atom()" n
- "%% Name of the test case that is about to be run." n
- "%% Config - [tuple()]" n
- "%% A list of key/value pairs, holding the test case configuration." n
- "%%" n
"%% Cleanup after each test case" n
"%%" n
+ "%% TestCase = atom()" n
+ "%% Name of the test case that is finished." n
+ "%% Config = [tuple()]" n
+ "%% A list of key/value pairs, holding the test case configuration." n
+ "%%" n
"%% @spec end_per_testcase(TestCase, Config) -> _" n
(erlang-skel-separator-end 2)
"end_per_testcase(_TestCase, _Config) ->" n >
@@ -993,64 +1002,247 @@ Please see the function `tempo-define-template'.")
(erlang-skel-separator-start 2)
"%% @doc" n
- "%% Clause - atom() - suite | doc" n
- "%% TestCases - [Case]" n
- "%% Case - atom()" n
- "%% Name of a test case." n
- "%%" n
+ "%% Returns a description of the test suite when" n
+ "%% Clause == doc, and a test specification (list" n
+ "%% of the conf and test cases in the suite) when" n
+ "%% Clause == suite." n
"%% Returns a list of all test cases in this test suite" n
"%%" n
+ "%% Clause = doc | suite" n
+ "%% Indicates expected return value." n
+ "%% Descr = [string()] | []" n
+ "%% String that describes the test suite." n
+ "%% Spec = [TestCase]" n
+ "%% A test specification." n
+ "%% TestCase = ConfCase | atom()" n
+ "%% Configuration case, or the name of a test case function." n
+ "%% ConfCase = {conf,Init,Spec,End} |" n
+ "%% {conf,Properties,Init,Spec,End}" n
+ "%% Init = End = {Mod,Func} | Func" n
+ "%% Initialization and cleanup function." n
+ "%% Mod = Func = atom()" n
+ "%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]" n
+ "%% Execution properties of the test cases (may be combined)." n
+ "%% Shuffle = shuffle | {shuffle,Seed}" n
+ "%% To get cases executed in random order." n
+ "%% Seed = {integer(),integer(),integer()}" n
+ "%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |" n
+ "%% repeat_until_any_ok | repeat_until_any_fail" n
+ "%% To get execution of cases repeated." n
+ "%% N = integer() | forever" n
+ "%% Reason = term()" n
+ "%% The reason for skipping the test suite." n
+ "%%" n
"%% @spec all(Clause) -> TestCases" n
(erlang-skel-separator-end 2)
"all(doc) ->" n >
"[\"Describe the main purpose of this suite\"];" n n
- "all(suite) ->" n >
- "[]." n n
-
- "%% Test cases starts here." n
+ "all(suite) -> " n >
+ "[a_test_case]." n n
+ n
(erlang-skel-separator-start 2)
- "test_case(doc) ->" n >
- "[\"Describe the main purpose of test case\"];" n n
- "test_case(suite) ->" n >
+ "%% TEST CASES" n
+ (erlang-skel-separator 2)
+ n
+ (erlang-skel-separator-start 2)
+ "%% @doc" n
+ "%% Test case function. Returns a description of the test" n
+ "%% case (doc), then returns a test specification (suite)," n
+ "%% or performs the actual test (Config)." n
+ "%%" n
+ "%% Arg = doc | suite | Config" n
+ "%% Indicates expected behaviour and return value." n
+ "%% Config = [tuple()]" n
+ "%% A list of key/value pairs, holding the test case configuration." n
+ "%% Descr = [string()] | []" n
+ "%% String that describes the test case." n
+ "%% Spec = [tuple()] | []" n
+ "%% A test specification, see all/1." n
+ "%% Reason = term()" n
+ "%% The reason for skipping the test case." n
+ "%%" n
+ "%% @spec TestCase(Arg) -> Descr | Spec | ok | exit() | {skip,Reason}" n
+
+ (erlang-skel-separator-end 2)
+ "a_test_case(doc) -> " n >
+ "[\"Describe the main purpose of this test case\"];" n n
+ "a_test_case(suite) -> " n >
"[];" n n
- "test_case(Config) when is_list(Config) ->" n >
+ "a_test_case(Config) when is_list(Config) -> " n >
"ok." n
)
"*The template of a library module.
Please see the function `tempo-define-template'.")
-(defvar erlang-skel-ct-test-suite
- '((erlang-skel-include erlang-skel-large-header)
- "-suite_defaults([{timetrap, {minutes, 10}}])." n n
+(defvar erlang-skel-ct-test-suite-s
+ '((erlang-skel-include erlang-skel-large-header)
+ "-compile(export_all)." n n
- "%% Note: This directive should only be used in test suites." n
+ "-include_lib(\"common_test/include/ct.hrl\")." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec suite() -> Info" n
+ "%% Info = [tuple()]" n
+ (erlang-skel-separator-end 2)
+ "suite() ->" n >
+ "[{timetrap,{seconds,30}}]." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec init_per_suite(Config0) ->" n
+ "%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% Reason = term()" n
+ (erlang-skel-separator-end 2)
+ "init_per_suite(Config) ->" n >
+ "Config." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec end_per_suite(Config0) -> void() | {save_config,Config1}" n
+ "%% Config0 = Config1 = [tuple()]" n
+ (erlang-skel-separator-end 2)
+ "end_per_suite(_Config) ->" n >
+ "ok." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec init_per_group(GroupName, Config0) ->" n
+ "%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
+ "%% GroupName = atom()" n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% Reason = term()" n
+ (erlang-skel-separator-end 2)
+ "init_per_group(_GroupName, Config) ->" n >
+ "Config." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec end_per_group(GroupName, Config0) ->" n
+ "%% void() | {save_config,Config1}" n
+ "%% GroupName = atom()" n
+ "%% Config0 = Config1 = [tuple()]" n
+ (erlang-skel-separator-end 2)
+ "end_per_group(_GroupName, _Config) ->" n >
+ "ok." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec init_per_testcase(TestCase, Config0) ->" n
+ "%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
+ "%% TestCase = atom()" n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% Reason = term()" n
+ (erlang-skel-separator-end 2)
+ "init_per_testcase(_TestCase, Config) ->" n >
+ "Config." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec end_per_testcase(TestCase, Config0) ->" n
+ "%% void() | {save_config,Config1} | {fail,Reason}" n
+ "%% TestCase = atom()" n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% Reason = term()" n
+ (erlang-skel-separator-end 2)
+ "end_per_testcase(_TestCase, _Config) ->" n >
+ "ok." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec groups() -> [Group]" n
+ "%% Group = {GroupName,Properties,GroupsAndTestCases}" n
+ "%% GroupName = atom()" n
+ "%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]" n
+ "%% GroupsAndTestCases = [Group | {group,GroupName} | TestCase]" n
+ "%% TestCase = atom()" n
+ "%% Shuffle = shuffle | {shuffle,{integer(),integer(),integer()}}" n
+ "%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |" n
+ "%% repeat_until_any_ok | repeat_until_any_fail" n
+ "%% N = integer() | forever" n
+ (erlang-skel-separator-end 2)
+ "groups() ->" n >
+ "[]." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec all() -> GroupsAndTestCases | {skip,Reason}" n
+ "%% GroupsAndTestCases = [{group,GroupName} | TestCase]" n
+ "%% GroupName = atom()" n
+ "%% TestCase = atom()" n
+ "%% Reason = term()" n
+ (erlang-skel-separator-end 2)
+ "all() -> " n >
+ "[my_test_case]." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec TestCase() -> Info" n
+ "%% Info = [tuple()]" n
+ (erlang-skel-separator-end 2)
+ "my_test_case() -> " n >
+ "[]." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @spec TestCase(Config0) ->" n
+ "%% ok | exit() | {skip,Reason} | {comment,Comment} |" n
+ "%% {save_config,Config1} | {skip_and_save,Reason,Config1}" n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% Reason = term()" n
+ "%% Comment = term()" n
+ (erlang-skel-separator-end 2)
+ "my_test_case(_Config) -> " n >
+ "ok." n
+ )
+ "*The template of a library module.
+Please see the function `tempo-define-template'.")
+
+
+(defvar erlang-skel-ct-test-suite-l
+ '((erlang-skel-include erlang-skel-large-header)
+ "%% Note: This directive should only be used in test suites." n
"-compile(export_all)." n n
- "-include(\"ct.hrl\")." n n
+ "-include_lib(\"common_test/include/ct.hrl\")." n n
- "%% Test server callback functions" n
+ (erlang-skel-separator-start 2)
+ "%% COMMON TEST CALLBACK FUNCTIONS" n
+ (erlang-skel-separator 2)
+ n
(erlang-skel-separator-start 2)
"%% @doc" n
- "%% Config - [tuple()]" n
- "%% A list of key/value pairs, holding the test case configuration." n
+ "%% Returns list of tuples to set default properties" n
+ "%% for the suite." n
+ "%%" n
+ "%% Function: suite() -> Info" n
+ "%%" n
+ "%% Info = [tuple()]" n
+ "%% List of key/value pairs." n
+ "%%" n
+ "%% Note: The suite/0 function is only meant to be used to return" n
+ "%% default data values, not perform any other operations." n
+ "%%" n
+ "%% @spec suite() -> Info" n
+ (erlang-skel-separator-end 2)
+ "suite() ->" n >
+ "[{timetrap,{minutes,10}}]." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @doc" n
+ "%% Initialization before the whole suite" n
"%%" n
- "%% Initiation before the whole suite" n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% A list of key/value pairs, holding the test case configuration." n
+ "%% Reason = term()" n
+ "%% The reason for skipping the suite." n
"%%" n
"%% Note: This function is free to add any key/value pairs to the Config" n
"%% variable, but should NOT alter/remove any existing entries." n
"%%" n
- "%% @spec init_per_suite(Config) -> Config" n
+ "%% @spec init_per_suite(Config0) ->" n
+ "%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
(erlang-skel-separator-end 2)
"init_per_suite(Config) ->" n >
"Config." n n
(erlang-skel-separator-start 2)
"%% @doc" n
+ "%% Cleanup after the whole suite" n
+ "%%" n
"%% Config - [tuple()]" n
"%% A list of key/value pairs, holding the test case configuration." n
"%%" n
- "%% Cleanup after the whole suite" n
- "%%" n
"%% @spec end_per_suite(Config) -> _" n
(erlang-skel-separator-end 2)
"end_per_suite(_Config) ->" n >
@@ -1058,58 +1250,157 @@ Please see the function `tempo-define-template'.")
(erlang-skel-separator-start 2)
"%% @doc" n
- "%% Case - atom()" n
+ "%% Initialization before each test case group." n
+ "%%" n
+ "%% GroupName = atom()" n
+ "%% Name of the test case group that is about to run." n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% A list of key/value pairs, holding configuration data for the group." n
+ "%% Reason = term()" n
+ "%% The reason for skipping all test cases and subgroups in the group." n
+ "%%" n
+ "%% @spec init_per_group(GroupName, Config0) ->" n
+ "%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
+ (erlang-skel-separator-end 2)
+ "init_per_group(_GroupName, Config) ->" n >
+ "Config." n n
+
+ (erlang-skel-separator-start 2)
+ "%% @doc" n
+ "%% Cleanup after each test case group." n
+ "%%" n
+ "%% GroupName = atom()" n
+ "%% Name of the test case group that is finished." n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% A list of key/value pairs, holding configuration data for the group." n
+ "%%" n
+ "%% @spec end_per_group(GroupName, Config0) ->" n
+ "%% void() | {save_config,Config1}" n
+ (erlang-skel-separator-end 2)
+ "end_per_group(_GroupName, _Config) ->" n >
+ "ok." n n
+ (erlang-skel-separator-start 2)
+ "%% @doc" n
+ "%% Initialization before each test case" n
+ "%%" n
+ "%% TestCase - atom()" n
"%% Name of the test case that is about to be run." n
- "%% Config - [tuple()]" n
+ "%% Config0 = Config1 = [tuple()]" n
"%% A list of key/value pairs, holding the test case configuration." n
- "%%" n
- "%% Initiation before each test case" n
+ "%% Reason = term()" n
+ "%% The reason for skipping the test case." n
"%%" n
"%% Note: This function is free to add any key/value pairs to the Config" n
"%% variable, but should NOT alter/remove any existing entries." n
- "%% Initiation before each test case" n
"%%" n
- "%% @spec init_per_testcase(TestCase, Config) -> Config" n
+ "%% @spec init_per_testcase(TestCase, Config0) ->" n
+ "%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
(erlang-skel-separator-end 2)
"init_per_testcase(_TestCase, Config) ->" n >
"Config." n n
(erlang-skel-separator-start 2)
"%% @doc" n
- "%% Case - atom()" n
- "%% Name of the test case that is about to be run." n
- "%% Config - [tuple()]" n
- "%% A list of key/value pairs, holding the test case configuration." n
- "%%" n
"%% Cleanup after each test case" n
"%%" n
- "%% @spec end_per_testcase(TestCase, Config) -> _" n
+ "%% TestCase - atom()" n
+ "%% Name of the test case that is finished." n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% A list of key/value pairs, holding the test case configuration." n
+ "%%" n
+ "%% @spec end_per_testcase(TestCase, Config0) ->" n
+ "%% void() | {save_config,Config1} | {fail,Reason}" n
(erlang-skel-separator-end 2)
"end_per_testcase(_TestCase, _Config) ->" n >
- "ok."n n
+ "ok." n n
(erlang-skel-separator-start 2)
"%% @doc" n
- "%% TestCases - [Case]" n
- "%% Case - atom()" n
- "%% Name of a test case." n
+ "%% Returns a list of test case group definitions." n
"%%" n
- "%% Returns a list of all test cases in this test suite" n
+ "%% Group = {GroupName,Properties,GroupsAndTestCases}" n
+ "%% GroupName = atom()" n
+ "%% The name of the group." n
+ "%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]" n
+ "%% Group properties that may be combined." n
+ "%% GroupsAndTestCases = [Group | {group,GroupName} | TestCase]" n
+ "%% TestCase = atom()" n
+ "%% The name of a test case." n
+ "%% Shuffle = shuffle | {shuffle,Seed}" n
+ "%% To get cases executed in random order." n
+ "%% Seed = {integer(),integer(),integer()}" n
+ "%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |" n
+ "%% repeat_until_any_ok | repeat_until_any_fail" n
+ "%% To get execution of cases repeated." n
+ "%% N = integer() | forever" n
"%%" n
- "%% @spec all() -> TestCases" n
+ "%% @spec: groups() -> [Group]" n
(erlang-skel-separator-end 2)
- "all() ->" n >
+ "groups() ->" n >
"[]." n n
- "%% Test cases starts here." n
(erlang-skel-separator-start 2)
- "test_case() ->" n >
- "[{doc, \"Describe the main purpose of this test case\"}]." n n
- "test_case(Config) when is_list(Config) ->" n >
+ "%% @doc" n
+ "%% Returns the list of groups and test cases that" n
+ "%% are to be executed." n
+ "%%" n
+ "%% GroupsAndTestCases = [{group,GroupName} | TestCase]" n
+ "%% GroupName = atom()" n
+ "%% Name of a test case group." n
+ "%% TestCase = atom()" n
+ "%% Name of a test case." n
+ "%% Reason = term()" n
+ "%% The reason for skipping all groups and test cases." n
+ "%%" n
+ "%% @spec all() -> GroupsAndTestCases | {skip,Reason}" n
+ (erlang-skel-separator-end 2)
+ "all() -> " n >
+ "[my_test_case]." n n
+
+ n
+ (erlang-skel-separator-start 2)
+ "%% TEST CASES" n
+ (erlang-skel-separator 2)
+ n
+
+ (erlang-skel-separator-start 2)
+ "%% @doc " n
+ "%% Test case info function - returns list of tuples to set" n
+ "%% properties for the test case." n
+ "%%" n
+ "%% Info = [tuple()]" n
+ "%% List of key/value pairs." n
+ "%%" n
+ "%% Note: This function is only meant to be used to return a list of" n
+ "%% values, not perform any other operations." n
+ "%%" n
+ "%% @spec TestCase() -> Info " n
+ (erlang-skel-separator-end 2)
+ "my_test_case() -> " n >
+ "[]." n n
+
+ (erlang-skel-separator 2)
+ "%% @doc Test case function. (The name of it must be specified in" n
+ "%% the all/0 list or in a test case group for the test case" n
+ "%% to be executed)." n
+ "%%" n
+ "%% Config0 = Config1 = [tuple()]" n
+ "%% A list of key/value pairs, holding the test case configuration." n
+ "%% Reason = term()" n
+ "%% The reason for skipping the test case." n
+ "%% Comment = term()" n
+ "%% A comment about the test case that will be printed in the html log." n
+ "%%" n
+ "%% @spec TestCase(Config0) ->" n
+ "%% ok | exit() | {skip,Reason} | {comment,Comment} |" n
+ "%% {save_config,Config1} | {skip_and_save,Reason,Config1}" n
+ (erlang-skel-separator-end 2)
+ "my_test_case(_Config) -> " n >
"ok." n
+
)
"*The template of a library module.
-Please see the function `tempo-define-template'.")
+ Please see the function `tempo-define-template'.")
;; Skeleton code:
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index 780bb2e741..2ed4476440 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.erl
@@ -73,8 +73,7 @@ gen_xml() ->
-record(hs,{alias,skip,fs,fopt,ev,acc,info}).
init_defs(List0) ->
- List1 = to_lists(List0),
- lists:map(fun mangle_info/1, List1).
+ [mangle_info(L) || L <- to_lists(List0)].
mangle_info(E={enum,Type0,SkipStr}) ->
Type = case is_atom(Type0) of true -> atom_to_list(Type0); false -> Type0 end,
@@ -138,9 +137,9 @@ parse_defs([{class,Name,Parent,Info}|Rest], Acc0) ->
Defs0 = load_members(FileName, Name, gb_trees:empty(), Tab, Type, Info),
put(current_class, Name),
- Class0 = #class{name=name(Name,Info),parent=Parent,
+ Class0 = #class{name=name(Name,Info), parent=Parent,
doc=get_value(doc,Info#hs.info,undefined),
- file=FileName,options=Info#hs.info, id=next_id(class_id)},
+ file=FileName, options=Info#hs.info, id=next_id(class_id)},
ParseClass = fun(Member,{Class,Dfs}) ->
parse_class(Member,Tab,Dfs,Class,Info)
end,
@@ -161,12 +160,11 @@ parse_defs([], Acc) -> reverse(Acc).
meta_info(C=#class{name=CName,methods=Ms0}) ->
Ms = lists:append(Ms0),
- HaveConstructor =
- lists:keysearch(constructor, #method.method_type, Ms) =/= false,
+ HaveConstructor = lists:keymember(constructor, #method.method_type, Ms),
case lists:keysearch(destructor, #method.method_type, Ms) of
false when HaveConstructor ->
- Dest = #method{name="destroy",id=next_id(func_id),
- method_type=destructor, params=[this(CName)]},
+ Dest = #method{name = "destroy", id = next_id(func_id),
+ method_type = destructor, params = [this(CName)]},
C#class{methods = [[Dest]|Ms0]};
false ->
C#class{abstract = true};
@@ -451,9 +449,9 @@ find_erl_alias_name(MName,Ps,Fopts) ->
_ ->
Find = fun({all,AliasName},Acc) -> [AliasName|Acc];
({Var,AliasName},Acc) ->
- case lists:keysearch(Var, #param.name, Ps) of
- {value, _} -> [AliasName|Acc];
- _ -> Acc
+ case lists:keymember(Var, #param.name, Ps) of
+ true -> [AliasName|Acc];
+ false -> Acc
end
end,
case lists:foldl(Find, [], Aliases) of
@@ -873,11 +871,14 @@ add_method2(M0=#method{name=Name,params=Ps0,type=T0},#class{name=CName,parent=Pa
end,
M1 = M0#method{defined_in=CName,
min_arity = length(Req),
- max_arity = length(Req) + if length(Opt) > 0 -> 1; true -> 0 end,
+ max_arity = length(Req) + case Opt of
+ [_ | _] -> 1;
+ _ -> 0
+ end,
type = Type,
method_type = IsStatic,
where = Where,
- id=next_id(func_id),
+ id = next_id(func_id),
pre_hook = get_opt(pre_hook, Name, length(Ps), Opts),
post_hook = get_opt(post_hook, Name, length(Ps), Opts),
doc = get_opt(doc, Name, length(Ps), Opts)
@@ -1037,10 +1038,10 @@ types_differ([list|R1], [opt_list|R2]) ->
types_differ([opt_list|R1], [list|R2]) ->
types_differ(R1,R2);
types_differ([C1|R1], [C2|R2]) when is_tuple(C1), is_tuple(C2) ->
- (size(C1) =/= size(C2)) orelse types_differ(R1,R2);
+ (tuple_size(C1) =/= tuple_size(C2)) orelse types_differ(R1,R2);
types_differ([C1|_R1], [_C2|_R2]) when is_tuple(C1) ->
true;
-types_differ([_C1|_R1], [C2|_R2]) when is_tuple(C2)->
+types_differ([_C1|_R1], [C2|_R2]) when is_tuple(C2) ->
true;
types_differ([_C1|R1], [_C2|R2]) -> %% More cases?
types_differ(R1,R2);
@@ -1198,7 +1199,7 @@ name(Name0, #hs{alias=Alias}) ->
Name0;
"esaBrekciP" ++ _ -> %% Arrg uses base
Name0;
- "esaB" ++ Rest when hd(Name0) == $w ->
+ "esaB" ++ Rest when hd(Name0) =:= $w ->
%% Arrg Some decl uses base class directly
reverse(Rest);
_F ->
diff --git a/lib/wx/doc/src/notes.xml b/lib/wx/doc/src/notes.xml
index f9f16defd3..92933c348b 100644
--- a/lib/wx/doc/src/notes.xml
+++ b/lib/wx/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2009</year>
+ <year>2009</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>wxErlang Release Notes</title>
@@ -31,6 +31,58 @@
<p>This document describes the changes made to the wxErlang
application.</p>
+<section><title>Wx 0.98.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Corrected incorrectly generated wxFileDialog:getPaths/1.
+ Reported by Jason/hornja.</p>
+ <p>
+ Own Id: OTP-8330</p>
+ </item>
+ <item>
+ <p>
+ Fixed a memory reference bug which caused unexplained
+ {badarg, Int} exits when running multiple wx
+ applications.</p>
+ <p>
+ Own Id: OTP-8461</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Added <c>wxListCtrl:getEditCtrl/1</c> (not available on
+ Mac).</p>
+ <p>
+ Own Id: OTP-8408</p>
+ </item>
+ <item>
+ <p>
+ Cleanups suggested by tidier and modernization of types
+ and specs.</p>
+ <p>
+ Own Id: OTP-8455</p>
+ </item>
+ <item>
+ <p> Changed representation of wxTreeItem to be an
+ integer. This saves memory, where the driver do not need
+ to keep a object reference to each tree item. </p> <p>
+ Added getFirstChild and getNextChild to wxTreeCtrl.</p>
+ <p>
+ Own Id: OTP-8462</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Wx 0.98.4</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/wx/examples/demo/demo_html_tagger.erl b/lib/wx/examples/demo/demo_html_tagger.erl
index 9b6d1fd950..243e5d659f 100644
--- a/lib/wx/examples/demo/demo_html_tagger.erl
+++ b/lib/wx/examples/demo/demo_html_tagger.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
-module(demo_html_tagger).
@@ -462,7 +462,7 @@ fix_remote([H|T]) ->
fix_remote([]) ->
[].
--spec is_keyword(atom()) -> bool().
+-spec is_keyword(atom()) -> boolean().
is_keyword('after' ) -> true;
is_keyword('and') -> true;
diff --git a/lib/wx/vsn.mk b/lib/wx/vsn.mk
index 91bbdc8c99..54ab92cad2 100644
--- a/lib/wx/vsn.mk
+++ b/lib/wx/vsn.mk
@@ -1,6 +1,7 @@
-WX_VSN = 0.98.4
+WX_VSN = 0.98.5
-TICKETS = OTP-8243 OTP-8250 OTP-8292
+TICKETS = OTP-8330 OTP-8461 OTP-8408 OTP-8455 OTP-8462
+TICKETS_0.98.4 = OTP-8243 OTP-8250 OTP-8292
TICKETS_0.98.3 = OTP-8138 OTP-8126 OTP-8083
TICKETS_0.98.2 = OTP-7943
TICKETS_0.98.1 = OTP-7875 \ No newline at end of file
diff --git a/lib/xmerl/doc/src/notes.xml b/lib/xmerl/doc/src/notes.xml
index 115c81a806..0f30ae9eca 100644
--- a/lib/xmerl/doc/src/notes.xml
+++ b/lib/xmerl/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>Xmerl Release Notes</title>
@@ -31,6 +31,20 @@
<p>This document describes the changes made to the Xmerl application.</p>
+<section><title>Xmerl 1.2.4</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>Updated the documentation Makefile to work with the
+ new documentation build process.</p>
+ <p>
+ Own Id: OTP-8343</p>
+ </item>
+ </list>
+ </section>
+
+</section>
<section><title>Xmerl 1.2.3</title>
diff --git a/lib/xmerl/vsn.mk b/lib/xmerl/vsn.mk
index 0bb57ea252..4162b52a80 100644
--- a/lib/xmerl/vsn.mk
+++ b/lib/xmerl/vsn.mk
@@ -1,28 +1,30 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2003-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2003-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
-XMERL_VSN = 1.2.3
+XMERL_VSN = 1.2.4
+
TICKETS = \
- OTP-8251 \
- OTP-8252 \
- OTP-8253
+ OTP-8343
+
+TICKETS_1.2.4 = \
+ OTP-8343
TICKETS_1.2.3 = \
OTP-8251 \