aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/appmon/vsn.mk12
-rw-r--r--lib/common_test/info2
-rw-r--r--lib/docbuilder/info2
-rw-r--r--lib/edoc/info2
-rw-r--r--lib/edoc/vsn.mk2
-rw-r--r--lib/erl_docgen/priv/xsl/db_man.xsl28
-rw-r--r--lib/eunit/info2
-rw-r--r--lib/eunit/vsn.mk2
-rw-r--r--lib/hipe/Makefile2
-rw-r--r--lib/hipe/doc/Makefile17
-rw-r--r--lib/hipe/doc/src/Makefile21
-rw-r--r--lib/hipe/doc/src/book.xml9
-rw-r--r--lib/hipe/doc/src/hipe_app.xml58
-rw-r--r--lib/hipe/doc/src/ref_man.xml35
-rw-r--r--lib/hipe/info2
-rw-r--r--lib/jinterface/vsn.mk12
-rw-r--r--lib/kernel/src/user.erl16
-rw-r--r--lib/parsetools/vsn.mk2
-rw-r--r--lib/percept/vsn.mk2
-rw-r--r--lib/runtime_tools/vsn.mk2
-rw-r--r--lib/snmp/doc/src/notes.xml13
-rw-r--r--lib/snmp/src/agent/snmpa_net_if.erl15
-rw-r--r--lib/snmp/src/app/snmp.appup.src6
-rw-r--r--lib/snmp/src/manager/snmpm_net_if.erl8
-rw-r--r--lib/snmp/src/misc/snmp_config.erl2
-rw-r--r--lib/snmp/src/misc/snmp_log.erl10
-rw-r--r--lib/snmp/vsn.mk6
-rw-r--r--lib/stdlib/doc/src/shell.xml9
-rw-r--r--lib/stdlib/doc/src/supervisor.xml6
-rw-r--r--lib/stdlib/src/dets_v8.erl40
-rw-r--r--lib/stdlib/src/edlin.erl10
-rw-r--r--lib/stdlib/src/escript.erl71
-rw-r--r--lib/stdlib/src/file_sorter.erl34
-rw-r--r--lib/stdlib/src/io_lib.erl14
-rw-r--r--lib/stdlib/src/qlc.erl159
-rw-r--r--lib/stdlib/src/qlc_pt.erl32
-rw-r--r--lib/stdlib/src/supervisor.erl10
-rw-r--r--lib/stdlib/test/io_proto_SUITE.erl50
-rw-r--r--lib/stdlib/test/shell_SUITE.erl16
-rw-r--r--lib/syntax_tools/vsn.mk2
-rw-r--r--lib/test_server/info2
-rw-r--r--lib/tools/src/xref_utils.erl13
-rw-r--r--lib/tools/test/xref_SUITE.erl24
43 files changed, 483 insertions, 299 deletions
diff --git a/lib/appmon/vsn.mk b/lib/appmon/vsn.mk
index cbf0a88737..78b95e5688 100644
--- a/lib/appmon/vsn.mk
+++ b/lib/appmon/vsn.mk
@@ -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%
-APPMON_VSN = 2.1.10.2
+APPMON_VSN = 2.1.11
diff --git a/lib/common_test/info b/lib/common_test/info
index 1819ca2aad..6b2778f3e6 100644
--- a/lib/common_test/info
+++ b/lib/common_test/info
@@ -1,2 +1,2 @@
-group: tools
+group: test
short: A portable framework for automatic testing
diff --git a/lib/docbuilder/info b/lib/docbuilder/info
index 33ce19fb4b..60daa212c8 100644
--- a/lib/docbuilder/info
+++ b/lib/docbuilder/info
@@ -1,2 +1,2 @@
-group: tools
+group: doc
short: Tool for generating HTML documentation for applications.
diff --git a/lib/edoc/info b/lib/edoc/info
index cb25c1e519..bc52caa78b 100644
--- a/lib/edoc/info
+++ b/lib/edoc/info
@@ -1,3 +1,3 @@
-group: tools
+group: doc Documentation Applications
short: A utility used to generate documentation out of tags in source files.
diff --git a/lib/edoc/vsn.mk b/lib/edoc/vsn.mk
index 7c7ba58cc9..2de2641b4a 100644
--- a/lib/edoc/vsn.mk
+++ b/lib/edoc/vsn.mk
@@ -1 +1 @@
-EDOC_VSN = 0.7.6.5
+EDOC_VSN = 0.7.6.6
diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl
index a9a2781a8a..a2b1e755e2 100644
--- a/lib/erl_docgen/priv/xsl/db_man.xsl
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -176,10 +176,12 @@
<xsl:template match="/erlref">
<xsl:variable name="companyname">
<xsl:choose>
- <xsl:when test="$company = ''"><xsl:value-of select="header/holder"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$company"/></xsl:otherwise>
+ <!-- Workaround until all of OTP's .../holder contents are correct. -->
+ <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
+
<xsl:text>.TH </xsl:text><xsl:value-of select="module"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "Erlang Module Definition"&#10;</xsl:text>
<xsl:text>.SH NAME&#10;</xsl:text>
<xsl:value-of select="module"/><xsl:text> \- </xsl:text><xsl:value-of select="modulesummary"/><xsl:text>&#10;</xsl:text>
@@ -190,11 +192,12 @@
<xsl:template match="/comref">
<xsl:variable name="companyname">
<xsl:choose>
- <xsl:when test="$company = ''"><xsl:value-of select="header/holder"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$company"/></xsl:otherwise>
+ <!-- Workaround until all of OTP's .../holder contents are correct. -->
+ <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:text>.TH </xsl:text><xsl:value-of select="com"/><xsl:text> 1 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "User Commands"&#10;</xsl:text>
+ <xsl:text>.TH </xsl:text><xsl:value-of select="com"/><xsl:text> 1 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "User Commands"&#10;</xsl:text>
<xsl:text>.SH NAME&#10;</xsl:text>
<xsl:value-of select="com"/><xsl:text> \- </xsl:text><xsl:value-of select="comsummary"/><xsl:text>&#10;</xsl:text>
<xsl:apply-templates/>
@@ -204,8 +207,9 @@
<xsl:template match="/cref">
<xsl:variable name="companyname">
<xsl:choose>
- <xsl:when test="$company = ''"><xsl:value-of select="header/holder"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$company"/></xsl:otherwise>
+ <!-- Workaround until all of OTP's .../holder contents are correct. -->
+ <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:text>.TH </xsl:text><xsl:value-of select="lib"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "C Library Functions"&#10;</xsl:text>
@@ -218,8 +222,9 @@
<xsl:template match="/fileref">
<xsl:variable name="companyname">
<xsl:choose>
- <xsl:when test="$company = ''"><xsl:value-of select="header/holder"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$company"/></xsl:otherwise>
+ <!-- Workaround until all of OTP's .../holder contents are correct. -->
+ <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:text>.TH </xsl:text><xsl:value-of select="file"/><xsl:text> 5 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "Files"&#10;</xsl:text>
@@ -232,8 +237,9 @@
<xsl:template match="/appref">
<xsl:variable name="companyname">
<xsl:choose>
- <xsl:when test="$company = ''"><xsl:value-of select="header/holder"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$company"/></xsl:otherwise>
+ <!-- Workaround until all of OTP's .../holder contents are correct. -->
+ <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:text>.TH </xsl:text><xsl:value-of select="app"/><xsl:text> 7 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "Erlang Application Definition"&#10;</xsl:text>
diff --git a/lib/eunit/info b/lib/eunit/info
index 138f4dc040..e7e6265940 100644
--- a/lib/eunit/info
+++ b/lib/eunit/info
@@ -1,2 +1,2 @@
-group: tools
+group: test
short: Support for unit testing.
diff --git a/lib/eunit/vsn.mk b/lib/eunit/vsn.mk
index 002703b1b3..3bfa9c8000 100644
--- a/lib/eunit/vsn.mk
+++ b/lib/eunit/vsn.mk
@@ -1 +1 @@
-EUNIT_VSN = 2.1.4
+EUNIT_VSN = 2.1.5
diff --git a/lib/hipe/Makefile b/lib/hipe/Makefile
index 10bf82b2d7..54efd7fcaf 100644
--- a/lib/hipe/Makefile
+++ b/lib/hipe/Makefile
@@ -27,7 +27,7 @@ else
HIPE_SUBDIRS =
endif
-ALWAYS_SUBDIRS = misc main cerl icode flow util
+ALWAYS_SUBDIRS = misc main cerl icode flow util doc/src
ifdef HIPE_ENABLED
# "rtl" below must be the first directory so that file rtl/hipe_literals.hrl
diff --git a/lib/hipe/doc/Makefile b/lib/hipe/doc/Makefile
index 340f909aa6..cdf9c9c798 100644
--- a/lib/hipe/doc/Makefile
+++ b/lib/hipe/doc/Makefile
@@ -1,21 +1,28 @@
-# ``The contents of this file are subject to the Erlang Public License,
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2006-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 via the world wide web at http://www.erlang.org/.
-#
+# 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%
+#
SHELL=/bin/sh
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
clean:
- -rm -f *.html edoc-info stylesheet.css
+ -rm -f *.html edoc-info stylesheet.css erlang.png
# ----------------------------------------------------
# Special Build Targets
diff --git a/lib/hipe/doc/src/Makefile b/lib/hipe/doc/src/Makefile
index 3b63e57549..d440178e4c 100644
--- a/lib/hipe/doc/src/Makefile
+++ b/lib/hipe/doc/src/Makefile
@@ -1,19 +1,20 @@
-# ``The contents of this file are subject to the Erlang Public License,
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2006-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 via the world wide web at http://www.erlang.org/.
-#
+# 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.
-#
-# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
-# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
-# AB. All Rights Reserved.''
-#
-# $Id$
+#
+# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
@@ -33,7 +34,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-XML_APPLICATION_FILES =
+XML_APPLICATION_FILES = ref_man.xml
XML_REF3_FILES =
XML_PART_FILES = part_notes.xml
diff --git a/lib/hipe/doc/src/book.xml b/lib/hipe/doc/src/book.xml
index 236dfc69a1..9c95e3a827 100644
--- a/lib/hipe/doc/src/book.xml
+++ b/lib/hipe/doc/src/book.xml
@@ -4,7 +4,7 @@
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</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>HiPE</title>
@@ -31,6 +31,9 @@
<preamble>
</preamble>
<pagetext>HiPE</pagetext>
+ <applications>
+ <xi:include href="ref_man.xml"/>
+ </applications>
<releasenotes>
<xi:include href="notes.xml"/>
</releasenotes>
diff --git a/lib/hipe/doc/src/hipe_app.xml b/lib/hipe/doc/src/hipe_app.xml
new file mode 100644
index 0000000000..56729d4cc4
--- /dev/null
+++ b/lib/hipe/doc/src/hipe_app.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE appref SYSTEM "appref.dtd">
+
+<appref>
+ <header>
+ <copyright>
+ <year>1997</year><year>2010</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>snmp</title>
+ <prepared></prepared>
+ <responsible></responsible>
+ <docno></docno>
+ <approved></approved>
+ <checked></checked>
+ <date></date>
+ <rev></rev>
+ <file>hipe.xml</file>
+ </header>
+ <app>HiPE</app>
+ <appsummary>The HiPE Application</appsummary>
+ <description>
+ <p>
+ The normal way to native-compile an Erlang module using HiPE is to include the atom native
+ in the Erlang compiler options, as in:
+ <code>
+ 1> <input>c(my_module, [native]).</input></code>
+ Options to the HiPE compiler are then passed as follows:
+ <code>
+ 1> <input>c(my_module, [native,{hipe,Options}]).</input></code>
+ For on-line help in the Erlang shell, call <c>hipe:help()</c>.
+ Details on HiPE compiler options are given by <c>hipe:help_options()</c>.
+ </p>
+ </description>
+ <section>
+ <title>SEE ALSO</title>
+ <p>
+ <seealso marker="stdlib:c">c(3)</seealso>,
+ <seealso marker="compiler:compile">compile(3)</seealso>
+ </p>
+ </section>
+
+</appref>
+
diff --git a/lib/hipe/doc/src/ref_man.xml b/lib/hipe/doc/src/ref_man.xml
new file mode 100644
index 0000000000..09d10147ee
--- /dev/null
+++ b/lib/hipe/doc/src/ref_man.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE application SYSTEM "application.dtd">
+
+<application xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>1996</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>HiPE</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date>1997-06-04</date>
+ <rev>1.3.1</rev>
+ <file>ref_man.xml</file>
+ </header>
+ <description>
+ </description>
+ <xi:include href="hipe_app.xml"/>
+</application>
+
diff --git a/lib/hipe/info b/lib/hipe/info
index 51b5dfb979..fe08fc8990 100644
--- a/lib/hipe/info
+++ b/lib/hipe/info
@@ -1,2 +1,2 @@
-group: basic
+group: misc Miscellaneous Applications
short: High Performance Erlang \ No newline at end of file
diff --git a/lib/jinterface/vsn.mk b/lib/jinterface/vsn.mk
index 243547cf1f..6b5719d7c5 100644
--- a/lib/jinterface/vsn.mk
+++ b/lib/jinterface/vsn.mk
@@ -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%
-JINTERFACE_VSN = 1.5.2
+JINTERFACE_VSN = 1.5.3
diff --git a/lib/kernel/src/user.erl b/lib/kernel/src/user.erl
index edf650ec59..17dc5a56a2 100644
--- a/lib/kernel/src/user.erl
+++ b/lib/kernel/src/user.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(user).
@@ -698,7 +698,11 @@ get_chars_more(State, M, F, Xa, Port, Q, Fmt) ->
prompt(_Port, '') -> ok;
prompt(Port, Prompt) ->
- put_port(io_lib:format_prompt(Prompt), Port).
+ put_port(wrap_characters_to_binary(io_lib:format_prompt(Prompt),unicode,
+ case get(unicode) of
+ true -> unicode;
+ _ -> latin1
+ end), Port).
%% Convert error code to make it look as before
err_func(io_lib, get_until, {_,F,_}) ->
diff --git a/lib/parsetools/vsn.mk b/lib/parsetools/vsn.mk
index e3db40c193..b1354e89d8 100644
--- a/lib/parsetools/vsn.mk
+++ b/lib/parsetools/vsn.mk
@@ -1 +1 @@
-PARSETOOLS_VSN = 2.0.1
+PARSETOOLS_VSN = 2.0.2
diff --git a/lib/percept/vsn.mk b/lib/percept/vsn.mk
index ef5a20f028..443d25c78f 100644
--- a/lib/percept/vsn.mk
+++ b/lib/percept/vsn.mk
@@ -1 +1 @@
-PERCEPT_VSN = 0.8.3
+PERCEPT_VSN = 0.8.4
diff --git a/lib/runtime_tools/vsn.mk b/lib/runtime_tools/vsn.mk
index 591f3e1ac4..4bbdef19de 100644
--- a/lib/runtime_tools/vsn.mk
+++ b/lib/runtime_tools/vsn.mk
@@ -1 +1 @@
-RUNTIME_TOOLS_VSN = 1.8.2
+RUNTIME_TOOLS_VSN = 1.8.3
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index 7984f2a536..dc2d879672 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -64,17 +64,22 @@
<section>
<title>Reported Fixed Bugs and Malfunctions</title>
+ <!--
<p>-</p>
+ -->
- <!--
<list type="bulleted">
<item>
- <p>TBD. </p>
- <p>Own Id: OTP-8384</p>
+ <p>The config utility
+ (<seealso marker="snmp#config">snmp:config/0</seealso>)
+ generated a default notify.conf
+ with a bad name for the starndard trap entry (was "stadard trap",
+ but should have been "standard trap"). This has been corrected. </p>
+ <p>Kenji Rikitake</p>
+ <p>Own Id: OTP-8433</p>
</item>
</list>
- -->
</section>
diff --git a/lib/snmp/src/agent/snmpa_net_if.erl b/lib/snmp/src/agent/snmpa_net_if.erl
index bc0777a7dd..3a91cf4033 100644
--- a/lib/snmp/src/agent/snmpa_net_if.erl
+++ b/lib/snmp/src/agent/snmpa_net_if.erl
@@ -945,6 +945,12 @@ system_terminate(Reason, _Parent, _Dbg, #state{log = Log}) ->
do_close_log(Log),
exit(Reason).
+system_code_change(OldState, _Module, _OldVsn, downgrade_to_pre_4_16) ->
+ {OldLog, Type} = OldState#state.log,
+ NewLog = snmp_log:downgrade(OldLog),
+ NewState = OldState#state{log = {NewLog, Type}},
+ {ok, NewState};
+
system_code_change(OldState, _Module, _OldVsn, upgrade_from_pre_4_16) ->
Initial = ?ATL_SEQNO_INITIAL,
Max = ?ATL_SEQNO_MAX,
@@ -952,12 +958,11 @@ system_code_change(OldState, _Module, _OldVsn, upgrade_from_pre_4_16) ->
Function = increment_counter,
Args = [atl_seqno, Initial, Max],
SeqNoGen = {Module, Function, Args},
- NewLog = snmp_log:upgrade(OldState#state.log, SeqNoGen),
- NewState = OldState#state{log = NewLog},
- {ok, NewState};
-system_code_change(OldState, _Module, _OldVsn, downgrade_to_pre_4_16) ->
- NewState = OldState#state{log = snmp_log:downgrade(OldState#state.log)},
+ {OldLog, Type} = OldState#state.log,
+ NewLog = snmp_log:upgrade(OldLog, SeqNoGen),
+ NewState = OldState#state{log = {NewLog, Type}},
{ok, NewState};
+
system_code_change(S, _Module, _OldVsn, _Extra) ->
{ok, S}.
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index 74747b2e59..05aa3d0d48 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -25,6 +25,7 @@
{"4.15",
[
{load_module, snmpa, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmp_log, soft_purge, soft_purge, []},
{update, snmpa_net_if, {advanced, upgrade_from_pre_4_16},
soft_purge, soft_purge, [snmpa_agent, snmp_log]},
@@ -34,6 +35,7 @@
{"4.14",
[
{load_module, snmpa, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmp_log, soft_purge, soft_purge, []},
{update, snmpa_net_if, {advanced, upgrade_from_pre_4_16},
soft_purge, soft_purge, [snmpa_agent, snmp_log]},
@@ -49,6 +51,7 @@
[
{load_module, snmpa_mib_data, soft_purge, soft_purge, []},
{load_module, snmpa, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmp_log, soft_purge, soft_purge, []},
{update, snmpa_net_if, {advanced, upgrade_from_pre_4_16},
soft_purge, soft_purge, [snmpa_agent, snmp_log]},
@@ -70,6 +73,7 @@
{"4.15",
[
{load_module, snmpa, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmp_log, soft_purge, soft_purge, []},
{update, snmpa_net_if, {advanced, downgrade_to_pre_4_16},
soft_purge, soft_purge, [snmpa_agent, snmp_log]},
@@ -79,6 +83,7 @@
{"4.14",
[
{load_module, snmpa, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmp_log, soft_purge, soft_purge, []},
{update, snmpa_net_if, {advanced, downgrade_to_pre_4_16},
soft_purge, soft_purge, [snmpa_agent, snmp_log]},
@@ -92,6 +97,7 @@
{"4.13.5",
[
{load_module, snmpa_mib_data, soft_purge, soft_purge, []},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmpa, soft_purge, soft_purge, [snmp_log]},
{load_module, snmp_log, soft_purge, soft_purge, []},
{update, snmpa_net_if, {advanced, downgrade_to_pre_4_16},
diff --git a/lib/snmp/src/manager/snmpm_net_if.erl b/lib/snmp/src/manager/snmpm_net_if.erl
index 4ec24af7f3..ad39157721 100644
--- a/lib/snmp/src/manager/snmpm_net_if.erl
+++ b/lib/snmp/src/manager/snmpm_net_if.erl
@@ -464,13 +464,17 @@ do_close_log(_) ->
code_change({down, _Vsn}, OldState, downgrade_to_pre_4_16) ->
?d("code_change(down) -> entry", []),
- State = OldState#state{log = snmp_log:downgrade(OldState#state.log)},
+ {OldLog, Type} = OldState#state.log,
+ NewLog = snmp_log:downgrade(OldLog),
+ State = OldState#state{log = {NewLog, Type}},
{ok, State};
% upgrade
code_change(_Vsn, OldState, upgrade_from_pre_4_16) ->
?d("code_change(up) -> entry", []),
- State = OldState#state{log = snmp_log:upgrade(OldState#state.log)},
+ {OldLog, Type} = OldState#state.log,
+ NewLog = snmp_log:upgrade(OldLog),
+ State = OldState#state{log = {NewLog, Type}},
{ok, State};
code_change(_Vsn, State, _Extra) ->
diff --git a/lib/snmp/src/misc/snmp_config.erl b/lib/snmp/src/misc/snmp_config.erl
index 0ee373a4d4..c066680160 100644
--- a/lib/snmp/src/misc/snmp_config.erl
+++ b/lib/snmp/src/misc/snmp_config.erl
@@ -1806,7 +1806,7 @@ write_agent_snmp_notify_conf(Dir, NotifyType) ->
"%% {\"standard inform\", \"std_inform\", inform}.\n"
"%%\n\n",
Hdr = header() ++ Comment,
- Conf = [{"stadard_trap", "std_trap", NotifyType}],
+ Conf = [{"standard trap", "std_trap", NotifyType}],
write_agent_notify_config(Dir, Hdr, Conf).
write_agent_notify_config(Dir, Hdr, Conf) ->
diff --git a/lib/snmp/src/misc/snmp_log.erl b/lib/snmp/src/misc/snmp_log.erl
index 9f4fdf97ca..f9aa911817 100644
--- a/lib/snmp/src/misc/snmp_log.erl
+++ b/lib/snmp/src/misc/snmp_log.erl
@@ -115,6 +115,11 @@ create(Name, File, SeqNoGen, Size, Repair, Notify) ->
close(#snmp_log{id = Log}) ->
?vtrace("close -> entry with"
"~n Log: ~p", [Log]),
+ do_close(Log);
+close(Log) ->
+ do_close(Log).
+
+do_close(Log) ->
disk_log:close(Log).
@@ -345,6 +350,11 @@ next_seqno(_) ->
%% -- change_size ---
change_size(#snmp_log{id = Log}, NewSize) ->
+ do_change_size(Log, NewSize);
+change_size(Log, NewSize) ->
+ do_change_size(Log, NewSize).
+
+do_change_size(Log, NewSize) ->
?vtrace("change_size -> entry with"
"~n Log: ~p"
"~n NewSize: ~p", [Log, NewSize]),
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index d78a2cec7a..a151f332ae 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -18,10 +18,12 @@
# %CopyrightEnd%
SNMP_VSN = 4.16
-PRE_VSN =-p01
+PRE_VSN =-p03
APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)"
-TICKETS = OTP-8395
+TICKETS = \
+ OTP-8395 \
+ OTP-8433
TICKETS_4_15 = OTP-8229 OTP-8249
diff --git a/lib/stdlib/doc/src/shell.xml b/lib/stdlib/doc/src/shell.xml
index 2a7c5b8c69..73cc1b33bd 100644
--- a/lib/stdlib/doc/src/shell.xml
+++ b/lib/stdlib/doc/src/shell.xml
@@ -755,10 +755,11 @@ loop(N) ->
created by the shell. Currently there is only one pair:
<c>{history, N}</c>, where N is the current command number. The
function should return a list of characters or an atom. This
- constraint is due to the Erlang I/O-protocol. Note that in
- restricted mode the call <c>Mod:Func(L)</c> must be allowed or
- the default shell prompt function will be called.</p>
- </section>
+ constraint is due to the Erlang I/O-protocol. Unicode characters
+ beyond codepoint 255 are allowed in the list. Note
+ that in restricted mode the call <c>Mod:Func(L)</c> must be
+ allowed or the default shell prompt function will be called.</p>
+ </section>
<funcs>
<func>
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index fb2ec9ba67..c696434d49 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -4,7 +4,7 @@
<erlref>
<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>supervisor</title>
diff --git a/lib/stdlib/src/dets_v8.erl b/lib/stdlib/src/dets_v8.erl
index b24df02882..1f9f84cd27 100644
--- a/lib/stdlib/src/dets_v8.erl
+++ b/lib/stdlib/src/dets_v8.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2001-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(dets_v8).
@@ -1053,14 +1053,14 @@ wl([{_Seq, {insert, Object}} | Cs], Type, _Del, Lookup, _I, _Objs)
wl(Cs, Type, delete, Lookup, 1, [{Object,-1}]);
wl([{_Seq, {insert, Object}} | Cs], Type, Del, Lookup, _I, Objs) ->
NObjs =
- case lists:keysearch(Object, 1, Objs) of
- {value, {_, 0}} ->
+ case lists:keyfind(Object, 1, Objs) of
+ {_, 0} ->
lists:keyreplace(Object, 1, Objs, {Object,-1});
- {value, {_, _C}} when Type =:= bag -> % C =:= 1; C =:= -1
+ {_, _C} when Type =:= bag -> % C =:= 1; C =:= -1
Objs;
- {value, {_, C}} when C < 0 -> % when Type =:= duplicate_bag
+ {_, C} when C < 0 -> % when Type =:= duplicate_bag
lists:keyreplace(Object, 1, Objs, {Object,C-1});
- {value, {_, C}} -> % when C > 0, Type =:= duplicate_bag
+ {_, C} -> % when C > 0, Type =:= duplicate_bag
lists:keyreplace(Object, 1, Objs, {Object,C+1});
false when Del =:= delete ->
[{Object, -1} | Objs];
@@ -1258,8 +1258,8 @@ eval_slot(Head, TrySize, Pos, WLs, L, LU) ->
find_key(Head, Pos, NextPos, Size, Term, Key, WLs, L, LU).
find_key(Head, Pos, NextPos, Size, Term, Key, WLs, L, LU) ->
- case lists:keysearch(Key, 1, WLs) of
- {value, {_, {Delete, LookUp, Objects}} = WL} ->
+ case lists:keyfind(Key, 1, WLs) of
+ {_, {Delete, LookUp, Objects}} = WL ->
NWLs = lists:delete(WL, WLs),
{NewObjects, NL, LUK} = eval_object(Size, Term, Delete, LookUp,
Objects, Head, Pos, L, []),
@@ -1297,30 +1297,30 @@ eval_key(Key, Delete, LookUp, Objects, Head, Pos, WLs, L, LU, LUK) ->
%% All objects in Objects have the key Key.
eval_object(Size, Term, Delete, LookUp, Objects, Head, Pos, L, LU) ->
Type = Head#head.type,
- case lists:keysearch(Term, 1, Objects) of
- {value, {_Object, N}} when N =:= 0 ->
+ case lists:keyfind(Term, 1, Objects) of
+ {_Object, N} when N =:= 0 ->
L1 = [{delete,Pos,Size} | L],
{Objects, L1, LU};
- {value, {_Object, N}} when N < 0, Type =:= set ->
+ {_Object, N} when N < 0, Type =:= set ->
L1 = [{old,Pos} | L],
wl_lookup(LookUp, Objects, Term, L1, LU);
- {value, {Object, _N}} when Type =:= bag -> % when N =:= 1; N =:= -1
+ {Object, _N} when Type =:= bag -> % when N =:= 1; N =:= -1
L1 = [{old,Pos} | L],
Objects1 = lists:keydelete(Object, 1, Objects),
wl_lookup(LookUp, Objects1, Term, L1, LU);
- {value, {Object, N}} when N < 0, Type =:= duplicate_bag ->
+ {Object, N} when N < 0, Type =:= duplicate_bag ->
L1 = [{old,Pos} | L],
Objects1 = lists:keyreplace(Object, 1, Objects, {Object,N+1}),
wl_lookup(LookUp, Objects1, Term, L1, LU);
- {value, {_Object, N}} when N > 0, Type =:= duplicate_bag ->
+ {_Object, N} when N > 0, Type =:= duplicate_bag ->
L1 = [{old,Pos} | L],
wl_lookup(LookUp, Objects, Term, L1, LU);
false when Type =:= set, Delete =:= delete ->
- case lists:keysearch(-1, 2, Objects) of
+ case lists:keyfind(-1, 2, Objects) of
false -> % no inserted object, perhaps deleted objects
L1 = [{delete,Pos,Size} | L],
{[], L1, LU};
- {value, {Term2,-1}} ->
+ {Term2, -1} ->
Bin2 = term_to_binary(Term2),
NSize = byte_size(Bin2),
Overwrite =
diff --git a/lib/stdlib/src/edlin.erl b/lib/stdlib/src/edlin.erl
index 0e98bbaa06..6cb441dbed 100644
--- a/lib/stdlib/src/edlin.erl
+++ b/lib/stdlib/src/edlin.erl
@@ -30,8 +30,6 @@
-import(lists, [reverse/1, reverse/2]).
-%-import([nthtail/2, keysearch/3, prefix/2]).
-
-export([over_word/3]).
@@ -476,8 +474,8 @@ prompt({line,Pbs,_,_}) ->
%% case erlang:module_loaded(Mod) of
%% true ->
%% L = apply(Mod, module_info, []),
-%% case keysearch(exports, 1, L) of
-%% {value, {_, Exports}} ->
+%% case lists:keyfind(exports, 1, L) of
+%% {_, Exports} ->
%% match(FuncPrefix, Exports, "(");
%% _ ->
%% no
@@ -493,7 +491,7 @@ prompt({line,Pbs,_,_}) ->
%% print_matches(Matches),
%% no;
%% {partial, Str} ->
-%% case nthtail(length(Prefix), Str) of
+%% case lists:nthtail(length(Prefix), Str) of
%% [] ->
%% print_matches(Matches),
%% {yes, []};
@@ -501,7 +499,7 @@ prompt({line,Pbs,_,_}) ->
%% {yes, Remain}
%% end;
%% {complete, Str} ->
-%% {yes, nthtail(length(Prefix), Str) ++ Extra};
+%% {yes, lists:nthtail(length(Prefix), Str) ++ Extra};
%% no ->
%% no
%% end.
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl
index c0f71fb3f5..b2562c6169 100644
--- a/lib/stdlib/src/escript.erl
+++ b/lib/stdlib/src/escript.erl
@@ -139,7 +139,8 @@ start(EscriptOptions) ->
parse_and_run(File, Args, Options) ->
CheckOnly = lists:member("s", Options),
- {Source, Module, FormsOrBin, Mode} = parse_file(File, CheckOnly),
+ {Source, Module, FormsOrBin, HasRecs, Mode} =
+ parse_file(File, CheckOnly),
Mode2 =
case lists:member("d", Options) of
true ->
@@ -159,7 +160,7 @@ parse_and_run(File, Args, Options) ->
is_list(FormsOrBin) ->
case Mode2 of
interpret ->
- interpret(FormsOrBin, File, Args);
+ interpret(FormsOrBin, HasRecs, File, Args);
compile ->
case compile:forms(FormsOrBin, [report]) of
{ok, Module, BeamBin} ->
@@ -246,7 +247,8 @@ parse_file(File, CheckOnly) ->
#state{mode = Mode,
source = Source,
module = Module,
- forms_or_bin = FormsOrBin} =
+ forms_or_bin = FormsOrBin,
+ has_records = HasRecs} =
case ScriptType of
archive ->
%% Archive file
@@ -260,7 +262,7 @@ parse_file(File, CheckOnly) ->
%% Source code
parse_source(S, File, Fd, StartLine, HeaderSz, CheckOnly)
end,
- {Source, Module, FormsOrBin, Mode}.
+ {Source, Module, FormsOrBin, HasRecs, Mode}.
%% Skip header and make a heuristic guess about the script type
skip_header(P, LineNo) ->
@@ -421,8 +423,7 @@ check_source(S, CheckOnly) ->
case S of
#state{n_errors = Nerrs} when Nerrs =/= 0 ->
fatal("There were compilation errors.");
- #state{exports_main = ExpMain,
- has_records = HasRecs,
+ #state{exports_main = ExpMain,
forms_or_bin = [FileForm2, ModForm2 | Forms]} ->
%% Optionally add export of main/1
Forms2 =
@@ -433,36 +434,15 @@ check_source(S, CheckOnly) ->
Forms3 = [FileForm2, ModForm2 | Forms2],
case CheckOnly of
true ->
- %% Optionally expand records
- Forms4 =
- case HasRecs of
- false -> Forms3;
- true -> erl_expand_records:module(Forms3, [])
- end,
%% Strong validation and halt
- case compile:forms(Forms4, [report,strong_validation]) of
+ case compile:forms(Forms3, [report,strong_validation]) of
{ok,_} ->
my_halt(0);
_Other ->
fatal("There were compilation errors.")
end;
false ->
- %% Basic validation before execution
- case erl_lint:module(Forms3) of
- {ok,Ws} ->
- report_warnings(Ws);
- {error,Es,Ws} ->
- report_errors(Es),
- report_warnings(Ws),
- fatal("There were compilation errors.")
- end,
- %% Optionally expand records
- Forms4 =
- case HasRecs of
- false -> Forms3;
- true -> erl_expand_records:module(Forms3, [])
- end,
- S#state{forms_or_bin = Forms4}
+ S#state{forms_or_bin = Forms3}
end
end.
@@ -495,17 +475,9 @@ epp_parse_file2(Epp, S, Forms, Parsed) ->
case Parsed of
{ok, Form} ->
case Form of
- {attribute,Ln,record,{Record,Fields}} ->
- S2 = S#state{has_records = true},
- case epp:normalize_typed_record_fields(Fields) of
- {typed, NewFields} ->
- epp_parse_file(Epp, S2,
- [{attribute, Ln, record, {Record, NewFields}},
- {attribute, Ln, type,
- {{record, Record}, Fields, []}} | Forms]);
- not_typed ->
- epp_parse_file(Epp, S2, [Form | Forms])
- end;
+ {attribute,_,record, _} ->
+ S2 = S#state{has_records = true},
+ epp_parse_file(Epp, S2, [Form | Forms]);
{attribute,Ln,mode,NewMode} ->
S2 = S#state{mode = NewMode},
if
@@ -564,8 +536,23 @@ run(Module, Args) ->
fatal(format_exception(Class, Reason))
end.
-interpret(Forms, File, Args) ->
- Dict = parse_to_dict(Forms),
+interpret(Forms, HasRecs, File, Args) ->
+ %% Basic validation before execution
+ case erl_lint:module(Forms) of
+ {ok,Ws} ->
+ report_warnings(Ws);
+ {error,Es,Ws} ->
+ report_errors(Es),
+ report_warnings(Ws),
+ fatal("There were compilation errors.")
+ end,
+ %% Optionally expand records
+ Forms2 =
+ case HasRecs of
+ false -> Forms;
+ true -> erl_expand_records:module(Forms, [])
+ end,
+ Dict = parse_to_dict(Forms2),
ArgsA = erl_parse:abstract(Args, 0),
Call = {call,0,{atom,0,main},[ArgsA]},
try
diff --git a/lib/stdlib/src/file_sorter.erl b/lib/stdlib/src/file_sorter.erl
index de9e628e22..e21a0c88f3 100644
--- a/lib/stdlib/src/file_sorter.erl
+++ b/lib/stdlib/src/file_sorter.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2001-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(file_sorter).
@@ -186,7 +186,7 @@ options(Option) ->
options([{format, Format} | L], Opts) when Format =:= binary;
Format =:= term;
is_function(Format),
- is_function(Format, 1) ->
+ is_function(Format, 1) ->
options(L, Opts#opts{format = Format});
options([{format, binary_term} | L], Opts) ->
options(L, Opts#opts{format = binary_term_fun()});
@@ -419,9 +419,9 @@ culprit_found(IFun, F, FNs, W, L, I, [_Size | BT]) ->
IFun(close),
check_files(FNs, W, [{F,I,binary_to_term(BT)} | L]).
-files(_I, L, _LSz, #w{seq = 1}=W, []) ->
+files(_I, L, _LSz, #w{seq = 1, out = Out}=W, []) ->
%% No temporary files created, everything in L.
- case W#w.out of
+ case Out of
Fun when is_function(Fun) ->
SL = internal_sort(L, W),
W1 = outfun(binterm_objects(SL, []), W),
@@ -462,8 +462,8 @@ fun_run(I, L, LSz, W, []) ->
{cont, NW, Objs} ->
fun_run(I, L, LSz, NW, Objs)
end;
-fun_run(I, L, LSz, W, Objs) when LSz < W#w.runsize ->
- {NI, NObjs, NL, NLSz} = fun_objs(Objs, L, LSz, W#w.runsize, I, W),
+fun_run(I, L, LSz, #w{runsize = Runsize}=W, Objs) when LSz < Runsize ->
+ {NI, NObjs, NL, NLSz} = fun_objs(Objs, L, LSz, Runsize, I, W),
fun_run(NI, NL, NLSz, W, NObjs);
fun_run(I, L, _LSz, W, Objs) ->
NW = write_run(L, W),
@@ -1201,11 +1201,11 @@ infun(W) ->
erlang:raise(Class, Reason, erlang:get_stacktrace())
end.
-outfun(A, W) when W#w.inout_value =/= no_value ->
+outfun(A, #w{inout_value = Val} = W) when Val =/= no_value ->
W1 = W#w{inout_value = no_value},
W2 = if
W1#w.fun_out ->
- outfun(W#w.inout_value, W1);
+ outfun(Val, W1);
true -> W1
end,
outfun(A, W2);
@@ -1372,19 +1372,19 @@ cleanup(W) ->
end,
lists:foreach(F, W1#w.temp).
-close_input(W) when is_function(W#w.in) ->
- catch (W#w.in)(close),
+close_input(#w{in = In}=W) when is_function(In) ->
+ catch In(close),
W#w{in = undefined};
close_input(#w{in = undefined}=W) ->
W.
-close_out(W) when is_function(W#w.out) ->
- catch (W#w.out)(close);
+close_out(#w{out = Out}) when is_function(Out) ->
+ catch Out(close);
close_out(_) ->
ok.
close_file(Fd, W) ->
- {value, {Fd, FileName}} = lists:keysearch(Fd, 1, W#w.temp),
+ {Fd, FileName} = lists:keyfind(Fd, 1, W#w.temp),
?DEBUG("closing ~p~n", [FileName]),
file:close(Fd),
W#w{temp = [FileName | lists:keydelete(Fd, 1, W#w.temp)]}.
diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
index 2d3c86e4ea..26f6ec8931 100644
--- a/lib/stdlib/src/io_lib.erl
+++ b/lib/stdlib/src/io_lib.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%
%%
@@ -139,9 +139,9 @@ format_prompt({format,Format,Args}) ->
format_prompt(Format,Args);
format_prompt(Prompt)
when is_list(Prompt); is_atom(Prompt); is_binary(Prompt) ->
- format_prompt("~s", [Prompt]);
+ format_prompt("~ts", [Prompt]);
format_prompt(Prompt) ->
- format_prompt("~p", [Prompt]).
+ format_prompt("~tp", [Prompt]).
format_prompt(Format, Args) ->
case catch io_lib:format(Format, Args) of
diff --git a/lib/stdlib/src/qlc.erl b/lib/stdlib/src/qlc.erl
index ef142e1c8a..6e48d95973 100644
--- a/lib/stdlib/src/qlc.erl
+++ b/lib/stdlib/src/qlc.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(qlc).
@@ -528,122 +528,111 @@ options(Options0, [Key | Keys], L) when is_list(Options0) ->
false ->
Options0
end,
- V = case lists:keysearch(Key, 1, Options) of
- {value, {format_fun, U=undefined}} ->
+ V = case lists:keyfind(Key, 1, Options) of
+ {format_fun, U=undefined} ->
{ok, U};
- {value, {info_fun, U=undefined}} ->
+ {info_fun, U=undefined} ->
{ok, U};
- {value, {lookup_fun, U=undefined}} ->
+ {lookup_fun, U=undefined} ->
{ok, U};
- {value, {parent_fun, U=undefined}} ->
+ {parent_fun, U=undefined} ->
{ok, U};
- {value, {post_fun, U=undefined}} ->
+ {post_fun, U=undefined} ->
{ok, U};
- {value, {pre_fun, U=undefined}} ->
+ {pre_fun, U=undefined} ->
{ok, U};
- {value, {info_fun, Fun}} when is_function(Fun),
- is_function(Fun, 1) ->
+ {info_fun, Fun} when is_function(Fun), is_function(Fun, 1) ->
{ok, Fun};
- {value, {pre_fun, Fun}} when is_function(Fun),
- is_function(Fun, 1) ->
+ {pre_fun, Fun} when is_function(Fun), is_function(Fun, 1) ->
{ok, Fun};
- {value, {post_fun, Fun}} when is_function(Fun),
- is_function(Fun, 0) ->
+ {post_fun, Fun} when is_function(Fun), is_function(Fun, 0) ->
{ok, Fun};
- {value, {lookup_fun, Fun}} when is_function(Fun),
- is_function(Fun, 2) ->
+ {lookup_fun, Fun} when is_function(Fun), is_function(Fun, 2) ->
{ok, Fun};
- {value, {max_lookup, Max}} when is_integer(Max), Max >= 0 ->
+ {max_lookup, Max} when is_integer(Max), Max >= 0 ->
{ok, Max};
- {value, {max_lookup, infinity}} ->
+ {max_lookup, infinity} ->
{ok, -1};
- {value, {format_fun, Fun}} when is_function(Fun),
- is_function(Fun, 1) ->
+ {format_fun, Fun} when is_function(Fun), is_function(Fun, 1) ->
{ok, Fun};
- {value, {parent_fun, Fun}} when is_function(Fun),
- is_function(Fun, 0) ->
+ {parent_fun, Fun} when is_function(Fun), is_function(Fun, 0) ->
{ok, Fun};
- {value, {key_equality, KE='=='}}->
+ {key_equality, KE='=='} ->
{ok, KE};
- {value, {key_equality, KE='=:='}}->
+ {key_equality, KE='=:='} ->
{ok, KE};
- {value, {join, J=any}} ->
+ {join, J=any} ->
{ok, J};
- {value, {join, J=nested_loop}} ->
+ {join, J=nested_loop} ->
{ok, J};
- {value, {join, J=merge}} ->
+ {join, J=merge} ->
{ok, J};
- {value, {join, J=lookup}} ->
+ {join, J=lookup} ->
{ok, J};
- {value, {lookup, LookUp}} when LookUp;
- not LookUp;
- LookUp =:= any ->
+ {lookup, LookUp} when is_boolean(LookUp); LookUp =:= any ->
{ok, LookUp};
- {value, {max_list_size, Max}} when is_integer(Max), Max >= 0 ->
+ {max_list_size, Max} when is_integer(Max), Max >= 0 ->
{ok, Max};
- {value, {tmpdir_usage, TmpUsage}} when TmpUsage =:= allowed;
- TmpUsage =:= not_allowed;
- TmpUsage =:= info_msg;
- TmpUsage =:= warning_msg;
- TmpUsage =:= error_msg ->
+ {tmpdir_usage, TmpUsage} when TmpUsage =:= allowed;
+ TmpUsage =:= not_allowed;
+ TmpUsage =:= info_msg;
+ TmpUsage =:= warning_msg;
+ TmpUsage =:= error_msg ->
{ok, TmpUsage};
- {value, {unique, Unique}} when Unique; not Unique ->
+ {unique, Unique} when is_boolean(Unique) ->
{ok, Unique};
- {value, {cache, Cache}} when Cache; not Cache; Cache =:= list ->
+ {cache, Cache} when is_boolean(Cache); Cache =:= list ->
{ok, Cache};
- {value, {cache, ets}} ->
+ {cache, ets} ->
{ok, true};
- {value, {cache, no}} ->
+ {cache, no} ->
{ok, false};
- {value, {unique_all, UniqueAll}} when UniqueAll; not UniqueAll ->
+ {unique_all, UniqueAll} when is_boolean(UniqueAll) ->
{ok, UniqueAll};
- {value, {cache_all, CacheAll}} when CacheAll;
- not CacheAll;
- CacheAll =:= list ->
+ {cache_all, CacheAll} when is_boolean(CacheAll);
+ CacheAll =:= list ->
{ok, CacheAll};
- {value, {cache_all, ets}} ->
+ {cache_all, ets} ->
{ok, true};
- {value, {cache_all, no}} ->
+ {cache_all, no} ->
{ok, false};
- {value, {spawn_options, default}} ->
+ {spawn_options, default} ->
{ok, default};
- {value, {spawn_options, SpawnOptions}} ->
+ {spawn_options, SpawnOptions} ->
case is_proper_list(SpawnOptions) of
true ->
{ok, SpawnOptions};
false ->
badarg
end;
- {value, {flat, Flat}} when Flat; not Flat ->
+ {flat, Flat} when is_boolean(Flat) ->
{ok, Flat};
- {value, {format, Format}} when Format =:= string;
- Format =:= abstract_code;
- Format =:= debug ->
+ {format, Format} when Format =:= string;
+ Format =:= abstract_code;
+ Format =:= debug ->
{ok, Format};
- {value, {n_elements, NElements}} when NElements =:= infinity;
- is_integer(NElements),
- NElements > 0 ->
+ {n_elements, NElements} when NElements =:= infinity;
+ is_integer(NElements),
+ NElements > 0 ->
{ok, NElements};
- {value, {depth, Depth}} when Depth =:= infinity;
- is_integer(Depth), Depth >= 0 ->
+ {depth, Depth} when Depth =:= infinity;
+ is_integer(Depth), Depth >= 0 ->
{ok, Depth};
- {value, {order, Order}} when is_function(Order),
- is_function(Order, 2);
- (Order =:= ascending);
- (Order =:= descending) ->
+ {order, Order} when is_function(Order), is_function(Order, 2);
+ (Order =:= ascending);
+ (Order =:= descending) ->
{ok, Order};
- {value, {compressed, Comp}} when Comp ->
+ {compressed, Comp} when Comp ->
{ok, [compressed]};
- {value, {compressed, Comp}} when not Comp ->
+ {compressed, Comp} when not Comp ->
{ok, []};
- {value, {tmpdir, T}} ->
+ {tmpdir, T} ->
{ok, T};
- {value, {size, Size}} when is_integer(Size), Size > 0 ->
+ {size, Size} when is_integer(Size), Size > 0 ->
{ok, Size};
- {value, {no_files, NoFiles}} when is_integer(NoFiles),
- NoFiles > 1 ->
+ {no_files, NoFiles} when is_integer(NoFiles), NoFiles > 1 ->
{ok, NoFiles};
- {value, {Key, _}} ->
+ {Key, _} ->
badarg;
false ->
Default = default_option(Key),
@@ -1457,7 +1446,7 @@ prep_qlc_lc({qlc_v1, QFun, CodeF, Qdata0, QOpt}, Opt, GOpt, _H) ->
{?qual_data(QNum, GoI, SI, {gen, Prep}), ModGens}
end,
{Qdata, ModGens} = lists:mapfoldl(F, [], Qdata0),
- SomeLookUp = lists:keymember(true, 2, ModGens) =/= false,
+ SomeLookUp = lists:keymember(true, 2, ModGens),
check_lookup_option(Opt, SomeLookUp),
case ModGens of
[{_QNum, _LookUp, all, OnePrep}] ->
@@ -1503,7 +1492,7 @@ pos_fun('==', QOpt, QNum) ->
prep_gen(#qlc_table{lu_vals = LuV0, ms = MS0, trav_MS = TravMS,
info_fun = IF, lookup_fun = LU_fun,
- key_equality = KeyEquality}=LE0,
+ key_equality = KeyEquality}=LE0,
Prep0, PosFun0, {MS, Fs}, Opt) ->
PosFun = PosFun0(KeyEquality),
{LuV, {STag,SkipFils}} = find_const_positions(IF, LU_fun, PosFun, Opt),
@@ -1998,8 +1987,8 @@ no_cache_of_first_generator(Optz, 1) ->
Optz#optz{cache = false}.
maybe_sort(LE, QNum, DoSort, Opt) ->
- case lists:keysearch(QNum, 1, DoSort) of
- {value, {QNum, Col}} ->
+ case lists:keyfind(QNum, 1, DoSort) of
+ {QNum, Col} ->
#qlc_opt{tmpdir = TmpDir, tmpdir_usage = TmpUsage} = Opt,
SortOpts = [{tmpdir,Dir} || Dir <- [TmpDir], Dir =/= ""],
Sort = #qlc_sort{h = LE, keypos = {keysort, Col}, unique = false,
@@ -2025,7 +2014,7 @@ skip_lookup_filters(Qdata0, LU_SkipFs) ->
%% specification it must be applied _after_ the lookup join (the
%% filter must not be skipped!).
activate_join_lookup_filter(QNum, Qdata) ->
- {value, {_,GoI2,SI2,{gen,Prep2}}} = lists:keysearch(QNum, 1, Qdata),
+ {_,GoI2,SI2,{gen,Prep2}} = lists:keyfind(QNum, 1, Qdata),
Table2 = Prep2#prepared.qh,
NPrep2 = Prep2#prepared{qh = Table2#qlc_table{ms = no_match_spec}},
%% Table2#qlc_table.ms has been reset; the filter will be run.
@@ -2059,7 +2048,7 @@ opt_join(Join, JoinOption, Qdata, Opt, LU_SkipQuals) ->
opt_join_lu([{{_Q1,_C1,Q2,_C2}=J,[{lookup_join,_KEols,JKE,Skip0} | _]} | LJ],
Qdata, LU_SkipQuals) ->
- {value, {Q2,_,_,{gen,Prep2}}} = lists:keysearch(Q2, 1, Qdata),
+ {Q2,_,_,{gen,Prep2}} = lists:keyfind(Q2, 1, Qdata),
#qlc_table{ms = MS, key_equality = KE,
lookup_fun = LU_fun} = Prep2#prepared.qh,
%% If there is no filter to skip (the match spec was derived
@@ -2670,8 +2659,8 @@ sort_list_output(L) ->
%% Don't use the file_sorter unless it is known that objects will be
%% put on a temporary file (optimization).
sort_handle(H, ListFun, FileFun, SortOptions, Post, LocalPost, TmpUsageM) ->
- Size = case lists:keysearch(size, 1, SortOptions) of
- {value, {size, Size0}} -> Size0;
+ Size = case lists:keyfind(size, 1, SortOptions) of
+ {size, Size0} -> Size0;
false -> default_option(size)
end,
sort_cache(H, [], Size, {ListFun, FileFun, Post, LocalPost, TmpUsageM}).
@@ -2891,8 +2880,8 @@ ucache_recall(UTab, MTab, SeqNo) ->
Object = case ets:lookup(UTab, Hash) of
[{Hash, SeqNo, Object0}] -> Object0;
HashSeqObjects ->
- {value, {Hash, SeqNo, Object0}} =
- lists:keysearch(SeqNo, 2, HashSeqObjects),
+ {Hash, SeqNo, Object0} =
+ lists:keyfind(SeqNo, 2, HashSeqObjects),
Object0
end,
[Object | fun() -> ucache_recall(UTab, MTab, SeqNo + 1) end]
@@ -3403,8 +3392,8 @@ merge_join_id() ->
tmp_merge_file(MergeId) ->
TmpFiles = get(?MERGE_JOIN_FILE),
- case lists:keysearch(MergeId, 1, TmpFiles) of
- {value, {MergeId, Fd, FileName}} ->
+ case lists:keyfind(MergeId, 1, TmpFiles) of
+ {MergeId, Fd, FileName} ->
{Fd, FileName};
false ->
none
diff --git a/lib/stdlib/src/qlc_pt.erl b/lib/stdlib/src/qlc_pt.erl
index 2d7874d99f..24378a0698 100644
--- a/lib/stdlib/src/qlc_pt.erl
+++ b/lib/stdlib/src/qlc_pt.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(qlc_pt).
@@ -845,8 +845,8 @@ join_handle(AP, L, [F, H, O, C], Constants) ->
join_handle_constants(QId, ExtraConstants) ->
IdNo = QId#qid.no,
- case lists:keysearch(IdNo, 1, ExtraConstants) of
- {value, {IdNo, ConstOps}} ->
+ case lists:keyfind(IdNo, 1, ExtraConstants) of
+ {IdNo, ConstOps} ->
ConstOps;
false ->
[]
@@ -1231,9 +1231,9 @@ lu_skip(ColConstants, FilterData, PatternFrame, PatternVars,
%% The filter can only be skipped if all constants
%% are looked up.
LookedUpConstants =
- case lists:keysearch(Column, 1, ColConstants) of
+ case lists:keyfind(Column, 1, ColConstants) of
false -> [];
- {value, {Column,LUCs}} -> LUCs
+ {Column, LUCs} -> LUCs
end,
%% Don't try to handle filters that compare several
%% values equal. See also frames_to_columns().
@@ -1279,8 +1279,8 @@ join_gens(Cs0, Qs, Skip) ->
join_gens2(lists:filter(fun(C) -> length(C) > 2 end, Cs), FD, Skip)}.
join_gens2(Cs0, FilterData, Skip) ->
- [{J, skip_tag(case lists:keysearch(J, 1, Skip) of
- {value, {J,FilL}} ->
+ [{J, skip_tag(case lists:keyfind(J, 1, Skip) of
+ {J, FilL} ->
FilL;
false ->
[]
@@ -1296,8 +1296,8 @@ skip_tag(FilList, FilterData) ->
end, FilList}.
skip_tag(Col, ColFils, FilterData) ->
- case lists:keysearch(Col, 1, ColFils) of
- {value, {Col, FilL}} ->
+ case lists:keyfind(Col, 1, ColFils) of
+ {Col, FilL} ->
Tag = if
length(FilterData) =:= length(FilL) ->
all;
@@ -1415,7 +1415,7 @@ sel_gf([], _N, _Deps, _RDs, _Gens, _Gens1) ->
sel_gf([{#qid{no = N}=Id,{fil,F}}=Fil | FData], N, Deps, RDs, Gens, Gens1) ->
case erl_lint:is_guard_test(F, RDs) of
true ->
- {value, {Id,GIds}} = lists:keysearch(Id, 1, Deps),
+ {Id,GIds} = lists:keyfind(Id, 1, Deps),
case length(GIds) =< 1 of
true ->
case generators_in_scope(GIds, Gens1) of
@@ -2572,8 +2572,8 @@ nos_pattern([P0 | Ps0], S0, PVs0) ->
{[P | Ps], S, PVs};
nos_pattern({var,L,V}, {LI,Vs0,UV,A,Sg}, PVs0) when V =/= '_' ->
{Name, Vs, PVs} =
- case lists:keysearch(V, 1, PVs0) of
- {value, {V,VN}} ->
+ case lists:keyfind(V, 1, PVs0) of
+ {V, VN} ->
_ = used_var(V, Vs0, UV),
{VN, Vs0, PVs0};
false ->
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 342b71f2da..22269a8d1b 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.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(supervisor).
diff --git a/lib/stdlib/test/io_proto_SUITE.erl b/lib/stdlib/test/io_proto_SUITE.erl
index 59aa175c73..93159fbd5b 100644
--- a/lib/stdlib/test/io_proto_SUITE.erl
+++ b/lib/stdlib/test/io_proto_SUITE.erl
@@ -23,7 +23,7 @@
-export([init_per_testcase/2, fin_per_testcase/2]).
-export([setopts_getopts/1,unicode_options/1,unicode_options_gen/1, binary_options/1, bc_with_r12/1,
- bc_with_r12_gl/1, read_modes_gl/1,bc_with_r12_ogl/1, read_modes_ogl/1, broken_unicode/1,eof_on_pipe/1]).
+ bc_with_r12_gl/1, read_modes_gl/1,bc_with_r12_ogl/1, read_modes_ogl/1, broken_unicode/1,eof_on_pipe/1,unicode_prompt/1]).
-export([io_server_proxy/1,start_io_server_proxy/0, proxy_getall/1, proxy_setnext/2, proxy_quit/1]).
@@ -31,6 +31,8 @@
-export([toerl_server/3,hold_the_line/3,answering_machine1/3,
answering_machine2/3]).
+-export([uprompt/1]).
+
%-define(without_test_server, true).
-ifdef(without_test_server).
@@ -43,7 +45,7 @@
-define(privdir(Conf), ?config(priv_dir, Conf)).
-endif.
-%-define(debug, true).
+-define(debug, true).
-ifdef(debug).
-define(format(S, A), io:format(S, A)).
@@ -82,7 +84,7 @@ all(doc) ->
all(suite) ->
[setopts_getopts, unicode_options, unicode_options_gen, binary_options, bc_with_r12,
bc_with_r12_gl,bc_with_r12_ogl, read_modes_gl, read_modes_ogl,
- broken_unicode,eof_on_pipe].
+ broken_unicode,eof_on_pipe,unicode_prompt].
-record(state, {
@@ -91,6 +93,48 @@ all(suite) ->
mode = list
}).
+uprompt(_L) ->
+ [1050,1072,1082,1074,1086,32,1077,32,85,110,105,99,111,100,101,32,63].
+
+unicode_prompt(suite) ->
+ [];
+unicode_prompt(doc) ->
+ ["Test that an Unicode prompt does not crash the shell"];
+unicode_prompt(Config) when is_list(Config) ->
+ ?line PA = filename:dirname(code:which(?MODULE)),
+ ?line rtnode([{putline,""},
+ {putline, "2."},
+ {getline, "2"},
+ {putline, "shell:prompt_func({io_proto_SUITE,uprompt})."},
+ {getline, "default"},
+ {putline, "io:get_line('')."},
+ {putline, "hej"},
+ {getline, "\"hej\\n\""},
+ {putline, "io:setopts([{binary,true}])."},
+ {getline, "ok"},
+ {putline, "io:get_line('')."},
+ {putline, "hej"},
+ {getline, "<<\"hej\\n\">>"}
+ ],[],[],"-pa "++ PA),
+ %% And one with oldshell
+ ?line rtnode([{putline,""},
+ {putline, "2."},
+ {getline_re, ".*2."},
+ {getline, "2"},
+ {putline, "shell:prompt_func({io_proto_SUITE,uprompt})."},
+ {getline_re, ".*default"},
+ {putline, "io:get_line('')."},
+ {putline, "hej"},
+ {getline_re, ".*\"hej\\\\n\""},
+ {putline, "io:setopts([{binary,true}])."},
+ {getline_re, ".*ok"},
+ {putline, "io:get_line('')."},
+ {putline, "hej"},
+ {getline_re, ".*<<\"hej\\\\n\">>"}
+ ],[],[],"-oldshell -pa "++PA),
+ ok.
+
+
setopts_getopts(suite) ->
[];
setopts_getopts(doc) ->
diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl
index da73046c2a..588342d46a 100644
--- a/lib/stdlib/test/shell_SUITE.erl
+++ b/lib/stdlib/test/shell_SUITE.erl
@@ -34,7 +34,8 @@
start_restricted_on_command_line/1,restricted_local/1]).
%% Internal export.
--export([otp_5435_2/0, prompt1/1, prompt2/1, prompt3/1, prompt4/1]).
+-export([otp_5435_2/0, prompt1/1, prompt2/1, prompt3/1, prompt4/1,
+ prompt5/1]).
%%
%% Define to run outside of test server
@@ -2618,6 +2619,16 @@ otp_8393(Config) when is_list(Config) ->
?line "default\nl.\n" =
t(<<"shell:prompt_func({shell_SUITE,prompt3}). l.">>),
+ %%
+ %% Although this tests that you can set a unicode prompt function
+ %% it does not really test that it does work with the io-servers.
+ %% That is instead tested in the io_proto_SUITE, which has
+ %% the right infrastructure in place for such tests. /PaN
+ %%
+ ?line _ = shell:prompt_func(default),
+ ?line "default\nl.\n" =
+ t(<<"shell:prompt_func({shell_SUITE,prompt5}). l.">>),
+
%% Restricted shell.
Contents = <<"-module(test_restricted_shell).
-export([local_allowed/3, non_local_allowed/3]).
@@ -2672,6 +2683,9 @@ prompt3(L) ->
prompt4(_L) ->
erlang:apply({erlang,'/'}, [1,0]).
+prompt5(_L) ->
+ [1050,1072,1082,1074,1086,32,1077,32,85,110,105,99,111,100,101,32,63].
+
-ifdef(not_used).
exit_term(B) ->
"** exception exit:" ++ Reply = t(B),
diff --git a/lib/syntax_tools/vsn.mk b/lib/syntax_tools/vsn.mk
index 53c13440f3..2ba5eac582 100644
--- a/lib/syntax_tools/vsn.mk
+++ b/lib/syntax_tools/vsn.mk
@@ -1 +1 @@
-SYNTAX_TOOLS_VSN = 1.6.4
+SYNTAX_TOOLS_VSN = 1.6.5
diff --git a/lib/test_server/info b/lib/test_server/info
index 79ccc202d7..7a9ed6c700 100644
--- a/lib/test_server/info
+++ b/lib/test_server/info
@@ -1,2 +1,2 @@
-group: tools
+group: test Test Applications
short: The OTP Test Server
diff --git a/lib/tools/src/xref_utils.erl b/lib/tools/src/xref_utils.erl
index aeb7bf9f1c..680b7e8aac 100644
--- a/lib/tools/src/xref_utils.erl
+++ b/lib/tools/src/xref_utils.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%
%%
-module(xref_utils).
@@ -453,7 +453,8 @@ find_beam(Module) when is_atom(Module) ->
non_existing ->
error({no_such_module, Module});
preloaded ->
- {_M, _Bin, File} = code:get_object_code(Module),
+ {Module, {_M, _Bin, File}} =
+ {Module, code:get_object_code(Module)},
{ok, File};
cover_compiled ->
error({cover_compiled, Module});
diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl
index 0bbb3ba0f1..b4684140ca 100644
--- a/lib/tools/test/xref_SUITE.erl
+++ b/lib/tools/test/xref_SUITE.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%
-module(xref_SUITE).
@@ -1067,9 +1067,7 @@ read_expected(Version) ->
{POS13+3,{FF,{'$M_EXPR','$F_EXPR',-1}}},
{POS14+8,{{read,bi,0},{'$M_EXPR','$F_EXPR',1}}}],
- O1 = [{0,{FF,{modul,'$F_EXPR',179}}},
- {0,{FF,{read,'$F_EXPR',178}}},
- {20,{{read,lc,0},{ets,new,0}}},
+ O1 = [{20,{{read,lc,0},{ets,new,0}}},
{21,{{read,lc,0},{ets,tab2list,1}}},
{POS1+1,{FF,{erlang,spawn,1}}},
{POS1+1,{FF,{mod17,fun17,0}}},
@@ -1168,13 +1166,19 @@ read_expected(Version) ->
[{POS8+3, {FF,{erlang,apply,3}}},
{POS10+1, {FF,{erlang,apply,3}}},
{POS10+6, {FF,{erlang,apply,3}}}]
- ++ O1;
+ ++
+ [{0,{FF,{read,'$F_EXPR',178}}},
+ {0,{FF,{modul,'$F_EXPR',179}}}]
+ ++ O1;
_ ->
% [{POS15+2,{{read,bi,0},{foo,t,0}}},
% {POS15+3,{{read,bi,0},{bar,t,0}}},
% {POS15+6,{{read,bi,0},{read,local,0}}},
% {POS15+8,{{read,bi,0},{foo,t,0}}},
% {POS15+10,{{read,bi,0},{bar,t,0}}}] ++
+ [{16,{FF,{read,'$F_EXPR',178}}},
+ {17,{FF,{modul,'$F_EXPR',179}}}]
+ ++
O1
end,
@@ -1649,7 +1653,7 @@ abstract_modules(Conf) when is_list(Conf) ->
%% The compiler will no longer allow us to have a mismatch between
%% the module name and the output file, so we must use a trick.
?line {ok, param, BeamCode} = compile:file(File, [binary,debug_info]),
- ?line ok = file:write_file(filename:join(Dir, Beam), BeamCode),
+ ?line ok = file:write_file(Beam, BeamCode),
?line {ok, _} = xref:start(s),
?line {ok, param} = xref:add_module(s, MFile, {warnings,false}),