aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL-WIN32.md24
-rw-r--r--erts/aclocal.m45
-rw-r--r--erts/doc/src/erl.xml45
-rw-r--r--erts/doc/src/erl_driver.xml7
-rw-r--r--erts/doc/src/erl_nif.xml78
-rw-r--r--erts/doc/src/erlang.xml72
-rw-r--r--erts/doc/src/erts_alloc.xml164
-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
-rw-r--r--system/README.unixware201
-rw-r--r--system/doc/top/src/erl_html_tools.erl2
-rw-r--r--system/doc/top/src/otp_man_index.erl2
-rw-r--r--xcomp/README.md2
43 files changed, 1072 insertions, 906 deletions
diff --git a/INSTALL-WIN32.md b/INSTALL-WIN32.md
index 305792ef88..f59a8ece67 100644
--- a/INSTALL-WIN32.md
+++ b/INSTALL-WIN32.md
@@ -50,15 +50,14 @@ tools.
However, if you feel comfortable with the environment and build
system, and have all the necessary tools, you have a great opportunity
to make the Erlang/OTP distribution for Windows better. Please submit
-any suggestions and patches to the appropriate mailing lists (see
-<http://www.erlang.org/faq.html>) to let them find their way into the next
-version of Erlang. If making changes to the build system (like
-makefiles etc) please bear in mind that the same makefiles are used on
-Unix/VxWorks/OSEDelta, so that your changes don't break other
-platforms. That of course goes for C-code too, system specific code
-resides in the `$ERL_TOP/erts/emulator/sys/win32` and `$ERL_TOP/erts/etc/win32`
-directories mostly. The `$ERL_TOP/erts/emulator/beam directory` is for
-common code.
+any suggestions and patches to the appropriate [mailing lists] [1] to let
+them find their way into the next version of Erlang. If making changes
+to the build system (like makefiles etc) please bear in mind that the
+same makefiles are used on Unix/VxWorks/OSEDelta, so that your changes
+don't break other platforms. That of course goes for C-code too, system
+specific code resides in the `$ERL_TOP/erts/emulator/sys/win32` and
+`$ERL_TOP/erts/etc/win32` directories mostly. The
+`$ERL_TOP/erts/emulator/beam directory` is for common code.
Before the R9C release of Erlang/OTP, the Windows release was built
partly on a Unix (Solaris) box and partly on a Windows box, using Perl
@@ -68,8 +67,8 @@ needed at all. Now we've used this build procedure for a couple of
releases, and it has worked fine for us. Still, there might be all
sorts of troubles on different machines and with different
setups. I'll try to give hints wherever I've encountered difficulties,
-but please share your experiences by using the mailing list
-<[email protected]>. I cannot of course help everyone with all
+but please share your experiences by using the [`erlang-questions`] [1]
+mailing list. I cannot of course help everyone with all
their problems, please try to solve the problems and submit
solutions/workarounds. Remember, it's all about sharing, not about
demanding...
@@ -777,3 +776,6 @@ Copyright and License
> under the License.
>
> %CopyrightEnd%
+
+
+ [1]: http://www.erlang.org/faq.html "mailing lists"
diff --git a/erts/aclocal.m4 b/erts/aclocal.m4
index 8052b2d67d..3d935b7295 100644
--- a/erts/aclocal.m4
+++ b/erts/aclocal.m4
@@ -826,8 +826,11 @@ case "$THR_LIB_NAME" in
AC_CHECK_FUNC(pthread_spin_lock, \
AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
[Define if you have the pthread_spin_lock function.]))
+ test "$force_linux_pthread_rwlocks" = "yes" || {
+ force_linux_pthread_rwlocks=no
+ }
case "$force_linux_pthread_rwlocks-$host_os" in
- yes-linux*) # Writers may get starved
+ no-linux*) # Writers may get starved
# TODO: write a test that tests the implementation
;;
*)
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 7a2ab375d1..bb741c7836 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -131,9 +131,8 @@
see <seealso marker="kernel:app">app(4)</seealso> and
<seealso marker="kernel:application">application(3)</seealso>.</p>
</item>
- <tag><c><![CDATA[-args_file FileName]]></c></tag>
+ <tag><marker id="args_file"><c><![CDATA[-args_file FileName]]></c></marker></tag>
<item>
- <marker id="args_file"></marker>
<p>Command line arguments are read from the file <c><![CDATA[FileName]]></c>.
The arguments read from the file replace the
'<c><![CDATA[-args_file FileName]]></c>' flag on the resulting command line.</p>
@@ -197,9 +196,8 @@
<seealso marker="kernel:app">app(4)</seealso> and
<seealso marker="kernel:application">application(3)</seealso>.</p>
</item>
- <tag><c><![CDATA[-connect_all false]]></c></tag>
+ <tag><marker id="connect_all"><c><![CDATA[-connect_all false]]></c></marker></tag>
<item>
- <marker id="connect_all"></marker>
<p>If this flag is present, <c><![CDATA[global]]></c> will not maintain a
fully connected network of distributed Erlang nodes, and then
global name registration cannot be used. See
@@ -282,9 +280,8 @@
<p>Makes <c><![CDATA[init]]></c> write some debug information while
interpreting the boot script.</p>
</item>
- <tag><c><![CDATA[-instr]]></c>(emulator flag)</tag>
+ <tag><marker id="instr"><c><![CDATA[-instr]]></c>(emulator flag)</marker></tag>
<item>
- <marker id="instr"></marker>
<p>Selects an instrumented Erlang runtime system (virtual
machine) to run, instead of the ordinary one. When running an
instrumented runtime system, some resource usage data can be
@@ -431,9 +428,8 @@
flag and those running with the <c><![CDATA[-name]]></c> flag, as node
names must be unique in distributed Erlang systems.</p>
</item>
- <tag><c><![CDATA[-smp [enable|auto|disable]]]></c></tag>
+ <tag><marker id="smp"><c><![CDATA[-smp [enable|auto|disable]]]></c></marker></tag>
<item>
- <marker id="smp"></marker>
<p><c>-smp enable</c> and <c>-smp</c> starts the Erlang runtime
system with SMP support enabled. This may fail if no runtime
system with SMP support is available. <c>-smp auto</c> starts
@@ -462,9 +458,8 @@
<p><c><![CDATA[erl]]></c> invokes the code for the Erlang emulator (virtual
machine), which supports the following flags:</p>
<taglist>
- <tag><c><![CDATA[+a size]]></c></tag>
+ <tag><marker id="async_thread_stack_size"><c><![CDATA[+a size]]></c></marker></tag>
<item>
- <marker id="async_thread_stack_size"></marker>
<p>Suggested stack size, in kilowords, for threads in the
async-thread pool. Valid range is 16-8192 kilowords. The
default suggested stack size is 16 kilowords, i.e, 64
@@ -478,9 +473,8 @@
suggestion, and it might even be ignored on some
platforms.</p>
</item>
- <tag><c><![CDATA[+A size]]></c></tag>
+ <tag><marker id="async_thread_pool_size"><c><![CDATA[+A size]]></c></marker></tag>
<item>
- <marker id="async_thread_pool_size"></marker>
<p>Sets the number of threads in async thread pool, valid range
is 0-1024. Default is 0.</p>
</item>
@@ -550,23 +544,20 @@
<p>Enables auto load tracing, displaying info while loading
code.</p>
</item>
- <tag><c><![CDATA[+MFlag Value]]></c></tag>
+ <tag><marker id="erts_alloc"><c><![CDATA[+MFlag Value]]></c></marker></tag>
<item>
- <marker id="erts_alloc"></marker>
<p>Memory allocator specific flags, see
<seealso marker="erts_alloc">erts_alloc(3)</seealso> for
further information.</p>
</item>
- <tag><c><![CDATA[+P Number]]></c></tag>
+ <tag><marker id="max_processes"><c><![CDATA[+P Number]]></c></marker></tag>
<item>
- <marker id="max_processes"></marker>
<p>Sets the maximum number of concurrent processes for this
system. <c><![CDATA[Number]]></c> must be in the range 16..134217727.
Default is 32768.</p>
</item>
- <tag><c><![CDATA[+R ReleaseNumber]]></c></tag>
+ <tag><marker id="compat_rel"><c><![CDATA[+R ReleaseNumber]]></c></marker></tag>
<item>
- <marker id="compat_rel"></marker>
<p>Sets the compatibility mode.</p>
<p>The distribution mechanism is not backwards compatible by
default. This flags sets the emulator in compatibility mode
@@ -592,9 +583,8 @@
<item>
<p>Force ets memory block to be moved on realloc.</p>
</item>
- <tag><c><![CDATA[+S Schedulers:SchedulerOnline]]></c></tag>
+ <tag><marker id="+S"><c><![CDATA[+S Schedulers:SchedulerOnline]]></c></marker></tag>
<item>
- <marker id="+S"></marker>
<p>Sets the amount of scheduler threads to create and scheduler
threads to set online when SMP support has been enabled.
Valid range for both values are 1-1024. If the
@@ -615,9 +605,8 @@
<item>
<p>Scheduling specific flags.</p>
<taglist>
- <tag>+sbt BindType</tag>
+ <tag><marker id="+sbt"><c>+sbt BindType</c></marker></tag>
<item>
- <marker id="+sbt"></marker>
<p>Set scheduler bind type. Currently valid <c>BindType</c>s:
</p>
<taglist>
@@ -672,9 +661,8 @@
<seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, SchedulerBindType)</seealso>.
</p>
</item>
- <tag><c>+sct CpuTopology</c></tag>
+ <tag><marker id="+sct"><c>+sct CpuTopology</c></marker></tag>
<item>
- <marker id="+sct"></marker>
<list type="bulleted">
<item><c><![CDATA[<Id> = integer(); when 0 =< <Id> =< 65535]]></c></item>
<item><c><![CDATA[<IdRange> = <Id>-<Id>]]></c></item>
@@ -791,21 +779,18 @@
</item>
</taglist>
</item>
- <tag><c><![CDATA[+sss size]]></c></tag>
+ <tag><marker id="sched_thread_stack_size"><c><![CDATA[+sss size]]></c></marker></tag>
<item>
- <marker id="sched_thread_stack_size"></marker>
<p>Suggested stack size, in kilowords, for scheduler threads.
Valid range is 4-8192 kilowords. The default stack size
is OS dependent.</p>
</item>
- <tag><c><![CDATA[+t size]]></c></tag>
+ <tag><marker id="+t"><c><![CDATA[+t size]]></c></marker></tag>
<item>
- <marker id="+t"></marker>
<p>Set the maximum number of atoms the VM can handle. Default is 1048576.</p>
</item>
- <tag><c><![CDATA[+T Level]]></c></tag>
+ <tag><marker id="+T"><c><![CDATA[+T Level]]></c></marker></tag>
<item>
- <marker id="+T"></marker>
<p>Enables modified timing and sets the modified timing level.
Currently valid range is 0-9. The timing of the runtime system
will change. A high level usually means a greater change than
diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml
index 63108f41f0..5061230a33 100644
--- a/erts/doc/src/erl_driver.xml
+++ b/erts/doc/src/erl_driver.xml
@@ -171,8 +171,8 @@
asynchronous function calls, using a thread pool provided by
Erlang. There is also a select call, that can be used for
asynchronous drivers.</item>
- <tag>Multi-threading</tag>
- <item><marker id="multi_threading"></marker>
+ <tag><marker id="multi_threading">Multi-threading</marker></tag>
+ <item>
<p>A POSIX thread like API for multi-threading is provided. The
Erlang driver thread API only provide a subset of the functionality
provided by the POSIX thread API. The subset provided is
@@ -245,9 +245,8 @@
<item>A driver can add and later remove drivers.</item>
<tag>Monitoring processes</tag>
<item>A driver can monitor a process that does not own a port.</item>
- <tag>Version management</tag>
+ <tag><marker id="version_management">Version management</marker></tag>
<item>
- <marker id="version_management"></marker>
<p>Version management is enabled for drivers that have set the
<seealso marker="driver_entry#extended_marker">extended_marker</seealso>
field of their
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index d25c63be3d..2e55f13ed5 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -115,7 +115,7 @@ ok
</note>
<p>A loaded NIF library is tied to the Erlang module code version
that loaded it. If the module is upgraded with a new version, the
- new code will have to load its own NIF library (or maybe choose not
+ new Erlang code will have to load its own NIF library (or maybe choose not
to). The new code version can however choose to load the exact
same NIF library as the old code if it wants to. Sharing the same
dynamic library will mean that static data defined by the library
@@ -146,7 +146,8 @@ ok
to query terms, like <c>enif_is_atom</c>, <c>enif_is_identical</c> and
<c>enif_compare</c>.</p></item>
<tag>Binaries</tag>
- <item><p>Terms of type binary are accessed through the struct type <seealso marker="#ErlNifBinary">ErlNifBinary</seealso>
+ <item><p>Terms of type binary are accessed with the help of the struct type
+ <seealso marker="#ErlNifBinary">ErlNifBinary</seealso>
that contains a pointer (<c>data</c>) to the raw binary data and the length
(<c>size</c>) of the data in bytes. Both <c>data</c> and <c>size</c> are
read-only and should only be written using calls to API functions.
@@ -155,17 +156,20 @@ ok
<p>The raw data pointed to by <c>data</c> is only mutable after a call to
<seealso marker="#enif_alloc_binary">enif_alloc_binary</seealso>.
All other functions that operates on a binary will leave the data as read-only.
- An allocated binary must in the end either be freed with
- <seealso marker="#enif_release_binary">enif_release_binary</seealso>
- or transferred to an Erlang term with <seealso marker="#enif_make_binary">enif_make_binary</seealso>.
- But it does not have do happen in the same NIF call.</p>
- <p>Binaries must be a number of whole bytes. Bitstrings with an arbitrary
+ A mutable binary allocated with <c>enif_alloc_binary</c> must in the end
+ either be freed with <seealso marker="#enif_release_binary">enif_release_binary</seealso>
+ or made read-only by transferring it to an Erlang term with
+ <seealso marker="#enif_make_binary">enif_make_binary</seealso>.
+ But it does not have do happen in the same NIF call. Read-only binaries
+ does not have to be released.</p>
+ <p>Binaries are sequences of whole bytes. Bitstrings with an arbitrary
bit length have no support yet.</p>
</item>
<tag>Resource objects</tag>
- <item><p>Resource objects are a way to return pointers to native data
- structures from a NIF in a safe way. A resource object is just a block
- of memory allocated with <seealso marker="#enif_alloc_resource">enif_alloc_resource()</seealso>.
+ <item><p>The use of resource objects is a way to return pointers to
+ native data structures from a NIF in a safe way. A resource object is
+ just a block of memory allocated with
+ <seealso marker="#enif_alloc_resource">enif_alloc_resource()</seealso>.
A handle ("safe pointer") to this memory block can then be returned to Erlang by the use of
<seealso marker="#enif_make_resource">enif_make_resource()</seealso>.
The term returned by <c>enif_make_resource</c>
@@ -178,20 +182,46 @@ ok
released with <seealso marker="#enif_release_resource">enif_release_resource()</seealso>
(not necessarily in that order).</p>
<p>All resource objects are created as instances of some <em>resource type</em>.
- This makes resources from different modules or applications to be distinguishable.
+ This makes resources from different modules to be distinguishable.
A resource type is created by calling
<seealso marker="#enif_open_resource_type">enif_open_resource_type()</seealso>
when a library is loaded. Objects of that resource type can then later be allocated
and <c>enif_get_resource</c> verifies that the resource is of the expected type.
- A resource type can have a destructor function that is automatically
- called when resources of that type are released (by either the garbage
- collector or <c>enif_release_resource</c>). Resource types also support
- upgrade in runtime by allowing a loaded NIF library to takeover an already
- existing resource type and thereby "inherit" all existing objects of that type.
- The destructor of the new library will thereafter be called for the inherited
- objects and the library with the old destructor function can be safely
- unloaded. Resource types are uniquely identified by a supplied name string.
+ A resource type can have a user supplied destructor function that is
+ automatically called when resources of that type are released (by either
+ the garbage collector or <c>enif_release_resource</c>). Resource types
+ are uniquely identified by a supplied name string.</p>
+ <p>Resource types support upgrade in runtime by allowing a loaded NIF
+ library to takeover an already existing resource type and thereby
+ "inherit" all existing objects of that type. The destructor of the new
+ library will thereafter be called for the inherited objects and the
+ library with the old destructor function can be safely unloaded. Existing
+ resource objects, of a module that is upgraded, must either be deleted
+ or taken over by the new NIF library. The unloading of a library will be
+ postponed as long as it exists resource objects with a destructor
+ function in the library.
</p>
+ <p>Here is a template example of how to create and return a resource object.</p>
+ <p/>
+ <code type="none">
+ ERL_NIF_TERM term;
+ MyStruct* ptr = enif_alloc_resource(env, my_resource_type, sizeof(MyStruct));
+
+ /* initialize struct ... */
+
+ term = enif_make_resource(env, ptr);
+
+ if (keep_a_reference_of_our_own) {
+ /* store 'ptr' in static variable, private data or other resource object */
+ }
+ else {
+ enif_release_resource(env, obj);
+ /* resource now only owned by "Erlang" */
+ }
+ return term;
+}
+</code>
+
</item>
<tag>Threads and concurrency</tag>
<item><p>A NIF is thread-safe without any explicit synchronization as
@@ -232,7 +262,9 @@ ok
and there is no previously loaded library for this module.</p>
<p><c>*priv_data</c> can be set to point to some private data
that the library needs in able to keep a state between NIF
- calls. <c>enif_priv_data()</c> will return this pointer.</p>
+ calls. <c>enif_priv_data()</c> will return this pointer.
+ <c>*priv_data</c> will be initialized to NULL when <c>load</c> is
+ called.</p>
<p><c>load_info</c> is the second argument to <seealso
marker="erlang#load_nif-2">erlang:load_nif/2</seealso>.</p>
<p>The library will fail to load if <c>load</c> returns
@@ -258,7 +290,8 @@ ok
<p>Works the same as <c>load</c>. The only difference is that
<c>*old_priv_data</c> already contains the value set by the
last call to <c>load</c> or <c>reload</c> for the old module
- code. It is allowed to write to both *priv_data and *old_priv_data.</p>
+ code. <c>*priv_data</c> will be initialized to NULL when <c>upgrade</c>
+ is called. It is allowed to write to both *priv_data and *old_priv_data.</p>
<p>The library will fail to load if <c>upgrade</c> returns
anything other than 0 or if <c>upgrade</c> is NULL.</p>
</item>
@@ -266,7 +299,8 @@ ok
<tag><marker id="unload"/>void (*unload)(ErlNifEnv* env, void* priv_data)</tag>
<item><p><c>unload</c> is called when the module code that
the NIF library belongs to is purged as old. New code
- of the same module may or may not exist.</p>
+ of the same module may or may not exist. Note that <c>unload</c> is not
+ called for a replaced library as a consequence of <c>reload</c>.</p>
</item>
</taglist>
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index d4fd8c8c9f..46f8df4683 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -3474,9 +3474,8 @@ os_prompt%</pre>
<p>This changes the minimum binary virtual heap size for the calling
process.</p>
</item>
- <tag><c>process_flag(priority, Level)</c></tag>
+ <tag><marker id="process_flag_priority"><c>process_flag(priority, Level)</c></marker></tag>
<item>
- <marker id="process_flag_priority"></marker>
<p>This sets the process priority. <c>Level</c> is an atom.
There are currently four priority levels: <c>low</c>,
<c>normal</c>, <c>high</c>, and <c>max</c>. The default
@@ -4788,9 +4787,8 @@ true</pre>
<c>ContextSwitches</c> is the total number of context
switches since the system started.</p>
</item>
- <tag><c>exact_reductions</c></tag>
+ <tag><marker id="statistics_exact_reductions"><c>exact_reductions</c></marker></tag>
<item>
- <marker id="statistics_exact_reductions"></marker>
<p>Returns
<c>{Total_Exact_Reductions, Exact_Reductions_Since_Last_Call}</c>.</p>
<p><em>NOTE:</em><c>statistics(exact_reductions)</c> is
@@ -4810,9 +4808,8 @@ true</pre>
through ports, and <c>Output</c> is the total number of
bytes output to ports.</p>
</item>
- <tag><c>reductions</c></tag>
+ <tag><marker id="statistics_reductions"><c>reductions</c></marker></tag>
<item>
- <marker id="statistics_reductions"></marker>
<p>Returns
<c>{Total_Reductions, Reductions_Since_Last_Call}</c>.</p>
<p><em>NOTE:</em> From erts version 5.5 (OTP release R11B)
@@ -4983,9 +4980,8 @@ true</pre>
<p>Sets the maximum depth of call stack back-traces in the
exit reason element of <c>'EXIT'</c> tuples.</p>
</item>
- <tag><c>erlang:system_flag(cpu_topology, CpuTopology)</c></tag>
+ <tag><marker id="system_flag_cpu_topology"><c>erlang:system_flag(cpu_topology, CpuTopology)</c></marker></tag>
<item>
- <marker id="system_flag_cpu_topology"></marker>
<p>Sets the user defined <c>CpuTopology</c>. The user defined
CPU topology will override any automatically detected
CPU topology. By passing <c>undefined</c> as <c>CpuTopology</c>
@@ -5047,9 +5043,8 @@ true</pre>
<seealso marker="#spawn_opt/4">spawn_opt/N</seealso> or
<seealso marker="#process_flag/2">process_flag/2</seealso>. </p>
</item>
- <tag><c>erlang:system_flag(multi_scheduling, BlockState)</c></tag>
+ <tag><marker id="system_flag_multi_scheduling"><c>erlang:system_flag(multi_scheduling, BlockState)</c></marker></tag>
<item>
- <marker id="system_flag_multi_scheduling"></marker>
<p><c>BlockState = block | unblock</c></p>
<p>If multi-scheduling is enabled, more than one scheduler
thread is used by the emulator. Multi-scheduling can be
@@ -5083,9 +5078,8 @@ true</pre>
<seealso marker="#system_info_multi_scheduling_blockers">erlang:system_info(multi_scheduling_blockers)</seealso>, and
<seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>.</p>
</item>
- <tag><c>erlang:system_flag(scheduler_bind_type, How)</c></tag>
+ <tag><marker id="system_flag_scheduler_bind_type"><c>erlang:system_flag(scheduler_bind_type, How)</c></marker></tag>
<item>
- <marker id="system_flag_scheduler_bind_type"></marker>
<p>Controls if and how schedulers are bound to logical
processors.</p>
<p>When <c>erlang:system_flag(scheduler_bind_type, How)</c> is
@@ -5212,9 +5206,8 @@ true</pre>
<seealso marker="#system_flag_cpu_topology">erlang:system_flag(cpu_topology, CpuTopology)</seealso>.
</p>
</item>
- <tag><c>erlang:system_flag(schedulers_online, SchedulersOnline)</c></tag>
+ <tag><marker id="system_flag_schedulers_online"><c>erlang:system_flag(schedulers_online, SchedulersOnline)</c></marker></tag>
<item>
- <marker id="system_flag_schedulers_online"></marker>
<p>Sets the amount of schedulers online. Valid range is
<![CDATA[1 <= SchedulerId <= erlang:system_info(schedulers)]]>.
</p>
@@ -5252,9 +5245,8 @@ true</pre>
<p>Returns various information about the current system
(emulator) as specified by <c>Type</c>:</p>
<taglist>
- <tag><c>allocated_areas</c></tag>
+ <tag><marker id="system_info_allocated_areas"><c>allocated_areas</c></marker></tag>
<item>
- <marker id="system_info_allocated_areas"></marker>
<p>Returns a list of tuples with information about
miscellaneous allocated memory areas.</p>
<p>Each tuple contains an atom describing type of memory as
@@ -5274,9 +5266,8 @@ true</pre>
in the total amount of memory allocated by the emulator
see <seealso marker="#memory/0">erlang:memory/0,1</seealso>.</p>
</item>
- <tag><c>allocator</c></tag>
+ <tag><marker id="system_info_allocator"><c>allocator</c></marker></tag>
<item>
- <marker id="system_info_allocator"></marker>
<p>Returns <c>{Allocator, Version, Features, Settings}.</c></p>
<p>Types:</p>
<list type="bulleted">
@@ -5317,9 +5308,8 @@ true</pre>
<p>See also "System Flags Effecting erts_alloc" in
<seealso marker="erts:erts_alloc#flags">erts_alloc(3)</seealso>.</p>
</item>
- <tag><c>alloc_util_allocators</c></tag>
+ <tag><marker id="system_info_alloc_util_allocators"><c>alloc_util_allocators</c></marker></tag>
<item>
- <marker id="system_info_alloc_util_allocators"></marker>
<p>Returns a list of the names of all allocators
using the ERTS internal <c>alloc_util</c> framework
as atoms. For more information see the
@@ -5328,9 +5318,8 @@ true</pre>
erts_alloc(3)</seealso> documentation.
</p>
</item>
- <tag><c>{allocator, Alloc}</c></tag>
+ <tag><marker id="system_info_allocator_tuple"><c>{allocator, Alloc}</c></marker></tag>
<item>
- <marker id="system_info_allocator_tuple"></marker>
<p>Returns information about the specified allocator.
As of erts version 5.6.1 the return value is a list
of <c>{instance, InstanceNo, InstanceInfo}</c> tuples
@@ -5366,9 +5355,8 @@ true</pre>
values. The first value is memory pool size and
the second value used memory size.</p>
</item>
- <tag><c>{allocator_sizes, Alloc}</c></tag>
+ <tag><marker id="system_info_allocator_sizes"><c>{allocator_sizes, Alloc}</c></marker></tag>
<item>
- <marker id="system_info_allocator_sizes"></marker>
<p>Returns various size information for the specified
allocator. The information returned is a subset of the
information returned by
@@ -5402,9 +5390,8 @@ true</pre>
line flag <c>+R</c>, see
<seealso marker="erts:erl#compat_rel">erl(1)</seealso>.</p>
</item>
- <tag><c>cpu_topology</c></tag>
+ <tag><marker id="system_info_cpu_topology"><c>cpu_topology</c></marker></tag>
<item>
- <marker id="system_info_cpu_topology"></marker>
<p>Returns the <c>CpuTopology</c> which currently is used by the
emulator. The CPU topology is used when binding schedulers
to logical processors. The CPU topology used is the user defined
@@ -5677,9 +5664,8 @@ true</pre>
<seealso marker="erts:erl#+T">erl(1)</seealso>
command for more information on modified timing.</p>
</item>
- <tag><c>multi_scheduling</c></tag>
+ <tag><marker id="system_info_multi_scheduling"><c>multi_scheduling</c></marker></tag>
<item>
- <marker id="system_info_multi_scheduling"></marker>
<p>Returns <c>disabled</c>, <c>blocked</c>, or <c>enabled</c>.
A description of the return values:</p>
<taglist>
@@ -5708,9 +5694,8 @@ true</pre>
<seealso marker="#system_info_multi_scheduling_blockers">erlang:system_info(multi_scheduling_blockers)</seealso>, and
<seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>.</p>
</item>
- <tag><c>multi_scheduling_blockers</c></tag>
+ <tag><marker id="system_info_multi_scheduling_blockers"><c>multi_scheduling_blockers</c></marker></tag>
<item>
- <marker id="system_info_multi_scheduling_blockers"></marker>
<p>Returns a list of <c>PID</c>s when multi-scheduling
is blocked; otherwise, the empty list. The <c>PID</c>s
in the list is <c>PID</c>s of the processes currently
@@ -5721,9 +5706,8 @@ true</pre>
<seealso marker="#system_info_multi_scheduling">erlang:system_info(multi_scheduling)</seealso>, and
<seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>.</p>
</item>
- <tag><c>otp_release</c></tag>
+ <tag><marker id="system_info_otp_release"><c>otp_release</c></marker></tag>
<item>
- <marker id="system_info_otp_release"></marker>
<p>Returns a string containing the OTP release number.</p>
</item>
<tag><c>process_count</c></tag>
@@ -5747,9 +5731,8 @@ true</pre>
information see the <seealso marker="erts:crash_dump">"How to interpret the Erlang crash dumps"</seealso> chapter
in the ERTS User's Guide.</p>
</item>
- <tag><c>scheduler_bind_type</c></tag>
+ <tag><marker id="system_info_scheduler_bind_type"><c>scheduler_bind_type</c></marker></tag>
<item>
- <marker id="system_info_scheduler_bind_type"></marker>
<p>Returns information on how user has requested
schedulers to be bound or not bound.</p>
<p><em>NOTE:</em> Even though user has requested
@@ -5764,9 +5747,8 @@ true</pre>
<seealso marker="#system_info_scheduler_bindings">erlang:system_info(scheduler_bindings)</seealso>.
</p>
</item>
- <tag><c>scheduler_bindings</c></tag>
+ <tag><marker id="system_info_scheduler_bindings"><c>scheduler_bindings</c></marker></tag>
<item>
- <marker id="system_info_scheduler_bindings"></marker>
<p>Returns information on currently used scheduler
bindings.</p>
<p>A tuple of a size equal to
@@ -5788,18 +5770,16 @@ true</pre>
<seealso marker="#system_info_schedulers_online">erlang:system_info(schedulers_online)</seealso>.
</p>
</item>
- <tag><c>scheduler_id</c></tag>
+ <tag><marker id="system_info_scheduler_id"><c>scheduler_id</c></marker></tag>
<item>
- <marker id="system_info_scheduler_id"></marker>
<p>Returns the scheduler id (<c>SchedulerId</c>) of the
scheduler thread that the calling process is executing
on. <c>SchedulerId</c> is a positive integer; where
<c><![CDATA[1 <= SchedulerId <= erlang:system_info(schedulers)]]></c>. See also
<seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>.</p>
</item>
- <tag><c>schedulers</c></tag>
+ <tag><marker id="system_info_schedulers"><c>schedulers</c></marker></tag>
<item>
- <marker id="system_info_schedulers"></marker>
<p>Returns the number of scheduler threads used by
the emulator. Scheduler threads online schedules Erlang
processes and Erlang ports, and execute Erlang code
@@ -5815,9 +5795,8 @@ true</pre>
<seealso marker="#system_info_multi_scheduling">erlang:system_info(multi_scheduling)</seealso>, and
and <seealso marker="#system_info_multi_scheduling_blockers">erlang:system_info(multi_scheduling_blockers)</seealso>.</p>
</item>
- <tag><c>schedulers_online</c></tag>
+ <tag><marker id="system_info_schedulers_online"><c>schedulers_online</c></marker></tag>
<item>
- <marker id="system_info_schedulers_online"></marker>
<p>Returns the amount of schedulers online. The scheduler
identifiers of schedulers online satisfy the following
relationship:
@@ -5850,9 +5829,8 @@ true</pre>
with thread support; otherwise, <c>false</c> is
returned.</p>
</item>
- <tag><c>thread_pool_size</c></tag>
+ <tag><marker id="system_info_thread_pool_size"><c>thread_pool_size</c></marker></tag>
<item>
- <marker id="system_info_thread_pool_size"></marker>
<p>Returns the number of async threads in the async thread
pool used for asynchronous driver calls
(<seealso marker="erts:erl_driver#driver_async">driver_async()</seealso>)
@@ -5865,9 +5843,8 @@ true</pre>
<c>get_tcw</c> in "Match Specifications in Erlang",
<seealso marker="erts:match_spec#get_tcw">ERTS User's Guide</seealso>.</p>
</item>
- <tag><c>version</c></tag>
+ <tag><marker id="system_info_version"><c>version</c></marker></tag>
<item>
- <marker id="system_info_version"></marker>
<p>Returns a string containing the version number of the
emulator.</p>
</item>
@@ -6477,9 +6454,8 @@ true</pre>
the current function cannot be determined, then the last
element <c>Arity</c> is 0.</p>
</item>
- <tag><c>{trace, Pid, gc_start, Info}</c></tag>
+ <tag><marker id="gc_start"><c>{trace, Pid, gc_start, Info}</c></marker></tag>
<item>
- <marker id="gc_start"></marker>
<p>Sent when garbage collection is about to be started.
<c>Info</c> is a list of two-element tuples, where
the first element is a key, and the second is the value.
diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml
index d51e5b3ea4..51a4a2bca0 100644
--- a/erts/doc/src/erts_alloc.xml
+++ b/erts/doc/src/erts_alloc.xml
@@ -4,7 +4,7 @@
<cref>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</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>erts_alloc</title>
@@ -122,7 +122,7 @@
size (<seealso marker="#M_lmbcs">lmbcs</seealso>), the smallest
multiblock carrier size (<seealso marker="#M_smbcs">smbcs</seealso>),
and the multiblock carrier growth stages
- (<seealso marker="#M_smbcs">mbcgs</seealso>) parameters. If
+ (<seealso marker="#M_mbcgs">mbcgs</seealso>) parameters. If
<c>nc</c> is the current number of multiblock carriers (the main
multiblock carrier excluded) managed by an allocator, the size
of the next <c>mseg_alloc</c> multiblock carrier allocated by
@@ -229,29 +229,25 @@
<p>The following flags are available for configuration of
<c>mseg_alloc</c>:</p>
<taglist>
- <tag><c><![CDATA[+MMamcbf <size>]]></c></tag>
- <item> <marker id="MMamcbf"></marker>
-
+ <tag><marker id="MMamcbf"><c><![CDATA[+MMamcbf <size>]]></c></marker></tag>
+ <item>
Absolute max cache bad fit (in kilobytes). A segment in the
memory segment cache is not reused if its size exceeds the
requested size with more than the value of this
parameter. Default value is 4096. </item>
- <tag><c><![CDATA[+MMrmcbf <ratio>]]></c></tag>
- <item> <marker id="MMrmcbf"></marker>
-
+ <tag><marker id="MMrmcbf"><c><![CDATA[+MMrmcbf <ratio>]]></c></marker></tag>
+ <item>
Relative max cache bad fit (in percent). A segment in the
memory segment cache is not reused if its size exceeds the
requested size with more than relative max cache bad fit
percent of the requested size. Default value is 20.</item>
- <tag><c><![CDATA[+MMmcs <amount>]]></c></tag>
- <item> <marker id="MMmcs"></marker>
-
+ <tag><marker id="MMmcs"><c><![CDATA[+MMmcs <amount>]]></c></marker></tag>
+ <item>
Max cached segments. The maximum number of memory segments
stored in the memory segment cache. Valid range is
0-30. Default value is 5.</item>
- <tag><c><![CDATA[+MMcci <time>]]></c></tag>
- <item> <marker id="MMcci"></marker>
-
+ <tag><marker id="MMcci"><c><![CDATA[+MMcci <time>]]></c></marker></tag>
+ <item>
Cache check interval (in milliseconds). The memory segment
cache is checked for segments to destroy at an interval
determined by this parameter. Default value is 1000.</item>
@@ -259,26 +255,23 @@
<p>The following flags are available for configuration of
<c>fix_alloc</c>:</p>
<taglist>
- <tag><c>+MFe true</c></tag>
- <item> <marker id="MFe"></marker>
-
+ <tag><marker id="MFe"><c>+MFe true</c></marker></tag>
+ <item>
Enable <c>fix_alloc</c>. Note: <c>fix_alloc</c> cannot be disabled.</item>
</taglist>
<p>The following flags are available for configuration of
<c>sys_alloc</c>:</p>
<taglist>
- <tag><c>+MYe true</c></tag>
- <item> <marker id="MYe"></marker>
-
+ <tag><marker id="MYe"><c>+MYe true</c></marker></tag>
+ <item>
Enable <c>sys_alloc</c>. Note: <c>sys_alloc</c> cannot be disabled.</item>
- <tag><c>+MYm libc</c></tag>
- <item> <marker id="MYm"></marker>
-<c>malloc</c> library to use. Currently only
+ <tag><marker id="MYm"><c>+MYm libc</c></marker></tag>
+ <item>
+ <c>malloc</c> library to use. Currently only
<c>libc</c> is available. <c>libc</c> enables the standard
<c>libc</c> malloc implementation. By default <c>libc</c> is used.</item>
- <tag><c><![CDATA[+MYtt <size>]]></c></tag>
- <item> <marker id="MYtt"></marker>
-
+ <tag><marker id="MYtt"><c><![CDATA[+MYtt <size>]]></c></marker></tag>
+ <item>
Trim threshold size (in kilobytes). This is the maximum amount
of free memory at the top of the heap (allocated by
<c>sbrk</c>) that will be kept by <c>malloc</c> (not
@@ -289,9 +282,8 @@
trim threshold is 128. <em>Note:</em> This flag will
only have any effect when the emulator has been linked with
the GNU C library, and uses its <c>malloc</c> implementation.</item>
- <tag><c><![CDATA[+MYtp <size>]]></c></tag>
- <item> <marker id="MYtp"></marker>
-
+ <tag><marker id="MYtp"><c><![CDATA[+MYtp <size>]]></c></marker></tag>
+ <item>
Top pad size (in kilobytes). This is the amount of extra
memory that will be allocated by <c>malloc</c> when
<c>sbrk</c> is called to get more memory from the operating
@@ -308,43 +300,37 @@
subsystem identifier, only the specific allocator identified will be
effected:</p>
<taglist>
- <tag><c><![CDATA[+M<S>as bf|aobf|gf|af]]></c></tag>
- <item> <marker id="M_as"></marker>
-
+ <tag><marker id="M_as"><c><![CDATA[+M<S>as bf|aobf|gf|af]]></c></marker></tag>
+ <item>
Allocation strategy. Valid strategies are <c>bf</c> (best fit),
<c>aobf</c> (address order best fit), <c>gf</c> (good fit),
and <c>af</c> (a fit). See
<seealso marker="#strategy">the description of allocation strategies</seealso> in "the <c>alloc_util</c> framework" section.</item>
- <tag><c><![CDATA[+M<S>asbcst <size>]]></c></tag>
- <item> <marker id="M_asbcst"></marker>
-
+ <tag><marker id="M_asbcst"><c><![CDATA[+M<S>asbcst <size>]]></c></marker></tag>
+ <item>
Absolute singleblock carrier shrink threshold (in
kilobytes). When a block located in an
<c>mseg_alloc</c> singleblock carrier is shrunk, the carrier
will be left unchanged if the amount of unused memory is less
than this threshold; otherwise, the carrier will be shrunk.
See also <seealso marker="#M_rsbcst">rsbcst</seealso>.</item>
- <tag><c><![CDATA[+M<S>e true|false]]></c></tag>
- <item> <marker id="M_e"></marker>
-
+ <tag><marker id="M_e"><c><![CDATA[+M<S>e true|false]]></c></marker></tag>
+ <item>
Enable allocator <c><![CDATA[<S>]]></c>.</item>
- <tag><c><![CDATA[+M<S>lmbcs <size>]]></c></tag>
- <item> <marker id="M_lmbcs"></marker>
-
+ <tag><marker id="M_lmbcs"><c><![CDATA[+M<S>lmbcs <size>]]></c></marker></tag>
+ <item>
Largest (<c>mseg_alloc</c>) multiblock carrier size (in
kilobytes). See <seealso marker="#mseg_mbc_sizes">the description
on how sizes for mseg_alloc multiblock carriers are decided</seealso>
in "the <c>alloc_util</c> framework" section.</item>
- <tag><c><![CDATA[+M<S>mbcgs <ratio>]]></c></tag>
- <item> <marker id="M_mbcgs"></marker>
-
+ <tag><marker id="M_mbcgs"><c><![CDATA[+M<S>mbcgs <ratio>]]></c></marker></tag>
+ <item>
(<c>mseg_alloc</c>) multiblock carrier growth stages. See
<seealso marker="#mseg_mbc_sizes">the description on how sizes for
mseg_alloc multiblock carriers are decided</seealso>
in "the <c>alloc_util</c> framework" section.</item>
- <tag><c><![CDATA[+M<S>mbsd <depth>]]></c></tag>
- <item> <marker id="M_mbsd"></marker>
-
+ <tag><marker id="M_mbsd"><c><![CDATA[+M<S>mbsd <depth>]]></c></marker></tag>
+ <item>
Max block search depth. This flag has effect only if the
good fit strategy has been selected for allocator
<c><![CDATA[<S>]]></c>. When the good fit strategy is used, free
@@ -353,47 +339,41 @@
search depth sets a limit on the maximum number of blocks to
inspect in a free list during a search for suitable block
satisfying the request.</item>
- <tag><c><![CDATA[+M<S>mmbcs <size>]]></c></tag>
- <item> <marker id="M_mmbcs"></marker>
-
+ <tag><marker id="M_mmbcs"><c><![CDATA[+M<S>mmbcs <size>]]></c></marker></tag>
+ <item>
Main multiblock carrier size. Sets the size of the main
multiblock carrier for allocator <c><![CDATA[<S>]]></c>. The main
multiblock carrier is allocated via <c><![CDATA[sys_alloc]]></c> and is
never deallocated.</item>
- <tag><c><![CDATA[+M<S>mmmbc <amount>]]></c></tag>
- <item> <marker id="M_mmmbc"></marker>
-
+ <tag><marker id="M_mmmbc"><c><![CDATA[+M<S>mmmbc <amount>]]></c></marker></tag>
+ <item>
Max <c>mseg_alloc</c> multiblock carriers. Maximum number of
multiblock carriers allocated via <c>mseg_alloc</c> by
allocator <c><![CDATA[<S>]]></c>. When this limit has been reached,
new multiblock carriers will be allocated via
<c>sys_alloc</c>.</item>
- <tag><c><![CDATA[+M<S>mmsbc <amount>]]></c></tag>
- <item> <marker id="M_mmsbc"></marker>
-
+ <tag><marker id="M_mmsbc"><c><![CDATA[+M<S>mmsbc <amount>]]></c></marker></tag>
+ <item>
Max <c>mseg_alloc</c> singleblock carriers. Maximum number of
singleblock carriers allocated via <c>mseg_alloc</c> by
allocator <c><![CDATA[<S>]]></c>. When this limit has been reached,
new singleblock carriers will be allocated via
<c>sys_alloc</c>.</item>
- <tag><c><![CDATA[+M<S>ramv <bool>]]></c></tag>
- <item> <marker id="M_ramv"></marker>
-
+ <tag><marker id="M_ramv"><c><![CDATA[+M<S>ramv <bool>]]></c></marker></tag>
+ <item>
Realloc always moves. When enabled, reallocate operations will
more or less be translated into an allocate, copy, free sequence.
This often reduce memory fragmentation, but costs performance.
</item>
- <tag><c><![CDATA[+M<S>rmbcmt <ratio>]]></c></tag>
- <item> <marker id="M_rmbcmt"></marker>
-
+ <tag><marker id="M_rmbcmt"><c><![CDATA[+M<S>rmbcmt <ratio>]]></c></marker></tag>
+ <item>
Relative multiblock carrier move threshold (in percent). When
a block located in a multiblock carrier is shrunk,
the block will be moved if the ratio of the size of the returned
memory compared to the previous size is more than this threshold;
otherwise, the block will be shrunk at current location.</item>
- <tag><c><![CDATA[+M<S>rsbcmt <ratio>]]></c></tag>
- <item> <marker id="M_rsbcmt"></marker>
-
+ <tag><marker id="M_rsbcmt"><c><![CDATA[+M<S>rsbcmt <ratio>]]></c></marker></tag>
+ <item>
Relative singleblock carrier move threshold (in percent). When
a block located in a singleblock carrier is shrunk to
a size smaller than the value of the
@@ -401,32 +381,28 @@
the block will be left unchanged in the singleblock carrier if
the ratio of unused memory is less than this threshold;
otherwise, it will be moved into a multiblock carrier. </item>
- <tag><c><![CDATA[+M<S>rsbcst <ratio>]]></c></tag>
- <item> <marker id="M_rsbcst"></marker>
-
+ <tag><marker id="M_rsbcst"><c><![CDATA[+M<S>rsbcst <ratio>]]></c></marker></tag>
+ <item>
Relative singleblock carrier shrink threshold (in
percent). When a block located in an <c>mseg_alloc</c>
singleblock carrier is shrunk, the carrier will be left
unchanged if the ratio of unused memory is less than this
threshold; otherwise, the carrier will be shrunk.
See also <seealso marker="#M_asbcst">asbcst</seealso>.</item>
- <tag><c><![CDATA[+M<S>sbct <size>]]></c></tag>
- <item> <marker id="M_sbct"></marker>
-
+ <tag><marker id="M_sbct"><c><![CDATA[+M<S>sbct <size>]]></c></marker></tag>
+ <item>
Singleblock carrier threshold. Blocks larger than this
threshold will be placed in singleblock carriers. Blocks
smaller than this threshold will be placed in multiblock
carriers.</item>
- <tag><c><![CDATA[+M<S>smbcs <size>]]></c></tag>
- <item> <marker id="M_smbcs"></marker>
-
+ <tag><marker id="M_smbcs"><c><![CDATA[+M<S>smbcs <size>]]></c></marker></tag>
+ <item>
Smallest (<c>mseg_alloc</c>) multiblock carrier size (in
kilobytes). See <seealso marker="#mseg_mbc_sizes">the description
on how sizes for mseg_alloc multiblock carriers are decided</seealso>
in "the <c>alloc_util</c> framework" section.</item>
- <tag><c><![CDATA[+M<S>t true|false|<amount>]]></c></tag>
- <item> <marker id="M_t"></marker>
-
+ <tag><marker id="M_t"><c><![CDATA[+M<S>t true|false|<amount>]]></c></marker></tag>
+ <item>
Multiple, thread specific instances of the allocator.
This option will only have any effect on the runtime system
with SMP support. Default behaviour on the runtime system with
@@ -451,16 +427,15 @@
<c>alloc_util</c>, i.e. all allocators based on <c>alloc_util</c>
will be effected:</p>
<taglist>
- <tag><c><![CDATA[+Muycs <size>]]></c></tag>
- <item> <marker id="Muycs"></marker>
-<c>sys_alloc</c> carrier size. Carriers allocated via
+ <tag><marker id="Muycs"><c><![CDATA[+Muycs <size>]]></c></marker></tag>
+ <item>
+ <c>sys_alloc</c> carrier size. Carriers allocated via
<c>sys_alloc</c> will be allocated in sizes which are
multiples of the <c>sys_alloc</c> carrier size. This is not
true for main multiblock carriers and carriers allocated
during a memory shortage, though.</item>
- <tag><c><![CDATA[+Mummc <amount>]]></c></tag>
- <item> <marker id="Mummc"></marker>
-
+ <tag><marker id="Mummc"><c><![CDATA[+Mummc <amount>]]></c></marker></tag>
+ <item>
Max <c>mseg_alloc</c> carriers. Maximum number of carriers
placed in separate memory segments. When this limit has been
reached, new carriers will be placed in memory retrieved from
@@ -468,23 +443,20 @@
</taglist>
<p>Instrumentation flags:</p>
<taglist>
- <tag><c>+Mim true|false</c></tag>
- <item> <marker id="Mim"></marker>
-
+ <tag><marker id="Mim"><c>+Mim true|false</c></marker></tag>
+ <item>
A map over current allocations is kept by the emulator. The
allocation map can be retrieved via the <c>instrument</c>
module. <c>+Mim true</c> implies <c>+Mis true</c>.
<c>+Mim true</c> is the same as
<seealso marker="erl#instr">-instr</seealso>.</item>
- <tag><c>+Mis true|false</c></tag>
- <item> <marker id="Mis"></marker>
-
+ <tag><marker id="Mis"><c>+Mis true|false</c></marker></tag>
+ <item>
Status over allocated memory is kept by the emulator. The
allocation status can be retrieved via the <c>instrument</c>
module.</item>
- <tag><c>+Mit X</c></tag>
- <item> <marker id="Mit"></marker>
-
+ <tag><marker id="Mit"><c>+Mit X</c></marker></tag>
+ <item>
Reserved for future use. Do <em>not</em> use this flag.</item>
</taglist>
<note>
@@ -493,8 +465,8 @@
</note>
<p>Other flags:</p>
<taglist>
- <tag><c>+Mea min|max|r9c|r10b|r11b|config</c></tag>
- <item> <marker id="Mea"></marker>
+ <tag><marker id="Mea"><c>+Mea min|max|r9c|r10b|r11b|config</c></marker></tag>
+ <item>
<taglist>
<tag><c>min</c></tag>
<item>
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 \
diff --git a/system/README.unixware b/system/README.unixware
deleted file mode 100644
index b9f9433723..0000000000
--- a/system/README.unixware
+++ /dev/null
@@ -1,201 +0,0 @@
-
-OTP R4B b1 UnixWare Release Notes
-------------------------------------
-
-Kent Boortz
-
-This is an *unsupported* release of OTP to UnixWare 2.1.2.
-In fact, it should not be considered a release or a product at all,
-it is a demo what a real release could look like.
-
-Questions should be directed directly to
-
- Kent Boortz
-
-Changes or problems:
-
- * There is no documentation as part of this release.
- Use the R5B documentation that comes with the
- Solaris release.
-
- * To run older graphical tools based on 'pxw' like
- 'xerl' and 'interpreter' you have to add
- "/usr/X/lib" to your LD_LIBRARY_PATH.
-
- * The OTP test cases looks reasonable well considering the
- short time I had to do the port. The tests of the base
- system gives equal results than on Solaris. There are
- some problems with the 'ic' application (CORBA) and there
- may be some 'mnesia' problems (the tests where not completed
- when I wrote this note)
-
- * OTP normally try to handle IP host name lookups
- by itself, parsing /etc/hosts and other configuration
- files. This is done because the normal calls like
- gethostbyname() is blocking. In this UnixWare port
- the normal gethostbyname() is used and if a reply
- from the name server takes some time this may block
- the OTP system from doing other tasks (it may be the
- case that it doesn't block the whole system, it may
- just keep other Erlang processes that do DNS lookups
- waiting, I'm not sure).
-
- * The erl_interface library support varios types of threading
- This is not supported in the OTP UnixWare release.
-
- * If you use gcc you compile and link dynamic drivers with
-
- gcc -fPIC -c foo.c
- ld -G -t text -o foo.so foo.o
-
- With the UnixWare C compiler I belive it will be
-
- gcc -KPIC -c foo.c
- ld -G -t text -o foo.so foo.o
-
- * The default shell limits was a problem when I was running
- some large tests. These limits can be changed by building
- a new kernel. To enable unlimited use of virtual memory
- and data you do as root
-
- % /etc/conf/bin/idtune SDATLIM 0x7FFFFFFF
- % /etc/conf/bin/idtune HDATLIM 0x7FFFFFFF
- % /etc/conf/bin/idtune SVMMLIM 0x7FFFFFFF
- % /etc/conf/bin/idtune HVMMLIM 0x7FFFFFFF
- % /etc/conf/bin/idbuild
-
- When you reboot a new kernel will be built.
-
- * I didn't give the system enough swap space. You can add
- swap on an ordinary file. To add about 100 MB more swap
- you do as root
-
- % dd < /dev/zero > /moreswap bs=512 count=200000
- % swap -a /moreswap 0 200000
-
- The first line will create a 100 MB file on the root partition
- and the second line will add this file as swap space. Note that
- the "swap" command is a bit buggy and may hang. Reboot UnixWare
- and try again.
-
-Internel notes on build the release
-
- * If the network addresses are changed you enter single user
- mode by hitting a key after the "Booting UnixWare..." and
- the beep. At the prompt
-
- BOOT# Hit return only to clear line
- BOOT# INITSTATE=S
- BOOT# go
-
- This will put you into single user mode. Find out ip address,
- default router and DNS server. At the shell prompt
-
- # /usr/local/bin/tcsh
- # setenv TERM vt100
- # cd /etc
- # vi resolv.conf
- < edit and save with :x! >
- # cd /etc/inet
- # vi hosts
- < edit and save with :x! >
- # vi config
- < edit and save with :x! >
- # cd /
- # shutdown now
-
- Now it should be possible to restart in single user mode.
- It may still have long timeouts because the NIS information
- is wrong. As root you do
-
- # ypinit -c
-
- and type in "arda" as NIS domain and "gandalf.du.uab.ericsson.se"
- as NIS server.
-
- * Prebuilding the release. Create a view with the -ncaexported option.
- See "http://otp/product/internal/test/doc/howto/export_view.html".
- Build a solaris release (optionally using a boostrap compiler)
-
- # cd /clearcase/otp/erts/autoconf; cm -V; cd ..
- # cm -V opt EMULATOR=jam BUILD_ALL=1 >& LOG.1
-
- * Create the directories for mount points and mount the view on
- the UnixWare machine.
-
- # mkdir -p /clearcase/otp; cd /clearcase/otp
- # mkdir erts internal_tools libraries system tools
-
- Use s script like
-
- #!/bin/sh
- HOST=$1
- VIEW=$2
- MOUNT=$HOST:/view/$VIEW/clearcase/otp
-
- mount -F nfs $MOUNT/erts $DIR/erts
- mount -F nfs $MOUNT/libraries $DIR/libraries
- mount -F nfs $MOUNT/tools $DIR/tools
- mount -F nfs $MOUNT/internal_tools $DIR/internal_tools
- mount -F nfs $MOUNT/system $DIR/system
-
- to mount the ClearCase VOBs.
-
- * Building the
- * Building the
-
- "/usr/X/lib" to your LD_LIBRARY_PATH.
-
- Had to patch the file
-
- /usr/local/lib/g++-include/_G_config.h
-
- not to define _G_HAVE_SYS_CDEFS 1
-
- Problems with pxw yacc
-
- yacc -dv -b i386-univel-sysv4.2MP/y parse.y
- UX:yacc: ERROR: Illegal option -- b
- UX:yacc: TO FIX: Usage: yacc [-wvVdlt] [-Q(y/n)] [-p driver_file] file
- gmake[6]: *** [i386-univel-sysv4.2MP/y.tab.c] Error 1
-
- Create some symbolic links (until got compiled libs for UnixWare)
-
- # cd crypt/src/ssleay
- # ln -s elibcrypto.so.i386-pc-solaris2.5.1 elibcrypto.so.i386-univel-sysv4.2MP
- # cd ssl/src/ssleay
- # ln -s i386-pc-solaris2.5.1 i386-univel-sysv4.2MP
-
- Run
-
- # ntpdate super.du.uab.ericsson.se
-
- now and then to set the time on the machine.
-
-
- Disabled HAVE_MULTICAST_SUPPORT from "drv/inet_drv.c", should be set in configure
-
- UnixWare want two arguments to 'ln'
-
- SkunkWare gcc, ln, tar, ..... required, make sure PATH points out them first
-
- The emulator has to be linked with "gcc -r -Wl,-Bexport " to be linkable
- with dynamic libraries.
-
- Tcl/Tk was compiled from
-
- tcl7.6p2plus.tar.gz
- tk4.2p2plus.tar.gz
-
- and the make-files where changed, see
-
- (not needed it seems, if not using gcc at least)
-
-
- VILL HA "-ly -ll" BARA PA PXW ???????
-
- You can view the limits of the Unix processes in
-
- /etc/conf/mtune.d/proc
-
diff --git a/system/doc/top/src/erl_html_tools.erl b/system/doc/top/src/erl_html_tools.erl
index 8a5c744128..c920245f94 100644
--- a/system/doc/top/src/erl_html_tools.erl
+++ b/system/doc/top/src/erl_html_tools.erl
@@ -212,6 +212,8 @@ get_app_dirs(Dir) ->
lists:map(fun(File) -> {File, filename:join([Dir, File])} end, Files),
lists:zf(fun is_app_with_doc/1, AFiles).
+is_app_with_doc({"." ++ ADir, _APath}) ->
+ false;
is_app_with_doc({ADir, APath}) ->
case file:read_file_info(filename:join([APath, "info"])) of
{ok, _FileInfo} ->
diff --git a/system/doc/top/src/otp_man_index.erl b/system/doc/top/src/otp_man_index.erl
index 78ecd8b954..0fdc531b37 100644
--- a/system/doc/top/src/otp_man_index.erl
+++ b/system/doc/top/src/otp_man_index.erl
@@ -117,6 +117,8 @@ get_app_dirs(Dir) ->
lists:map(fun(File) -> {File, filename:join([Dir, File])} end, Files),
lists:zf(fun is_app_with_doc/1, AFiles).
+is_app_with_doc({"." ++ ADir, _APath}) ->
+ false;
is_app_with_doc({ADir, APath}) ->
case file:read_file_info(filename:join([APath, "info"])) of
{ok, _FileInfo} ->
diff --git a/xcomp/README.md b/xcomp/README.md
index 19a692143a..bc2696c046 100644
--- a/xcomp/README.md
+++ b/xcomp/README.md
@@ -80,7 +80,7 @@ Other files that might need to be updated are:
- `$ERL_TOP/xcomp/erl-xcomp-vars.sh`
- `$ERL_TOP/erl-build-tool-vars.sh`
- `$ERL_TOP/erts/aclocal.m4`
-- `$ERL_TOP/xcomp/README`
+- `$ERL_TOP/xcomp/README.md`
- `$ERL_TOP/xcomp/erl-xcomp-*.conf`
Note that this might be an incomplete list of files that need to be updated.