aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in38
-rw-r--r--erts/configure.in1
-rw-r--r--erts/doc/src/erl.xml2
-rw-r--r--erts/doc/src/erl_driver.xml8
-rw-r--r--erts/doc/src/erl_nif.xml4
-rw-r--r--erts/doc/src/erlang.xml112
-rw-r--r--erts/doc/src/erlc.xml10
-rw-r--r--erts/doc/src/notes.xml8
-rw-r--r--erts/emulator/Makefile.in18
-rw-r--r--erts/emulator/beam/erl_bif_guard.c14
-rw-r--r--erts/emulator/beam/erl_bif_re.c15
-rw-r--r--erts/emulator/beam/erl_db_tree.c14
-rw-r--r--erts/emulator/beam/erl_lock_check.c13
-rw-r--r--erts/emulator/beam/erl_port_task.c58
-rw-r--r--erts/emulator/beam/erl_process.c24
-rw-r--r--erts/emulator/beam/erl_time_sup.c14
-rw-r--r--erts/emulator/hipe/hipe_bif0.c123
-rw-r--r--erts/emulator/test/scheduler_SUITE.erl110
-rw-r--r--erts/emulator/test/statistics_SUITE.erl54
-rw-r--r--erts/epmd/test/Makefile24
-rw-r--r--erts/epmd/test/epmd_SUITE.erl160
-rw-r--r--erts/etc/common/erlc.c13
-rw-r--r--erts/lib_src/Makefile.in12
-rw-r--r--erts/preloaded/ebin/erl_prim_loader.beambin48420 -> 50376 bytes
-rw-r--r--erts/preloaded/ebin/erlang.beambin23284 -> 23284 bytes
-rw-r--r--erts/preloaded/ebin/init.beambin44416 -> 44416 bytes
-rw-r--r--erts/preloaded/ebin/otp_ring0.beambin1392 -> 1392 bytes
-rw-r--r--erts/preloaded/ebin/prim_file.beambin29480 -> 29480 bytes
-rw-r--r--erts/preloaded/ebin/prim_inet.beambin57308 -> 57308 bytes
-rw-r--r--erts/preloaded/ebin/prim_zip.beambin20756 -> 21756 bytes
-rw-r--r--erts/preloaded/ebin/zlib.beambin10624 -> 10624 bytes
-rw-r--r--erts/preloaded/src/erl_prim_loader.erl201
-rw-r--r--erts/preloaded/src/prim_zip.erl57
-rw-r--r--erts/test/erl_print_SUITE.erl12
-rw-r--r--erts/test/erlc_SUITE.erl19
-rw-r--r--erts/test/erlexec_SUITE.erl12
-rw-r--r--erts/test/ethread_SUITE.erl12
-rw-r--r--erts/test/ignore_cores.erl12
-rw-r--r--erts/test/nt_SUITE.erl13
-rw-r--r--erts/test/otp_SUITE.erl13
-rw-r--r--erts/test/run_erl_SUITE.erl12
-rw-r--r--erts/test/z_SUITE.erl12
-rw-r--r--lib/appmon/doc/src/Makefile13
-rw-r--r--lib/common_test/doc/src/Makefile20
-rw-r--r--lib/common_test/doc/src/example_chapter.xml12
-rw-r--r--lib/common_test/include/ct.hrl12
-rw-r--r--lib/compiler/doc/src/compile.xml12
-rw-r--r--lib/compiler/src/beam_validator.erl16
-rw-r--r--lib/compiler/src/compile.erl63
-rw-r--r--lib/compiler/test/beam_validator_SUITE.erl46
-rw-r--r--lib/compiler/test/error_SUITE.erl30
-rw-r--r--lib/compiler/vsn.mk2
-rw-r--r--lib/crypto/doc/src/Makefile3
-rw-r--r--lib/crypto/vsn.mk2
-rw-r--r--lib/docbuilder/doc/src/inline_tags.xml8
-rw-r--r--lib/edoc/Makefile6
-rw-r--r--lib/edoc/doc/src/Makefile5
-rw-r--r--lib/edoc/src/Makefile2
-rw-r--r--lib/erl_docgen/priv/bin/Makefile13
-rwxr-xr-xlib/erl_docgen/priv/bin/codeline_preprocessing.escript17
-rwxr-xr-xlib/erl_docgen/priv/bin/xml_from_edoc.escript149
-rw-r--r--lib/erl_docgen/priv/xsl/db_eix.xsl68
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl253
-rw-r--r--lib/erl_docgen/priv/xsl/db_man.xsl242
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf.xsl99
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf_params.xsl26
-rw-r--r--lib/erl_interface/vsn.mk2
-rw-r--r--lib/et/doc/src/Makefile24
-rw-r--r--lib/eunit/doc/src/Makefile5
-rw-r--r--lib/hipe/Makefile18
-rw-r--r--lib/hipe/amd64/Makefile15
-rw-r--r--lib/hipe/arm/Makefile15
-rw-r--r--lib/hipe/cerl/Makefile15
-rw-r--r--lib/hipe/flow/Makefile15
-rw-r--r--lib/hipe/icode/Makefile15
-rw-r--r--lib/hipe/main/Makefile16
-rw-r--r--lib/hipe/misc/Makefile15
-rw-r--r--lib/hipe/opt/Makefile15
-rw-r--r--lib/hipe/ppc/Makefile15
-rw-r--r--lib/hipe/regalloc/Makefile16
-rw-r--r--lib/hipe/sparc/Makefile15
-rw-r--r--lib/hipe/tools/Makefile15
-rw-r--r--lib/hipe/util/Makefile15
-rw-r--r--lib/hipe/x86/Makefile15
-rw-r--r--lib/inets/doc/src/httpc.xml60
-rw-r--r--lib/inets/doc/src/notes.xml10
-rw-r--r--lib/inets/src/http_client/httpc.erl115
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl271
-rw-r--r--lib/inets/src/http_client/httpc_internal.hrl34
-rw-r--r--lib/inets/src/http_client/httpc_manager.erl118
-rw-r--r--lib/inets/src/http_client/httpc_request.erl42
-rw-r--r--lib/inets/src/http_lib/http_transport.erl136
-rw-r--r--lib/inets/test/ftp_SUITE_data/TAR.exclude2
-rw-r--r--lib/inets/test/ftp_SUITE_data/ftpd_hosts.skel23
-rw-r--r--lib/inets/test/httpc_SUITE.erl134
-rw-r--r--lib/inets/vsn.mk3
-rw-r--r--lib/jinterface/doc/src/Makefile13
-rw-r--r--lib/kernel/src/code.erl24
-rw-r--r--lib/kernel/src/code_server.erl14
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl32
-rw-r--r--lib/kernel/test/erl_prim_loader_SUITE.erl74
-rw-r--r--lib/odbc/doc/src/Makefile13
-rw-r--r--lib/percept/doc/src/Makefile14
-rw-r--r--lib/public_key/doc/src/Makefile13
-rw-r--r--lib/public_key/src/pubkey_cert_records.erl12
-rw-r--r--lib/public_key/src/public_key.erl26
-rw-r--r--lib/public_key/test/Makefile12
-rw-r--r--lib/public_key/test/public_key_SUITE.erl15
-rw-r--r--lib/reltool/test/Makefile82
-rw-r--r--lib/reltool/test/README30
-rw-r--r--lib/reltool/test/reltool.spec2
-rw-r--r--lib/reltool/test/reltool_server_SUITE.erl494
-rw-r--r--lib/reltool/test/reltool_test_lib.erl329
-rw-r--r--lib/reltool/test/reltool_test_lib.hrl91
-rw-r--r--lib/reltool/test/reltool_wx_SUITE.erl62
-rwxr-xr-xlib/reltool/test/rtt55
-rw-r--r--lib/reltool/test/rtt.erl154
-rw-r--r--lib/ssl/doc/src/Makefile13
-rw-r--r--lib/ssl/src/ssl_connection.erl23
-rw-r--r--lib/ssl/src/ssl_handshake.erl38
-rw-r--r--lib/ssl/test/Makefile.src16
-rw-r--r--lib/ssl/test/ssl_packet_SUITE.erl12
-rw-r--r--lib/ssl/vsn.mk15
-rw-r--r--lib/stdlib/doc/src/beam_lib.xml152
-rw-r--r--lib/stdlib/doc/src/io.xml9
-rw-r--r--lib/stdlib/doc/src/unicode.xml4
-rw-r--r--lib/stdlib/doc/src/unicode_usage.xml6
-rw-r--r--lib/stdlib/src/edlin.erl36
-rw-r--r--lib/stdlib/src/edlin_expand.erl49
-rw-r--r--lib/stdlib/src/escript.erl13
-rw-r--r--lib/stdlib/src/filelib.erl10
-rw-r--r--lib/stdlib/src/re.erl71
-rw-r--r--lib/stdlib/test/ExpandTestCaps.erl32
-rw-r--r--lib/stdlib/test/ExpandTestCaps1.erl44
-rw-r--r--lib/stdlib/test/Makefile5
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE.erl156
-rw-r--r--lib/stdlib/test/expand_test.erl32
-rw-r--r--lib/stdlib/test/expand_test1.erl44
-rw-r--r--lib/stdlib/test/filelib_SUITE.erl10
-rw-r--r--lib/stdlib/test/io_proto_SUITE.erl40
-rw-r--r--lib/stdlib/test/re_SUITE.erl30
-rw-r--r--lib/stdlib/test/re_SUITE_data/mod_testoutput8877
-rw-r--r--lib/stdlib/test/run_pcre_tests.erl50
-rw-r--r--lib/syntax_tools/Makefile6
-rw-r--r--lib/syntax_tools/doc/src/Makefile14
-rw-r--r--lib/syntax_tools/src/Makefile12
-rw-r--r--lib/test_server/doc/src/Makefile13
-rw-r--r--lib/test_server/src/Makefile12
-rw-r--r--lib/tools/test/Makefile90
-rw-r--r--lib/tools/test/cover_SUITE.erl1198
-rw-r--r--lib/tools/test/cover_SUITE_data/a.erl55
-rw-r--r--lib/tools/test/cover_SUITE_data/b.erl14
-rw-r--r--lib/tools/test/cover_SUITE_data/cc.erl88
-rw-r--r--lib/tools/test/cover_SUITE_data/compile_beam/crypt.erl6
-rw-r--r--lib/tools/test/cover_SUITE_data/compile_beam/d/y.erl6
-rw-r--r--lib/tools/test/cover_SUITE_data/compile_beam/v.erl6
-rw-r--r--lib/tools/test/cover_SUITE_data/compile_beam/w.erl6
-rw-r--r--lib/tools/test/cover_SUITE_data/compile_beam/x.erl6
-rw-r--r--lib/tools/test/cover_SUITE_data/d.erl156
-rw-r--r--lib/tools/test/cover_SUITE_data/d1/e.erl127
-rw-r--r--lib/tools/test/cover_SUITE_data/f.erl10
-rw-r--r--lib/tools/test/cover_SUITE_data/included_functions/cover_inc.erl8
-rw-r--r--lib/tools/test/cover_SUITE_data/included_functions/cover_inc.hrl7
-rw-r--r--lib/tools/test/cover_SUITE_data/otp_6115/f1.erl12
-rw-r--r--lib/tools/test/cover_SUITE_data/otp_6115/f2.erl13
-rw-r--r--lib/tools/test/cprof_SUITE.erl309
-rw-r--r--lib/tools/test/cprof_SUITE_data/cprof_SUITE_test.erl25
-rw-r--r--lib/tools/test/emem_SUITE.erl713
-rw-r--r--lib/tools/test/eprof_SUITE.erl97
-rw-r--r--lib/tools/test/eprof_SUITE_data/ed.script8
-rw-r--r--lib/tools/test/eprof_SUITE_data/eed.erl815
-rw-r--r--lib/tools/test/eprof_SUITE_data/eprof_suite_test.erl74
-rw-r--r--lib/tools/test/fprof_SUITE.erl1191
-rw-r--r--lib/tools/test/fprof_SUITE_data/foo.erl41
l---------lib/tools/test/ignore_cores.erl1
-rw-r--r--lib/tools/test/instrument_SUITE.erl129
-rw-r--r--lib/tools/test/make_SUITE.erl295
-rw-r--r--lib/tools/test/make_SUITE_data/Emakefile20
-rw-r--r--lib/tools/test/make_SUITE_data/test1.erl10
-rw-r--r--lib/tools/test/make_SUITE_data/test2.erl10
-rw-r--r--lib/tools/test/make_SUITE_data/test3.erl10
-rw-r--r--lib/tools/test/make_SUITE_data/test4.erl10
-rw-r--r--lib/tools/test/make_SUITE_data/test5.erl10
-rw-r--r--lib/tools/test/tools.spec1
-rw-r--r--lib/tools/test/tools.spec.win2
-rw-r--r--lib/tools/test/tools_SUITE.erl56
-rw-r--r--lib/tools/test/xref_SUITE.erl2743
-rw-r--r--lib/tools/test/xref_SUITE_data/depr_r9c.beambin0 -> 1664 bytes
-rw-r--r--lib/tools/test/xref_SUITE_data/dir/dir/dummy2
-rw-r--r--lib/tools/test/xref_SUITE_data/dir/jam/x.jam (renamed from system/doc/images/.gitignore)0
-rw-r--r--lib/tools/test/xref_SUITE_data/lib_test/cp.erl6
-rw-r--r--lib/tools/test/xref_SUITE_data/lib_test/lib1.erl6
-rw-r--r--lib/tools/test/xref_SUITE_data/lib_test/lib2.erl14
-rw-r--r--lib/tools/test/xref_SUITE_data/lib_test/lib3.erl11
-rw-r--r--lib/tools/test/xref_SUITE_data/lib_test/t.erl14
-rw-r--r--lib/tools/test/xref_SUITE_data/md/x__x.erl7
-rw-r--r--lib/tools/test/xref_SUITE_data/md/y__y.erl12
-rw-r--r--lib/tools/test/xref_SUITE_data/read/read.beam.v1bin0 -> 7160 bytes
-rw-r--r--lib/tools/test/xref_SUITE_data/read/read.erl175
-rw-r--r--lib/tools/test/xref_SUITE_data/rel2/lib/app1-1.0/ebin/dummy2
-rw-r--r--lib/tools/test/xref_SUITE_data/rel2/lib/app1-1.1/ebin/dummy2
-rw-r--r--lib/tools/test/xref_SUITE_data/rel2/lib/app2-1.1/ebin/dummy2
-rw-r--r--lib/tools/test/xref_SUITE_data/rel2/x.erl16
-rw-r--r--lib/tools/test/xref_SUITE_data/rel2/y.erl6
-rw-r--r--lib/tools/test/xref_SUITE_data/update/x.erl.16
-rw-r--r--lib/tools/test/xref_SUITE_data/update/x.erl.26
-rw-r--r--lib/wx/api_gen/wx_gen.erl19
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl30
-rw-r--r--lib/wx/api_gen/wx_gen_erl.erl19
-rw-r--r--lib/wx/api_gen/wxapi.conf21
-rw-r--r--lib/wx/c_src/gen/wxe_events.cpp14
-rw-r--r--lib/wx/c_src/gen/wxe_funcs.cpp237
-rw-r--r--lib/wx/c_src/gen/wxe_macros.h2875
-rw-r--r--lib/wx/c_src/wxe_impl.cpp57
-rw-r--r--lib/wx/c_src/wxe_return.cpp12
-rw-r--r--lib/wx/doc/src/Makefile18
-rw-r--r--lib/wx/include/wx.hrl12
-rw-r--r--lib/wx/src/gen/wxGenericDirCtrl.erl12
-rw-r--r--lib/wx/src/gen/wxTreeCtrl.erl458
-rw-r--r--lib/wx/src/gen/wxTreeEvent.erl14
-rw-r--r--lib/wx/src/gen/wxe_debug.hrl2875
-rw-r--r--lib/wx/src/gen/wxe_funcs.hrl2875
-rw-r--r--lib/wx/test/wx_class_SUITE.erl26
-rw-r--r--lib/wx/test/wx_xtra_SUITE.erl72
-rw-r--r--lib/wx/test/wxt.erl18
-rw-r--r--lib/xmerl/doc/src/Makefile12
-rw-r--r--make/otp.mk.in14
-rw-r--r--system/AD.html307
-rw-r--r--system/AD.sgml367
-rw-r--r--system/ADbeam.html261
-rw-r--r--system/ADbeam.sgml246
-rw-r--r--system/doc/book.xml52
-rw-r--r--system/doc/extensions/Makefile142
-rw-r--r--system/doc/extensions/bit_syntax.xml403
-rw-r--r--system/doc/extensions/book.xml45
-rw-r--r--system/doc/extensions/fun_test.erl17
-rw-r--r--system/doc/extensions/funparse.erl74
-rw-r--r--system/doc/extensions/funs.xml486
-rw-r--r--system/doc/extensions/funs1.erl125
-rw-r--r--system/doc/extensions/include.xml81
-rw-r--r--system/doc/extensions/list_comprehensions.erl118
-rw-r--r--system/doc/extensions/list_comprehensions.xml205
-rw-r--r--system/doc/extensions/list_comrehensions.erl75
-rw-r--r--system/doc/extensions/macros.xml177
-rw-r--r--system/doc/extensions/make.dep21
-rw-r--r--system/doc/extensions/mexpand.erl16
-rw-r--r--system/doc/extensions/misc.xml310
-rw-r--r--system/doc/extensions/part.xml57
-rw-r--r--system/doc/extensions/records.xml284
-rw-r--r--system/doc/extensions/warning.gifbin1498 -> 0 bytes
-rw-r--r--system/doc/pics/Makefile58
-rw-r--r--system/doc/pics/app.gifbin285 -> 0 bytes
-rw-r--r--system/doc/pics/ede.gifbin13644 -> 0 bytes
-rw-r--r--system/doc/pics/ede_logo.gifbin757 -> 0 bytes
-rw-r--r--system/doc/pics/min_head.gifbin2652 -> 0 bytes
-rw-r--r--system/doc/pics/notes.gifbin2005 -> 0 bytes
-rw-r--r--system/doc/pics/otp.gifbin13737 -> 0 bytes
-rw-r--r--system/doc/pics/otp_logo.gifbin1660 -> 0 bytes
-rw-r--r--system/doc/pics/ps.gifbin618 -> 0 bytes
-rw-r--r--system/doc/pics/ref_man.gifbin1530 -> 0 bytes
-rw-r--r--system/doc/pics/user_guide.gifbin1581 -> 0 bytes
-rwxr-xr-x[l---------]system/doc/top/bin/otp_man_index107
-rw-r--r--[l---------]system/doc/top/src/erl_html_tools.erl728
-rw-r--r--[l---------]system/doc/top/src/erlresolvelinks.erl145
l---------system/doc/top/src/permuted_index.erl1
-rw-r--r--system/doc/top/templates/erlang.gifbin2162 -> 0 bytes
-rw-r--r--system/doc/top/templates/first.html.src104
-rwxr-xr-xsystem/doc/top/templates/flip_closed.gifbin82 -> 0 bytes
-rwxr-xr-xsystem/doc/top/templates/flip_google.gifbin257 -> 0 bytes
-rwxr-xr-xsystem/doc/top/templates/flip_open.gifbin86 -> 0 bytes
-rwxr-xr-xsystem/doc/top/templates/flip_static.gifbin109 -> 0 bytes
-rwxr-xr-xsystem/doc/top/templates/flipmenu.js342
-rw-r--r--system/doc/top/templates/index.html.src4
-rw-r--r--system/doc/top/templates/otp_top.css53
-rw-r--r--system/doc/top/templates/system.html.src281
-rw-r--r--system/doc/top/templates/toc_.html.src105
276 files changed, 20126 insertions, 10983 deletions
diff --git a/Makefile.in b/Makefile.in
index 107bf80bb5..8e97edfd84 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1998-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1998-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%
# Toplevel makefile for building the Erlang system
@@ -214,14 +214,15 @@ endif
# ---------------------------------------------------------------
# Target only used when building commercial ERTS patches
# ---------------------------------------------------------------
-release_docs:
+release_docs docs:
ifeq ($(OTP_SMALL_BUILD),true)
- cd $(ERL_TOP)/lib && $(MAKE) TESTROOT=$(RELEASE_ROOT) release_docs
+ cd $(ERL_TOP)/lib && $(MAKE) TESTROOT=$(RELEASE_ROOT) $@
else
- cd $(ERL_TOP)/lib && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
- cd $(ERL_TOP)/lib/dialyzer && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
+ cd $(ERL_TOP)/lib && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
+ cd $(ERL_TOP)/lib/dialyzer && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
endif
- cd $(ERL_TOP)/erts && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
+ cd $(ERL_TOP)/erts && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
+ cd $(ERL_TOP)/system/doc && $(MAKE) TESTROOT=$(RELEASE_ROOT) $@
# ----------------------------------------------------------------------
@@ -441,6 +442,8 @@ fourth_bootstrap_copy:
if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; fi
if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; fi
if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/test_server ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/test_server ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/test_server/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/test_server/include ; fi
for x in lib/ic/ebin/*.beam; do \
BN=`basename $$x`; \
TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin/$$BN; \
@@ -506,6 +509,16 @@ fourth_bootstrap_copy:
cp $$x $$TF; \
true; \
done
+ for x in lib/test_server/include/*.hrl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/test_server/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
# cp lib/syntax_tools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin
@@ -718,6 +731,11 @@ bootstrap_nc_for_ne_no_debug_sym:
#
install: install.dirs install.emulator install.libs install.Install install.bin
+install-docs:
+ ERL_TOP=$(ERL_TOP) INSTALLROOT=$(ERLANG_LIBDIR) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) RELEASE_ROOT=$(ERLANG_LIBDIR) release_docs
+
+
install.emulator:
cd erts && \
ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
diff --git a/erts/configure.in b/erts/configure.in
index ea97d73aa8..48d236351b 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -325,6 +325,7 @@ dnl Checks for programs.
dnl ----------------------------------------------------------------------
AC_PROG_CC
+AC_SUBST(GCC)
dnl ---------------------------------------------------------------------
dnl Special stuff regarding CFLAGS and details in the environment...
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 6f5dd248ce..b01d187b01 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -410,7 +410,7 @@
<tag><c><![CDATA[-setcookie Cookie]]></c></tag>
<item>
<p>Sets the magic cookie of the node to <c><![CDATA[Cookie]]></c>, see
- <seealso marker="erlang#erlang:set_cookie/2">erlang:set_cookie/2</seealso>.</p>
+ <seealso marker="erlang#set_cookie/2">erlang:set_cookie/2</seealso>.</p>
</item>
<tag><c><![CDATA[-shutdown_time Time]]></c></tag>
<item>
diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml
index 0b11f4bbcb..5d7a11b70a 100644
--- a/erts/doc/src/erl_driver.xml
+++ b/erts/doc/src/erl_driver.xml
@@ -4,7 +4,7 @@
<cref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</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>erl_driver</title>
@@ -1292,7 +1292,7 @@ typedef struct ErlIOVec {
has been set in the
<seealso marker="driver_entry">driver_entry</seealso>,
data can be forced into the driver via
- <seealso marker="erlang#erlang:port_command/3">port_command(Port, Data, [force])</seealso>
+ <seealso marker="erlang#port_command/3">port_command(Port, Data, [force])</seealso>
even though the driver has signaled that it is busy.
</p>
</desc>
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 2033ba8a66..2902d70976 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -148,7 +148,7 @@ ok
that the library needs in able to keep a state between NIF
calls. <c>enif_get_data()</c> will return this pointer.</p>
<p><c>load_info</c> is the second argument to <seealso
- marker="erlang#erlang:load_nif-2">erlang:load_nif/2</seealso>.</p>
+ marker="erlang#load_nif-2">erlang:load_nif/2</seealso>.</p>
<p>The library will fail to load if <c>load</c> returns
anything other than 0. <c>load</c> can be NULL in case no
initialization is needed.</p>
@@ -397,7 +397,7 @@ typedef struct {
</funcs>
<section>
<title>SEE ALSO</title>
- <p><seealso marker="erlang#erlang:load_nif-2">load_nif(3)</seealso></p>
+ <p><seealso marker="erlang#load_nif-2">load_nif(3)</seealso></p>
</section>
</cref>
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 28b040a441..207aabca35 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -452,19 +452,19 @@ iolist() = [char() | binary() | iolist()]
<desc>
<p>Cancels a timer, where <c>TimerRef</c> was returned by
either
- <seealso marker="#erlang:send_after/3">erlang:send_after/3</seealso>
+ <seealso marker="#send_after/3">erlang:send_after/3</seealso>
or
- <seealso marker="#erlang:start_timer/3">erlang:start_timer/3</seealso>.
+ <seealso marker="#start_timer/3">erlang:start_timer/3</seealso>.
If the timer is there to be removed, the function returns
the time in milliseconds left until the timer would have expired,
otherwise <c>false</c> (which means that <c>TimerRef</c> was
never a timer, that it has already been cancelled, or that it
has already delivered its message).</p>
<p>See also
- <seealso marker="#erlang:send_after/3">erlang:send_after/3</seealso>,
- <seealso marker="#erlang:start_timer/3">erlang:start_timer/3</seealso>,
+ <seealso marker="#send_after/3">erlang:send_after/3</seealso>,
+ <seealso marker="#start_timer/3">erlang:start_timer/3</seealso>,
and
- <seealso marker="#erlang:read_timer/1">erlang:read_timer/1</seealso>.</p>
+ <seealso marker="#read_timer/1">erlang:read_timer/1</seealso>.</p>
<p>Note: Cancelling a timer does not guarantee that the message
has not already been delivered to the message queue.</p>
</desc>
@@ -715,7 +715,7 @@ false</pre>
<desc>
<p>If <c>MonitorRef</c> is a reference which the calling process
obtained by calling
- <seealso marker="#erlang:monitor/2">erlang:monitor/2</seealso>,
+ <seealso marker="#monitor/2">erlang:monitor/2</seealso>,
this monitoring is turned off. If the monitoring is already
turned off, nothing happens.</p>
<p>Once <c>erlang:demonitor(MonitorRef)</c> has returned it is
@@ -726,7 +726,7 @@ false</pre>
the call, though. Therefore, in most cases, it is advisable
to remove such a <c>'DOWN'</c> message from the message queue
after monitoring has been stopped.
- <seealso marker="#erlang:demonitor/2">erlang:demonitor(MonitorRef, [flush])</seealso> can be used instead of
+ <seealso marker="#demonitor/2">erlang:demonitor(MonitorRef, [flush])</seealso> can be used instead of
<c>erlang:demonitor(MonitorRef)</c> if this cleanup is wanted.</p>
<note>
<p>Prior to OTP release R11B (erts version 5.5) <c>erlang:demonitor/1</c>
@@ -760,7 +760,7 @@ false</pre>
of <c>OptionList</c>.
</p>
<p><c>erlang:demonitor(MonitorRef, [])</c> is equivalent to
- <seealso marker="#erlang:demonitor/1">erlang:demonitor(MonitorRef)</seealso>.</p>
+ <seealso marker="#demonitor/1">erlang:demonitor(MonitorRef)</seealso>.</p>
<p>Currently the following <c>Option</c>s are valid:</p>
<taglist>
<tag><c>flush</c></tag>
@@ -810,7 +810,7 @@ false</pre>
</note>
<p>Failure: <c>badarg</c> if <c>OptionList</c> is not a list, or
if <c>Option</c> is not a valid option, or the same failure as for
- <seealso marker="#erlang:demonitor/1">erlang:demonitor/1</seealso></p>
+ <seealso marker="#demonitor/1">erlang:demonitor/1</seealso></p>
</desc>
</func>
<func>
@@ -1129,7 +1129,7 @@ b</pre>
<c>uniq</c>, and <c>pid</c>. For an external fun, the value
of any of these items is always the atom <c>undefined</c>.</p>
<p>See
- <seealso marker="#erlang:fun_info/1">erlang:fun_info/1</seealso>.</p>
+ <seealso marker="#fun_info/1">erlang:fun_info/1</seealso>.</p>
</desc>
</func>
<func>
@@ -1275,8 +1275,8 @@ b</pre>
returns, for example:</p>
<p><c>{'EXIT',{badarg,Stacktrace}} = catch abs(x)</c></p>
<p>See also
- <seealso marker="#erlang:error/1">erlang:error/1</seealso> and
- <seealso marker="#erlang:error/2">erlang:error/2</seealso>.</p>
+ <seealso marker="#error/1">erlang:error/1</seealso> and
+ <seealso marker="#error/2">erlang:error/2</seealso>.</p>
</desc>
</func>
<func>
@@ -2387,7 +2387,7 @@ os_prompt%</pre>
<item>
If <c>Type</c> is not one of the memory types listed in the
documentation of
- <seealso marker="#erlang:memory/0">erlang:memory/0</seealso>.
+ <seealso marker="#memory/0">erlang:memory/0</seealso>.
</item>
<tag><c>badarg</c></tag>
<item>
@@ -2401,7 +2401,7 @@ os_prompt%</pre>
</item>
</taglist>
<p>See also
- <seealso marker="#erlang:memory/0">erlang:memory/0</seealso>.</p>
+ <seealso marker="#memory/0">erlang:memory/0</seealso>.</p>
</desc>
</func>
<func>
@@ -2510,7 +2510,7 @@ os_prompt%</pre>
</note>
<p>The monitoring is turned off either when the <c>'DOWN'</c>
message is sent, or when
- <seealso marker="#erlang:demonitor/1">erlang:demonitor/1</seealso>
+ <seealso marker="#demonitor/1">erlang:demonitor/1</seealso>
is called.</p>
<p>If an attempt is made to monitor a process on an older node
(where remote process monitoring is not implemented or one
@@ -3379,7 +3379,7 @@ os_prompt%</pre>
registered name, [] is returned.</p>
<p>For valid values of <c>Item</c>, and corresponding
values of <c>Info</c>, see
- <seealso marker="#erlang:port_info/1">erlang:port_info/1</seealso>.</p>
+ <seealso marker="#port_info/1">erlang:port_info/1</seealso>.</p>
<p>Failure: <c>badarg</c> if <c>Port</c> is not a local port.</p>
</desc>
</func>
@@ -3868,9 +3868,9 @@ os_prompt%</pre>
ActiveSuspendCount, OutstandingSuspendCount}</c> tuples.
<c>Suspendee</c> is the pid of a process that have been or is to
be suspended by the process identified by <c>Pid</c> via the
- <seealso marker="#erlang:suspend_process/2">erlang:suspend_process/2</seealso>
+ <seealso marker="#suspend_process/2">erlang:suspend_process/2</seealso>
BIF, or the
- <seealso marker="#erlang:suspend_process/1">erlang:suspend_process/1</seealso>
+ <seealso marker="#suspend_process/1">erlang:suspend_process/1</seealso>
BIF. <c>ActiveSuspendCount</c> is the number of times the
<c>Suspendee</c> has been suspended by <c>Pid</c>.
<c>OutstandingSuspendCount</c> is the number of not yet
@@ -4021,19 +4021,19 @@ os_prompt%</pre>
</type>
<desc>
<p><c>TimerRef</c> is a timer reference returned by
- <seealso marker="#erlang:send_after/3">erlang:send_after/3</seealso>
+ <seealso marker="#send_after/3">erlang:send_after/3</seealso>
or
- <seealso marker="#erlang:start_timer/3">erlang:start_timer/3</seealso>.
+ <seealso marker="#start_timer/3">erlang:start_timer/3</seealso>.
If the timer is active, the function returns the time in
milliseconds left until the timer will expire, otherwise
<c>false</c> (which means that <c>TimerRef</c> was never a
timer, that it has been cancelled, or that it has already
delivered its message).</p>
<p>See also
- <seealso marker="#erlang:send_after/3">erlang:send_after/3</seealso>,
- <seealso marker="#erlang:start_timer/3">erlang:start_timer/3</seealso>,
+ <seealso marker="#send_after/3">erlang:send_after/3</seealso>,
+ <seealso marker="#start_timer/3">erlang:start_timer/3</seealso>,
and
- <seealso marker="#erlang:cancel_timer/1">erlang:cancel_timer/1</seealso>.</p>
+ <seealso marker="#cancel_timer/1">erlang:cancel_timer/1</seealso>.</p>
</desc>
</func>
<func>
@@ -4098,9 +4098,9 @@ true</pre>
<p>Decreases the suspend count on the process identified by
<c>Suspendee</c>. <c>Suspendee</c> should previously have been
suspended via
- <seealso marker="#erlang:suspend_process/2">erlang:suspend_process/2</seealso>,
+ <seealso marker="#suspend_process/2">erlang:suspend_process/2</seealso>,
or
- <seealso marker="#erlang:suspend_process/1">erlang:suspend_process/1</seealso>
+ <seealso marker="#suspend_process/1">erlang:suspend_process/1</seealso>
by the process calling <c>erlang:resume_process(Suspendee)</c>. When
the suspend count on <c>Suspendee</c> reach zero, <c>Suspendee</c>
will be resumed, i.e., the state of the <c>Suspendee</c> is changed
@@ -4186,9 +4186,9 @@ true</pre>
<p>Sends a message and returns <c>ok</c>, or does not send
the message but returns something else (see below). Otherwise
the same as
- <seealso marker="#erlang:send/2">erlang:send/2</seealso>. See
+ <seealso marker="#send/2">erlang:send/2</seealso>. See
also
- <seealso marker="#erlang:send_nosuspend/2">erlang:send_nosuspend/2,3</seealso>.
+ <seealso marker="#send_nosuspend/2">erlang:send_nosuspend/2,3</seealso>.
for more detailed explanation and warnings.</p>
<p>The possible options are:</p>
<taglist>
@@ -4234,10 +4234,10 @@ true</pre>
erts version 5.4.11. Note that timers will not be
automatically canceled when <c>Dest</c> is an atom.</p>
<p>See also
- <seealso marker="#erlang:start_timer/3">erlang:start_timer/3</seealso>,
- <seealso marker="#erlang:cancel_timer/1">erlang:cancel_timer/1</seealso>,
+ <seealso marker="#start_timer/3">erlang:start_timer/3</seealso>,
+ <seealso marker="#cancel_timer/1">erlang:cancel_timer/1</seealso>,
and
- <seealso marker="#erlang:read_timer/1">erlang:read_timer/1</seealso>.</p>
+ <seealso marker="#read_timer/1">erlang:read_timer/1</seealso>.</p>
<p>Failure: <c>badarg</c> if the arguments does not satisfy
the requirements specified above.</p>
</desc>
@@ -4253,7 +4253,7 @@ true</pre>
</type>
<desc>
<p>The same as
- <seealso marker="#erlang:send/3">erlang:send(Dest, Msg, [nosuspend])</seealso>, but returns <c>true</c> if
+ <seealso marker="#send/3">erlang:send(Dest, Msg, [nosuspend])</seealso>, but returns <c>true</c> if
the message was sent and <c>false</c> if the message was not
sent because the sender would have had to be suspended.</p>
<p>This function is intended for send operations towards an
@@ -4305,10 +4305,10 @@ true</pre>
</type>
<desc>
<p>The same as
- <seealso marker="#erlang:send/3">erlang:send(Dest, Msg, [nosuspend | Options])</seealso>,
+ <seealso marker="#send/3">erlang:send(Dest, Msg, [nosuspend | Options])</seealso>,
but with boolean return value.</p>
<p>This function behaves like
- <seealso marker="#erlang:send_nosuspend/2">erlang:send_nosuspend/2)</seealso>,
+ <seealso marker="#send_nosuspend/2">erlang:send_nosuspend/2)</seealso>,
but takes a third parameter, a list of options. The only
currently implemented option is <c>noconnect</c>. The option
<c>noconnect</c> makes the function return <c>false</c> if
@@ -4610,7 +4610,7 @@ true</pre>
<tag><c>monitor</c></tag>
<item>
<p>Monitor the new process (just like
- <seealso marker="#erlang:monitor/2">erlang:monitor/2</seealso> does).</p>
+ <seealso marker="#monitor/2">erlang:monitor/2</seealso> does).</p>
</item>
<tag><c>{priority, Level}</c></tag>
<item>
@@ -4653,7 +4653,7 @@ true</pre>
and no virtual memory, one might want to preserve memory
by setting <c>Number</c> to zero. (The value may be set
globally, see
- <seealso marker="#erlang:system_flag/2">erlang:system_flag/2</seealso>.)</p>
+ <seealso marker="#system_flag/2">erlang:system_flag/2</seealso>.)</p>
</item>
<tag><c>{min_heap_size, Size}</c></tag>
<item>
@@ -4764,10 +4764,10 @@ true</pre>
erts version 5.4.11. Note that timers will not be
automatically canceled when <c>Dest</c> is an atom.</p>
<p>See also
- <seealso marker="#erlang:send_after/3">erlang:send_after/3</seealso>,
- <seealso marker="#erlang:cancel_timer/1">erlang:cancel_timer/1</seealso>,
+ <seealso marker="#send_after/3">erlang:send_after/3</seealso>,
+ <seealso marker="#cancel_timer/1">erlang:cancel_timer/1</seealso>,
and
- <seealso marker="#erlang:read_timer/1">erlang:read_timer/1</seealso>.</p>
+ <seealso marker="#read_timer/1">erlang:read_timer/1</seealso>.</p>
<p>Failure: <c>badarg</c> if the arguments does not satisfy
the requirements specified above.</p>
</desc>
@@ -4872,7 +4872,7 @@ true</pre>
process will not leave the suspended state until its suspend
count reach zero. The suspend count of <c>Suspendee</c> is
decreased when
- <seealso marker="#erlang:resume_process/1">erlang:resume_process(Suspendee)</seealso>
+ <seealso marker="#resume_process/1">erlang:resume_process(Suspendee)</seealso>
is called by the same process that called
<c>erlang:suspend_process(Suspendee)</c>. All increased suspend
counts on other processes acquired by a process will automatically be
@@ -4961,7 +4961,7 @@ true</pre>
<desc>
<p>Suspends the process identified by <c>Suspendee</c>. The
same as calling
- <seealso marker="#erlang:suspend_process/2">erlang:suspend_process(Suspendee, [])</seealso>. For more information see the documentation of <seealso marker="#erlang:suspend_process/2">erlang:suspend_process/2</seealso>.
+ <seealso marker="#suspend_process/2">erlang:suspend_process(Suspendee, [])</seealso>. For more information see the documentation of <seealso marker="#suspend_process/2">erlang:suspend_process/2</seealso>.
</p>
<warning>
<p>This BIF is intended for debugging only.</p>
@@ -5272,7 +5272,7 @@ true</pre>
Some values are part of other values, and some memory
areas are not part of the result. If you are interested
in the total amount of memory allocated by the emulator
- see <seealso marker="#erlang:memory/0">erlang:memory/0,1</seealso>.</p>
+ see <seealso marker="#memory/0">erlang:memory/0,1</seealso>.</p>
</item>
<tag><c>allocator</c></tag>
<item>
@@ -5587,7 +5587,7 @@ true</pre>
<c>spawn</c> or <c>spawn_link</c> will use these
garbage collection settings. The default settings can be
changed by use of
- <seealso marker="#erlang:system_flag/2">system_flag/2</seealso>.
+ <seealso marker="#system_flag/2">system_flag/2</seealso>.
<seealso marker="#spawn_opt/4">spawn_opt/4</seealso>
can spawn a process that does not use the default
settings.</p>
@@ -5900,7 +5900,7 @@ true</pre>
</type>
<desc>
<p>Returns the current system monitoring settings set by
- <seealso marker="#erlang:system_monitor/2">erlang:system_monitor/2</seealso>
+ <seealso marker="#system_monitor/2">erlang:system_monitor/2</seealso>
as <c>{MonitorPid, Options}</c>, or <c>undefined</c> if there
are no settings. The order of the options may be different
from the one that was set.</p>
@@ -5918,9 +5918,9 @@ true</pre>
system performance monitoring settings are cleared.</p>
<p>Calling the function with <c>{MonitorPid, Options}</c> as
argument, is the same as calling
- <seealso marker="#erlang:system_monitor/2">erlang:system_monitor(MonitorPid, Options)</seealso>.</p>
+ <seealso marker="#system_monitor/2">erlang:system_monitor(MonitorPid, Options)</seealso>.</p>
<p>Returns the previous system monitor settings just like
- <seealso marker="#erlang:system_monitor/0">erlang:system_monitor/0</seealso>.</p>
+ <seealso marker="#system_monitor/0">erlang:system_monitor/0</seealso>.</p>
</desc>
</func>
@@ -5956,7 +5956,7 @@ true</pre>
explained in the documentation of the
<seealso marker="#gc_start">gc_start</seealso>
trace message (see
- <seealso marker="#erlang:trace/3">erlang:trace/3</seealso>).
+ <seealso marker="#trace/3">erlang:trace/3</seealso>).
New tuples may be added, and the order of the tuples in
the <c>Info</c> list may be changed at any time without prior
notice.
@@ -5998,7 +5998,7 @@ true</pre>
</item>
</taglist>
<p>Returns the previous system monitor settings just like
- <seealso marker="#erlang:system_monitor/0">erlang:system_monitor/0</seealso>.</p>
+ <seealso marker="#system_monitor/0">erlang:system_monitor/0</seealso>.</p>
<note>
<p>If a monitoring process gets so large that it itself
starts to cause system monitor messages when garbage
@@ -6022,7 +6022,7 @@ true</pre>
</type>
<desc>
<p>Returns the current system profiling settings set by
- <seealso marker="#erlang:system_profile/2">erlang:system_profile/2</seealso>
+ <seealso marker="#system_profile/2">erlang:system_profile/2</seealso>
as <c>{ProfilerPid, Options}</c>, or <c>undefined</c> if there
are no settings. The order of the options may be different
from the one that was set.</p>
@@ -6250,7 +6250,7 @@ true</pre>
<item>
<p>Trace certain function calls. Specify which function
calls to trace by calling
- <seealso marker="#erlang:trace_pattern/3">erlang:trace_pattern/3</seealso>.</p>
+ <seealso marker="#trace_pattern/3">erlang:trace_pattern/3</seealso>.</p>
<p>Message tags: <c>call</c>, <c>return_from</c>.</p>
</item>
<tag><c>silent</c></tag>
@@ -6279,7 +6279,7 @@ true</pre>
Trace the actual return from a traced function back to
its caller. Only works for functions traced with
the <c>local</c> option to
- <seealso marker="#erlang:trace_pattern/3">erlang:trace_pattern/3</seealso>.</p>
+ <seealso marker="#trace_pattern/3">erlang:trace_pattern/3</seealso>.</p>
<p>The semantics is that a trace message is sent when a
call traced function actually returns, that is, when a
chain of tail recursive calls is ended. There will be
@@ -6667,7 +6667,7 @@ true</pre>
<c>true</c> for the pseudo function <c>on_load</c> if call
count tracing is active. Return <c>false</c> otherwise.
See also
- <seealso marker="#erlang:trace_pattern/3">erlang:trace_pattern/3</seealso>.</p>
+ <seealso marker="#trace_pattern/3">erlang:trace_pattern/3</seealso>.</p>
</item>
<tag><c>all</c></tag>
<item>
@@ -6690,7 +6690,7 @@ true</pre>
<fsummary>Set trace patterns for global call tracing</fsummary>
<desc>
<p>The same as
- <seealso marker="#erlang:trace_pattern/3">erlang:trace_pattern(MFA, MatchSpec, [])</seealso>,
+ <seealso marker="#trace_pattern/3">erlang:trace_pattern(MFA, MatchSpec, [])</seealso>,
retained for backward compatibility.</p>
</desc>
</func>
@@ -6703,7 +6703,7 @@ true</pre>
<desc>
<p>This BIF is used to enable or disable call tracing for
exported functions. It must be combined with
- <seealso marker="#erlang:trace/3">erlang:trace/3</seealso>
+ <seealso marker="#trace/3">erlang:trace/3</seealso>
to set the <c>call</c> trace flag for one or more processes.</p>
<p>Conceptually, call tracing works like this: Inside
the Erlang virtual machine there is a set of processes to be
@@ -6713,7 +6713,7 @@ true</pre>
in the traced function set, the trace action will be taken.
Otherwise, nothing will happen.</p>
<p>Use
- <seealso marker="#erlang:trace/3">erlang:trace/3</seealso> to
+ <seealso marker="#trace/3">erlang:trace/3</seealso> to
add or remove one or more processes to the set of traced
processes. Use <c>erlang:trace_pattern/2</c> to add or remove
exported functions to the set of traced functions.</p>
@@ -6830,7 +6830,7 @@ true</pre>
counters can be restarted from zero with
<c>MatchSpec == restart</c>.</p>
<p>The counter value can be read with
- <seealso marker="#erlang:trace_info/2">erlang:trace_info/2</seealso>.</p>
+ <seealso marker="#trace_info/2">erlang:trace_info/2</seealso>.</p>
</item>
</taglist>
<p>The <c>global</c> and <c>local</c> options are mutually
@@ -6850,7 +6850,7 @@ true</pre>
specification list. If a function has a match specification,
you can replace it with a completely new one. If you need to
change an existing match specification, use the
- <seealso marker="#erlang:trace_info/2">erlang:trace_info/2</seealso>
+ <seealso marker="#trace_info/2">erlang:trace_info/2</seealso>
BIF to retrieve the existing match specification.</p>
<p>Returns the number of exported functions that matched
the <c>MFA</c> argument. This will be zero if none matched at
diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml
index 3859ac8365..1e8960c22c 100644
--- a/erts/doc/src/erlc.xml
+++ b/erts/doc/src/erlc.xml
@@ -4,7 +4,7 @@
<comref>
<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>erlc</title>
@@ -104,6 +104,10 @@
must be quoted. Terms which contain spaces
must be quoted on all platforms.</p>
</item>
+ <tag>-W<em>error</em></tag>
+ <item>
+ <p>Makes all warnings into errors.</p>
+ </item>
<tag>-W<em>number</em></tag>
<item>
<p>Sets warning level to <em>number</em>. Default is <c><![CDATA[1]]></c>.
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml
index 2252358e0d..5fe414841e 100644
--- a/erts/doc/src/notes.xml
+++ b/erts/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>ERTS Release Notes</title>
@@ -242,7 +242,7 @@
<item>
<p>
The <seealso
- marker="erlang#erlang:port_command/3">erlang:port_command/3</seealso>
+ marker="erlang#port_command/3">erlang:port_command/3</seealso>
BIF has been added. <c>erlang:port_command/3</c> is
currently not auto imported, but it is planned to be auto
imported in OTP R14. For more information see the
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index 903e1e96ba..bc846d1e3d 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -1,24 +1,25 @@
#
# %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%
#
include $(ERL_TOP)/make/target.mk
include ../vsn.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
ENABLE_ALLOC_TYPE_VARS = @ENABLE_ALLOC_TYPE_VARS@
HIPE_ENABLED=@HIPE_ENABLED@
@@ -213,7 +214,7 @@ else
OPT_LEVEL = -O3
endif
-ifeq ($(CC), gcc)
+ifeq ($(GCC),yes)
ifeq ($(NO_INLINE_FUNCTIONS),true)
GEN_OPT_FLGS = $(OPT_LEVEL) -fno-inline-functions
else
@@ -252,7 +253,7 @@ CS_TYPE_FLAGS = $(subst QUANTIFY,FAKE_QUANTIFY, \
$(subst PURIFY,FAKE_PURIFY, $(TYPE_FLAGS)))
endif
CS_CFLAGS_ = $(CS_TYPE_FLAGS) @DEFS@ $(WFLAGS)
-ifeq ($(CC), gcc)
+ifeq ($(GCC),yes)
CS_CFLAGS = $(subst -O2, $(GEN_OPT_FLGS) $(UNROLL_FLG), $(CS_CFLAGS_))
else
CS_CFLAGS = $(CS_CFLAGS_)
@@ -351,7 +352,6 @@ endif
CS_EXECUTABLE = child_setup$(TYPEMARKER)
# ----------------------------------------------------------------------
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
ifeq ($(ERLANG_OSTYPE), unix)
UNIX_ONLY_BUILDS = $(BINDIR)/$(CS_EXECUTABLE)
@@ -692,7 +692,7 @@ $(OBJDIR)/%.kp.o: sys/common/%.c
$(OBJDIR)/%.nkp.o: sys/common/%.c
$(CC) -DERTS_NO_KERNEL_POLL_VERSION $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
-ifeq ($(CC), gcc)
+ifeq ($(GCC),yes)
$(OBJDIR)/erl_obsolete.o: beam/erl_obsolete.c
$(CC) $(subst -Wstrict-prototypes, , $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS))) $(INCLUDES) -c $< -o $@
diff --git a/erts/emulator/beam/erl_bif_guard.c b/erts/emulator/beam/erl_bif_guard.c
index 8b47db10dd..440b0b4f14 100644
--- a/erts/emulator/beam/erl_bif_guard.c
+++ b/erts/emulator/beam/erl_bif_guard.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2006-2009. All Rights Reserved.
- *
+ *
+ * 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 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%
*/
@@ -318,6 +318,10 @@ double_to_integer(Process* p, double x)
* The following code is used when a guard that may build on the
* heap is called directly. They must not use HAlloc(), but must
* do a garbage collection if there is insufficient heap space.
+ *
+ * Important note: All error checking MUST be done before doing
+ * a garbage collection. The compiler assumes that all registers
+ * are still valid if a guard BIF generates an exception.
*/
#define ERTS_NEED_GC(p, need) ((HEAP_LIMIT((p)) - HEAP_TOP((p))) <= (need))
diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c
index 16abab65b0..c027cd5984 100644
--- a/erts/emulator/beam/erl_bif_re.c
+++ b/erts/emulator/beam/erl_bif_re.c
@@ -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%
*/
@@ -884,7 +884,7 @@ re_run_3(BIF_ALIST_3)
int capture_count;
if (pflags & PARSE_FLAG_UNICODE &&
- (!is_binary(BIF_ARG_1) ||
+ (!is_binary(BIF_ARG_2) || !is_binary(BIF_ARG_1) ||
(is_list_cap && !(pflags & PARSE_FLAG_GLOBAL)))) {
BIF_TRAP3(urun_trap_exportp, BIF_P, BIF_ARG_1, BIF_ARG_2, BIF_ARG_3);
}
@@ -1020,6 +1020,9 @@ re_run_3(BIF_ALIST_3)
goto handle_iolist;
}
pb = (ProcBin *) bptr;
+ if (pb->flags) {
+ erts_emasculate_writable_binary(pb);
+ }
restart.subject = (char *) (pb->bytes+offset);
restart.flags |= RESTART_FLAG_SUBJECT_IN_BINARY;
} else {
diff --git a/erts/emulator/beam/erl_db_tree.c b/erts/emulator/beam/erl_db_tree.c
index d3a916d2d9..b421da591b 100644
--- a/erts/emulator/beam/erl_db_tree.c
+++ b/erts/emulator/beam/erl_db_tree.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1998-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1998-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%
*/
@@ -2529,7 +2529,9 @@ static TreeDbTerm *find_node(DbTableTree *tb, Eterm key)
this = this->right;
}
}
- release_stack(tb,stack);
+ if (stack) {
+ release_stack(tb,stack);
+ }
return this;
}
diff --git a/erts/emulator/beam/erl_lock_check.c b/erts/emulator/beam/erl_lock_check.c
index 25f1d420d1..2f2924ae76 100644
--- a/erts/emulator/beam/erl_lock_check.c
+++ b/erts/emulator/beam/erl_lock_check.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2005-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2005-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%
*/
@@ -75,6 +75,9 @@ static erts_lc_lock_order_t erts_lock_order[] = {
* the lock name)"
*/
#ifdef ERTS_SMP
+#ifdef HIPE
+ { "hipe_mfait_lock", NULL },
+#endif
{ "driver_lock", "driver_name" },
{ "port_lock", "port_id" },
#endif
diff --git a/erts/emulator/beam/erl_port_task.c b/erts/emulator/beam/erl_port_task.c
index 0fb264a53c..3cb5a966ac 100644
--- a/erts/emulator/beam/erl_port_task.c
+++ b/erts/emulator/beam/erl_port_task.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2006-2009. All Rights Reserved.
- *
+ *
+ * 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 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%
*/
@@ -902,25 +902,45 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
*curr_port_pp = NULL;
- if (pp->sched.taskq) {
+#ifdef ERTS_SMP
+ ASSERT(runq == (ErtsRunQueue *) erts_smp_atomic_read(&pp->run_queue));
+#endif
+
+ if (!pp->sched.taskq) {
+ ASSERT(pp->sched.exe_taskq);
+ pp->sched.exe_taskq = NULL;
+ }
+ else {
+#ifdef ERTS_SMP
+ ErtsRunQueue *xrunq;
+#endif
+
ASSERT(!(pp->status & ERTS_PORT_SFLGS_DEAD));
ASSERT(pp->sched.taskq->first);
- enqueue_port(runq, pp);
- port_was_enqueued = 1;
-
- /*
- erts_smp_notify_inc_runq();
- * No need to notify schedulers about the increase in run
- * queue length since at least this thread, which is a
- * scheduler, will discover that the port run queue isn't
- * empty before trying to go to sleep.
- */
+#ifdef ERTS_SMP
+ xrunq = erts_check_emigration_need(runq, ERTS_PORT_PRIO_LEVEL);
+ if (!xrunq) {
+#endif
+ enqueue_port(runq, pp);
+ ASSERT(pp->sched.exe_taskq);
+ pp->sched.exe_taskq = NULL;
+ /* No need to notify ourselves about inc in runq. */
+#ifdef ERTS_SMP
+ }
+ else {
+ /* Port emigrated ... */
+ erts_smp_atomic_set(&pp->run_queue, (long) xrunq);
+ enqueue_port(xrunq, pp);
+ ASSERT(pp->sched.exe_taskq);
+ pp->sched.exe_taskq = NULL;
+ erts_smp_notify_inc_runq(xrunq);
+ erts_smp_runq_unlock(xrunq);
+ }
+#endif
+ port_was_enqueued = 1;
}
- ASSERT(pp->sched.exe_taskq);
- pp->sched.exe_taskq = NULL;
-
res = erts_smp_atomic_read(&erts_port_task_outstanding_io_tasks) != (long) 0;
ERTS_PT_CHK_PRES_PORTQ(runq, pp);
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 5f512a9982..b519b39d63 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -2522,8 +2522,11 @@ suspend_scheduler(ErtsSchedulerData *esdp)
NULL);
}
- erts_smp_atomic_inc(&schdlr_sspnd.active);
-
+ active_schedulers = erts_smp_atomic_inctest(&schdlr_sspnd.active);
+ if (schdlr_sspnd.changing == ERTS_SCHED_CHANGING_MULTI_SCHED
+ && schdlr_sspnd.online == active_schedulers) {
+ schdlr_sspnd.changing = 0;
+ }
erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
if (erts_system_profile_flags.scheduler)
@@ -2750,11 +2753,12 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
ErtsProcList *plp;
erts_smp_mtx_lock(&schdlr_sspnd.mtx);
- if (on) {
- if (schdlr_sspnd.changing) {
- res = ERTS_SCHDLR_SSPND_YIELD_RESTART; /* Yield */
- }
- else if (erts_is_multi_scheduling_blocked()) {
+
+ if (schdlr_sspnd.changing) {
+ res = ERTS_SCHDLR_SSPND_YIELD_RESTART; /* Yield */
+ }
+ else if (on) { /* ------ BLOCK ------ */
+ if (erts_is_multi_scheduling_blocked()) {
plp = proclist_create(p);
plp->next = schdlr_sspnd.msb.procs;
schdlr_sspnd.msb.procs = plp;
@@ -2842,10 +2846,11 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
}
}
else if (!ongoing_multi_scheduling_block()) {
+ /* unblock not ongoing */
ASSERT(!schdlr_sspnd.msb.procs);
res = ERTS_SCHDLR_SSPND_DONE;
}
- else {
+ else { /* ------ UNBLOCK ------ */
if (p->flags & F_HAVE_BLCKD_MSCHED) {
ErtsProcList **plpp = &schdlr_sspnd.msb.procs;
plp = schdlr_sspnd.msb.procs;
@@ -2930,7 +2935,6 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
erts_smp_mtx_lock(&schdlr_sspnd.mtx);
}
erts_smp_cnd_broadcast(&schdlr_sspnd.cnd);
- schdlr_sspnd.changing = 0;
res = ERTS_SCHDLR_SSPND_DONE;
}
}
@@ -5517,6 +5521,8 @@ erts_proc_migrate(Process *p, ErtsProcLocks *plcks,
p->run_queue = to_rq;
enqueue_process(to_rq, p);
+ smp_notify_inc_runq(to_rq);
+
return ERTS_MIGRATE_SUCCESS;
}
#endif /* ERTS_SMP */
diff --git a/erts/emulator/beam/erl_time_sup.c b/erts/emulator/beam/erl_time_sup.c
index 76bfdecd9f..c15f85f8f1 100644
--- a/erts/emulator/beam/erl_time_sup.c
+++ b/erts/emulator/beam/erl_time_sup.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1999-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1999-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%
*/
@@ -754,12 +754,8 @@ get_sys_now(Uint* megasec, Uint* sec, Uint* microsec)
{
SysTimeval now;
- erts_smp_mtx_lock(&erts_timeofday_mtx);
-
sys_gettimeofday(&now);
- erts_smp_mtx_unlock(&erts_timeofday_mtx);
-
*megasec = (Uint) (now.tv_sec / 1000000);
*sec = (Uint) (now.tv_sec % 1000000);
*microsec = (Uint) (now.tv_usec);
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index 032bf2e896..5291374e25 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -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%
*/
/* $Id$
@@ -656,6 +656,7 @@ static void *hipe_get_emu_address(Eterm m, Eterm f, unsigned int arity, int is_r
address = hipe_find_emu_address(m, f, arity);
if (!address) {
/* if not found, stub it via the export entry */
+ /* no lock needed around erts_export_get_or_make_stub() */
Export *export_entry = erts_export_get_or_make_stub(m, f, arity);
address = export_entry->address;
}
@@ -1188,8 +1189,31 @@ static struct {
unsigned int mask; /* INV: mask == (1 << log2size)-1 */
unsigned int used;
struct hipe_mfa_info **bucket;
+ /*
+ * The mfa info table is normally updated by the loader,
+ * which runs in non-concurrent mode. Unfortunately runtime
+ * apply operations (get_na_nofail) update the table if
+ * they create a new stub for the mfa, which forces locking.
+ * XXX: Redesign apply et al to avoid those updates.
+ */
+ erts_smp_mtx_t lock;
} hipe_mfa_info_table;
+static inline void hipe_mfa_info_table_init_lock(void)
+{
+ erts_smp_mtx_init(&hipe_mfa_info_table.lock, "hipe_mfait_lock");
+}
+
+static inline void hipe_mfa_info_table_lock(void)
+{
+ erts_smp_mtx_lock(&hipe_mfa_info_table.lock);
+}
+
+static inline void hipe_mfa_info_table_unlock(void)
+{
+ erts_smp_mtx_unlock(&hipe_mfa_info_table.lock);
+}
+
#define HIPE_MFA_HASH(M,F,A) ((M) * (F) + (A))
static struct hipe_mfa_info **hipe_mfa_info_table_alloc_bucket(unsigned int size)
@@ -1258,9 +1282,11 @@ void hipe_mfa_info_table_init(void)
hipe_mfa_info_table.mask = size - 1;
hipe_mfa_info_table.used = 0;
hipe_mfa_info_table.bucket = hipe_mfa_info_table_alloc_bucket(size);
+
+ hipe_mfa_info_table_init_lock();
}
-static inline struct hipe_mfa_info *hipe_mfa_info_table_get(Eterm m, Eterm f, unsigned int arity)
+static inline struct hipe_mfa_info *hipe_mfa_info_table_get_locked(Eterm m, Eterm f, unsigned int arity)
{
unsigned long h;
unsigned int i;
@@ -1286,7 +1312,7 @@ void *hipe_mfa_find_na(Eterm m, Eterm f, unsigned int arity)
}
#endif
-static struct hipe_mfa_info *hipe_mfa_info_table_put(Eterm m, Eterm f, unsigned int arity)
+static struct hipe_mfa_info *hipe_mfa_info_table_put_locked(Eterm m, Eterm f, unsigned int arity)
{
unsigned long h;
unsigned int i;
@@ -1313,7 +1339,10 @@ static struct hipe_mfa_info *hipe_mfa_info_table_put(Eterm m, Eterm f, unsigned
static void hipe_mfa_set_na(Eterm m, Eterm f, unsigned int arity, void *address, int is_exported)
{
- struct hipe_mfa_info *p = hipe_mfa_info_table_put(m, f, arity);
+ struct hipe_mfa_info *p;
+
+ hipe_mfa_info_table_lock();
+ p = hipe_mfa_info_table_put_locked(m, f, arity);
#ifdef DEBUG_LINKER
printf("%s: ", __FUNCTION__);
print_mfa(m, f, arity);
@@ -1322,19 +1351,30 @@ static void hipe_mfa_set_na(Eterm m, Eterm f, unsigned int arity, void *address,
p->local_address = address;
if (is_exported)
p->remote_address = address;
+ hipe_mfa_info_table_unlock();
}
#if defined(__powerpc__) || defined(__ppc__) || defined(__powerpc64__) || defined(__arm__)
void *hipe_mfa_get_trampoline(Eterm m, Eterm f, unsigned int arity)
{
- struct hipe_mfa_info *p = hipe_mfa_info_table_put(m, f, arity);
- return p->trampoline;
+ struct hipe_mfa_info *p;
+ void *trampoline;
+
+ hipe_mfa_info_table_lock();
+ p = hipe_mfa_info_table_put_locked(m, f, arity);
+ trampoline = p->trampoline;
+ hipe_mfa_info_table_unlock();
+ return trampoline;
}
void hipe_mfa_set_trampoline(Eterm m, Eterm f, unsigned int arity, void *trampoline)
{
- struct hipe_mfa_info *p = hipe_mfa_info_table_put(m, f, arity);
+ struct hipe_mfa_info *p;
+
+ hipe_mfa_info_table_lock();
+ p = hipe_mfa_info_table_put_locked(m, f, arity);
p->trampoline = trampoline;
+ hipe_mfa_info_table_unlock();
}
#endif
@@ -1365,12 +1405,13 @@ BIF_RETTYPE hipe_bifs_invalidate_funinfo_native_addresses_1(BIF_ALIST_1)
struct mfa mfa;
struct hipe_mfa_info *p;
+ hipe_mfa_info_table_lock();
lst = BIF_ARG_1;
while (is_list(lst)) {
if (!term_to_mfa(CAR(list_val(lst)), &mfa))
- BIF_ERROR(BIF_P, BADARG);
+ break;
lst = CDR(list_val(lst));
- p = hipe_mfa_info_table_get(mfa.mod, mfa.fun, mfa.ari);
+ p = hipe_mfa_info_table_get_locked(mfa.mod, mfa.fun, mfa.ari);
if (p) {
p->remote_address = NULL;
p->local_address = NULL;
@@ -1393,6 +1434,7 @@ BIF_RETTYPE hipe_bifs_invalidate_funinfo_native_addresses_1(BIF_ALIST_1)
}
}
}
+ hipe_mfa_info_table_unlock();
if (is_not_nil(lst))
BIF_ERROR(BIF_P, BADARG);
BIF_RET(NIL);
@@ -1406,7 +1448,8 @@ void hipe_mfa_save_orig_beam_op(Eterm mod, Eterm fun, unsigned int ari, Eterm *p
orig_beam_op = pc[0];
if (orig_beam_op != BeamOpCode(op_hipe_trap_call_closure) &&
orig_beam_op != BeamOpCode(op_hipe_trap_call)) {
- p = hipe_mfa_info_table_put(mod, fun, ari);
+ hipe_mfa_info_table_lock();
+ p = hipe_mfa_info_table_put_locked(mod, fun, ari);
#ifdef DEBUG_LINKER
printf("%s: ", __FUNCTION__);
print_mfa(mod, fun, ari);
@@ -1414,6 +1457,7 @@ void hipe_mfa_save_orig_beam_op(Eterm mod, Eterm fun, unsigned int ari, Eterm *p
#endif
p->beam_code = pc;
p->orig_beam_op = orig_beam_op;
+ hipe_mfa_info_table_unlock();
} else {
#ifdef DEBUG_LINKER
printf("%s: ", __FUNCTION__);
@@ -1440,12 +1484,12 @@ static void *hipe_make_stub(Eterm m, Eterm f, unsigned int arity, int is_remote)
return StubAddress;
}
-static void *hipe_get_na_nofail(Eterm m, Eterm f, unsigned int a, int is_remote)
+static void *hipe_get_na_nofail_locked(Eterm m, Eterm f, unsigned int a, int is_remote)
{
struct hipe_mfa_info *p;
void *address;
- p = hipe_mfa_info_table_get(m, f, a);
+ p = hipe_mfa_info_table_get_locked(m, f, a);
if (p) {
/* find address, predicting for a runtime apply call */
address = p->remote_address;
@@ -1459,13 +1503,23 @@ static void *hipe_get_na_nofail(Eterm m, Eterm f, unsigned int a, int is_remote)
if (address)
return address;
} else
- p = hipe_mfa_info_table_put(m, f, a);
+ p = hipe_mfa_info_table_put_locked(m, f, a);
address = hipe_make_stub(m, f, a, is_remote);
/* XXX: how to tell if a BEAM MFA is exported or not? */
p->remote_address = address;
return address;
}
+static void *hipe_get_na_nofail(Eterm m, Eterm f, unsigned int a, int is_remote)
+{
+ void *p;
+
+ hipe_mfa_info_table_lock();
+ p = hipe_get_na_nofail_locked(m, f, a, is_remote);
+ hipe_mfa_info_table_unlock();
+ return p;
+}
+
/* used for apply/3 in hipe_mode_switch */
void *hipe_get_remote_na(Eterm m, Eterm f, unsigned int a)
{
@@ -1549,6 +1603,8 @@ int hipe_find_mfa_from_ra(const void *ra, Eterm *m, Eterm *f, unsigned int *a)
/* Note about locking: the table is only updated from the
loader, which runs with the rest of the system suspended. */
+ /* XXX: alas not true; see comment at hipe_mfa_info_table.lock */
+ hipe_mfa_info_table_lock();
bucket = hipe_mfa_info_table.bucket;
nrbuckets = 1 << hipe_mfa_info_table.log2size;
mfa = NULL;
@@ -1564,12 +1620,13 @@ int hipe_find_mfa_from_ra(const void *ra, Eterm *m, Eterm *f, unsigned int *a)
b = b->bucket.next;
}
}
- if (!mfa)
- return 0;
- *m = mfa->m;
- *f = mfa->f;
- *a = mfa->a;
- return 1;
+ if (mfa) {
+ *m = mfa->m;
+ *f = mfa->f;
+ *a = mfa->a;
+ }
+ hipe_mfa_info_table_unlock();
+ return mfa ? 1 : 0;
}
/*
@@ -1645,8 +1702,9 @@ BIF_RETTYPE hipe_bifs_add_ref_2(BIF_ALIST_2)
default:
goto badarg;
}
- callee_mfa = hipe_mfa_info_table_put(callee.mod, callee.fun, callee.ari);
- caller_mfa = hipe_mfa_info_table_put(caller.mod, caller.fun, caller.ari);
+ hipe_mfa_info_table_lock();
+ callee_mfa = hipe_mfa_info_table_put_locked(callee.mod, callee.fun, callee.ari);
+ caller_mfa = hipe_mfa_info_table_put_locked(caller.mod, caller.fun, caller.ari);
refers_to = erts_alloc(ERTS_ALC_T_HIPE, sizeof(*refers_to));
refers_to->mfa = callee_mfa;
@@ -1660,6 +1718,7 @@ BIF_RETTYPE hipe_bifs_add_ref_2(BIF_ALIST_2)
ref->flags = flags;
ref->next = callee_mfa->referred_from;
callee_mfa->referred_from = ref;
+ hipe_mfa_info_table_unlock();
BIF_RET(NIL);
@@ -1679,10 +1738,12 @@ BIF_RETTYPE hipe_bifs_mark_referred_from_1(BIF_ALIST_1) /* get_refs_from */
if (!term_to_mfa(BIF_ARG_1, &mfa))
BIF_ERROR(BIF_P, BADARG);
- p = hipe_mfa_info_table_get(mfa.mod, mfa.fun, mfa.ari);
+ hipe_mfa_info_table_lock();
+ p = hipe_mfa_info_table_get_locked(mfa.mod, mfa.fun, mfa.ari);
if (p)
for (ref = p->referred_from; ref != NULL; ref = ref->next)
ref->flags |= REF_FLAG_PENDING_REDIRECT;
+ hipe_mfa_info_table_unlock();
BIF_RET(NIL);
}
@@ -1695,7 +1756,8 @@ BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1)
if (!term_to_mfa(BIF_ARG_1, &mfa))
BIF_ERROR(BIF_P, BADARG);
- caller_mfa = hipe_mfa_info_table_get(mfa.mod, mfa.fun, mfa.ari);
+ hipe_mfa_info_table_lock();
+ caller_mfa = hipe_mfa_info_table_get_locked(mfa.mod, mfa.fun, mfa.ari);
if (caller_mfa) {
refers_to = caller_mfa->refers_to;
while (refers_to) {
@@ -1725,6 +1787,7 @@ BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1)
}
caller_mfa->refers_to = NULL;
}
+ hipe_mfa_info_table_unlock();
BIF_RET(NIL);
}
@@ -1742,14 +1805,15 @@ BIF_RETTYPE hipe_bifs_redirect_referred_from_1(BIF_ALIST_1)
if (!term_to_mfa(BIF_ARG_1, &mfa))
BIF_ERROR(BIF_P, BADARG);
- p = hipe_mfa_info_table_get(mfa.mod, mfa.fun, mfa.ari);
+ hipe_mfa_info_table_lock();
+ p = hipe_mfa_info_table_get_locked(mfa.mod, mfa.fun, mfa.ari);
if (p) {
prev = &p->referred_from;
ref = *prev;
while (ref) {
if (ref->flags & REF_FLAG_PENDING_REDIRECT) {
is_remote = ref->flags & REF_FLAG_IS_REMOTE;
- new_address = hipe_get_na_nofail(p->m, p->f, p->a, is_remote);
+ new_address = hipe_get_na_nofail_locked(p->m, p->f, p->a, is_remote);
if (ref->flags & REF_FLAG_IS_LOAD_MFA)
res = hipe_patch_insn(ref->address, (Uint)new_address, am_load_mfa);
else
@@ -1772,6 +1836,7 @@ BIF_RETTYPE hipe_bifs_redirect_referred_from_1(BIF_ALIST_1)
}
}
}
+ hipe_mfa_info_table_unlock();
BIF_RET(NIL);
}
diff --git a/erts/emulator/test/scheduler_SUITE.erl b/erts/emulator/test/scheduler_SUITE.erl
index e644ad4dc8..c9101b77c2 100644
--- a/erts/emulator/test/scheduler_SUITE.erl
+++ b/erts/emulator/test/scheduler_SUITE.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%
%%
@@ -48,7 +48,8 @@
scheduler_bind_types/1,
cpu_topology/1,
sct_cmd/1,
- sbt_cmd/1]).
+ sbt_cmd/1,
+ scheduler_suspend/1]).
-define(DEFAULT_TIMEOUT, ?t:minutes(10)).
@@ -65,7 +66,8 @@ all(suite) ->
equal_with_high,
equal_with_high_max,
bound_process,
- scheduler_bind].
+ scheduler_bind,
+ scheduler_suspend].
init_per_testcase(Case, Config) when is_list(Config) ->
Dog = ?t:timetrap(?DEFAULT_TIMEOUT),
@@ -882,11 +884,103 @@ sbt_test(Config, CpuTCmd, ClBt, Bt, LP) ->
?line stop_node(Node),
?line ok.
+scheduler_suspend(Config) when is_list(Config) ->
+ ?line Dog = ?t:timetrap(?t:minutes(2)),
+ ?line lists:foreach(fun (S) -> scheduler_suspend_test(Config, S) end,
+ [64, 32, 16, default]),
+ ?line ?t:timetrap_cancel(Dog),
+ ?line ok.
+scheduler_suspend_test(Config, Schedulers) ->
+ ?line Cmd = case Schedulers of
+ default ->
+ "";
+ _ ->
+ S = integer_to_list(Schedulers),
+ "+S"++S++":"++S
+ end,
+ ?line {ok, Node} = start_node(Config, Cmd),
+ ?line [SState] = mcall(Node, [fun () ->
+ erlang:system_info(schedulers_state)
+ end]),
+ ?line {Sched, _, _} = SState,
+ ?line true = is_integer(Sched),
+ ?line [ok] = mcall(Node, [fun () -> sst0_loop(300) end]),
+ ?line [ok] = mcall(Node, [fun () -> sst1_loop(300) end]),
+ ?line [ok] = mcall(Node, [fun () -> sst2_loop(300) end]),
+ ?line [ok, ok, ok, ok, ok] = mcall(Node,
+ [fun () -> sst0_loop(200) end,
+ fun () -> sst1_loop(200) end,
+ fun () -> sst2_loop(200) end,
+ fun () -> sst2_loop(200) end,
+ fun () -> sst3_loop(Sched, 200) end]),
+ ?line [SState] = mcall(Node, [fun () ->
+ erlang:system_info(schedulers_state)
+ end]),
+ ?line stop_node(Node),
+ ?line ok.
+
+
+sst0_loop(0) ->
+ ok;
+sst0_loop(N) ->
+ erlang:system_flag(multi_scheduling, block),
+ erlang:system_flag(multi_scheduling, unblock),
+ erlang:yield(),
+ sst0_loop(N-1).
+
+sst1_loop(0) ->
+ ok;
+sst1_loop(N) ->
+ erlang:system_flag(multi_scheduling, block),
+ erlang:system_flag(multi_scheduling, unblock),
+ sst1_loop(N-1).
+
+sst2_loop(0) ->
+ ok;
+sst2_loop(N) ->
+ erlang:system_flag(multi_scheduling, block),
+ erlang:system_flag(multi_scheduling, block),
+ erlang:system_flag(multi_scheduling, block),
+ erlang:system_flag(multi_scheduling, unblock),
+ erlang:system_flag(multi_scheduling, unblock),
+ erlang:system_flag(multi_scheduling, unblock),
+ sst2_loop(N-1).
+
+sst3_loop(_S, 0) ->
+ ok;
+sst3_loop(S, N) ->
+ erlang:system_flag(schedulers_online, (S div 2)+1),
+ erlang:system_flag(schedulers_online, 1),
+ erlang:system_flag(schedulers_online, (S div 2)+1),
+ erlang:system_flag(schedulers_online, S),
+ erlang:system_flag(schedulers_online, 1),
+ erlang:system_flag(schedulers_online, S),
+ sst3_loop(S, N-1).
+
-%
+%%
%% Utils
%%
+mcall(Node, Funs) ->
+ Parent = self(),
+ Refs = lists:map(fun (Fun) ->
+ Ref = make_ref(),
+ spawn_link(Node,
+ fun () ->
+ Res = Fun(),
+ unlink(Parent),
+ Parent ! {Ref, Res}
+ end),
+ Ref
+ end, Funs),
+ lists:map(fun (Ref) ->
+ receive
+ {Ref, Res} ->
+ Res
+ end
+ end, Refs).
+
erl_rel_flag_var() ->
"ERL_"++erlang:system_info(otp_release)++"_FLAGS".
diff --git a/erts/emulator/test/statistics_SUITE.erl b/erts/emulator/test/statistics_SUITE.erl
index 9e1732a445..898908c40f 100644
--- a/erts/emulator/test/statistics_SUITE.erl
+++ b/erts/emulator/test/statistics_SUITE.erl
@@ -25,7 +25,7 @@
init_per_testcase/2,
fin_per_testcase/2,
wall_clock/1, wall_clock_zero_diff/1, wall_clock_update/1,
- runtime/1, runtime_zero_diff/1, runtime_zero_update/1,
+ runtime/1, runtime_zero_diff/1,
runtime_update/1, runtime_diff/1,
run_queue/1, run_queue_one/1,
reductions/1, reductions_big/1, garbage_collection/1, io/1,
@@ -99,8 +99,7 @@ wall_clock_update1(0) ->
%%% Test statistics(runtime).
-runtime(suite) -> [runtime_zero_diff, runtime_zero_update, runtime_update,
- runtime_diff].
+runtime(suite) -> [runtime_zero_diff, runtime_update, runtime_diff].
runtime_zero_diff(doc) ->
"Tests that the difference between the times returned from two consectuitive "
@@ -117,55 +116,32 @@ runtime_zero_diff1(N) when N > 0 ->
runtime_zero_diff1(0) ->
?line test_server:fail("statistics(runtime) never returned zero difference").
-runtime_zero_update(doc) ->
- "Test that the time differences returned by two calls to "
- "statistics(runtime) several seconds apart is zero.";
-runtime_zero_update(Config) when is_list(Config) ->
- case ?t:is_debug() of
- false -> ?line runtime_zero_update1(6);
- true -> {skip,"Unreliable in DEBUG build"}
- end.
-
-runtime_zero_update1(N) when N > 0 ->
- ?line {T1, _} = statistics(runtime),
- ?line receive after 7000 -> ok end,
- ?line case statistics(runtime) of
- {T, Td} when Td =< 80 ->
- test_server:format("ok, Runtime before: {~p, _} after: {~p, ~p}",
- [T1, T, Td]),
- ok;
- {T, R} ->
- test_server:format("nok, Runtime before: {~p, _} after: {~p, ~p}",
- [T1, T, R]),
- runtime_zero_update1(N-1)
- end;
-runtime_zero_update1(0) ->
- ?line test_server:fail("statistics(runtime) never returned zero difference").
-
runtime_update(doc) ->
- "Test that the statistics(runtime) returns a substanstially updated difference "
- "after running a process that takes all CPU power of the Erlang process "
- "for a second.";
+ "Test that the statistics(runtime) returns a substanstially "
+ "updated difference after running a process that takes all CPU "
+ " power of the Erlang process for a second.";
runtime_update(Config) when is_list(Config) ->
case ?t:is_cover() of
false ->
?line process_flag(priority, high),
- ?line test_server:m_out_of_n(1, 10, fun runtime_update/0);
+ do_runtime_update(10);
true ->
{skip,"Cover-compiled"}
end.
-runtime_update() ->
- ?line {T1,_} = statistics(runtime),
+do_runtime_update(0) ->
+ {comment,"Never close enough"};
+do_runtime_update(N) ->
+ ?line {T1,Diff0} = statistics(runtime),
?line spawn_link(fun cpu_heavy/0),
receive after 1000 -> ok end,
?line {T2,Diff} = statistics(runtime),
- ?line Delta = abs(Diff-1000),
- ?line test_server:format("T1 = ~p, T2 = ~p, Diff = ~p, abs(Diff-1000) = ~p",
- [T1,T2,Diff,Delta]),
+ ?line true = is_integer(T1+T2+Diff0+Diff),
+ ?line test_server:format("T1 = ~p, T2 = ~p, Diff = ~p, T2-T1 = ~p",
+ [T1,T2,Diff,T2-T1]),
?line if
- abs(Diff-1000) =:= Delta, Delta =< 100 ->
- ok
+ T2 - T1 =:= Diff, 900 =< Diff, Diff =< 1500 -> ok;
+ true -> do_runtime_update(N-1)
end.
cpu_heavy() ->
diff --git a/erts/epmd/test/Makefile b/erts/epmd/test/Makefile
index c1d62f0f93..13dad09ae3 100644
--- a/erts/epmd/test/Makefile
+++ b/erts/epmd/test/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1998-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1998-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%
#
include $(ERL_TOP)/make/target.mk
@@ -34,6 +34,8 @@ ERL_FILES= $(MODULES:%=%.erl)
TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+EMAKEFILE=Emakefile
+
# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
@@ -43,15 +45,17 @@ RELEPMDDIR = $(RELEASE_PATH)/epmd_test
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include \
- -I$(ERL_TOP)/lib/kernel/src/ \
- $(EPMD_FLAGS)
+ERL_COMPILE_FLAGS += $(EPMD_FLAGS)
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-tests debug opt: $(TARGET_FILES)
+tests debug opt: $(EMAKEFILE)
+
+$(EMAKEFILE): Makefile $(ERL_FILES)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) \
+ -o$(EBIN) $(MODULES) > $(EMAKEFILE)
clean:
rm -f $(TARGET_FILES)
@@ -69,7 +73,7 @@ release_spec:
release_tests_spec: opt
$(INSTALL_DIR) $(RELEPMDDIR)
$(INSTALL_DATA) epmd.spec epmd.spec.vxworks $(ERL_FILES) \
- $(TARGET_FILES) $(RELEPMDDIR)
+ $(EMAKEFILE) $(RELEPMDDIR)
chmod -f -R u+w $(RELEPMDDIR)
release_docs_spec:
diff --git a/erts/epmd/test/epmd_SUITE.erl b/erts/epmd/test/epmd_SUITE.erl
index 513c87a13e..91e09faf75 100644
--- a/erts/epmd/test/epmd_SUITE.erl
+++ b/erts/epmd/test/epmd_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1998-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(epmd_SUITE).
@@ -31,6 +31,9 @@
-define(MEDIUM_PAUSE, ?t:seconds(1)).
-define(LONG_PAUSE, ?t:seconds(5)).
+% Information about nodes
+-record(node_info, {port, node_type, prot, lvsn, hvsn, node_name, extra}).
+
% Test server specific exports
-export([all/1, init_per_testcase/2, fin_per_testcase/2]).
@@ -57,7 +60,10 @@
too_large/1,
alive_req_too_small_1/1,
alive_req_too_small_2/1,
- alive_req_too_large/1
+ alive_req_too_large/1,
+
+ returns_valid_empty_extra/1,
+ returns_valid_populated_extra_with_nulls/1
]).
@@ -76,9 +82,13 @@
-define(REG_REPEAT_LIM,1000).
% Message codes in epmd protocol
--define(EPMD_ALIVE_REQ, $a).
--define(EPMD_ALIVE_OK_RESP, $Y).
--define(EPMD_PORT_REQ, $p).
+-define(EPMD_ALIVE_REQ, $a).
+-define(EPMD_ALIVE2_REQ, $x).
+-define(EPMD_ALIVE_OK_RESP, $Y).
+-define(EPMD_ALIVE2_RESP, $y).
+-define(EPMD_PORT_REQ, $p).
+-define(EPMD_PORT_PLEASE2_REQ, $z).
+-define(EPMD_PORT2_RESP, $w).
-define(EPMD_NAMES_REQ, $n).
-define(EPMD_DUMP_REQ, $d).
-define(EPMD_KILL_REQ, $k).
@@ -111,7 +121,10 @@ all(suite) ->
too_large,
alive_req_too_small_1,
alive_req_too_small_2,
- alive_req_too_large
+ alive_req_too_large,
+
+ returns_valid_empty_extra,
+ returns_valid_populated_extra_with_nulls
].
%%
@@ -182,29 +195,70 @@ register_node(Name) ->
register_node(Name,?DUMMY_PORT).
register_node(Name, Port) ->
- case connect() of
+ case send_req([?EPMD_ALIVE_REQ, put16(Port), Name]) of
{ok,Sock} ->
- M = [?EPMD_ALIVE_REQ, put16(Port), Name],
- case send(Sock, [size16(M), M]) of
- ok ->
- case recv(Sock,3) of
- {ok, [?EPMD_ALIVE_OK_RESP,_D1,_D0]} ->
- {ok,Sock};
- Other ->
- test_server:format("recv on sock ~w: ~p~n",
- [Sock,Other]),
- error
- end;
+ case recv(Sock,3) of
+ {ok, [?EPMD_ALIVE_OK_RESP,_D1,_D0]} ->
+ {ok,Sock};
Other ->
- test_server:format("send on sock ~w: ~w~n",[Sock,Other]),
+ test_server:format("recv on sock ~w: ~p~n",
+ [Sock,Other]),
error
end;
- Other ->
- test_server:format("Connect on port ~w: ~p~n",[Port,Other]),
+ error ->
+ error
+ end.
+
+register_node_v2(Port, NodeType, Prot, HVsn, LVsn, Name, Extra) ->
+ Req = [?EPMD_ALIVE2_REQ, put16(Port), NodeType, Prot,
+ put16(HVsn), put16(LVsn),
+ size16(Name), Name,
+ size16(Extra), Extra],
+ case send_req(Req) of
+ {ok,Sock} ->
+ case recv(Sock,4) of
+ {ok, [?EPMD_ALIVE2_RESP,_Res=0,_C0,_C1]} ->
+ {ok,Sock};
+ Other ->
+ test_server:format("recv on sock ~w: ~p~n",
+ [Sock,Other]),
+ error
+ end;
+ error ->
error
end.
+% Internal function to fetch information about a node
+
+port_please_v2(Name) ->
+ case send_req([?EPMD_PORT_PLEASE2_REQ, Name]) of
+ {ok,Sock} ->
+ case recv_until_sock_closes(Sock) of
+ {ok, Resp} ->
+ parse_port2_resp(Resp);
+ Other ->
+ test_server:format("recv on sock ~w: ~p~n",
+ [Sock,Other]),
+ error
+ end;
+ error ->
+ error
+ end.
+parse_port2_resp(Resp) ->
+ case list_to_binary(Resp) of
+ <<?EPMD_PORT2_RESP,Res,Port:16,NodeType,Prot,HVsn:16,LVsn:16,
+ NLen:16,NodeName:NLen/binary,
+ ELen:16,Extra:ELen/binary>> when Res =:= 0 ->
+ {ok, #node_info{port=Port,node_type=NodeType,prot=Prot,
+ hvsn=HVsn,lvsn=LVsn,
+ node_name=binary_to_list(NodeName),
+ extra=binary_to_list(Extra)}};
+ Other ->
+ test_server:format("invalid port2 resp: ~p~n",
+ [Resp]),
+ error
+ end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -631,6 +685,32 @@ alive_req_too_large(Config) when list(Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+returns_valid_empty_extra(doc) ->
+ ["Check that an empty extra is prefixed by a two byte length"];
+returns_valid_empty_extra(suite) ->
+ [];
+returns_valid_empty_extra(Config) when list(Config) ->
+ ?line ok = epmdrun(),
+ ?line {ok,Sock} = register_node_v2(4711, 72, 0, 5, 5, "foo", []),
+ ?line {ok,#node_info{extra=[]}} = port_please_v2("foo"),
+ ?line ok = close(Sock),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+returns_valid_populated_extra_with_nulls(doc) ->
+ ["Check a populated extra with embedded null characters"];
+returns_valid_populated_extra_with_nulls(suite) ->
+ [];
+returns_valid_populated_extra_with_nulls(Config) when list(Config) ->
+ ?line ok = epmdrun(),
+ ?line {ok,Sock} = register_node_v2(4711, 72, 0, 5, 5, "foo", "ABC\000\000"),
+ ?line {ok,#node_info{extra="ABC\000\000"}} = port_please_v2("foo"),
+ ?line ok = close(Sock),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Terminate all tests with killing epmd.
cleanup() ->
@@ -813,6 +893,36 @@ send_direct(Sock, Bytes) ->
Any
end.
+send_req(Req) ->
+ case connect() of
+ {ok,Sock} ->
+ case send(Sock, [size16(Req), Req]) of
+ ok ->
+ {ok,Sock};
+ Other ->
+ test_server:format("Failed to send ~w on sock ~w: ~w~n",
+ [Req,Sock,Other]),
+ error
+ end;
+ Other ->
+ test_server:format("Connect failed when sending ~w: ~p~n",
+ [Req, Other]),
+ error
+ end.
+
+recv_until_sock_closes(Sock) ->
+ recv_until_sock_closes_2(Sock,[]).
+
+recv_until_sock_closes_2(Sock,AccData) ->
+ case recv(Sock,0) of
+ {ok,Data} ->
+ recv_until_sock_closes_2(Sock,AccData++Data);
+ closed ->
+ {ok,AccData};
+ Other ->
+ Other
+ end.
+
sleep(MilliSeconds) ->
timer:sleep(MilliSeconds).
diff --git a/erts/etc/common/erlc.c b/erts/etc/common/erlc.c
index c958fed741..09aca19e6c 100644
--- a/erts/etc/common/erlc.c
+++ b/erts/etc/common/erlc.c
@@ -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%
*/
/*
@@ -310,6 +310,8 @@ main(int argc, char** argv)
case 'W': /* Enable warnings. */
if (strcmp(argv[1]+2, "all") == 0) {
PUSH2("@warn", "999");
+ } else if (strcmp(argv[1]+2, "error") == 0) {
+ PUSH2("@option", "warnings_as_errors");
} else if (isdigit((int)argv[1][2])) {
PUSH2("@warn", argv[1]+2);
} else {
@@ -566,6 +568,7 @@ usage(void)
{"-pz path", "add path to the end of Erlang's code path"},
{"-smp", "compile using SMP emulator"},
{"-v", "verbose compiler output"},
+ {"-Werror", "make all warnings into errors"},
{"-W0", "disable warnings"},
{"-Wnumber", "set warning level to number"},
{"-Wall", "enable all warnings"},
diff --git a/erts/lib_src/Makefile.in b/erts/lib_src/Makefile.in
index ce5c846677..49f5b1f048 100644
--- a/erts/lib_src/Makefile.in
+++ b/erts/lib_src/Makefile.in
@@ -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%
#
@@ -483,6 +483,8 @@ ifneq ($(strip $(INTERNAL_RELEASE_LIBS)),)
$(INSTALL_DATA) $(INTERNAL_RELEASE_LIBS) $(RELSYSDIR)/lib/internal
endif
+docs:
+
release_docs_spec:
diff --git a/erts/preloaded/ebin/erl_prim_loader.beam b/erts/preloaded/ebin/erl_prim_loader.beam
index d7134967bf..e966f727c4 100644
--- a/erts/preloaded/ebin/erl_prim_loader.beam
+++ b/erts/preloaded/ebin/erl_prim_loader.beam
Binary files differ
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam
index f490fe7c3d..620ee733bd 100644
--- a/erts/preloaded/ebin/erlang.beam
+++ b/erts/preloaded/ebin/erlang.beam
Binary files differ
diff --git a/erts/preloaded/ebin/init.beam b/erts/preloaded/ebin/init.beam
index 39118a0109..aa9bd13dd0 100644
--- a/erts/preloaded/ebin/init.beam
+++ b/erts/preloaded/ebin/init.beam
Binary files differ
diff --git a/erts/preloaded/ebin/otp_ring0.beam b/erts/preloaded/ebin/otp_ring0.beam
index 4680d645cb..f060ac73b7 100644
--- a/erts/preloaded/ebin/otp_ring0.beam
+++ b/erts/preloaded/ebin/otp_ring0.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam
index 2cacb6808c..34f9565fe3 100644
--- a/erts/preloaded/ebin/prim_file.beam
+++ b/erts/preloaded/ebin/prim_file.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam
index aa9b255ebb..0ec3130d44 100644
--- a/erts/preloaded/ebin/prim_inet.beam
+++ b/erts/preloaded/ebin/prim_inet.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_zip.beam b/erts/preloaded/ebin/prim_zip.beam
index 0e7adad9e8..b7897dd798 100644
--- a/erts/preloaded/ebin/prim_zip.beam
+++ b/erts/preloaded/ebin/prim_zip.beam
Binary files differ
diff --git a/erts/preloaded/ebin/zlib.beam b/erts/preloaded/ebin/zlib.beam
index 93b05172d8..c9be5d2aa0 100644
--- a/erts/preloaded/ebin/zlib.beam
+++ b/erts/preloaded/ebin/zlib.beam
Binary files differ
diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl
index 399c2bb55d..c0785083de 100644
--- a/erts/preloaded/src/erl_prim_loader.erl
+++ b/erts/preloaded/src/erl_prim_loader.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%
%%
@@ -49,7 +49,7 @@
prim_read_file_info/2, prim_get_cwd/2]).
%% Used by escript and code
--export([set_primary_archive/2, release_archives/0]).
+-export([set_primary_archive/3, release_archives/0]).
%% Internal function. Exported to avoid dialyzer warnings
-export([concat/1]).
@@ -220,14 +220,15 @@ get_cwd(Drive) ->
check_file_result(get_cwd, Drive, request({get_cwd,[Drive]})).
-spec set_primary_archive(File :: string() | 'undefined',
- ArchiveBin :: binary() | 'undefined')
- -> {ok, [string()]} | {error,_}.
+ ArchiveBin :: binary() | 'undefined',
+ FileInfo :: #file_info{} | 'undefined')
+ -> {ok, [string()]} | {error,_}.
-set_primary_archive(undefined, undefined) ->
- request({set_primary_archive, undefined, undefined});
-set_primary_archive(File, ArchiveBin)
- when is_list(File), is_binary(ArchiveBin) ->
- request({set_primary_archive, File, ArchiveBin}).
+set_primary_archive(undefined, undefined, undefined) ->
+ request({set_primary_archive, undefined, undefined, undefined});
+set_primary_archive(File, ArchiveBin, FileInfo)
+ when is_list(File), is_binary(ArchiveBin), is_record(FileInfo, file_info) ->
+ request({set_primary_archive, File, ArchiveBin, FileInfo}).
-spec release_archives() -> 'ok' | {'error', _}.
@@ -315,8 +316,8 @@ loop(State, Parent, Paths) ->
{get_cwd,[_]=Args} ->
{Res,State1} = handle_get_cwd(State, Args),
{Res,State1,Paths};
- {set_primary_archive,File,Bin} ->
- {Res,State1} = handle_set_primary_archive(State, File, Bin),
+ {set_primary_archive,File,Bin,FileInfo} ->
+ {Res,State1} = handle_set_primary_archive(State, File, Bin,FileInfo),
{Res,State1,Paths};
release_archives ->
{Res,State1} = handle_release_archives(State),
@@ -356,8 +357,8 @@ handle_get_file(State = #state{loader = efile}, Paths, File) ->
handle_get_file(State = #state{loader = inet}, Paths, File) ->
?SAFE2(inet_get_file_from_port(State, File, Paths), State).
-handle_set_primary_archive(State= #state{loader = efile}, File, Bin) ->
- ?SAFE2(efile_set_primary_archive(State, File, Bin), State).
+handle_set_primary_archive(State= #state{loader = efile}, File, Bin, FileInfo) ->
+ ?SAFE2(efile_set_primary_archive(State, File, Bin, FileInfo), State).
handle_release_archives(State= #state{loader = efile}) ->
?SAFE2(efile_release_archives(State), State).
@@ -481,8 +482,8 @@ efile_get_file_from_port3(State, File, [P | Paths]) ->
efile_get_file_from_port3(State, _File, []) ->
{{error,enoent},State}.
-efile_set_primary_archive(#state{prim_state = PS} = State, File, Bin) ->
- {Res, PS2} = prim_set_primary_archive(PS, File, Bin),
+efile_set_primary_archive(#state{prim_state = PS} = State, File, Bin, FileInfo) ->
+ {Res, PS2} = prim_set_primary_archive(PS, File, Bin, FileInfo),
{Res,State#state{prim_state = PS2}}.
efile_release_archives(#state{prim_state = PS} = State) ->
@@ -572,13 +573,14 @@ find_loop(U, Retry, AL, ReqDelay, SReSleep, Ignore, Tries, LReSleep) ->
case find_loop(U, Retry, AL, ReqDelay, []) of
[] -> % no response from any server
erlang:display({erl_prim_loader,'no server found'}), % lifesign
- Tries1 = if Tries > 0 ->
- sleep(SReSleep),
- Tries - 1;
- true ->
- sleep(LReSleep),
- 0
- end,
+ Tries1 =
+ if Tries > 0 ->
+ sleep(SReSleep),
+ Tries - 1;
+ true ->
+ sleep(LReSleep),
+ 0
+ end,
find_loop(U, Retry, AL, ReqDelay, SReSleep, Ignore, Tries1, LReSleep);
Servers ->
keysort(1, Servers -- Ignore)
@@ -787,9 +789,9 @@ prim_release_archives(PS) ->
prim_do_release_archives(PS, [{ArchiveFile, DictVal} | KeyVals], Acc) ->
Res =
case DictVal of
- {primary, _PrimZip} ->
+ {primary, _PrimZip, _FI} ->
ok; % Keep primary archive
- {_Mtime, Cache} ->
+ {Cache, _FI} ->
debug(PS, {release, cache, ArchiveFile}),
erase(ArchiveFile),
clear_cache(ArchiveFile, Cache)
@@ -805,7 +807,7 @@ prim_do_release_archives(PS, [], []) ->
prim_do_release_archives(PS, [], Errors) ->
{{error, Errors}, PS#prim_state{primary_archive = undefined}}.
-prim_set_primary_archive(PS, undefined, undefined) ->
+prim_set_primary_archive(PS, undefined, undefined, undefined) ->
debug(PS, {set_primary_archive, clean}),
case PS#prim_state.primary_archive of
undefined ->
@@ -813,15 +815,15 @@ prim_set_primary_archive(PS, undefined, undefined) ->
debug(PS, {return, Res}),
{Res, PS};
ArchiveFile ->
- {primary, PrimZip} = erase(ArchiveFile),
+ {primary, PrimZip, _FI} = erase(ArchiveFile),
ok = prim_zip:close(PrimZip),
PS2 = PS#prim_state{primary_archive = undefined},
Res = {ok, []},
debug(PS2, {return, Res}),
{Res, PS2}
end;
-prim_set_primary_archive(PS, ArchiveFile, ArchiveBin)
- when is_list(ArchiveFile), is_binary(ArchiveBin) ->
+prim_set_primary_archive(PS, ArchiveFile, ArchiveBin, FileInfo)
+ when is_list(ArchiveFile), is_binary(ArchiveBin), is_record(FileInfo, file_info) ->
%% Try the archive file
debug(PS, {set_primary_archive, ArchiveFile, byte_size(ArchiveBin)}),
{Res3, PS3} =
@@ -833,17 +835,17 @@ prim_set_primary_archive(PS, ArchiveFile, ArchiveBin)
["", "nibe", RevApp] -> % Reverse ebin
%% Collect ebin directories in archive
Ebin = reverse(RevApp) ++ "/ebin",
- {true, [Ebin | A]};
+ {true, [Ebin | A]};
_ ->
{true, A}
end
end,
Ebins0 = [ArchiveFile],
- case open_archive({ArchiveFile, ArchiveBin}, Ebins0, Fun) of
- {ok, PrimZip, RevEbins} ->
+ case open_archive({ArchiveFile, ArchiveBin}, FileInfo, Ebins0, Fun) of
+ {ok, PrimZip, {RevEbins, FI, _}} ->
Ebins = reverse(RevEbins),
debug(PS, {set_primary_archive, Ebins}),
- put(ArchiveFile, {primary, PrimZip}),
+ put(ArchiveFile, {primary, PrimZip, FI}),
{{ok, Ebins}, PS#prim_state{primary_archive = ArchiveFile}};
Error ->
debug(PS, {set_primary_archive, Error}),
@@ -851,10 +853,10 @@ prim_set_primary_archive(PS, ArchiveFile, ArchiveBin)
end;
OldArchiveFile ->
debug(PS, {set_primary_archive, clean}),
- PrimZip = erase(OldArchiveFile),
+ {primary, PrimZip, _FI} = erase(OldArchiveFile),
ok = prim_zip:close(PrimZip),
PS2 = PS#prim_state{primary_archive = undefined},
- prim_set_primary_archive(PS2, ArchiveFile, ArchiveBin)
+ prim_set_primary_archive(PS2, ArchiveFile, ArchiveBin, FileInfo)
end,
debug(PS3, {return, Res3}),
{Res3, PS3}.
@@ -956,15 +958,15 @@ prim_read_file_info(PS, File) ->
FunnyFile = funny_split(FileInArchive, $/),
Fun =
fun({Funny, GetInfo, _GetBin}, Acc) ->
- if
- hd(Funny) =:= "",
- tl(Funny) =:= FunnyFile ->
+ case Funny of
+ [H | T] when H =:= "",
+ T =:= FunnyFile ->
%% Directory
{false, {ok, GetInfo()}};
- Funny =:= FunnyFile ->
+ F when F =:= FunnyFile ->
%% Plain file
{false, {ok, GetInfo()}};
- true ->
+ _ ->
%% No match
{true, Acc}
end
@@ -990,33 +992,36 @@ prim_get_cwd(PS, [Drive]) ->
apply_archive(PS, Fun, Acc, Archive) ->
case get(Archive) of
undefined ->
+ case open_archive(Archive, Acc, Fun) of
+ {ok, PrimZip, {Acc2, FI, _}} ->
+ debug(PS, {cache, ok}),
+ put(Archive, {{ok, PrimZip}, FI}),
+ {Acc2, PS};
+ Error ->
+ debug(PS, {cache, Error}),
+ %% put(Archive, {Error, FI}),
+ {Error, PS}
+ end;
+ {primary, PrimZip, FI} ->
+ case prim_file:read_file_info(Archive) of
+ {ok, FI2}
+ when FI#file_info.mtime =:= FI2#file_info.mtime ->
+ case foldl_archive(PrimZip, Acc, Fun) of
+ {ok, _PrimZip2, Acc2} ->
+ {Acc2, PS};
+ Error ->
+ debug(PS, {primary, Error}),
+ {Error, PS}
+ end;
+ Error ->
+ debug(PS, {cache, {clear, Error}}),
+ clear_cache(Archive, {ok, PrimZip}),
+ apply_archive(PS, Fun, Acc, Archive)
+ end;
+ {Cache, FI} ->
case prim_file:read_file_info(Archive) of
- {ok, #file_info{mtime = Mtime}} ->
- case open_archive(Archive, Acc, Fun) of
- {ok, PrimZip, Acc2} ->
- debug(PS, {cache, ok}),
- put(Archive, {Mtime, {ok, PrimZip}}),
- {Acc2, PS};
- Error ->
- debug(PS, {cache, Error}),
- put(Archive, {Mtime, Error}),
- {Error, PS}
- end;
- Error ->
- debug(PS, {cache, Error}),
- {Error, PS}
- end;
- {primary, PrimZip} ->
- case foldl_archive(PrimZip, Acc, Fun) of
- {ok, _PrimZip2, Acc2} ->
- {Acc2, PS};
- Error ->
- debug(PS, {primary, Error}),
- {Error, PS}
- end;
- {Mtime, Cache} ->
- case prim_file:read_file_info(Archive) of
- {ok, #file_info{mtime = Mtime2}} when Mtime2 =:= Mtime ->
+ {ok, FI2}
+ when FI#file_info.mtime =:= FI2#file_info.mtime ->
case Cache of
{ok, PrimZip} ->
case foldl_archive(PrimZip, Acc, Fun) of
@@ -1026,7 +1031,8 @@ apply_archive(PS, Fun, Acc, Archive) ->
debug(PS, {cache, {clear, Error}}),
clear_cache(Archive, Cache),
debug(PS, {cache, Error}),
- put(Archive, {Mtime, Error}),
+ erase(Archive),
+ %% put(Archive, {Error, FI}),
{Error, PS}
end;
Error ->
@@ -1041,20 +1047,57 @@ apply_archive(PS, Fun, Acc, Archive) ->
end.
open_archive(Archive, Acc, Fun) ->
+ case prim_file:read_file_info(Archive) of
+ {ok, FileInfo} ->
+ open_archive(Archive, FileInfo, Acc, Fun);
+ {error, Reason} ->
+ {error, Reason}
+ end.
+
+open_archive(Archive, FileInfo, Acc, Fun) ->
+ FakeFI = FileInfo#file_info{type = directory},
Wrapper =
- fun({N, GI, GB}, A) ->
- %% Ensure full iteration at open
- Funny = funny_split(N, $/),
- {_Continue, A2} = Fun({Funny, GI, GB}, A),
- {true, {true, Funny}, A2}
- end,
- prim_zip:open(Wrapper, Acc, Archive).
+ fun({N, GI, GB}, {A, I, FunnyDirs}) -> % Full iteration at open
+ Funny = funny_split(N, $/),
+ FunnyDirs2 =
+ case Funny of
+ ["" | FunnyDir] ->
+ [FunnyDir | FunnyDirs];
+ _ ->
+ FunnyDirs
+ end,
+ {Includes, FunnyDirs3, A2} =
+ ensure_virtual_dirs(Funny, Fun, FakeFI, [{true, Funny}], FunnyDirs2, A),
+ {_Continue, A3} = Fun({Funny, GI, GB}, A2),
+ {true, Includes, {A3, I, FunnyDirs3}}
+ end,
+ prim_zip:open(Wrapper, {Acc, FakeFI, []}, Archive).
+
+ensure_virtual_dirs(Funny, Fun, FakeFI, Includes, FunnyDirs, Acc) ->
+ case Funny of
+ [_ | FunnyDir] ->
+ case lists:member(FunnyDir, FunnyDirs) of % BIF
+ false ->
+ GetInfo = fun() -> FakeFI end,
+ GetBin = fun() -> <<>> end,
+ VirtualDir = ["" | FunnyDir],
+ Includes2 = [{true, VirtualDir, GetInfo, GetBin} | Includes],
+ FunnyDirs2 = [FunnyDir | FunnyDirs],
+ {I, F, Acc2} = ensure_virtual_dirs(FunnyDir, Fun, FakeFI, Includes2, FunnyDirs2, Acc),
+ {_Continue, Acc3} = Fun({VirtualDir, GetInfo, GetBin}, Acc2),
+ {I, F, Acc3};
+ true ->
+ {reverse(Includes), FunnyDirs, Acc}
+ end;
+ [] ->
+ {reverse(Includes), FunnyDirs, Acc}
+ end.
foldl_archive(PrimZip, Acc, Fun) ->
Wrapper =
- fun({N, GI, GB}, A) ->
+ fun({Funny, GI, GB}, A) ->
%% Allow partial iteration at foldl
- {Continue, A2} = Fun({N, GI, GB}, A),
+ {Continue, A2} = Fun({Funny, GI, GB}, A),
{Continue, true, A2}
end,
prim_zip:foldl(Wrapper, Acc, PrimZip).
diff --git a/erts/preloaded/src/prim_zip.erl b/erts/preloaded/src/prim_zip.erl
index 17ef8c6c43..3f5a5b9721 100644
--- a/erts/preloaded/src/prim_zip.erl
+++ b/erts/preloaded/src/prim_zip.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%
%%
@@ -94,12 +94,7 @@ do_foldl(FilterFun, FilterAcc, [PF | Tail], Acc0, PrimZip, PrimZipOrig) ->
#primzip_file{name = F, get_info = GetInfo, get_bin = GetBin} = PF,
case FilterFun({F, GetInfo, GetBin}, FilterAcc) of
{Continue, Include, FilterAcc2} ->
- Acc1 =
- case Include of
- false -> Acc0;
- true -> [PF | Acc0];
- {true, Nick} -> [PF#primzip_file{name = Nick} | Acc0]
- end,
+ Acc1 = include_acc(Include, PF, Acc0),
case Continue of
true ->
do_foldl(FilterFun, FilterAcc2, Tail, Acc1, PrimZip, PrimZipOrig);
@@ -112,6 +107,28 @@ do_foldl(FilterFun, FilterAcc, [PF | Tail], Acc0, PrimZip, PrimZipOrig) ->
do_foldl(_FilterFun, FilterAcc, [], Acc, PrimZip, _PrimZipOrig) ->
{ok, FilterAcc, PrimZip#primzip{files = reverse(Acc)}}.
+include_acc(Include, PF, Acc) ->
+ case Include of
+ false ->
+ Acc;
+ true ->
+ [PF | Acc];
+ {true, Nick} ->
+ [PF#primzip_file{name = Nick} | Acc];
+ {true, Nick, GetInfo, GetBin} ->
+ PF2 = #primzip_file{name = Nick, get_info = GetInfo, get_bin = GetBin},
+ [PF2 | Acc];
+ List when is_list(List) ->
+ %% Add new entries
+ Fun = fun(I, A) -> include_acc(I, PF, A) end,
+ lists_foldl(Fun, Acc, List)
+ end.
+
+lists_foldl(F, Accu, [Hd|Tail]) ->
+ lists_foldl(F, F(Hd, Accu), Tail);
+lists_foldl(F, Accu, []) when is_function(F, 2) ->
+ Accu.
+
%% close a zip archive
close(#primzip{in = In0, input = Input, zlib = Z}) ->
Input(close, In0),
@@ -199,15 +216,25 @@ get_cd_loop(N, BCD, Acc0, PrimZip, FileName, Offset, CFH, EndOffset, FilterFun,
end,
%% erlang:display({FileName, N, Offset, Size, NextPF}),
GetInfo = fun() -> cd_file_header_to_file_info(FileName, CFH, <<>>) end,
- GetBin = fun() -> get_z_file(FileName, Offset, Size, PrimZip) end,
+ GetBin = fun() -> get_z_file(FileName, Offset, Size, PrimZip) end,
PF = #primzip_file{name = FileName, get_info = GetInfo, get_bin = GetBin},
case FilterFun({FileName, GetInfo, GetBin}, FilterAcc) of
{Continue, Include, FilterAcc2} ->
Acc1 =
case Include of
- false -> Acc0;
- true -> [PF | Acc0];
- {true, Nick} -> [PF#primzip_file{name = Nick} | Acc0]
+ false ->
+ Acc0;
+ true ->
+ [PF | Acc0];
+ {true, Nick} ->
+ [PF#primzip_file{name = Nick} | Acc0];
+ {true, Nick, GI, GB} ->
+ PF2 = #primzip_file{name = Nick, get_info = GI, get_bin = GB},
+ [PF2 | Acc0];
+ List when is_list(List) ->
+ %% Add new entries
+ Fun = fun(I, A) -> include_acc(I, PF, A) end,
+ lists_foldl(Fun, Acc0, List)
end,
case Continue of
true when N > 1 ->
diff --git a/erts/test/erl_print_SUITE.erl b/erts/test/erl_print_SUITE.erl
index b1458d84d0..3bb7d4d016 100644
--- a/erts/test/erl_print_SUITE.erl
+++ b/erts/test/erl_print_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2005-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%
%%
@@ -36,7 +36,7 @@
-export([erlang_display/1, integer/1, float/1, string/1, character/1, snprintf/1, quote/1]).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
all(doc) -> [];
all(suite) -> test_cases().
diff --git a/erts/test/erlc_SUITE.erl b/erts/test/erlc_SUITE.erl
index 1d944811aa..437f020f99 100644
--- a/erts/test/erlc_SUITE.erl
+++ b/erts/test/erlc_SUITE.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(erlc_SUITE).
@@ -23,7 +23,7 @@
-export([all/1, compile_erl/1, compile_yecc/1, compile_script/1,
compile_mib/1, good_citizen/1, deep_cwd/1]).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
all(suite) ->
[compile_erl, compile_yecc, compile_script, compile_mib,
@@ -56,6 +56,13 @@ compile_erl(Config) when is_list(Config) ->
?line run(Config, Cmd, FileName, "-W0", ["_OK_"]),
+ %% Try treating warnings as errors.
+
+ ?line run(Config, Cmd, FileName, "-Werror",
+ ["compile: warnings being treated as errors\$",
+ "Warning: function foo/0 is unused\$",
+ "_ERROR_"]),
+
%% Check a bad file.
?line BadFile = filename:join(SrcDir, "erl_test_bad.erl"),
diff --git a/erts/test/erlexec_SUITE.erl b/erts/test/erlexec_SUITE.erl
index fcf1e67e9e..164ce9faaf 100644
--- a/erts/test/erlexec_SUITE.erl
+++ b/erts/test/erlexec_SUITE.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%
%%
@@ -35,7 +35,7 @@
-export([args_file/1, evil_args_file/1, env/1, args_file_env/1, otp_7461/1, otp_7461_remote/1, otp_8209/1]).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
init_per_testcase(Case, Config) ->
diff --git a/erts/test/ethread_SUITE.erl b/erts/test/ethread_SUITE.erl
index a8f4f5e90c..bbc79e9381 100644
--- a/erts/test/ethread_SUITE.erl
+++ b/erts/test/ethread_SUITE.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%
%%
@@ -53,7 +53,7 @@
atomic/1,
gate/1]).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
tests() ->
[create_join_thread,
diff --git a/erts/test/ignore_cores.erl b/erts/test/ignore_cores.erl
index 7ec2cac706..8b1ac0fe6c 100644
--- a/erts/test/ignore_cores.erl
+++ b/erts/test/ignore_cores.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%
%%
@@ -27,7 +27,7 @@
-module(ignore_cores).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
-export([init/1, fini/1, setup/3, setup/4, restore/1, dir/1]).
diff --git a/erts/test/nt_SUITE.erl b/erts/test/nt_SUITE.erl
index 7ff5c908e6..530fb55270 100644
--- a/erts/test/nt_SUITE.erl
+++ b/erts/test/nt_SUITE.erl
@@ -1,24 +1,25 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1998-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%
%%
%%% Purpose: Test NT specific utilities
-module(nt_SUITE).
--include("test_server.hrl").
+
+-include_lib("test_server/include/test_server.hrl").
-include_lib("kernel/include/file.hrl").
-export([all/1,init_per_testcase/2,fin_per_testcase/2,nt/1,handle_eventlog/2,
diff --git a/erts/test/otp_SUITE.erl b/erts/test/otp_SUITE.erl
index c6769743dd..425ad31782 100644
--- a/erts/test/otp_SUITE.erl
+++ b/erts/test/otp_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%
%%
@@ -24,7 +24,8 @@
obsolete_but_not_deprecated/1,call_to_deprecated/1,
call_to_size_1/1,strong_components/1]).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
+
-import(lists, [filter/2,foldl/3,foreach/2]).
all(suite) ->
diff --git a/erts/test/run_erl_SUITE.erl b/erts/test/run_erl_SUITE.erl
index afff4120d4..efeafbad8c 100644
--- a/erts/test/run_erl_SUITE.erl
+++ b/erts/test/run_erl_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2005-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,7 +23,7 @@
basic/1,heavy/1,heavier/1,defunct/1]).
-export([ping_me_back/1]).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
init_per_testcase(_Case, Config) ->
Dog = ?t:timetrap(?t:minutes(2)),
diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl
index 0e37af1ca2..8faddeb0d3 100644
--- a/erts/test/z_SUITE.erl
+++ b/erts/test/z_SUITE.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%
%%
@@ -39,7 +39,7 @@
-export([search_for_core_files/1, core_files/1]).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
init_per_testcase(Case, Config) ->
diff --git a/lib/appmon/doc/src/Makefile b/lib/appmon/doc/src/Makefile
index ece0977810..743f123c06 100644
--- a/lib/appmon/doc/src/Makefile
+++ b/lib/appmon/doc/src/Makefile
@@ -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%
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
@@ -46,6 +46,9 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
+XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
GIF_FILES = \
app_win.gif \
listbox_win.gif \
diff --git a/lib/common_test/doc/src/Makefile b/lib/common_test/doc/src/Makefile
index a6ece5af28..a2c014418d 100644
--- a/lib/common_test/doc/src/Makefile
+++ b/lib/common_test/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %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%
#
@@ -112,18 +112,16 @@ DVIPS_FLAGS +=
CT_SRC_DIR = $(ERL_TOP)/../internal_tools/common_test/src
-EDOC_ARGS=[{preprocess,true},{includes,["$(XMERL_DIR)/include","../../../test_server/include","../../include","../../../../erts/lib/kernel/include","../../../../lib/kernel/include","../../../../erts/lib/snmp/include","../../../../lib/snmp/include"]}]
-
-
$(HTMLDIR)/%.gif: %.gif
$(INSTALL_DATA) $< $@
docs: pdf html man
$(CT_XML_FILES):
- erl -boot start_clean -noshell \
- -eval 'docb_gen:module("../../src/$(@:%.xml=%.erl)",$(EDOC_ARGS))' \
- -s erlang halt
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -preprocess true -i $(XMERL_DIR)/include \
+ -i ../../../test_server/include -i ../../include \
+ -i ../../../../erts/lib/kernel/include -i ../../../../lib/kernel/include \
+ -i ../../../../erts/lib/snmp/include -i ../../../../lib/snmp/include ../../src/$(@:%.xml=%.erl)
$(TOP_PDF_FILE): $(XML_FILES)
diff --git a/lib/common_test/doc/src/example_chapter.xml b/lib/common_test/doc/src/example_chapter.xml
index 028cbf7c8d..f269dba2cd 100644
--- a/lib/common_test/doc/src/example_chapter.xml
+++ b/lib/common_test/doc/src/example_chapter.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</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>Examples and Templates</title>
@@ -38,7 +38,7 @@
<code>
-module(db_data_type_SUITE).
--include("ct.hrl").
+-include_lib("common_test/include/ct.hrl").
%% Test server callbacks
-export([suite/0, all/0,
@@ -186,7 +186,7 @@ insert_and_lookup(Key, Value, Config) ->
%% Note: This directive should only be used in test suites.
-compile(export_all).
--include("ct.hrl").
+-include_lib("common_test/include/ct.hrl").
%%--------------------------------------------------------------------
%% COMMON TEST CALLBACK FUNCTIONS
@@ -394,7 +394,7 @@ my_test_case(_Config) ->
-compile(export_all).
--include("ct.hrl").
+-include_lib("common_test/include/ct.hrl").
%%--------------------------------------------------------------------
%% Function: suite() -> Info
diff --git a/lib/common_test/include/ct.hrl b/lib/common_test/include/ct.hrl
index ad3b3374c4..aa1cc832cf 100644
--- a/lib/common_test/include/ct.hrl
+++ b/lib/common_test/include/ct.hrl
@@ -1,22 +1,22 @@
%%
%% %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%
%%
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
-compile({parse_transform,ct_line}).
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml
index c39c9b25eb..daa686bc56 100644
--- a/lib/compiler/doc/src/compile.xml
+++ b/lib/compiler/doc/src/compile.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>compile</title>
@@ -212,6 +212,12 @@
success.</p>
</item>
+ <tag><c>warnings_as_errors</c></tag>
+ <item>
+ <p>Causes warnings to be treated as errors. This option is supported
+ since R13B04.</p>
+ </item>
+
<tag><c>return</c></tag>
<item>
<p>This is a short form for both <c>return_errors</c> and
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 08ba9c3ee4..1fd61831e0 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.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(beam_validator).
@@ -604,9 +604,9 @@ valfun_4({gc_bif,Op,{f,Fail},Live,Src,Dst}, #vst{current=St0}=Vst0) ->
St = kill_heap_allocation(St0),
Vst1 = Vst0#vst{current=St},
verify_live(Live, Vst1),
- Vst2 = prune_x_regs(Live, Vst1),
- validate_src(Src, Vst2),
- Vst = branch_state(Fail, Vst2),
+ Vst2 = branch_state(Fail, Vst1),
+ Vst = prune_x_regs(Live, Vst2),
+ validate_src(Src, Vst),
Type = bif_type(Op, Src, Vst),
set_type_reg(Type, Dst, Vst);
valfun_4(return, #vst{current=#st{numy=none}}=Vst) ->
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index e725083a9f..58e147d508 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.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%
%%
%% Purpose: Run the Erlang compiler.
@@ -302,7 +302,7 @@ os_process_size() ->
list_to_integer(lib:nonl(Size));
_ ->
0
- end.
+ end.
run_tc({Name,Fun}, St) ->
Before0 = statistics(runtime),
@@ -318,17 +318,30 @@ run_tc({Name,Fun}, St) ->
Val.
comp_ret_ok(#compile{code=Code,warnings=Warn0,module=Mod,options=Opts}=St) ->
- Warn = messages_per_file(Warn0),
- report_warnings(St#compile{warnings = Warn}),
- Ret1 = case member(binary, Opts) andalso not member(no_code_generation, Opts) of
- true -> [Code];
- false -> []
- end,
- Ret2 = case member(return_warnings, Opts) of
- true -> Ret1 ++ [Warn];
- false -> Ret1
- end,
- list_to_tuple([ok,Mod|Ret2]).
+ case member(warnings_as_errors, Opts) andalso length(Warn0) > 0 of
+ true ->
+ case member(report_warnings, Opts) of
+ true ->
+ io:format("~p: warnings being treated as errors\n",
+ [?MODULE]);
+ false ->
+ ok
+ end,
+ comp_ret_err(St);
+ false ->
+ Warn = messages_per_file(Warn0),
+ report_warnings(St#compile{warnings = Warn}),
+ Ret1 = case member(binary, Opts) andalso
+ not member(no_code_generation, Opts) of
+ true -> [Code];
+ false -> []
+ end,
+ Ret2 = case member(return_warnings, Opts) of
+ true -> Ret1 ++ [Warn];
+ false -> Ret1
+ end,
+ list_to_tuple([ok,Mod|Ret2])
+ end.
comp_ret_err(#compile{warnings=Warn0,errors=Err0,options=Opts}=St) ->
Warn = messages_per_file(Warn0),
@@ -344,18 +357,18 @@ comp_ret_err(#compile{warnings=Warn0,errors=Err0,options=Opts}=St) ->
messages_per_file(Ms) ->
T = lists:sort([{File,M} || {File,Messages} <- Ms, M <- Messages]),
PrioMs = [erl_scan, epp, erl_parse],
- {Prio0, Rest} =
+ {Prio0, Rest} =
lists:mapfoldl(fun(M, A) ->
lists:partition(fun({_,{_,Mod,_}}) -> Mod =:= M;
(_) -> false
end, A)
end, T, PrioMs),
- Prio = lists:sort(fun({_,{L1,_,_}}, {_,{L2,_,_}}) -> L1 =< L2 end,
+ Prio = lists:sort(fun({_,{L1,_,_}}, {_,{L2,_,_}}) -> L1 =< L2 end,
lists:append(Prio0)),
flatmap(fun mpf/1, [Prio, Rest]).
mpf(Ms) ->
- [{File,[M || {F,M} <- Ms, F =:= File]} ||
+ [{File,[M || {F,M} <- Ms, F =:= File]} ||
File <- lists:usort([F || {F,_} <- Ms])].
%% passes(form|file, [Option]) -> [{Name,PassFun}]
@@ -495,14 +508,14 @@ select_passes([List|Ps], Opts) when is_list(List) ->
select_cond(Flag, ShouldBe, Pass, Ps, Opts) ->
ShouldNotBe = not ShouldBe,
- case member(Flag, Opts) of
+ case member(Flag, Opts) of
ShouldBe -> select_passes([Pass|Ps], Opts);
ShouldNotBe -> select_passes(Ps, Opts)
end.
%% select_list_passes([Pass], Opts) -> {done,[Pass]} | {not_done,[Pass]}
%% Evaluate all conditions having to do with listings in the list of
-%% passes.
+%% passes.
select_list_passes(Ps, Opts) ->
select_list_passes_1(Ps, Opts, []).
@@ -782,7 +795,7 @@ clean_parse_transforms_1([F|Fs], Acc) ->
clean_parse_transforms_1(Fs, [F|Acc]);
clean_parse_transforms_1([], Acc) -> reverse(Acc).
-transforms(Os) -> [ M || {parse_transform,M} <- Os ].
+transforms(Os) -> [ M || {parse_transform,M} <- Os ].
transform_module(#compile{options=Opt,code=Code0}=St0) ->
%% Extract compile options from code into options field.
@@ -815,7 +828,7 @@ foldl_transform(St, [T|Ts]) ->
end;
foldl_transform(St, []) -> {ok,St}.
-get_core_transforms(Opts) -> [M || {core_transform,M} <- Opts].
+get_core_transforms(Opts) -> [M || {core_transform,M} <- Opts].
core_transforms(St) ->
%% The options field holds the complete list of options at this
@@ -1264,7 +1277,7 @@ listing(Ext, St) ->
listing(LFun, Ext, St) ->
Lfile = outfile(St#compile.base, Ext, St#compile.options),
case file:open(Lfile, [write,delayed_write]) of
- {ok,Lf} ->
+ {ok,Lf} ->
Code = restore_expanded_types(Ext, St#compile.code),
LFun(Lf, Code),
ok = file:close(Lf),
diff --git a/lib/compiler/test/beam_validator_SUITE.erl b/lib/compiler/test/beam_validator_SUITE.erl
index ef8feb8a27..74b5d7c7eb 100644
--- a/lib/compiler/test/beam_validator_SUITE.erl
+++ b/lib/compiler/test/beam_validator_SUITE.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(beam_validator_SUITE).
@@ -28,7 +28,7 @@
freg_range/1,freg_uninit/1,freg_state/1,
bin_match/1,bin_aligned/1,bad_dsetel/1,
state_after_fault_in_catch/1,no_exception_in_catch/1,
- undef_label/1,illegal_instruction/1]).
+ undef_label/1,illegal_instruction/1,failing_gc_guard_bif/1]).
-include("test_server.hrl").
@@ -52,13 +52,13 @@ all(suite) ->
freg_range,freg_uninit,freg_state,
bin_match,bin_aligned,
bad_dsetel,state_after_fault_in_catch,no_exception_in_catch,
- undef_label,illegal_instruction].
+ undef_label,illegal_instruction,failing_gc_guard_bif].
beam_files(Config) when is_list(Config) ->
?line {ok,Cwd} = file:get_cwd(),
?line Parent = filename:dirname(Cwd),
?line Wc = filename:join([Parent,"*","*.beam"]),
- %% Must have at least two files here, or there will could be
+ %% Must have at least two files here, or there will be
%% a grammatical error in the output of the io:format/2 call below. ;-)
?line [_,_|_] = Fs = filelib:wildcard(Wc),
?line io:format("~p files\n", [length(Fs)]),
@@ -356,6 +356,36 @@ illegal_instruction(Config) when is_list(Config) ->
{{'_',y,0},{[],0,illegal_instruction}}] = Errors,
ok.
+%% The beam_validator used to assume that a GC guard BIF could
+%% do a garbage collection even if it failed. That assumption
+%% is not correct, and will cause the beam_validator to reject
+%% valid programs such as this test case.
+%%
+%% (Thanks to Kiran Khaladkar.)
+%%
+failing_gc_guard_bif(Config) when is_list(Config) ->
+ ?line ok = process_request(lists:seq(1, 36)),
+ ?line error = process_request([]),
+ ?line error = process_request(not_a_list),
+ ok.
+
+process_request(ConfId) ->
+ case process_request_foo(ConfId) of
+ false ->
+ if
+ length(ConfId) == 36 ->
+ Response = ok;
+ true ->
+ Response = error
+ end
+ end,
+ process_request_bar(self(), [Response]).
+
+process_request_foo(_) ->
+ false.
+
+process_request_bar(Pid, [Response]) when is_pid(Pid) ->
+ Response.
%%%-------------------------------------------------------------------------
diff --git a/lib/compiler/test/error_SUITE.erl b/lib/compiler/test/error_SUITE.erl
index 477730c3ac..cdd2434b25 100644
--- a/lib/compiler/test/error_SUITE.erl
+++ b/lib/compiler/test/error_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1998-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(error_SUITE).
@@ -21,11 +21,11 @@
-include("test_server.hrl").
-export([all/1,
- head_mismatch_line/1,r11b_binaries/1]).
+ head_mismatch_line/1,r11b_binaries/1,warnings_as_errors/1]).
all(suite) ->
test_lib:recompile(?MODULE),
- [head_mismatch_line,r11b_binaries].
+ [head_mismatch_line,r11b_binaries,warnings_as_errors].
%% Tests that a head mismatch is reported on the correct line (OTP-2125).
head_mismatch_line(Config) when is_list(Config) ->
@@ -73,6 +73,20 @@ r11b_binaries(Config) when is_list(Config) ->
?line [] = run(Config, Ts),
ok.
+warnings_as_errors(Config) when is_list(Config) ->
+ Ts = [{warnings_as_errors,
+ <<"
+ t() ->
+ A = unused,
+ ok.
+ ">>,
+ [warnings_as_errors],
+ {error,
+ [],
+ [{3,erl_lint,{unused_var,'A'}}]} }],
+ ?line [] = run(Config, Ts),
+ ok.
+
run(Config, Tests) ->
F = fun({N,P,Ws,E}, BadL) ->
@@ -104,6 +118,8 @@ run_test(Conf, Test0, Warnings) ->
%% Test result of compilation.
?line Res = case compile:file(File, Opts) of
{error,[{_File,Es}],Ws} ->
+ {error,Es,Ws};
+ {error,Es,[{_File,Ws}]} ->
{error,Es,Ws}
end,
file:delete(File),
diff --git a/lib/compiler/vsn.mk b/lib/compiler/vsn.mk
index 72abcdde10..a5e6de7b5f 100644
--- a/lib/compiler/vsn.mk
+++ b/lib/compiler/vsn.mk
@@ -1 +1 @@
-COMPILER_VSN = 4.6.4
+COMPILER_VSN = 4.6.5
diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile
index d2cec9b11b..03aaba939b 100644
--- a/lib/crypto/doc/src/Makefile
+++ b/lib/crypto/doc/src/Makefile
@@ -42,6 +42,9 @@ XML_CHAPTER_FILES = notes.xml licenses.xml
BOOK_FILES = book.xml
+XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
GIF_FILES =
# ----------------------------------------------------
diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk
index f2a9b4fe24..68eecfe759 100644
--- a/lib/crypto/vsn.mk
+++ b/lib/crypto/vsn.mk
@@ -1 +1 @@
-CRYPTO_VSN = 1.6.3
+CRYPTO_VSN = 1.6.4
diff --git a/lib/docbuilder/doc/src/inline_tags.xml b/lib/docbuilder/doc/src/inline_tags.xml
index e1d392076a..10afbf143f 100644
--- a/lib/docbuilder/doc/src/inline_tags.xml
+++ b/lib/docbuilder/doc/src/inline_tags.xml
@@ -4,7 +4,7 @@
<chapter>
<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>Inline Tags</title>
@@ -157,7 +157,7 @@
<p>The default behaviour can be modified by using the callback
module option to <c>docb_transform:file/1,2</c> and defining a
callback function
- <seealso marker="docb_transform#Module:seealso/1">Module:seealso/1</seealso>.
+ <seealso marker="docb_transform#Module:seealso-1">Module:seealso/1</seealso>.
This possibility is for example used in OTP to resolve cross
references between applications.</p>
</section>
diff --git a/lib/edoc/Makefile b/lib/edoc/Makefile
index 2b011b55cc..e512e390e3 100644
--- a/lib/edoc/Makefile
+++ b/lib/edoc/Makefile
@@ -86,13 +86,13 @@ SYNTAX_TOOLS_DIR=$(ERL_TOP)/lib/syntax_tools
XMERL_DIR=$(ERL_TOP)/lib/xmerl
INCDIR=$(XMERL_DIR)/include
-docs:
+# The overriding docs target have been removed so the default make rules work properly.
+
+edocs:
erl -noshell -pa $(BINDIR) -pa $(SYNTAX_TOOLS_DIR)/ebin \
-pa $(XMERL_DIR)/ebin -run edoc_run application \
"'$(APPNAME)'" '"."' '$(DOC_OPTS)'
-edocs: docs
-
info:
@echo $(HTML_FILES)
diff --git a/lib/edoc/doc/src/Makefile b/lib/edoc/doc/src/Makefile
index 8d22e1c1da..748691d173 100644
--- a/lib/edoc/doc/src/Makefile
+++ b/lib/edoc/doc/src/Makefile
@@ -103,11 +103,10 @@ html: gifs $(HTML_REF_MAN_FILE)
man: $(MAN3_FILES)
$(XML_REF3_FILES):
- docb_gen -def vsn $(EDOC_VSN) -includes $(INC_DIR) \
- $(SRC_DIR)/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(EDOC_VSN) -i $(ERL_TOP)/lib/edoc/include $(SRC_DIR)/$(@:%.xml=%.erl)
$(XML_CHAPTER_FILES):
- docb_gen -chapter -def vsn $(EDOC_VSN) ../overview.edoc
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(EDOC_VSN) -chapter ../overview.edoc
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
diff --git a/lib/edoc/src/Makefile b/lib/edoc/src/Makefile
index fd0fbac37d..ca95c4cdad 100644
--- a/lib/edoc/src/Makefile
+++ b/lib/edoc/src/Makefile
@@ -55,6 +55,8 @@ all: $(OBJECTS)
$(OBJECTS): $(HRL_FILES) $(XMERL)/include/xmerl.hrl
+docs:
+
clean:
rm -f $(OBJECTS) edoc_parser.erl
rm -f core *~
diff --git a/lib/erl_docgen/priv/bin/Makefile b/lib/erl_docgen/priv/bin/Makefile
index bd59675003..95ad36216a 100644
--- a/lib/erl_docgen/priv/bin/Makefile
+++ b/lib/erl_docgen/priv/bin/Makefile
@@ -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%
#
#
@@ -38,7 +38,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/erl_docgen-$(VSN)
ESCRIPT_FILES= \
- codeline_preprocessing.escript
+ codeline_preprocessing.escript \
+ xml_from_edoc.escript
# ----------------------------------------------------
# FLAGS
diff --git a/lib/erl_docgen/priv/bin/codeline_preprocessing.escript b/lib/erl_docgen/priv/bin/codeline_preprocessing.escript
index 33a678d3a4..592b3985e4 100755
--- a/lib/erl_docgen/priv/bin/codeline_preprocessing.escript
+++ b/lib/erl_docgen/priv/bin/codeline_preprocessing.escript
@@ -1,20 +1,20 @@
#!/usr/bin/env escript
%% -*- erlang -*-
%% %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%
%%----------------------------------------------------------------------
%% File : codeline_preprocessing.escript
@@ -54,13 +54,16 @@ main([InFile, OutFile]) ->
main(_) ->
usage().
+%%======================================================================
+%% Internal functions
+%%======================================================================
%%----------------------------------------------------------------------
-%% Function: main/1
+%% Function: usage/0
%% Description:
%%----------------------------------------------------------------------
usage() ->
- io:format("usage: codeline_preprocessing <infile> <outfile>\n"),
+ io:format("usage: codeline_preprocessing.escript <infile> <outfile>\n"),
halt(1).
diff --git a/lib/erl_docgen/priv/bin/xml_from_edoc.escript b/lib/erl_docgen/priv/bin/xml_from_edoc.escript
new file mode 100755
index 0000000000..ee79e82c3a
--- /dev/null
+++ b/lib/erl_docgen/priv/bin/xml_from_edoc.escript
@@ -0,0 +1,149 @@
+#!/usr/bin/env escript
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 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%
+%%----------------------------------------------------------------------
+%% File : xml_from_edoc.escript
+%%
+%% Created : 12 Dec 2009 by Lars Thorsen
+%%----------------------------------------------------------------------
+
+
+%%======================================================================
+%% Records
+%%======================================================================
+-record(args, {suffix=".xml",
+ layout=docb_edoc_xml_cb,
+ def=[],
+ includes=[],
+ preprocess=false,
+ sort_functions=true}).
+
+
+%%======================================================================
+%% External functions
+%%======================================================================
+%%----------------------------------------------------------------------
+%% Function: main/1
+%% Description:
+%%----------------------------------------------------------------------
+main(RawOpts) ->
+ case catch parse(RawOpts, erlref, #args{}) of
+ {ok, File, Type, Args} ->
+ case Type of
+ erlref ->
+ module(File, Args);
+ chapter ->
+ users_guide(File, Args)
+ end;
+ {error, Msg} ->
+ io:format("~p\n", [Msg]),
+ usage()
+ end;
+main(_) ->
+ usage().
+
+%%======================================================================
+%% Internal functions
+%%======================================================================
+
+%%----------------------------------------------------------------------
+%% Function: usage/0
+%% Description:
+%%----------------------------------------------------------------------
+usage() ->
+ io:format("usage: xml_from_edoc.escript [<options>] <file> \n"),
+ halt(1).
+
+
+%%----------------------------------------------------------------------
+%% Function: module/2
+%% Description:
+%%----------------------------------------------------------------------
+module(File, Args) ->
+ case filelib:is_regular(File) of
+ true ->
+ Opts = [{def, Args#args.def},
+ {includes, Args#args.includes},
+ {preprocess, Args#args.preprocess},
+ {sort_functions, Args#args.sort_functions},
+
+ {app_default, "OTPROOT"},
+ {file_suffix, Args#args.suffix},
+ {dir, "."},
+ {layout, Args#args.layout}],
+ edoc:file(File, Opts);
+ false ->
+ io:format("~s: not a regular file\n", [File]),
+ usage()
+ end.
+
+
+%%----------------------------------------------------------------------
+%% Function: users_guide/2
+%% Description:
+%%----------------------------------------------------------------------
+users_guide(File, Args) ->
+ case filelib:is_regular(File) of
+ true ->
+ Opts = [{def, Args#args.def},
+ {app_default, "OTPROOT"},
+ {file_suffix, Args#args.suffix},
+ {layout, Args#args.layout}],
+
+ Env = edoc_lib:get_doc_env(Opts),
+
+ {ok, Tags} =
+ edoc_extract:file(File, overview, Env, Opts),
+ Data =
+ edoc_data:overview("Overview", Tags, Env, Opts),
+ F = fun(M) -> M:overview(Data, Opts) end,
+ Text = edoc_lib:run_layout(F, Opts),
+
+ OutFile = "chapter" ++ Args#args.suffix,
+ edoc_lib:write_file(Text, ".", OutFile);
+ false ->
+ io:format("~s: not a regular file\n", [File]),
+ usage()
+ end.
+
+
+
+parse(["-xml" |RawOpts], Type, Args) ->
+ parse(RawOpts, Type, Args); % default, no update of record necessary
+parse(["-sgml" |RawOpts], Type, Args) ->
+ parse(RawOpts, Type, Args#args{suffix=".sgml", layout=docb_edoc_sgml_cb});
+parse(["-chapter" |RawOpts], _Type, Args) ->
+ parse(RawOpts, chapter, Args);
+parse(["-def", Key, Val |RawOpts], Type, Args) ->
+ Args2 = Args#args{def=Args#args.def++[{list_to_atom(Key), Val}]},
+ parse(RawOpts, Type, Args2);
+
+parse(["-i", Dir |RawOpts], Type, Args) ->
+ Args2 = Args#args{includes=Args#args.includes++[Dir]},
+ parse(RawOpts, Type, Args2);
+parse(["-preprocess", Bool |RawOpts], Type, Args) when Bool == "true";
+ Bool == "false" ->
+ parse(RawOpts, Type, Args#args{preprocess=list_to_atom(Bool)});
+parse(["-sort_functions", Bool |RawOpts], Type, Args) when Bool == "true";
+ Bool == "false" ->
+ parse(RawOpts, Type, Args#args{sort_functions=list_to_atom(Bool)});
+parse([File], Type, Args) ->
+ {ok, File, Type, Args};
+parse([Opt | _RawOpts], _Type, _Args) ->
+ {error, io_lib:format("Bad option: ~p", [Opt])}.
+
diff --git a/lib/erl_docgen/priv/xsl/db_eix.xsl b/lib/erl_docgen/priv/xsl/db_eix.xsl
index 929272256a..970b85ccb9 100644
--- a/lib/erl_docgen/priv/xsl/db_eix.xsl
+++ b/lib/erl_docgen/priv/xsl/db_eix.xsl
@@ -137,7 +137,20 @@
<xsl:value-of select="substring-before(nametext, '(')"/>
</xsl:when>
<xsl:when test="ancestor::erlref">
- <xsl:value-of select="substring-before(., '(')"/>
+ <xsl:variable name="fname1">
+ <xsl:value-of select="substring-before(., '(')"/>
+ </xsl:variable>
+ <xsl:variable name="fname2">
+ <xsl:value-of select="substring-after($fname1, 'erlang:')"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($fname2) > 0">
+ <xsl:value-of select="$fname2"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fname1"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:variable>
@@ -178,26 +191,63 @@
</xsl:template>
<xsl:template name="remove-paren">
- <xsl:param name="string"/>
- <xsl:variable name="bstring">
- <xsl:value-of select="substring-before($string, '(')"/>
+ <xsl:param name="string"/>
+
+ <xsl:variable name="str1">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$string"/>
+ <xsl:with-param name="start">(</xsl:with-param>
+ <xsl:with-param name="end">)</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="str2">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$str1"/>
+ <xsl:with-param name="start">{</xsl:with-param>
+ <xsl:with-param name="end">}</xsl:with-param>
+ </xsl:call-template>
</xsl:variable>
+
+ <xsl:variable name="str3">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$str2"/>
+ <xsl:with-param name="start">[</xsl:with-param>
+ <xsl:with-param name="end">]</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:value-of select="$str3"/>
+
+ </xsl:template>
+
+
+ <xsl:template name="remove-paren-1">
+ <xsl:param name="string"/>
+ <xsl:param name="start"/>
+ <xsl:param name="end"/>
+
+ <xsl:variable name="tmp1">
+ <xsl:value-of select="substring-before($string, $start)"/>
+ </xsl:variable>
+
<xsl:choose>
- <xsl:when test="string-length($bstring) > 0">
- <xsl:variable name="astring">
- <xsl:value-of select="substring-after($string, ')')"/>
+ <xsl:when test="string-length($tmp1) > 0 or starts-with($string, $start)">
+ <xsl:variable name="tmp2">
+ <xsl:value-of select="substring-after($string, $end)"/>
</xsl:variable>
<xsl:variable name="retstring">
<xsl:call-template name="remove-paren">
- <xsl:with-param name="string" select="$astring"/>
+ <xsl:with-param name="string" select="$tmp2"/>
</xsl:call-template>
</xsl:variable>
- <xsl:value-of select="concat($bstring, $retstring)"/>
+ <xsl:value-of select="concat(concat($tmp1, 'x'), $retstring)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
+
</xsl:template>
<!-- default content handling -->
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index 984655fc26..5614b02bb7 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -2,20 +2,20 @@
<!--
#
# %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%
-->
@@ -40,6 +40,46 @@
<div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="{$topdocdir}/js/flipmenu/flipmenu.js"/>
<script id="js2" type="text/javascript" src="{$topdocdir}/js/erlresolvelinks.js"></script>
+ <script language="JavaScript" type="text/javascript">
+ <xsl:text disable-output-escaping="yes"><![CDATA[
+ <!--
+ function getWinHeight() {
+ var myHeight = 0;
+ if( typeof( window.innerHeight ) == 'number' ) {
+ //Non-IE
+ myHeight = window.innerHeight;
+ } else if( document.documentElement && ( document.documentElement.clientWidth ||
+ document.documentElement.clientHeight ) ) {
+ //IE 6+ in 'standards compliant mode'
+ myHeight = document.documentElement.clientHeight;
+ } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
+ //IE 4 compatible
+ myHeight = document.body.clientHeight;
+ }
+ return myHeight;
+ }
+
+ function setscrollpos() {
+ var objf=document.getElementById('loadscrollpos');
+ document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
+ }
+
+ function addEvent(obj, evType, fn){
+ if (obj.addEventListener){
+ obj.addEventListener(evType, fn, true);
+ return true;
+ } else if (obj.attachEvent){
+ var r = obj.attachEvent("on"+evType, fn);
+ return r;
+ } else {
+ return false;
+ }
+ }
+
+ addEvent(window, 'load', setscrollpos);
+
+ //-->]]></xsl:text>
+ </script>
<!-- Generate menu -->
<xsl:call-template name="menu">
<xsl:with-param name="chapnum" select="$chapnum"/>
@@ -543,7 +583,13 @@
<xsl:otherwise>false</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <li title="{header/title}" expanded="{$expanded}">
+ <xsl:variable name="loadscrollpos">
+ <xsl:choose>
+ <xsl:when test="$chapnum = $curchapnum">loadscrollpos</xsl:when>
+ <xsl:otherwise>no</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <li id="{$loadscrollpos}" title="{header/title}" expanded="{$expanded}">
<xsl:value-of select="header/title"/>
<ul>
<li>
@@ -656,7 +702,7 @@
<!-- Menu.ref -->
<xsl:template name="menu.ref">
- <xsl:param name="$curModule"/>
+ <xsl:param name="curModule"/>
<div id="leftnav">
<div class="innertube">
@@ -731,12 +777,19 @@
</xsl:choose>
</xsl:variable>
+ <xsl:variable name="loadscrollpos">
+ <xsl:choose>
+ <xsl:when test="$curModule = $cval">loadscrollpos</xsl:when>
+ <xsl:otherwise>no</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:variable name="link_cval"><xsl:value-of select="translate($cval, '&#173;', '')"/></xsl:variable>
<xsl:choose>
<xsl:when test="$genFuncMenu = 'true'">
- <li title="{$cval} " expanded="{$expanded}">
+ <li id="{$loadscrollpos}" title="{$cval} " expanded="{$expanded}">
<xsl:value-of select="$cval"/>
<ul>
<li>
@@ -788,58 +841,73 @@
<xsl:when test="string-length($fname) > 0">
<li title="{$fname}">
<a href="{$basename}.html#{$fname}">
- <xsl:value-of select="$fname"/>()
- </a>
- </li>
- </xsl:when>
- <xsl:otherwise>
- <li title="{name/nametext}">
- <a href="{$basename}.html#{name/nametext}">
- <xsl:value-of select="nametext"/>()
- </a>
- </li>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
-
- <xsl:when test="ancestor::erlref">
-
- <xsl:variable name="tmpstring">
- <xsl:value-of select="substring-before(substring-after(., '('), '->')"/>
- </xsl:variable>
-
- <xsl:variable name="ustring">
- <xsl:choose>
- <xsl:when test="string-length($tmpstring) > 0">
- <xsl:call-template name="remove-paren">
- <xsl:with-param name="string" select="$tmpstring"/>
- </xsl:call-template>
+ <xsl:value-of select="$fname"/>()
+ </a>
+ </li>
</xsl:when>
<xsl:otherwise>
- <xsl:call-template name="remove-paren">
- <xsl:with-param name="string" select="substring-after(., '(')"/>
- </xsl:call-template>
+ <li title="{name/nametext}">
+ <a href="{$basename}.html#{name/nametext}">
+ <xsl:value-of select="nametext"/>()
+ </a>
+ </li>
</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="arity">
- <xsl:call-template name="calc-arity">
- <xsl:with-param name="string" select="substring-before($ustring, ')')"/>
- <xsl:with-param name="no-of-pars" select="0"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="fname">
- <xsl:value-of select="substring-before(., '(')"/>
- </xsl:variable>
- <li title="{$fname}-{$arity}">
- <a href="{$basename}.html#{$fname}-{$arity}">
- <xsl:value-of select="$fname"/>/<xsl:value-of select="$arity"/>
- </a>
- </li>
- </xsl:when>
- </xsl:choose>
-
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="ancestor::erlref">
+
+ <xsl:variable name="tmpstring">
+ <xsl:value-of select="substring-before(substring-after(., '('), '->')"/>
+ </xsl:variable>
+
+ <xsl:variable name="ustring">
+ <xsl:choose>
+ <xsl:when test="string-length($tmpstring) > 0">
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="$tmpstring"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="substring-after(., '(')"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="arity">
+ <xsl:call-template name="calc-arity">
+ <xsl:with-param name="string" select="substring-before($ustring, ')')"/>
+ <xsl:with-param name="no-of-pars" select="0"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="fname">
+ <xsl:variable name="fname1">
+ <xsl:value-of select="substring-before(., '(')"/>
+ </xsl:variable>
+ <xsl:variable name="fname2">
+ <xsl:value-of select="substring-after($fname1, 'erlang:')"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($fname2) > 0">
+ <xsl:value-of select="$fname2"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fname1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <li title="{$fname}-{$arity}">
+ <a href="{$basename}.html#{$fname}-{$arity}">
+ <xsl:value-of select="$fname"/>/<xsl:value-of select="$arity"/>
+ </a>
+ </li>
+ </xsl:when>
+ </xsl:choose>
+
</xsl:for-each>
</xsl:template>
@@ -1065,6 +1133,7 @@
<!-- Funcs -->
<xsl:template match="funcs">
+ <xsl:param name="partnum"/>
<h3>
<xsl:text>EXPORTS</xsl:text>
@@ -1121,11 +1190,26 @@
<a name="{substring-before(nametext, '(')}"><span class="bold_code"><xsl:value-of select="ret"/><xsl:text> </xsl:text><xsl:value-of select="nametext"/></span></a><br/>
</xsl:when>
<xsl:when test="ancestor::erlref">
- <a name="{substring-before(., '(')}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/>
+ <xsl:variable name="fname">
+ <xsl:variable name="fname1">
+ <xsl:value-of select="substring-before(., '(')"/>
+ </xsl:variable>
+ <xsl:variable name="fname2">
+ <xsl:value-of select="substring-after($fname1, 'erlang:')"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($fname2) > 0">
+ <xsl:value-of select="$fname2"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fname1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <a name="{$fname}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/>
</xsl:when>
</xsl:choose>
-
</xsl:template>
@@ -1167,6 +1251,7 @@
<!-- Desc -->
<xsl:template match="desc">
+ <xsl:param name="partnum"/>
<div class="REFBODY">
<p>
<xsl:apply-templates>
@@ -1458,29 +1543,65 @@
</xsl:choose>
</xsl:template>
+
<xsl:template name="remove-paren">
<xsl:param name="string"/>
+
+ <xsl:variable name="str1">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$string"/>
+ <xsl:with-param name="start">(</xsl:with-param>
+ <xsl:with-param name="end">)</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="str2">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$str1"/>
+ <xsl:with-param name="start">{</xsl:with-param>
+ <xsl:with-param name="end">}</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="str3">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$str2"/>
+ <xsl:with-param name="start">[</xsl:with-param>
+ <xsl:with-param name="end">]</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:value-of select="$str3"/>
+
+ </xsl:template>
+
+
+ <xsl:template name="remove-paren-1">
+ <xsl:param name="string"/>
+ <xsl:param name="start"/>
+ <xsl:param name="end"/>
- <xsl:variable name="bstring">
- <xsl:value-of select="substring-before($string, '(')"/>
+ <xsl:variable name="tmp1">
+ <xsl:value-of select="substring-before($string, $start)"/>
</xsl:variable>
<xsl:choose>
- <xsl:when test="string-length($bstring) > 0">
- <xsl:variable name="astring">
- <xsl:value-of select="substring-after($string, ')')"/>
+ <xsl:when test="string-length($tmp1) > 0 or starts-with($string, $start)">
+ <xsl:variable name="tmp2">
+ <xsl:value-of select="substring-after($string, $end)"/>
</xsl:variable>
<xsl:variable name="retstring">
<xsl:call-template name="remove-paren">
- <xsl:with-param name="string" select="$astring"/>
+ <xsl:with-param name="string" select="$tmp2"/>
</xsl:call-template>
</xsl:variable>
- <xsl:value-of select="concat($bstring, $retstring)"/>
+ <xsl:value-of select="concat(concat($tmp1, 'x'), $retstring)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
+
</xsl:template>
</xsl:stylesheet>
diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl
index c759a77496..a9a2781a8a 100644
--- a/lib/erl_docgen/priv/xsl/db_man.xsl
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -2,20 +2,20 @@
<!--
#
# %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%
-->
@@ -37,14 +37,12 @@
<!-- *ref/Section -->
<xsl:template match="erlref/section|comref/section|cref/section|fileref/section|appref/section">
- <xsl:text>&#10;.RE&#10;</xsl:text>
<xsl:text>&#10;.SH "</xsl:text><xsl:value-of select="translate(title, 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:text>"&#10;</xsl:text>
<xsl:apply-templates/>
</xsl:template>
<!-- *ref/Subsection -->
- <xsl:template match="erlref/section/section|comref/section/section|cref/section/section|fileref/section/section|appref/section/section">
- <xsl:text>&#10;.RE&#10;</xsl:text>
+ <xsl:template match="section/section">
<xsl:text>&#10;.SS "</xsl:text><xsl:value-of select="title"/><xsl:text>"&#10;</xsl:text>
<xsl:apply-templates/>
</xsl:template>
@@ -53,84 +51,76 @@
<!-- Lists -->
<xsl:template match="list">
- <xsl:text>&#10;.RS 2&#10;</xsl:text>
+ <xsl:text>&#10;.RS 2</xsl:text>
<xsl:apply-templates/>
- <xsl:text>&#10;.RE&#10;</xsl:text>
+ <xsl:text>&#10;.RE</xsl:text>
</xsl:template>
<xsl:template match="list/item">
<xsl:text>&#10;.TP 2&#10;</xsl:text>
<xsl:text>*&#10;</xsl:text>
- <xsl:variable name="content">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:value-of select="normalize-space($content)"/>
- <xsl:text>&#10;.br&#10;</xsl:text>
- <xsl:text>&#10;.br&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.LP&#10;</xsl:text>
</xsl:template>
<xsl:template match="taglist">
- <xsl:text>&#10;.RS 2&#10;</xsl:text>
- <xsl:apply-templates/>
- <xsl:text>&#10;.RE&#10;</xsl:text>
+ <xsl:text>&#10;.RS 2</xsl:text>
+ <xsl:apply-templates select="tag|item"/>
+ <xsl:text>&#10;.RE</xsl:text>
</xsl:template>
<xsl:template match="taglist/tag">
- <xsl:text>&#10;.TP 4&#10;</xsl:text>
+ <xsl:text>&#10;.TP 2&#10;</xsl:text>
<xsl:text>.B&#10;</xsl:text>
- <xsl:apply-templates/>
+ <xsl:apply-templates/><xsl:text>:&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="taglist/item">
+ <xsl:apply-templates/>
</xsl:template>
<xsl:template match="item/p">
<xsl:variable name="content">
<xsl:apply-templates/>
</xsl:variable>
- <xsl:value-of select="normalize-space($content)"/>
- <xsl:text>&#10;.br&#10;</xsl:text>
- <xsl:text>&#10;.br&#10;</xsl:text>
- </xsl:template>
-
-
- <xsl:template match="taglist/item">
- <xsl:text>&#10;</xsl:text>
- <xsl:apply-templates/>
+ <xsl:choose>
+ <xsl:when test="position() = 1">
+ <xsl:value-of select="$content"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&#10;.RS 2</xsl:text>
+ <xsl:text>&#10;.LP&#10;&#10;.LP&#10;</xsl:text>
+ <xsl:value-of select="$content"/>
+ <xsl:text>&#10;.RE</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- Note -->
<xsl:template match="note">
- <xsl:text>&#10;.TP 4&#10;.B&#10;Note:&#10;</xsl:text>
+ <xsl:text>&#10;.SS Note:</xsl:text>
<xsl:apply-templates/>
+ <xsl:text>&#10;</xsl:text>
</xsl:template>
<!-- Warning -->
<xsl:template match="warning">
- <xsl:text>&#10;.TP 4&#10;.B&#10;Warning:&#10;</xsl:text>
+ <xsl:text>&#10;.SS Warning:</xsl:text>
<xsl:apply-templates/>
+ <xsl:text>&#10;</xsl:text>
</xsl:template>
- <xsl:template match="warning/p|note/p">
- <xsl:variable name="content">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:value-of select="normalize-space($content)"/>
- <xsl:text>&#10;.LP&#10;</xsl:text>
- </xsl:template>
-
-
<!-- Paragraph -->
<xsl:template match="p">
<xsl:text>&#10;.LP&#10;</xsl:text>
- <xsl:variable name="content">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:value-of select="normalize-space($content)"/>
+ <xsl:apply-templates/>
</xsl:template>
<!-- Inline elements -->
<xsl:template match="b">
- <xsl:text> \fB</xsl:text>
+ <xsl:text>\fB</xsl:text>
<xsl:apply-templates/>
- <xsl:text>\fR\&amp;</xsl:text>
+ <xsl:text>\fR\&amp; </xsl:text>
</xsl:template>
<xsl:template match="br">
@@ -138,19 +128,20 @@
</xsl:template>
<xsl:template match="c">
- <xsl:text> \fI</xsl:text><xsl:value-of select="text()"/><xsl:text>\fR\&amp;</xsl:text>
+ <xsl:text>\fI</xsl:text><xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
</xsl:template>
<xsl:template match="em">
- <xsl:text> \fI</xsl:text><xsl:value-of select="text()"/><xsl:text>\fR\&amp;</xsl:text>
+ <xsl:text>\fI</xsl:text> <xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
</xsl:template>
<xsl:template match="seealso">
- <xsl:text> \fB</xsl:text><xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
+ <xsl:text>\fB</xsl:text><xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
</xsl:template>
<!-- Code -->
<xsl:template match="code">
+ <xsl:text>&#10;.LP&#10;</xsl:text>
<xsl:text>&#10;.nf&#10;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#10;.fi&#10;</xsl:text>
@@ -158,6 +149,7 @@
<!-- Pre -->
<xsl:template match="pre">
+ <xsl:text>&#10;.LP&#10;</xsl:text>
<xsl:text>&#10;.nf&#10;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#10;.fi&#10;</xsl:text>
@@ -168,16 +160,7 @@
<xsl:template match="table">
</xsl:template>
- <!--xsl:template match="row">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="cell">
- <xsl:apply-templates/>
- </xsl:template -->
-
-
- <!-- Image -->
+ <!-- Image -->
<xsl:template match="image">
</xsl:template>
@@ -191,42 +174,72 @@
<!-- Erlref -->
<xsl:template match="/erlref">
- <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>" "Ericsson AB" "Erlang Module Definition"&#10;</xsl:text>
- <xsl:text>.SH MODULE&#10;</xsl:text>
- <xsl:value-of select="module"/><xsl:text> \- </xsl:text><xsl:value-of select="modulesummary"/><xsl:text>&#10;</xsl:text>
- <xsl:apply-templates/>
+ <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>
+ </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>
+ <xsl:apply-templates/>
</xsl:template>
<!-- Comref -->
<xsl:template match="/comref">
- <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>" "Ericsson AB" "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/>
+ <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>
+ </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>.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/>
</xsl:template>
<!-- Cref -->
<xsl:template match="/cref">
- <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>" "Ericsson AB" "C Library Functions"&#10;</xsl:text>
- <xsl:text>.SH NAME&#10;</xsl:text>
- <xsl:value-of select="lib"/><xsl:text> \- </xsl:text><xsl:value-of select="libsummary"/><xsl:text>&#10;</xsl:text>
- <xsl:apply-templates/>
+ <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>
+ </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>
+ <xsl:text>.SH NAME&#10;</xsl:text>
+ <xsl:value-of select="lib"/><xsl:text> \- </xsl:text><xsl:value-of select="libsummary"/><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
</xsl:template>
<!-- Fileref -->
<xsl:template match="/fileref">
- <xsl:text>.TH </xsl:text><xsl:value-of select="file"/><xsl:text> 4 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Files"&#10;</xsl:text>
- <xsl:text>.SH NAME&#10;</xsl:text>
- <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text>&#10;</xsl:text>
- <xsl:apply-templates/>
+ <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>
+ </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>
+ <xsl:text>.SH NAME&#10;</xsl:text>
+ <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
</xsl:template>
<!-- Appref -->
<xsl:template match="/appref">
- <xsl:text>.TH </xsl:text><xsl:value-of select="app"/><xsl:text> 6 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Erlang Application Definition"&#10;</xsl:text>
- <xsl:text>.SH NAME&#10;</xsl:text>
- <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text>&#10;</xsl:text>
- <xsl:apply-templates/>
+ <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>
+ </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>
+ <xsl:text>.SH NAME&#10;</xsl:text>
+ <xsl:value-of select="app"/><xsl:text> \- </xsl:text><xsl:value-of select="appsummary"/><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
</xsl:template>
<!-- Module|Com|Lib|File|App-->
@@ -297,12 +310,71 @@
<!-- This tag is skipped for now. -->
</xsl:template>
- <!-- xsl:template match="p/text()">
- <xsl:value-of select="normalize-space()"/>
- </xsl:template-->
+
+ <!-- Authors -->
+ <xsl:template match="authors">
+ <xsl:text>&#10;.SH AUTHORS</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Aname -->
+ <xsl:template match="authors/aname">
+ <xsl:text>&#10;.LP&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
- <xsl:template match="d/text()">
- <xsl:value-of select="normalize-space()"/>
+ <!-- Email -->
+ <xsl:template match="authors/email">
+ <xsl:text>&#10;.I&#10;&lt;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:template>
+
+ <!-- Replace ' by \&' ans . by \&. -->
+ <xsl:template match="text()">
+ <xsl:variable name="startstring">
+ <xsl:value-of select="normalize-space()"/><xsl:text> </xsl:text>
+ </xsl:variable>
+ <xsl:variable name="rep1">
+ <xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="$startstring" />
+ <xsl:with-param name="replace" select="&quot;\&quot;" />
+ <xsl:with-param name="with" select="&quot;\\&quot;" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="rep2">
+ <xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="$rep1" />
+ <xsl:with-param name="replace" select="&quot;&apos;&quot;" />
+ <xsl:with-param name="with" select="&quot;\&amp;&apos;&quot;" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="$rep2" />
+ <xsl:with-param name="replace" select="&quot;.&quot;" />
+ <xsl:with-param name="with" select="&quot;\&amp;.&quot;" />
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Template replace-string is borrowed at http://www.dpawson.co.uk/xsl/sect2/replace.html -->
+ <xsl:template name="replace-string">
+ <xsl:param name="text"/>
+ <xsl:param name="replace"/>
+ <xsl:param name="with"/>
+ <xsl:choose>
+ <xsl:when test="contains($text,$replace)">
+ <xsl:value-of select="substring-before($text,$replace)"/>
+ <xsl:value-of select="$with"/>
+ <xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="substring-after($text,$replace)"/>
+ <xsl:with-param name="replace" select="$replace"/>
+ <xsl:with-param name="with" select="$with"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
</xsl:stylesheet>
diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl
index bef86277ea..e12b4d219a 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl
@@ -2,20 +2,20 @@
<!--
#
# %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%
-->
@@ -229,7 +229,9 @@
<xsl:value-of select="$companyname"/>
</fo:block>
<fo:block xsl:use-attribute-sets="cover.inner.copyrightnotice">
- The contents of this file are subject to the Erlang Public License,
+ <xsl:value-of select="/book/header/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
@@ -241,6 +243,7 @@
under the License.
The Initial Developer of the Original Code is
+-->
<xsl:value-of select="$companyname"/>.
</fo:block>
<fo:block xsl:use-attribute-sets="cover.inner.date">
@@ -382,7 +385,9 @@
<xsl:choose>
<xsl:when test="ancestor::cref">
<fo:bookmark internal-destination="{generate-id(nametext)}" starting-state="hide">
- <xsl:variable name="fname"><xsl:value-of select="substring-before(nametext, '(')"/></xsl:variable>
+ <xsl:variable name="fname">
+ <xsl:value-of select="substring-before(nametext, '(')"/>
+ </xsl:variable>
<fo:bookmark-title>
<xsl:choose>
<xsl:when test="string-length($fname) > 0">
@@ -422,8 +427,26 @@
<xsl:with-param name="no-of-pars" select="0"/>
</xsl:call-template>
</xsl:variable>
+
+ <xsl:variable name="fname">
+ <xsl:variable name="fname1">
+ <xsl:value-of select="substring-before(., '(')"/>
+ </xsl:variable>
+ <xsl:variable name="fname2">
+ <xsl:value-of select="substring-after($fname1, 'erlang:')"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($fname2) > 0">
+ <xsl:value-of select="$fname2"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fname1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<fo:bookmark-title>
- <xsl:value-of select="substring-before(., '(')"/>/<xsl:value-of select="$arity"/>
+ <xsl:value-of select="$fname"/>/<xsl:value-of select="$arity"/>
</fo:bookmark-title>
</fo:bookmark>
</xsl:when>
@@ -668,12 +691,12 @@
<xsl:number level="any" from="part" count="code"/>
</xsl:variable>
- <fo:block xsl:use-attribute-sets="code" margin-left="1.5em">
+ <fo:block xsl:use-attribute-sets="code">
<xsl:apply-templates select="text()"/>
</fo:block>
<xsl:if test="@caption">
- <fo:block xsl:use-attribute-sets="caption" margin-left="1.5em">
+ <fo:block xsl:use-attribute-sets="caption">
Code listing <xsl:value-of select="$partnum"/>.<xsl:value-of select="$codenum"/>:&#160;
<xsl:value-of select="@caption"/>
</fo:block>
@@ -687,12 +710,12 @@
<xsl:number level="any" from="part" count="code"/>
</xsl:variable>
- <fo:block xsl:use-attribute-sets="code" margin-left="1.5em">
+ <fo:block xsl:use-attribute-sets="code">
<xsl:apply-templates/>
</fo:block>
<xsl:if test="@caption">
- <fo:block xsl:use-attribute-sets="caption" margin-left="1.5em">
+ <fo:block xsl:use-attribute-sets="caption">
Code listing <xsl:value-of select="$partnum"/>.<xsl:value-of select="$codenum"/>:&#160;
<xsl:value-of select="@caption"/>
</fo:block>
@@ -862,7 +885,7 @@
<!-- Funcs -->
<xsl:template match="funcs">
-
+ <xsl:param name="partnum"/>
<fo:block xsl:use-attribute-sets="h3">
<xsl:text>Exports</xsl:text>
</fo:block>
@@ -958,6 +981,7 @@
<!-- Desc -->
<xsl:template match="desc">
+ <xsl:param name="partnum"/>
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
@@ -1103,27 +1127,62 @@
<xsl:template name="remove-paren">
<xsl:param name="string"/>
+
+ <xsl:variable name="str1">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$string"/>
+ <xsl:with-param name="start">(</xsl:with-param>
+ <xsl:with-param name="end">)</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="str2">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$str1"/>
+ <xsl:with-param name="start">{</xsl:with-param>
+ <xsl:with-param name="end">}</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="str3">
+ <xsl:call-template name="remove-paren-1">
+ <xsl:with-param name="string" select="$str2"/>
+ <xsl:with-param name="start">[</xsl:with-param>
+ <xsl:with-param name="end">]</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:value-of select="$str3"/>
+
+ </xsl:template>
+
+
+ <xsl:template name="remove-paren-1">
+ <xsl:param name="string"/>
+ <xsl:param name="start"/>
+ <xsl:param name="end"/>
- <xsl:variable name="bstring">
- <xsl:value-of select="substring-before($string, '(')"/>
+ <xsl:variable name="tmp1">
+ <xsl:value-of select="substring-before($string, $start)"/>
</xsl:variable>
<xsl:choose>
- <xsl:when test="string-length($bstring) > 0">
- <xsl:variable name="astring">
- <xsl:value-of select="substring-after($string, ')')"/>
+ <xsl:when test="string-length($tmp1) > 0 or starts-with($string, $start)">
+ <xsl:variable name="tmp2">
+ <xsl:value-of select="substring-after($string, $end)"/>
</xsl:variable>
<xsl:variable name="retstring">
<xsl:call-template name="remove-paren">
- <xsl:with-param name="string" select="$astring"/>
+ <xsl:with-param name="string" select="$tmp2"/>
</xsl:call-template>
</xsl:variable>
- <xsl:value-of select="concat($bstring, $retstring)"/>
+ <xsl:value-of select="concat(concat($tmp1, 'x'), $retstring)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
+
</xsl:template>
</xsl:stylesheet>
diff --git a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
index e2e264b90a..7de20f2092 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
@@ -2,20 +2,20 @@
<!--
#
# %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%
-->
@@ -110,7 +110,7 @@
<xsl:attribute-set name="cover.inner.copyrightnotice">
<xsl:attribute name="font-size">0.9em</xsl:attribute>
- <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <!-- xsl:attribute name="font-weight">bold</xsl:attribute -->
</xsl:attribute-set>
<xsl:attribute-set name="cover.inner.date">
@@ -248,6 +248,8 @@
<xsl:attribute name="padding-after">1em</xsl:attribute>
<xsl:attribute name="space-after">1em</xsl:attribute>
<xsl:attribute name="space-before">2em</xsl:attribute>
+ <xsl:attribute name="margin-left">0.5em</xsl:attribute>
+ <xsl:attribute name="margin-right">0.5em</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
<xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
@@ -266,8 +268,10 @@
<xsl:attribute name="text-align">justify</xsl:attribute>
<xsl:attribute name="padding-before">1em</xsl:attribute>
<xsl:attribute name="padding-after">0.3em</xsl:attribute>
- <xsl:attribute name="padding-left">1em</xsl:attribute>
- <xsl:attribute name="padding-right">1em</xsl:attribute>
+ <xsl:attribute name="padding-left">0.5em</xsl:attribute>
+ <xsl:attribute name="padding-right">0.5em</xsl:attribute>
+ <xsl:attribute name="margin-left">0.5em</xsl:attribute>
+ <xsl:attribute name="margin-right">0.5em</xsl:attribute>
<xsl:attribute name="keep-together.within-page">always</xsl:attribute>
</xsl:attribute-set>
@@ -278,8 +282,10 @@
<xsl:attribute name="text-align">justify</xsl:attribute>
<xsl:attribute name="padding-before">1em</xsl:attribute>
<xsl:attribute name="padding-after">0.3em</xsl:attribute>
- <xsl:attribute name="padding-left">1em</xsl:attribute>
- <xsl:attribute name="padding-right">1em</xsl:attribute>
+ <xsl:attribute name="padding-left">0.5em</xsl:attribute>
+ <xsl:attribute name="padding-right">0.5em</xsl:attribute>
+ <xsl:attribute name="margin-left">0.5em</xsl:attribute>
+ <xsl:attribute name="margin-right">0.5em</xsl:attribute>
<xsl:attribute name="keep-together.within-page">always</xsl:attribute>
</xsl:attribute-set>
diff --git a/lib/erl_interface/vsn.mk b/lib/erl_interface/vsn.mk
index c5f4c06037..589b9e2f9c 100644
--- a/lib/erl_interface/vsn.mk
+++ b/lib/erl_interface/vsn.mk
@@ -1 +1 @@
-EI_VSN = 3.6.4
+EI_VSN = 3.6.5
diff --git a/lib/et/doc/src/Makefile b/lib/et/doc/src/Makefile
index bcbde437d1..6bb8164e91 100644
--- a/lib/et/doc/src/Makefile
+++ b/lib/et/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2002-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,6 +41,9 @@ include files.mk
# ----------------------------------------------------
+XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
$(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
@@ -60,7 +63,7 @@ XML_FLAGS +=
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
+$(HTMLDIR)/%: %
$(INSTALL_DATA) $< $@
docs: pdf html man
@@ -69,9 +72,14 @@ $(TOP_PDF_FILE): $(XML_FILES)
pdf: $(TOP_PDF_FILE)
-html: gifs $(HTML_REF_MAN_FILE)
+html: images $(HTML_REF_MAN_FILE)
clean clean_docs:
+ for file in $(XML_FILES); do \
+ if [ -f $$file\src ]; then \
+ rm -f $$file; \
+ fi \
+ done
rm -rf $(HTMLDIR)/*
rm -f $(MAN3DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
@@ -79,7 +87,7 @@ clean clean_docs:
man: $(MAN3_FILES)
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
+images: $(IMAGE_FILES:%=$(HTMLDIR)/%)
debug opt:
diff --git a/lib/eunit/doc/src/Makefile b/lib/eunit/doc/src/Makefile
index faf2f9a847..19be96d763 100644
--- a/lib/eunit/doc/src/Makefile
+++ b/lib/eunit/doc/src/Makefile
@@ -123,11 +123,10 @@ man: $(MAN3_FILES)
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
$(XML_REF3_FILES):
- docb_gen -def vsn $(EUNIT_VSN) -includes $(EUNIT_INC_DIR) $(EUNIT_DIR)/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(EUNIT_VSN) -i $(EUNIT_INC_DIR) $(EUNIT_DIR)/$(@:%.xml=%.erl)
$(XML_CHAPTER_FILES):
- docb_gen -chapter -def vsn $(EUNIT_VSN) ../overview.edoc
-
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(EUNIT_VSN) -chapter ../overview.edoc
info:
@echo "XML_PART_FILES: $(XML_PART_FILES)"
diff --git a/lib/hipe/Makefile b/lib/hipe/Makefile
index be3a618e34..10bf82b2d7 100644
--- a/lib/hipe/Makefile
+++ b/lib/hipe/Makefile
@@ -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%
#
SHELL=/bin/sh
@@ -42,15 +42,13 @@ endif
#
include $(ERL_TOP)/make/otp_subdir.mk
-# This overrides the default recursive-make edocs target in otp_subdir.mk
-# It is not pretty, but it will have to do for now.
-docs:
+# The overriding docs target have been removed so the default make rules work properly.
+
+edocs:
@if [ -d $(ERL_TOP)/lib/edoc/ebin ]; then \
erl -noshell -pa $(ERL_TOP)/lib/edoc/ebin $(ERL_TOP)/lib/syntax_tools/ebin $(ERL_TOP)/lib/xmerl/ebin -run edoc_run application 'hipe' '"."' '[new,no_packages]' -s init stop ; \
fi
-edocs: docs
-
all-subdirs:
-for dir in $(SUB_DIRECTORIES); do \
(cd $$dir; $(MAKE) $(MAKETARGET) EBIN=../ebin; cd ..); \
diff --git a/lib/hipe/amd64/Makefile b/lib/hipe/amd64/Makefile
index 93e5f086d9..58377e5349 100644
--- a/lib/hipe/amd64/Makefile
+++ b/lib/hipe/amd64/Makefile
@@ -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%
#
@@ -80,7 +80,10 @@ ERL_COMPILE_FLAGS += -DHIPE_AMD64 +warn_exported_vars
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/arm/Makefile b/lib/hipe/arm/Makefile
index 571a1da0fc..3f60cd77cc 100644
--- a/lib/hipe/arm/Makefile
+++ b/lib/hipe/arm/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2005-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2005-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%
#
@@ -81,7 +81,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
index fb7ca1153b..7fcc44d27d 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
@@ -1,19 +1,19 @@
#
# %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%
#
@@ -73,7 +73,10 @@ ERL_COMPILE_FLAGS += +inline +warn_exported_vars +warn_unused_import +warn_missi
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/flow/Makefile b/lib/hipe/flow/Makefile
index 5b9d0b7582..91dcfda6f5 100644
--- a/lib/hipe/flow/Makefile
+++ b/lib/hipe/flow/Makefile
@@ -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%
#
@@ -73,7 +73,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile
index de37c4e4c4..eced90b0ec 100644
--- a/lib/hipe/icode/Makefile
+++ b/lib/hipe/icode/Makefile
@@ -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%
#
@@ -91,7 +91,10 @@ ERL_COMPILE_FLAGS += +warn_unused_import +warn_missing_spec +warn_untyped_record
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/main/Makefile b/lib/hipe/main/Makefile
index 0ac522b1b2..a14c9c3ca4 100644
--- a/lib/hipe/main/Makefile
+++ b/lib/hipe/main/Makefile
@@ -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%
#
@@ -83,7 +83,11 @@ $(EBIN)/hipe_main.beam: hipe.hrl ../icode/hipe_icode.hrl #../rtl/hipe_rtl.hrl
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES) $(DOC_FILES) $(HRL_FILES)
diff --git a/lib/hipe/misc/Makefile b/lib/hipe/misc/Makefile
index d5c395855a..98a69d62c7 100644
--- a/lib/hipe/misc/Makefile
+++ b/lib/hipe/misc/Makefile
@@ -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%
#
@@ -76,7 +76,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/opt/Makefile b/lib/hipe/opt/Makefile
index 972cf63944..74fde26c0b 100644
--- a/lib/hipe/opt/Makefile
+++ b/lib/hipe/opt/Makefile
@@ -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%
#
@@ -71,7 +71,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/ppc/Makefile b/lib/hipe/ppc/Makefile
index 0857043527..f24139e34b 100644
--- a/lib/hipe/ppc/Makefile
+++ b/lib/hipe/ppc/Makefile
@@ -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%
#
@@ -83,7 +83,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/regalloc/Makefile b/lib/hipe/regalloc/Makefile
index 5ab70d1837..386f3589c6 100644
--- a/lib/hipe/regalloc/Makefile
+++ b/lib/hipe/regalloc/Makefile
@@ -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%
#
@@ -84,7 +84,11 @@ ERL_COMPILE_FLAGS += +warn_exported_vars# +warn_missing_spec +warn_untyped_recor
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/sparc/Makefile b/lib/hipe/sparc/Makefile
index efd4996046..f25212a89b 100644
--- a/lib/hipe/sparc/Makefile
+++ b/lib/hipe/sparc/Makefile
@@ -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%
#
@@ -83,7 +83,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/tools/Makefile b/lib/hipe/tools/Makefile
index 6ce5cb1b8b..0eaa3a7b05 100644
--- a/lib/hipe/tools/Makefile
+++ b/lib/hipe/tools/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2002-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,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/util/Makefile b/lib/hipe/util/Makefile
index 27cacedf11..85719ec3d6 100644
--- a/lib/hipe/util/Makefile
+++ b/lib/hipe/util/Makefile
@@ -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%
#
@@ -76,7 +76,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/hipe/x86/Makefile b/lib/hipe/x86/Makefile
index 065b56fce3..d7d0c7bf5a 100644
--- a/lib/hipe/x86/Makefile
+++ b/lib/hipe/x86/Makefile
@@ -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%
#
@@ -91,7 +91,10 @@ ERL_COMPILE_FLAGS += +warn_exported_vars
debug opt: $(TARGET_FILES)
-docs: $(DOC_FILES)
+docs:
+
+# Moved docs target to edocs so the standard docs rule work properly.
+edocs: $(DOC_FILES)
clean:
rm -f $(TARGET_FILES)
diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml
index 680473cc38..e143ba2c1a 100644
--- a/lib/inets/doc/src/httpc.xml
+++ b/lib/inets/doc/src/httpc.xml
@@ -21,7 +21,7 @@
</legalnotice>
- <title>http</title>
+ <title>httpc</title>
<prepared>Ingela Anderton Andin</prepared>
<responsible></responsible>
<docno></docno>
@@ -64,6 +64,8 @@ request_id() = ref()
profile() = atom()
path() = string() representing a file path or directory path
ip_address() = See inet(3)
+socket_opt() = See the Options used by gen_tcp(3) and
+ ssl(3) connect(s)
]]></code>
</section>
@@ -162,13 +164,13 @@ ssl_options() = {verify, code()} |
<v>Request = request()</v>
<v>HTTPOptions = http_options()</v>
<v>http_options() = [http_option()]</v>
- <v>http_option() = {timeout, timeout()} |
+ <v>http_option() = {timeout, timeout()} |
{connect_timeout, timeout()} |
- {ssl, ssl_options()} |
- {autoredirect, boolean()} |
+ {ssl, ssl_options()} |
+ {autoredirect, boolean()} |
{proxy_auth, {userstring(), passwordstring()}} |
- {version, http_version()} |
- {relaxed, boolean()}</v>
+ {version, http_version()} |
+ {relaxed, boolean()}</v>
<v>timeout() = integer() >= 0 | infinity</v>
<v>Options = options()</v>
<v>options() = [option()]</v>
@@ -177,8 +179,10 @@ ssl_options() = {verify, code()} |
{body_format, body_format()} |
{full_result, boolean()} |
{headers_as_is, boolean() |
+ {socket_opts, socket_opts()} |
{receiver, receiver()}}</v>
<v>stream_to() = none | self | {self, once} | filename() </v>
+ <v>socket_opts() = [socket_opt()]</v>
<v>receiver() = pid() | function()/1 | {Module, Function, Args} </v>
<v>Module = atom() </v>
<v>Function = atom() </v>
@@ -315,6 +319,24 @@ ssl_options() = {verify, code()} |
<p>Defaults to <c>false</c>. </p>
</item>
+ <tag><c><![CDATA[socket_opts]]></c></tag>
+ <item>
+ <p>Socket options to be used for this and subsequent
+ request(s). </p>
+ <p>Overrides any value set by the
+ <seealso marker="set_options">set_options</seealso>
+ function. </p>
+ <p>Note that the validity of the options are <em>not</em>
+ checked in any way. </p>
+ <p>Note that this may change the socket behaviour
+ (see <seealso marker="inet#setopts">inet:setopts/2</seealso>)
+ for an already existing, and therefor already connected
+ request handler. </p>
+ <p>By defaults the socket options set by the
+ <seealso marker="#set_options">set_options/1,2</seealso>
+ function is used when establishing connection. </p>
+ </item>
+
<tag><c><![CDATA[receiver]]></c></tag>
<item>
<p>Defines how the client will deliver the result for a
@@ -393,17 +415,30 @@ apply(Module, Function, [ReplyInfo | Args])
<fsummary>Sets options to be used for subsequent requests.</fsummary>
<type>
<v>Options = [Option]</v>
- <v>Option = {proxy, {Proxy, NoProxy}} | {max_sessions, MaxSessions} |
- {max_keep_alive_length, MaxKeepAlive} | {keep_alive_timeout, KeepAliveTimeout} |
- {max_pipeline_length, MaxPipeline} | {pipeline_timeout, PipelineTimeout} |
- {cookies | CookieMode} |
- {ipfamily, IpFamily} | {ip, IpAddress} | {port, Port} |
- {verbose, VerboseMode} </v>
+ <v>Option = {proxy, {Proxy, NoProxy}} |
+ {max_sessions, MaxSessions} |
+ {max_keep_alive_length, MaxKeepAlive} |
+ {keep_alive_timeout, KeepAliveTimeout} |
+ {max_pipeline_length, MaxPipeline} |
+ {pipeline_timeout, PipelineTimeout} |
+ {cookies, CookieMode} |
+ {ipfamily, IpFamily} |
+ {ip, IpAddress} |
+ {port, Port} |
+ {socket_opts, socket_opts()} |
+ {verbose, VerboseMode} </v>
<v>Proxy = {Hostname, Port}</v>
<v>Hostname = string() </v>
<d>ex: "localhost" or "foo.bar.se"</d>
<v>Port = integer()</v>
<d>ex: 8080 </d>
+ <v>socket_opts() = [socket_opt()]</v>
+ <d>The options are appended to the socket options used by the
+ client. </d>
+ <d>These are the default values when a new request handler
+ is started (for the initial connect). They are passed directly
+ to the underlying transport (gen_tcp or ssl) <em>without</em>
+ verification! </d>
<v>NoProxy = [NoProxyDesc]</v>
<v>NoProxyDesc = DomainDesc | HostName | IPDesc</v>
<v>DomainDesc = "*.Domain"</v>
@@ -573,6 +608,7 @@ apply(Module, Function, [ReplyInfo | Args])
<section>
<title>SEE ALSO</title>
<p>RFC 2616, <seealso marker="inets">inets(3)</seealso>,
+ <seealso marker="kernel:gen_tcp">gen_tcp(3)</seealso>,
<seealso marker="ssl:ssl">ssl(3)</seealso>
</p>
</section>
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index ed83708940..e95c8d6e97 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -41,6 +41,16 @@
<list>
<item>
+ <p>[httpc] - Allow users to pass socket options to the transport
+ module when making requests. </p>
+ <p>See the <c>socket_opts</c> option in the
+ <seealso marker="httpc#request2">request/4</seealso> or
+ <seealso marker="httpc#set_options">set_options/1,2</seealso>
+ for more info, </p>
+ <p>Own Id: OTP-8352</p>
+ </item>
+
+ <item>
<p>[httpc] Fix bug crafting Host header when port is not 80. </p>
<p>The host header should include the port number as well as the
host name when making a request to a server listening on a port
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index c4ee4f1fda..5205605e0a 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -28,7 +28,8 @@
-behaviour(inets_service).
%% API
--export([request/1, request/2, request/4, request/5,
+-export([
+ request/1, request/2, request/4, request/5,
cancel_request/1, cancel_request/2,
set_option/2, set_option/3,
set_options/1, set_options/2,
@@ -38,7 +39,9 @@
reset_cookies/0, reset_cookies/1,
stream_next/1,
default_profile/0,
- profile_name/1, profile_name/2]).
+ profile_name/1, profile_name/2,
+ info/0, info/1
+ ]).
%% Behavior callbacks
-export([start_standalone/1, start_service/1,
@@ -314,6 +317,27 @@ which_cookies(Profile) ->
%%--------------------------------------------------------------------------
+%% info() -> list()
+%% info(Profile) -> list()
+%%
+%% Description: Debug function, retreive info about the profile
+%%-------------------------------------------------------------------------
+info() ->
+ info(default_profile()).
+
+info(Profile) ->
+ ?hcrt("info", [{profile, Profile}]),
+ try
+ begin
+ httpc_manager:info(profile_name(Profile))
+ end
+ catch
+ exit:{noproc, _} ->
+ {error, {not_started, Profile}}
+ end.
+
+
+%%--------------------------------------------------------------------------
%% reset_cookies() -> void()
%% reset_cookies(Profile) -> void()
%%
@@ -399,35 +423,34 @@ handle_request(Method, Url,
Headers, ContentType, Body,
HTTPOptions0, Options0, Profile) ->
- Started = http_util:timestamp(),
- NewHeaders = [{http_util:to_lower(Key), Val} || {Key, Val} <- Headers],
+ Started = http_util:timestamp(),
+ NewHeaders = [{http_util:to_lower(Key), Val} || {Key, Val} <- Headers],
try
begin
- HTTPOptions = http_options(HTTPOptions0),
- Options = request_options(Options0),
- Sync = proplists:get_value(sync, Options),
- Stream = proplists:get_value(stream, Options),
- HeadersRecord =
- header_record(NewHeaders,
- #http_request_h{},
- header_host(Host, Port),
- HTTPOptions#http_options.version),
- Receiver = proplists:get_value(receiver, Options),
- Request = #request{from = Receiver,
- scheme = Scheme,
- address = {Host,Port},
- path = Path,
- pquery = Query,
- method = Method,
- headers = HeadersRecord,
- content = {ContentType,Body},
- settings = HTTPOptions,
- abs_uri = Url,
- userinfo = UserInfo,
- stream = Stream,
+ HTTPOptions = http_options(HTTPOptions0),
+ Options = request_options(Options0),
+ Sync = proplists:get_value(sync, Options),
+ Stream = proplists:get_value(stream, Options),
+ Host2 = header_host(Host, Port),
+ HeadersRecord = header_record(NewHeaders, Host2, HTTPOptions),
+ Receiver = proplists:get_value(receiver, Options),
+ SocketOpts = proplists:get_value(socket_opts, Options),
+ Request = #request{from = Receiver,
+ scheme = Scheme,
+ address = {Host, Port},
+ path = Path,
+ pquery = Query,
+ method = Method,
+ headers = HeadersRecord,
+ content = {ContentType, Body},
+ settings = HTTPOptions,
+ abs_uri = Url,
+ userinfo = UserInfo,
+ stream = Stream,
headers_as_is = headers_as_is(Headers, Options),
- started = Started},
+ socket_opts = SocketOpts,
+ started = Started},
case httpc_manager:request(Request, profile_name(Profile)) of
{ok, RequestId} ->
handle_answer(RequestId, Sync, Options);
@@ -591,6 +614,7 @@ http_options_default() ->
{connect_timeout, {field, #http_options.timeout}, #http_options.connect_timeout, ConnTimeoutPost}
].
+
request_options_defaults() ->
VerifyBoolean =
fun(Value) when ((Value =:= true) orelse (Value =:= false)) ->
@@ -640,13 +664,23 @@ request_options_defaults() ->
error
end,
+ VerifySocketOpts =
+ fun([]) ->
+ {ok, undefined};
+ (Value) when is_list(Value) ->
+ ok;
+ (_) ->
+ error
+ end,
+
[
- {sync, true, VerifySync},
- {stream, none, VerifyStream},
- {body_format, string, VerifyBodyFormat},
- {full_result, true, VerifyFullResult},
- {headers_as_is, false, VerifyHeaderAsIs},
- {receiver, self(), VerifyReceiver}
+ {sync, true, VerifySync},
+ {stream, none, VerifyStream},
+ {body_format, string, VerifyBodyFormat},
+ {full_result, true, VerifyFullResult},
+ {headers_as_is, false, VerifyHeaderAsIs},
+ {receiver, self(), VerifyReceiver},
+ {socket_opts, undefined, VerifySocketOpts}
].
request_options(Options) ->
@@ -671,6 +705,9 @@ request_options([{Key, DefaultVal, Verify} | Defaults], Options, Acc) ->
ok ->
Options2 = lists:keydelete(Key, 1, Options),
request_options(Defaults, Options2, [{Key, Value} | Acc]);
+ {ok, Value2} ->
+ Options2 = lists:keydelete(Key, 1, Options),
+ request_options(Defaults, Options2, [{Key, Value2} | Acc]);
error ->
Report = io_lib:format("Invalid option ~p:~p ignored ~n",
[Key, Value]),
@@ -756,6 +793,10 @@ validate_options([{port, Value} = Opt| Tail], Acc) ->
validate_port(Value),
validate_options(Tail, [Opt | Acc]);
+validate_options([{socket_opts, Value} = Opt| Tail], Acc) ->
+ validate_socket_opts(Value),
+ validate_options(Tail, [Opt | Acc]);
+
validate_options([{verbose, Value} = Opt| Tail], Acc) ->
validate_verbose(Value),
validate_options(Tail, [Opt | Acc]);
@@ -836,6 +877,11 @@ validate_port(Value) when is_integer(Value) ->
validate_port(BadValue) ->
bad_option(port, BadValue).
+validate_socket_opts(Value) when is_list(Value) ->
+ Value;
+validate_socket_opts(BadValue) ->
+ bad_option(socket_opts, BadValue).
+
validate_verbose(Value)
when ((Value =:= false) orelse
(Value =:= verbose) orelse
@@ -855,6 +901,9 @@ header_host(Host, Port) ->
Host ++ ":" ++ integer_to_list(Port).
+header_record(NewHeaders, Host, #http_options{version = Version}) ->
+ header_record(NewHeaders, #http_request_h{}, Host, Version).
+
header_record([], RequestHeaders, Host, Version) ->
validate_headers(RequestHeaders, Host, Version);
header_record([{"cache-control", Val} | Rest], RequestHeaders, Host, Version) ->
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index 25f9b0777f..fec74932a2 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -28,8 +28,15 @@
%%--------------------------------------------------------------------
%% Internal Application API
--export([start_link/2, connect_and_send/2,
- send/2, cancel/2, stream/3, stream_next/1]).
+-export([
+ start_link/2,
+ connect_and_send/2,
+ send/2,
+ cancel/2,
+ stream/3,
+ stream_next/1,
+ info/1
+ ]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
@@ -131,6 +138,18 @@ stream_next(Pid) ->
%%--------------------------------------------------------------------
+%% Function: info(Pid) -> [{Key, Val}]
+%% Pid = pid() - the pid of the http-request handler process.
+%%
+%% Description:
+%% Returns various information related to this handler
+%% Used for debugging and testing
+%%--------------------------------------------------------------------
+info(Pid) ->
+ call(info, Pid).
+
+
+%%--------------------------------------------------------------------
%% Function: stream(BodyPart, Request, Code) -> _
%% BodyPart = binary()
%% Request = #request{}
@@ -143,21 +162,21 @@ stream_next(Pid) ->
%%--------------------------------------------------------------------
%% Request should not be streamed
stream(BodyPart, Request = #request{stream = none}, _) ->
- ?hcrt("stream - none", [{body_part, BodyPart}]),
+ ?hcrt("stream - none", []),
{BodyPart, Request};
%% Stream to caller
stream(BodyPart, Request = #request{stream = Self}, Code)
when ((Code =:= 200) orelse (Code =:= 206)) andalso
((Self =:= self) orelse (Self =:= {self, once})) ->
- ?hcrt("stream - self", [{stream, Self}, {code, Code}, {body_part, BodyPart}]),
+ ?hcrt("stream - self", [{stream, Self}, {code, Code}]),
httpc_response:send(Request#request.from,
{Request#request.id, stream, BodyPart}),
{<<>>, Request};
stream(BodyPart, Request = #request{stream = Self}, 404)
when (Self =:= self) orelse (Self =:= {self, once}) ->
- ?hcrt("stream - self with 404", [{stream, Self}, {body_part, BodyPart}]),
+ ?hcrt("stream - self with 404", [{stream, Self}]),
httpc_response:send(Request#request.from,
{Request#request.id, stream, BodyPart}),
{<<>>, Request};
@@ -167,7 +186,7 @@ stream(BodyPart, Request = #request{stream = Self}, 404)
%% We keep this for backward compatibillity...
stream(BodyPart, Request = #request{stream = Filename}, Code)
when ((Code =:= 200) orelse (Code =:= 206)) andalso is_list(Filename) ->
- ?hcrt("stream - filename", [{stream, Filename}, {code, Code}, {body_part, BodyPart}]),
+ ?hcrt("stream - filename", [{stream, Filename}, {code, Code}]),
case file:open(Filename, [write, raw, append, delayed_write]) of
{ok, Fd} ->
?hcrt("stream - file open ok", [{fd, Fd}]),
@@ -179,7 +198,7 @@ stream(BodyPart, Request = #request{stream = Filename}, Code)
%% Stream to file
stream(BodyPart, Request = #request{stream = Fd}, Code)
when ((Code =:= 200) orelse (Code =:= 206)) ->
- ?hcrt("stream to file", [{stream, Fd}, {code, Code}, {body_part, BodyPart}]),
+ ?hcrt("stream to file", [{stream, Fd}, {code, Code}]),
case file:write(Fd, BodyPart) of
ok ->
{<<>>, Request};
@@ -188,7 +207,7 @@ stream(BodyPart, Request = #request{stream = Fd}, Code)
end;
stream(BodyPart, Request,_) -> % only 200 and 206 responses can be streamed
- ?hcrt("stream - ignore", [{request, Request}, {body_part, BodyPart}]),
+ ?hcrt("stream - ignore", [{request, Request}]),
{BodyPart, Request}.
@@ -260,22 +279,22 @@ handle_call({connect_and_send, #request{address = Address0,
end
end;
-handle_call(Request, _,
+handle_call(#request{address = Addr} = Request, _,
#state{status = Status,
session = #tcp_session{socket = Socket,
type = pipeline} = Session,
timers = Timers,
- options = Options,
+ options = #options{proxy = Proxy} = _Options,
profile_name = ProfileName} = State)
when Status =/= undefined ->
- ?hcrv("new request", [{request, Request},
- {profile, ProfileName},
- {status, Status},
- {session_type, pipeline},
- {timers, Timers}]),
+ ?hcrv("new request on a pipeline session",
+ [{request, Request},
+ {profile, ProfileName},
+ {status, Status},
+ {timers, Timers}]),
- Address = handle_proxy(Request#request.address, Options#options.proxy),
+ Address = handle_proxy(Addr, Proxy),
case httpc_request:send(Address, Request, Socket) of
ok ->
@@ -331,21 +350,21 @@ handle_call(Request, _,
{reply, {pipeline_failed, Reason}, State}
end;
-handle_call(Request, _,
+handle_call(#request{address = Addr} = Request, _,
#state{status = Status,
session = #tcp_session{socket = Socket,
type = keep_alive} = Session,
timers = Timers,
- options = Options,
+ options = #options{proxy = Proxy} = _Options,
profile_name = ProfileName} = State)
when Status =/= undefined ->
- ?hcrv("new request", [{request, Request},
- {profile, ProfileName},
- {status, Status},
- {session_type, keep_alive}]),
+ ?hcrv("new request on a keep-alive session",
+ [{request, Request},
+ {profile, ProfileName},
+ {status, Status}]),
- Address = handle_proxy(Request#request.address, Options#options.proxy),
+ Address = handle_proxy(Addr, Proxy),
case httpc_request:send(Address, Request, Socket) of
ok ->
@@ -396,7 +415,12 @@ handle_call(Request, _,
{error, Reason} ->
?hcri("failed sending request", [{reason, Reason}]),
{reply, {request_failed, Reason}, State}
- end.
+ end;
+
+
+handle_call(info, _, State) ->
+ Info = handler_info(State),
+ {reply, Info, State}.
%%--------------------------------------------------------------------
@@ -441,8 +465,7 @@ handle_cast({cancel, RequestId},
{noreply, State#state{canceled = [RequestId | Canceled]}};
handle_cast(stream_next, #state{session = Session} = State) ->
- http_transport:setopts(socket_type(Session#tcp_session.scheme),
- Session#tcp_session.socket, [{active, once}]),
+ activate_once(Session),
{noreply, State#state{once = once}}.
@@ -453,7 +476,7 @@ handle_cast(stream_next, #state{session = Session} = State) ->
%% Description: Handling all non call/cast messages
%%--------------------------------------------------------------------
handle_info({Proto, _Socket, Data},
- #state{mfa = {Module, Function, Args} = MFA,
+ #state{mfa = {Module, Function, Args},
request = #request{method = Method,
stream = Stream} = Request,
session = Session,
@@ -463,8 +486,8 @@ handle_info({Proto, _Socket, Data},
(Proto =:= httpc_handler) ->
?hcri("received data", [{proto, Proto},
- {data, Data},
- {mfa, MFA},
+ {module, Module},
+ {function, Function},
{method, Method},
{stream, Stream},
{session, Session},
@@ -473,14 +496,13 @@ handle_info({Proto, _Socket, Data},
FinalResult =
try Module:Function([Data | Args]) of
{ok, Result} ->
- ?hcrd("data processed - ok", [{result, Result}]),
+ ?hcrd("data processed - ok", []),
handle_http_msg(Result, State);
{_, whole_body, _} when Method =:= head ->
?hcrd("data processed - whole body", []),
handle_response(State#state{body = <<>>});
{Module, whole_body, [Body, Length]} ->
- ?hcrd("data processed - whole body",
- [{module, Module}, {body, Body}, {length, Length}]),
+ ?hcrd("data processed - whole body", [{length, Length}]),
{_, Code, _} = StatusLine,
{NewBody, NewRequest} = stream(Body, Request, Code),
%% When we stream we will not keep the already
@@ -498,25 +520,25 @@ handle_info({Proto, _Socket, Data},
{noreply, NewState#state{mfa = NewMFA,
request = NewRequest}};
NewMFA ->
- ?hcrd("data processed", [{new_mfa, NewMFA}]),
- http_transport:setopts(socket_type(Session#tcp_session.scheme),
- Session#tcp_session.socket,
- [{active, once}]),
+ ?hcrd("data processed - new mfa", []),
+ activate_once(Session),
{noreply, State#state{mfa = NewMFA}}
catch
- exit:_ ->
+ exit:_Exit ->
+ ?hcrd("data processing exit", [{exit, _Exit}]),
ClientReason = {could_not_parse_as_http, Data},
ClientErrMsg = httpc_response:error(Request, ClientReason),
NewState = answer_request(Request, ClientErrMsg, State),
{stop, normal, NewState};
- error:_ ->
+ error:_Error ->
+ ?hcrd("data processing error", [{error, _Error}]),
ClientReason = {could_not_parse_as_http, Data},
ClientErrMsg = httpc_response:error(Request, ClientReason),
NewState = answer_request(Request, ClientErrMsg, State),
{stop, normal, NewState}
end,
- ?hcri("data processed", [{result, FinalResult}]),
+ ?hcri("data processed", []),
FinalResult;
@@ -667,6 +689,9 @@ terminate(normal,
request = Request,
timers = Timers,
pipeline = Pipeline}) ->
+ ?hcrt("terminate(normal) - remote close",
+ [{id, Id}, {profile, ProfileName}]),
+
%% Clobber session
(catch httpc_manager:delete_session(Id, ProfileName)),
@@ -776,19 +801,22 @@ new_queue(Queue, Fun) ->
end, List),
queue:from_list(NewList).
-%%--------------------------------------------------------------------
+
+%%%--------------------------------------------------------------------
%%% Internal functions
-%%--------------------------------------------------------------------
+%%%--------------------------------------------------------------------
-connect(SocketType, ToAddress, #options{ipfamily = IpFamily,
- ip = FromAddress,
- port = FromPort}, Timeout) ->
+connect(SocketType, ToAddress,
+ #options{ipfamily = IpFamily,
+ ip = FromAddress,
+ port = FromPort,
+ socket_opts = Opts0}, Timeout) ->
Opts1 =
case FromPort of
default ->
- [];
+ Opts0;
_ ->
- [{port, FromPort}]
+ [{port, FromPort} | Opts0]
end,
Opts2 =
case FromAddress of
@@ -814,10 +842,10 @@ connect(SocketType, ToAddress, #options{ipfamily = IpFamily,
end.
connect_and_send_first_request(Address,
- #request{settings = Settings,
- headers = Headers,
- address = OrigAddress,
- scheme = Scheme} = Request,
+ #request{settings = Settings,
+ headers = Headers,
+ address = OrigAddress,
+ scheme = Scheme} = Request,
#state{options = Options} = State) ->
?hcrd("connect",
@@ -841,13 +869,13 @@ connect_and_send_first_request(Address,
client_close = ClientClose,
type = SessionType},
TmpState =
- State#state{request = Request,
- session = Session,
- mfa = init_mfa(Request, State),
+ State#state{request = Request,
+ session = Session,
+ mfa = init_mfa(Request, State),
status_line = init_status_line(Request),
- headers = undefined,
- body = undefined,
- status = new},
+ headers = undefined,
+ body = undefined,
+ status = new},
?hcrt("activate socket", []),
activate_once(Session),
NewState = activate_request_timeout(TmpState),
@@ -867,12 +895,87 @@ connect_and_send_first_request(Address,
{stop, Error, State#state{request = Request}}
end.
+
+handler_info(#state{request = Request,
+ session = Session,
+ status_line = _StatusLine,
+ pipeline = Pipeline,
+ keep_alive = KeepAlive,
+ status = Status,
+ canceled = _Canceled,
+ options = _Options,
+ timers = _Timers} = _State) ->
+
+ ?hcrt("handler info", [{request, Request},
+ {session, Session},
+ {pipeline, Pipeline},
+ {keep_alive, KeepAlive},
+ {status, Status}]),
+
+ %% Info about the current request
+ RequestInfo =
+ case Request of
+ undefined ->
+ [];
+ #request{id = Id,
+ started = ReqStarted} ->
+ [{id, Id}, {started, ReqStarted}]
+ end,
+
+ ?hcrt("handler info", [{request_info, RequestInfo}]),
+
+ %% Info about the current session/socket
+ SessionType = Session#tcp_session.type,
+ QueueLen = case Session#tcp_session.type of
+ pipeline ->
+ queue:len(Pipeline);
+ keep_alive ->
+ queue:len(KeepAlive)
+ end,
+ Socket = Session#tcp_session.socket,
+ Scheme = Session#tcp_session.scheme,
+ SocketType = socket_type(Scheme),
+
+ ?hcrt("handler info", [{session_type, SessionType},
+ {queue_length, QueueLen},
+ {scheme, Scheme},
+ {socket_type, SocketType},
+ {socket, Socket}]),
+
+ SocketOpts = http_transport:getopts(SocketType, Socket),
+ SocketStats = http_transport:getstat(SocketType, Socket),
+
+ Remote = http_transport:peername(SocketType, Socket),
+ Local = http_transport:sockname(SocketType, Socket),
+
+ ?hcrt("handler info", [{remote, Remote},
+ {local, Local},
+ {socket_opts, SocketOpts},
+ {socket_stats, SocketStats}]),
+
+ SocketInfo = [{remote, Remote},
+ {local, Local},
+ {socket_opts, SocketOpts},
+ {socket_stats, SocketStats}],
+
+ SessionInfo =
+ [{type, SessionType},
+ {queue_length, QueueLen},
+ {scheme, Scheme},
+ {socket_info, SocketInfo}],
+
+ [{status, Status},
+ {current_request, RequestInfo},
+ {session, SessionInfo}].
+
+
+
handle_http_msg({Version, StatusCode, ReasonPharse, Headers, Body},
State = #state{request = Request}) ->
- ?hcrt("handle_http_msg", [{body, Body}]),
+ ?hcrt("handle_http_msg", [{headers, Headers}]),
case Headers#http_response_h.'content-type' of
"multipart/byteranges" ++ _Param ->
- exit({not_yet_implemented, multypart_nyteranges});
+ exit({not_yet_implemented, multypart_byteranges});
_ ->
StatusLine = {Version, StatusCode, ReasonPharse},
{ok, NewRequest} = start_stream(StatusLine, Headers, Request),
@@ -883,11 +986,11 @@ handle_http_msg({Version, StatusCode, ReasonPharse, Headers, Body},
end;
handle_http_msg({ChunkedHeaders, Body}, #state{headers = Headers} = State) ->
?hcrt("handle_http_msg",
- [{chunked_headers, ChunkedHeaders}, {body, Body}]),
+ [{chunked_headers, ChunkedHeaders}, {headers, Headers}]),
NewHeaders = http_chunk:handle_headers(Headers, ChunkedHeaders),
handle_response(State#state{headers = NewHeaders, body = Body});
handle_http_msg(Body, #state{status_line = {_,Code, _}} = State) ->
- ?hcrt("handle_http_msg", [{body, Body}, {code, Code}]),
+ ?hcrt("handle_http_msg", [{code, Code}]),
{NewBody, NewRequest} = stream(Body, State#state.request, Code),
handle_response(State#state{body = NewBody, request = NewRequest}).
@@ -903,15 +1006,12 @@ handle_http_body(<<>>, State = #state{request = #request{method = head}}) ->
?hcrt("handle_http_body - head", []),
handle_response(State#state{body = <<>>});
-handle_http_body(Body, State = #state{headers = Headers,
- max_body_size = MaxBodySize,
- status_line = {_,Code, _},
- request = Request}) ->
+handle_http_body(Body, #state{headers = Headers,
+ max_body_size = MaxBodySize,
+ status_line = {_,Code, _},
+ request = Request} = State) ->
?hcrt("handle_http_body",
- [{headers, Headers},
- {body, Body},
- {max_body_size, MaxBodySize},
- {code, Code}]),
+ [{max_body_size, MaxBodySize}, {headers, Headers}, {code, Code}]),
TransferEnc = Headers#http_response_h.'transfer-encoding',
case case_insensitive_header(TransferEnc) of
"chunked" ->
@@ -1000,9 +1100,7 @@ handle_response(#state{request = Request,
Session#tcp_session.socket,
RequestBody),
%% Wait for next response
- http_transport:setopts(socket_type(Session#tcp_session.scheme),
- Session#tcp_session.socket,
- [{active, once}]),
+ activate_once(Session),
Relaxed = (Request#request.settings)#http_options.relaxed,
MFA = {httpc_response, parse,
[State#state.max_header_size, Relaxed]},
@@ -1038,7 +1136,7 @@ handle_response(#state{request = Request,
ok = httpc_manager:retry_request(TimeNewRequest, ProfileName),
handle_queue(State#state{request = undefined}, Data);
{ok, Msg, Data} ->
- ?hcrd("handle response - ok", [{msg, Msg}, {data, Data}]),
+ ?hcrd("handle response - ok", []),
end_stream(StatusLine, Request),
NewState = answer_request(Request, Msg, State),
handle_queue(NewState, Data);
@@ -1137,10 +1235,7 @@ handle_pipeline(#state{status = pipeline,
body = undefined},
case Data of
<<>> ->
- http_transport:setopts(
- socket_type(Session#tcp_session.scheme),
- Session#tcp_session.socket,
- [{active, once}]),
+ activate_once(Session),
{noreply, NewState};
_ ->
%% If we already received some bytes of
@@ -1164,14 +1259,12 @@ handle_keep_alive_queue(
case queue:out(State#state.keep_alive) of
{empty, _} ->
- ?hcrd("epmty keep_alive queue", []),
+ ?hcrd("empty keep_alive queue", []),
%% The server may choose too terminate an idle keep_alive session
%% in this case we want to receive the close message
%% at once and not when trying to send the next
%% request.
- http_transport:setopts(socket_type(Session#tcp_session.scheme),
- Session#tcp_session.socket,
- [{active, once}]),
+ activate_once(Session),
%% If a keep_alive session has been idle for some time is not
%% closed by the server, the client may want to close it.
NewState = activate_queue_timeout(TimeOut, State),
@@ -1276,9 +1369,8 @@ is_keep_alive_enabled_server("HTTP/1.0",
is_keep_alive_enabled_server(_,_) ->
false.
-is_keep_alive_connection(Headers, Session) ->
- (not ((Session#tcp_session.client_close) or
- httpc_response:is_server_closing(Headers))).
+is_keep_alive_connection(Headers, #tcp_session{client_close = ClientClose}) ->
+ (not ((ClientClose) orelse httpc_response:is_server_closing(Headers))).
try_to_enable_pipeline_or_keep_alive(
#state{session = Session,
@@ -1286,8 +1378,12 @@ try_to_enable_pipeline_or_keep_alive(
status_line = {Version, _, _},
headers = Headers,
profile_name = ProfileName} = State) ->
- case (is_keep_alive_enabled_server(Version, Headers) andalso
- is_keep_alive_connection(Headers, Session)) of
+ ?hcrd("try to enable pipeline or keep-alive",
+ [{version, Version},
+ {headers, Headers},
+ {session, Session}]),
+ case is_keep_alive_enabled_server(Version, Headers) andalso
+ is_keep_alive_connection(Headers, Session) of
true ->
case (is_pipeline_enabled_client(Session) andalso
httpc_request:is_idempotent(Method)) of
@@ -1307,7 +1403,7 @@ try_to_enable_pipeline_or_keep_alive(
end.
answer_request(Request, Msg, #state{timers = Timers} = State) ->
- ?hcrt("answer request", [{request, Request}, {msg, Msg}]),
+ ?hcrt("answer request", [{request, Request}]),
httpc_response:send(Request#request.from, Msg),
RequestTimers = Timers#timers.request_timers,
TimerRef =
@@ -1435,7 +1531,7 @@ socket_type(#request{scheme = https, settings = Settings}) ->
socket_type(http) ->
ip_comm;
socket_type(https) ->
- {ssl, []}. %% Dummy value ok for ex setops that does not use this value
+ {ssl, []}. %% Dummy value ok for ex setopts that does not use this value
start_stream({_Version, _Code, _ReasonPhrase}, _Headers,
#request{stream = none} = Request) ->
@@ -1529,6 +1625,7 @@ handle_verbose(trace) ->
handle_verbose(_) ->
ok.
+
%%% Normaly I do not comment out code, I throw it away. But this might
%%% actually be used one day if ssl is improved.
%% send_ssl_tunnel_request(Address, Request = #request{address = {Host, Port}},
diff --git a/lib/inets/src/http_client/httpc_internal.hrl b/lib/inets/src/http_client/httpc_internal.hrl
index 4c5e6ed5d8..4d76c4beb3 100644
--- a/lib/inets/src/http_client/httpc_internal.hrl
+++ b/lib/inets/src/http_client/httpc_internal.hrl
@@ -46,7 +46,7 @@
%% bool() - true if auto redirect on 30x response
autoredirect = true,
- %% Ssl socket options
+ %% ssl socket options
ssl = [],
%% {User, Password} = {string(), string()}
@@ -63,19 +63,20 @@
%%% HTTP Client per profile setting.
-record(options,
{
- proxy = {undefined, []}, % {{ProxyHost, ProxyPort}, [NoProxy]},
- %% 0 means persistent connections are used without pipelining
- pipeline_timeout = ?HTTP_PIPELINE_TIMEOUT,
- max_pipeline_length = ?HTTP_PIPELINE_LENGTH,
- max_keep_alive_length = ?HTTP_KEEP_ALIVE_LENGTH,
- keep_alive_timeout = ?HTTP_KEEP_ALIVE_TIMEOUT, % Used when pipeline_timeout = 0
- max_sessions = ?HTTP_MAX_TCP_SESSIONS,
- cookies = disabled, % enabled | disabled | verify
- verbose = false,
- ipfamily = inet, % inet | inet6 | inet6fb4
- ip = default, % specify local interface
- port = default % specify local port
- }
+ proxy = {undefined, []}, % {{ProxyHost, ProxyPort}, [NoProxy]},
+ %% 0 means persistent connections are used without pipelining
+ pipeline_timeout = ?HTTP_PIPELINE_TIMEOUT,
+ max_pipeline_length = ?HTTP_PIPELINE_LENGTH,
+ max_keep_alive_length = ?HTTP_KEEP_ALIVE_LENGTH,
+ keep_alive_timeout = ?HTTP_KEEP_ALIVE_TIMEOUT, % Used when pipeline_timeout = 0
+ max_sessions = ?HTTP_MAX_TCP_SESSIONS,
+ cookies = disabled, % enabled | disabled | verify
+ verbose = false,
+ ipfamily = inet, % inet | inet6 | inet6fb4
+ ip = default, % specify local interface
+ port = default, % specify local port
+ socket_opts = [] % other socket options
+ }
).
%%% All data associated to a specific HTTP request
@@ -98,7 +99,8 @@
headers_as_is, % Boolean() - workaround for servers that does
% not honor the http standard, can also be used for testing purposes.
started, % integer() > 0 - When we started processing the request
- timer % undefined | ref()
+ timer, % undefined | ref()
+ socket_opts % undefined | [socket_option()]
}
).
@@ -109,7 +111,7 @@
scheme, % http (HTTP/TCP) | https (HTTP/SSL/TCP)
socket, % Open socket, used by connection
queue_length = 1, % Current length of pipeline or keep alive queue
- type % pipeline | keep_alive (wait for response before sending new request)
+ type % pipeline | keep_alive (wait for response before sending new request)
}).
-record(http_cookie,
diff --git a/lib/inets/src/http_client/httpc_manager.erl b/lib/inets/src/http_client/httpc_manager.erl
index 915f4c024d..f8fc6322ed 100644
--- a/lib/inets/src/http_client/httpc_manager.erl
+++ b/lib/inets/src/http_client/httpc_manager.erl
@@ -38,7 +38,8 @@
store_cookies/3,
which_cookies/1, which_cookies/2,
reset_cookies/1,
- session_type/1
+ session_type/1,
+ info/1
]).
%% gen_server callbacks
@@ -61,7 +62,7 @@
starter, % Pid of the handler starter process (temp): pid()
handler, % Pid of the handler process: pid()
from, % From for the request: from()
- state % State of the handler: initiating | operational
+ state % State of the handler: initiating | operational | canceled
}).
%% Entries in the handler / request cross-ref table
@@ -181,6 +182,7 @@ request_canceled(RequestId, ProfileName) ->
insert_session(Session, ProfileName) ->
SessionDbName = session_db_name(ProfileName),
+ ?hcrt("insert session", [{session, Session}, {profile, ProfileName}]),
ets:insert(SessionDbName, Session).
@@ -196,6 +198,7 @@ insert_session(Session, ProfileName) ->
delete_session(SessionId, ProfileName) ->
SessionDbName = session_db_name(ProfileName),
+ ?hcrt("delete session", [{session_is, SessionId}, {profile, ProfileName}]),
ets:delete(SessionDbName, SessionId).
@@ -263,6 +266,19 @@ which_cookies(Url, ProfileName) ->
%%--------------------------------------------------------------------
+%% Function: info(ProfileName) -> list()
+%%
+%% ProfileName = atom()
+%%
+%% Description: Retrieves various info about the manager and the
+%% handlers it manages
+%%--------------------------------------------------------------------
+
+info(ProfileName) ->
+ call(ProfileName, info).
+
+
+%%--------------------------------------------------------------------
%% Function: session_type(Options) -> ok
%%
%% Options = #options{}
@@ -342,10 +358,8 @@ handle_call({request, Request}, _From, State) ->
{reply, {ok, ReqId}, NewState};
Error ->
- %% This is way too severe
- %% To crash the manager simply because
- %% it failed to properly handle a request
- {stop, Error, httpc_response:error(Request, Error), State}
+ NewError = {error, {failed_process_request, Error}},
+ {reply, NewError, State}
end;
handle_call({cancel_request, RequestId}, From,
@@ -377,17 +391,17 @@ handle_call({cancel_request, RequestId}, From,
end;
-handle_call(reset_cookies, _, #state{cookie_db = CookieDb} = State) ->
+handle_call(reset_cookies, _, #state{cookie_db = CookieDb} = State) ->
?hcrv("reset cookies", []),
httpc_cookie:reset_db(CookieDb),
{reply, ok, State};
-handle_call(which_cookies, _, #state{cookie_db = CookieDb} = State) ->
+handle_call(which_cookies, _, #state{cookie_db = CookieDb} = State) ->
?hcrv("which cookies", []),
CookieHeaders = httpc_cookie:which_cookies(CookieDb),
{reply, CookieHeaders, State};
-handle_call({which_cookies, Url}, _, #state{cookie_db = CookieDb} = State) ->
+handle_call({which_cookies, Url}, _, #state{cookie_db = CookieDb} = State) ->
?hcrv("which cookies", [{url, Url}]),
case http_uri:parse(Url) of
{Scheme, _, Host, Port, Path, _} ->
@@ -398,6 +412,11 @@ handle_call({which_cookies, Url}, _, #state{cookie_db = CookieDb} = State) ->
{reply, Msg, State}
end;
+handle_call(info, _, State) ->
+ ?hcrv("info", []),
+ Info = get_manager_info(State),
+ {reply, Info, State};
+
handle_call(Req, From, #state{profile_name = ProfileName} = State) ->
error_report(ProfileName,
"received unkown request"
@@ -428,17 +447,29 @@ handle_cast({retry_or_redirect_request, {Time, Request}},
{noreply, State}
end;
-handle_cast({retry_or_redirect_request, Request}, State) ->
+handle_cast({retry_or_redirect_request, Request},
+ #state{profile_name = Profile,
+ handler_db = HandlerDb} = State) ->
?hcrv("retry or redirect request", [{request, Request}]),
case (catch handle_request(Request, State)) of
{ok, _, NewState} ->
{noreply, NewState};
Error ->
- %% This is *way* too severe.
- %% To crash the manager simply because
- %% it failed to properly handle *one* request
- {stop, Error, State}
+ ReqId = Request#request.id,
+ error_report(Profile,
+ "failed to retry or redirect request ~p"
+ "~n Error: ~p", [ReqId, Error]),
+ case ets:lookup(HandlerDb, ReqId) of
+ [#handler_info{from = From}] ->
+ Error2 = httpc_response:error(Request, Error),
+ httpc_response:send(From, Error2),
+ ok;
+
+ _ ->
+ ok
+ end,
+ {noreply, State}
end;
handle_cast({request_canceled, RequestId}, State) ->
@@ -468,7 +499,8 @@ handle_cast({set_options, Options}, State = #state{options = OldOptions}) ->
ipfamily = get_ipfamily(Options, OldOptions),
ip = get_ip(Options, OldOptions),
port = get_port(Options, OldOptions),
- verbose = get_verbose(Options, OldOptions)
+ verbose = get_verbose(Options, OldOptions),
+ socket_opts = get_socket_opts(Options, OldOptions)
},
case {OldOptions#options.verbose, NewOptions#options.verbose} of
{Same, Same} ->
@@ -572,6 +604,32 @@ code_change(_OldVsn, State, _Extra) ->
%% Internal functions
%%--------------------------------------------------------------------
+get_manager_info(#state{handler_db = HDB,
+ cookie_db = CDB} = _State) ->
+ HandlerInfo = get_handler_info(HDB),
+ CookieInfo = httpc_cookie:which_cookies(CDB),
+ [{handlers, HandlerInfo}, {cookies, CookieInfo}].
+
+get_handler_info(Tab) ->
+ Pattern = #handler_info{handler = '$1',
+ state = '$2',
+ _ = '_'},
+ Handlers1 = [{Pid, State} || [Pid, State] <- ets:match(Tab, Pattern)],
+ F = fun({Pid, State} = Elem, Acc) when State =/= canceled ->
+ case lists:keymember(Pid, 1, Acc) of
+ true ->
+ Acc;
+ false ->
+ [Elem | Acc]
+ end;
+ (_, Acc) ->
+ Acc
+ end,
+ Handlers2 = lists:foldl(F, [], Handlers1),
+ Handlers3 = [{Pid, State, httpc_handler:info(Pid)} ||
+ {Pid, State} <- Handlers2],
+ Handlers3.
+
%%
%% The request handler process is started asynchronously by a
@@ -606,7 +664,7 @@ handle_connect_and_send(_StarterPid, ReqId, HandlerPid, Result,
"send request ~p"
"~n Error: ~p", [HandlerPid, ReqId, Result]),
?hcri("received connect-and-send error", [{result, Result}]),
- Reason2 =
+ Reason2 =
case Result of
{error, Reason} ->
{failed_connecting, Reason};
@@ -747,7 +805,10 @@ select_session(Method, HostPort, Scheme, SessionType,
type = SessionType},
%% {'_', {HostPort, '$1'}, false, Scheme, '_', '$2', SessionTyp},
Candidates = ets:match(SessionDb, Pattern),
- ?hcrd("select session", [{candidates, Candidates}]),
+ ?hcrd("select session", [{host_port, HostPort},
+ {scheme, Scheme},
+ {type, SessionType},
+ {candidates, Candidates}]),
select_session(Candidates, MaxKeepAlive, MaxPipe, SessionType);
false ->
no_connection
@@ -776,20 +837,30 @@ pipeline_or_keep_alive(#request{id = Id} = Request, HandlerPid, State) ->
?hcrd("pipeline of keep-alive", [{id, Id}, {handler, HandlerPid}]),
case (catch httpc_handler:send(Request, HandlerPid)) of
ok ->
- ?hcrd("pipeline of keep-alive - successfully sent", []),
+ ?hcrd("pipeline or keep-alive - successfully sent", []),
Entry = #handler_info{id = Id,
handler = HandlerPid,
state = operational},
ets:insert(State#state.handler_db, Entry);
_ -> %% timeout pipelining failed
- ?hcrd("pipeline of keep-alive - failed sending -> "
+ ?hcrd("pipeline or keep-alive - failed sending -> "
"start a new handler", []),
create_handler_starter(Request, State)
end.
-create_handler_starter(#request{id = Id, from = From} = Request,
+create_handler_starter(#request{socket_opts = SocketOpts} = Request,
+ #state{options = Options} = State)
+ when is_list(SocketOpts) ->
+ %% The user provided us with (override) socket options
+ ?hcrt("create handler starter", [{socket_opts, SocketOpts}, {options, Options}]),
+ Options2 = Options#options{socket_opts = SocketOpts},
+ create_handler_starter(Request#request{socket_opts = undefined},
+ State#state{options = Options2});
+
+create_handler_starter(#request{id = Id,
+ from = From} = Request,
#state{profile_name = ProfileName,
options = Options,
handler_db = HandlerDb} = _State) ->
@@ -858,8 +929,8 @@ generate_request_id(Request) ->
RequestId = make_ref(),
Request#request{id = RequestId};
_ ->
- %% This is an automatic redirect or a retryed pipelined
- %% request keep the old id.
+ %% This is an automatic redirect or a retryed pipelined request
+ %% => keep the old id.
Request
end.
@@ -960,6 +1031,9 @@ get_port(Opts, #options{port = Default}) ->
get_verbose(Opts, #options{verbose = Default}) ->
proplists:get_value(verbose, Opts, Default).
+get_socket_opts(Opts, #options{socket_opts = Default}) ->
+ proplists:get_value(socket_opts, Opts, Default).
+
handle_verbose(debug) ->
dbg:p(self(), [call]),
diff --git a/lib/inets/src/http_client/httpc_request.erl b/lib/inets/src/http_client/httpc_request.erl
index f15c5d4381..55e0af4b42 100644
--- a/lib/inets/src/http_client/httpc_request.erl
+++ b/lib/inets/src/http_client/httpc_request.erl
@@ -39,24 +39,37 @@
%%
%% Description: Composes and sends a HTTP-request.
%%-------------------------------------------------------------------------
-send(SendAddr, #request{method = Method,
- scheme = Scheme,
- path = Path,
- pquery = Query,
- headers = Headers,
- content = Content,
- address = Address,
- abs_uri = AbsUri,
- headers_as_is = HeadersAsIs,
- settings = HttpOptions,
- userinfo = UserInfo},
- Socket) ->
+send(SendAddr, #request{scheme = Scheme, socket_opts = SocketOpts} = Request,
+ Socket)
+ when is_list(SocketOpts) ->
+ SocketType = socket_type(Scheme),
+ case http_transport:setopts(SocketType, Socket, SocketOpts) of
+ ok ->
+ send(SendAddr, Socket, SocketType,
+ Request#request{socket_opts = undefined});
+ {error, Reason} ->
+ {error, {setopts_failed, Reason}}
+ end;
+send(SendAddr, #request{scheme = Scheme} = Request, Socket) ->
+ SocketType = socket_type(Scheme),
+ send(SendAddr, Socket, SocketType, Request).
+
+send(SendAddr, Socket, SocketType,
+ #request{method = Method,
+ path = Path,
+ pquery = Query,
+ headers = Headers,
+ content = Content,
+ address = Address,
+ abs_uri = AbsUri,
+ headers_as_is = HeadersAsIs,
+ settings = HttpOptions,
+ userinfo = UserInfo}) ->
?hcrt("send",
[{send_addr, SendAddr},
{socket, Socket},
{method, Method},
- {scheme, Scheme},
{path, Path},
{pquery, Query},
{headers, Headers},
@@ -95,7 +108,8 @@ send(SendAddr, #request{method = Method,
?hcrd("send", [{message, Message}]),
- http_transport:send(socket_type(Scheme), Socket, lists:append(Message)).
+ http_transport:send(SocketType, Socket, lists:append(Message)).
+
%%-------------------------------------------------------------------------
diff --git a/lib/inets/src/http_lib/http_transport.erl b/lib/inets/src/http_lib/http_transport.erl
index 27a950174f..7c2ac626e6 100644
--- a/lib/inets/src/http_lib/http_transport.erl
+++ b/lib/inets/src/http_lib/http_transport.erl
@@ -16,17 +16,33 @@
%%
%% %CopyrightEnd%
%%
-%
+
-module(http_transport).
% Internal application API
--export([start/1, connect/3, connect/4, listen/2, listen/3,
- accept/2, accept/3, close/2,
- send/3, controlling_process/3, setopts/3,
- peername/2, resolve/0]).
+-export([
+ start/1,
+ connect/3, connect/4,
+ listen/2, listen/3,
+ accept/2, accept/3,
+ close/2,
+ send/3,
+ controlling_process/3,
+ setopts/3, getopts/2, getopts/3,
+ getstat/2,
+ peername/2, sockname/2,
+ resolve/0
+ ]).
-export([negotiate/3]).
+-include("inets_internal.hrl").
+-define(SERVICE, httpl).
+-define(hlri(Label, Content), ?report_important(Label, ?SERVICE, Content)).
+-define(hlrv(Label, Content), ?report_verbose(Label, ?SERVICE, Content)).
+-define(hlrd(Label, Content), ?report_debug(Label, ?SERVICE, Content)).
+-define(hlrt(Label, Content), ?report_trace(Label, ?SERVICE, Content)).
+
%%%=========================================================================
%%% Internal application API
@@ -77,14 +93,22 @@ connect(SocketType, Address, Opts) ->
connect(ip_comm = _SocketType, {Host, Port}, Opts0, Timeout)
when is_list(Opts0) ->
Opts = [binary, {packet, 0}, {active, false}, {reuseaddr, true} | Opts0],
+ ?hlrt("connect using gen_tcp",
+ [{host, Host}, {port, Port}, {opts, Opts}, {timeout, Timeout}]),
gen_tcp:connect(Host, Port, Opts, Timeout);
connect({ssl, SslConfig}, {Host, Port}, _, Timeout) ->
Opts = [binary, {active, false}] ++ SslConfig,
+ ?hlrt("connect using ssl",
+ [{host, Host}, {port, Port}, {ssl_config, SslConfig},
+ {timeout, Timeout}]),
ssl:connect(Host, Port, Opts, Timeout);
connect({erl_ssl, SslConfig}, {Host, Port}, _, Timeout) ->
Opts = [binary, {active, false}, {ssl_imp, new}] ++ SslConfig,
+ ?hlrt("connect using erl_ssl",
+ [{host, Host}, {port, Port}, {ssl_config, SslConfig},
+ {timeout, Timeout}]),
ssl:connect(Host, Port, Opts, Timeout).
@@ -209,6 +233,7 @@ accept(ip_comm, ListenSocket, Timeout) ->
accept({ssl,_SSLConfig}, ListenSocket, Timeout) ->
ssl:transport_accept(ListenSocket, Timeout).
+
%%-------------------------------------------------------------------------
%% controlling_process(SocketType, Socket, NewOwner) -> ok | {error, Reason}
%% SocketType = ip_comm | {ssl, _}
@@ -222,6 +247,7 @@ controlling_process(ip_comm, Socket, NewOwner) ->
controlling_process({ssl, _}, Socket, NewOwner) ->
ssl:controlling_process(Socket, NewOwner).
+
%%-------------------------------------------------------------------------
%% setopts(SocketType, Socket, Options) -> ok | {error, Reason}
%% SocketType = ip_comm | {ssl, _}
@@ -231,10 +257,62 @@ controlling_process({ssl, _}, Socket, NewOwner) ->
%% gen_tcp or ssl.
%%-------------------------------------------------------------------------
setopts(ip_comm, Socket, Options) ->
- inet:setopts(Socket,Options);
+ ?hlrt("ip_comm setopts", [{socket, Socket}, {options, Options}]),
+ inet:setopts(Socket, Options);
setopts({ssl, _}, Socket, Options) ->
+ ?hlrt("ssl setopts", [{socket, Socket}, {options, Options}]),
ssl:setopts(Socket, Options).
+
+%%-------------------------------------------------------------------------
+%% getopts(SocketType, Socket [, Opts]) -> ok | {error, Reason}
+%% SocketType = ip_comm | {ssl, _}
+%% Socket = socket()
+%% Opts = socket_options()
+%% Description: Gets the values for some options.
+%%-------------------------------------------------------------------------
+getopts(SocketType, Socket) ->
+ Opts = [packet, packet_size, recbuf, sndbuf, priority, tos, send_timeout],
+ getopts(SocketType, Socket, Opts).
+
+getopts(ip_comm, Socket, Options) ->
+ ?hlrt("ip_comm getopts", [{socket, Socket}, {options, Options}]),
+ case inet:getopts(Socket, Options) of
+ {ok, SocketOpts} ->
+ SocketOpts;
+ {error, _} ->
+ []
+ end;
+getopts({ssl, _}, Socket, Options) ->
+ ?hlrt("ssl getopts", [{socket, Socket}, {options, Options}]),
+ case ssl:getopts(Socket, Options) of
+ {ok, SocketOpts} ->
+ SocketOpts;
+ {error, _} ->
+ []
+ end.
+
+
+%%-------------------------------------------------------------------------
+%% getstat(SocketType, Socket) -> socket_stats()
+%% SocketType = ip_comm | {ssl, _}
+%% Socket = socket()
+%% socket_stats() = list()
+%% Description: Gets the socket stats values for the socket
+%%-------------------------------------------------------------------------
+getstat(ip_comm = _SocketType, Socket) ->
+ ?hlrt("ip_comm getstat", [{socket, Socket}]),
+ case inet:getstat(Socket) of
+ {ok, Stats} ->
+ Stats;
+ {error, _} ->
+ []
+ end;
+getstat({ssl, _} = _SocketType, _Socket) ->
+ %% ?hlrt("ssl getstat", [{socket, Socket}]),
+ [].
+
+
%%-------------------------------------------------------------------------
%% send(RequestOrSocketType, Socket, Message) -> ok | {error, Reason}
%% SocketType = ip_comm | {ssl, _}
@@ -261,9 +339,11 @@ close({ssl, _}, Socket) ->
ssl:close(Socket).
%%-------------------------------------------------------------------------
-%% peername(SocketType, Socket) -> ok | {error, Reason}
+%% peername(SocketType, Socket) -> {Port, SockName}
%% SocketType = ip_comm | {ssl, _}
%% Socket = socket()
+%% Port = integer() (-1 if error occured)
+%% PeerName = string()
%%
%% Description: Returns the address and port for the other end of a
%% connection, usning either gen_tcp or ssl.
@@ -298,6 +378,48 @@ peername({ssl, _}, Socket) ->
{-1, "unknown"}
end.
+
+%%-------------------------------------------------------------------------
+%% sockname(SocketType, Socket) -> {Port, SockName}
+%% SocketType = ip_comm | {ssl, _}
+%% Socket = socket()
+%% Port = integer() (-1 if error occured)
+%% SockName = string()
+%%
+%% Description: Returns the address and port for the local (our) end
+%% other end of connection, using either gen_tcp or ssl.
+%%-------------------------------------------------------------------------
+sockname(ip_comm, Socket) ->
+ case inet:sockname(Socket) of
+ {ok,{{A, B, C, D}, Port}} ->
+ SockName = integer_to_list(A)++"."++integer_to_list(B)++"."++
+ integer_to_list(C)++"."++integer_to_list(D),
+ {Port, SockName};
+ {ok,{{A, B, C, D, E, F, G, H}, Port}} ->
+ SockName = http_util:integer_to_hexlist(A) ++ ":"++
+ http_util:integer_to_hexlist(B) ++ ":" ++
+ http_util:integer_to_hexlist(C) ++ ":" ++
+ http_util:integer_to_hexlist(D) ++ ":" ++
+ http_util:integer_to_hexlist(E) ++ ":" ++
+ http_util:integer_to_hexlist(F) ++ ":" ++
+ http_util:integer_to_hexlist(G) ++":"++
+ http_util:integer_to_hexlist(H),
+ {Port, SockName};
+ {error, _} ->
+ {-1, "unknown"}
+ end;
+
+sockname({ssl, _}, Socket) ->
+ case ssl:sockname(Socket) of
+ {ok,{{A, B, C, D}, Port}} ->
+ SockName = integer_to_list(A)++"."++integer_to_list(B)++"."++
+ integer_to_list(C)++"."++integer_to_list(D),
+ {Port, SockName};
+ {error, _} ->
+ {-1, "unknown"}
+ end.
+
+
%%-------------------------------------------------------------------------
%% resolve() -> HostName
%% HostName = string()
diff --git a/lib/inets/test/ftp_SUITE_data/TAR.exclude b/lib/inets/test/ftp_SUITE_data/TAR.exclude
deleted file mode 100644
index 2078965740..0000000000
--- a/lib/inets/test/ftp_SUITE_data/TAR.exclude
+++ /dev/null
@@ -1,2 +0,0 @@
-ftp_SUITE_data/TAR.exclude
-ftp_SUITE_data/ftpd_hosts
diff --git a/lib/inets/test/ftp_SUITE_data/ftpd_hosts.skel b/lib/inets/test/ftp_SUITE_data/ftpd_hosts.skel
index a820f8d014..75096ce687 100644
--- a/lib/inets/test/ftp_SUITE_data/ftpd_hosts.skel
+++ b/lib/inets/test/ftp_SUITE_data/ftpd_hosts.skel
@@ -1,17 +1,18 @@
%% Add a host name in the appropriate list
%% Each "platform" contains a list of hostnames (a string) that can
%% be used for testing the ftp client.
-[{solaris8_sparc, []},
- {solaris9_sparc, []},
- {solaris10_sparc, []},
- {solaris10_x86, []},
- {linux_x86, []},
- {linux_ppc, []},
- {macosx_ppc, []},
- {macosx_x86, []},
+%% The definition below are an example!!
+[{solaris8_sparc, ["solaris8_sparc_dummy1", "solaris8_sparc_dummy2"]},
+ {solaris9_sparc, ["solaris9_sparc_dummy1"]},
+ {solaris10_sparc, ["solaris10_sparc_dummy1"]},
+ {solaris10_x86, ["solaris10_x86_dummy1", "solaris10_x86_dummy2"]},
+ {linux_x86, ["linux_x86_dummy1", "linux_x86_dummy2"]},
+ {linux_ppc, ["linux_ppc_dummy1"]},
+ {macosx_ppc, ["macosx_ppc_dummy1"]},
+ {macosx_x86, ["macosx_x86_dummy1", "macosx_x86_dummy2"]},
{openbsd_x86, []},
- {freebsd_x86, []},
+ {freebsd_x86, ["freebsd_x86_dummy1"]},
{netbsd_x86, []},
{windows_xp, []},
- {windows_2003_server, []},
- {ticket_test, []}].
+ {windows_2003_server, ["win2003_dummy1"]},
+ {ticket_test, ["solaris8_x86_dummy1", "linux_x86_dummy1"]}].
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 4914a16264..96099c49fd 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -164,7 +164,7 @@ end_per_suite(Config) ->
%%--------------------------------------------------------------------
%% Function: init_per_testcase(Case, Config) -> Config
-% Case - atom()
+%% Case - atom()
%% Name of the test case that is about to be run.
%% Config - [tuple()]
%% A list of key/value pairs, holding the test case configuration.
@@ -234,6 +234,7 @@ init_per_testcase(Case, Timeout, Config) ->
http:set_options([{proxy, {{?PROXY, ?PROXY_PORT},
["localhost", ?IPV6_LOCAL_HOST]}}]),
inets:enable_trace(max, io, httpc),
+ %% inets:enable_trace(max, io, all),
%% snmp:set_trace([gen_tcp, inet_tcp, prim_inet]),
NewConfig.
@@ -282,6 +283,7 @@ tickets(suite) ->
otp_8154,
otp_8106,
otp_8056,
+ otp_8352,
otp_8371
].
@@ -977,6 +979,29 @@ http_redirect(Config) when is_list(Config) ->
"~n ~p", [URL302]),
{ok, {{_,200,_}, [_ | _], [_|_]}}
= http:request(get, {URL302, []}, [], []),
+ case http:request(get, {URL302, []}, [], []) of
+ {ok, Reply7} ->
+ case Reply7 of
+ {{_,200,_}, [_ | _], [_|_]} ->
+ tsp("http_redirect -> "
+ "expected reply for request 7"),
+ ok;
+ {StatusLine, Headers, Body} ->
+ tsp("http_redirect -> "
+ "unexpected reply for request 7: "
+ "~n StatusLine: ~p"
+ "~n Headers: ~p"
+ "~n Body: ~p",
+ [StatusLine, Headers, Body]),
+ tsf({unexpected_reply, Reply7})
+ end;
+ Error7 ->
+ tsp("http_redirect -> "
+ "unexpected result for request 7: "
+ "~n Error7: ~p",
+ [Error7]),
+ tsf({unexpected_result, Error7})
+ end,
tsp("http_redirect -> issue request 7: "
"~n ~p", [URL302]),
@@ -1019,6 +1044,7 @@ http_redirect(Config) when is_list(Config) ->
end.
+
%%-------------------------------------------------------------------------
http_redirect_loop(doc) ->
["Test redirect loop detection"];
@@ -1197,26 +1223,42 @@ proxy_emulate_lower_versions(suite) ->
proxy_emulate_lower_versions(Config) when is_list(Config) ->
case ?config(skip, Config) of
undefined ->
- {ok, Body0 = [_| _]} = http:request(get, {?PROXY_URL, []},
- [{version, "HTTP/0.9"}], []),
- inets_test_lib:check_body(Body0),
+ Result09 = pelv_get("HTTP/0.9"),
+ case Result09 of
+ {ok, [_| _] = Body0} ->
+ inets_test_lib:check_body(Body0),
+ ok;
+ _ ->
+ tsf({unexpected_result, "HTTP/0.9", Result09})
+ end,
%% We do not check the version here as many servers
%% do not behave according to the rfc and send
%% 1.1 in its response.
- {ok,{{_, 200, _}, [_ | _], Body1 = [_ | _]}} =
- http:request(get, {?PROXY_URL, []},
- [{version, "HTTP/1.0"}], []),
- inets_test_lib:check_body(Body1),
-
- {ok, {{"HTTP/1.1", 200, _}, [_ | _], Body2 = [_ | _]}} =
- http:request(get, {?PROXY_URL, []},
- [{version, "HTTP/1.1"}], []),
- inets_test_lib:check_body(Body2);
+ Result10 = pelv_get("HTTP/1.0"),
+ case Result10 of
+ {ok,{{_, 200, _}, [_ | _], Body1 = [_ | _]}} ->
+ inets_test_lib:check_body(Body1),
+ ok;
+ _ ->
+ tsf({unexpected_result, "HTTP/1.0", Result10})
+ end,
+
+ Result11 = pelv_get("HTTP/1.1"),
+ case Result11 of
+ {ok, {{"HTTP/1.1", 200, _}, [_ | _], Body2 = [_ | _]}} ->
+ inets_test_lib:check_body(Body2);
+ _ ->
+ tsf({unexpected_result, "HTTP/1.1", Result11})
+ end;
+
Reason ->
{skip, Reason}
end.
+pelv_get(Version) ->
+ http:request(get, {?PROXY_URL, []}, [{version, Version}], []).
+
%%-------------------------------------------------------------------------
proxy_trace(doc) ->
["Perform a TRACE request that goes through a proxy."];
@@ -2275,6 +2317,72 @@ otp_8056(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
+otp_8352(doc) ->
+ "OTP-8352";
+otp_8352(suite) ->
+ [];
+otp_8352(Config) when is_list(Config) ->
+ tsp("otp_8352 -> entry with"
+ "~n Config: ~p", [Config]),
+ case ?config(local_server, Config) of
+ ok ->
+ tsp("local-server running"),
+
+ tsp("initial profile info(1): ~p", [httpc:info()]),
+
+ MaxSessions = 5,
+ MaxKeepAlive = 10,
+ KeepAliveTimeout = timer:minutes(2),
+ ConnOptions = [{max_sessions, MaxSessions},
+ {max_keep_alive_length, MaxKeepAlive},
+ {keep_alive_timeout, KeepAliveTimeout}],
+ http:set_options(ConnOptions),
+
+ Method = get,
+ Port = ?config(local_port, Config),
+ URL = ?URL_START ++ integer_to_list(Port) ++ "/dummy.html",
+ Request = {URL, []},
+ Timeout = timer:seconds(1),
+ ConnTimeout = Timeout + timer:seconds(1),
+ HttpOptions1 = [{timeout, Timeout}, {connect_timeout, ConnTimeout}],
+ Options1 = [{socket_opts, [{tos, 87},
+ {recbuf, 16#FFFF},
+ {sndbuf, 16#FFFF}]}],
+ case http:request(Method, Request, HttpOptions1, Options1) of
+ {ok, {{_,200,_}, [_ | _], ReplyBody1 = [_ | _]}} ->
+ %% equivaliant to http:request(get, {URL, []}, [], []),
+ inets_test_lib:check_body(ReplyBody1);
+ {ok, UnexpectedReply1} ->
+ tsf({unexpected_reply, UnexpectedReply1});
+ {error, _} = Error1 ->
+ tsf({bad_reply, Error1})
+ end,
+
+ tsp("profile info (2): ~p", [httpc:info()]),
+
+ HttpOptions2 = [],
+ Options2 = [{socket_opts, [{tos, 84},
+ {recbuf, 32#1FFFF},
+ {sndbuf, 32#1FFFF}]}],
+ case http:request(Method, Request, HttpOptions2, Options2) of
+ {ok, {{_,200,_}, [_ | _], ReplyBody2 = [_ | _]}} ->
+ %% equivaliant to http:request(get, {URL, []}, [], []),
+ inets_test_lib:check_body(ReplyBody2);
+ {ok, UnexpectedReply2} ->
+ tsf({unexpected_reply, UnexpectedReply2});
+ {error, _} = Error2 ->
+ tsf({bad_reply, Error2})
+ end,
+ tsp("profile info (3): ~p", [httpc:info()]),
+ ok;
+
+ _ ->
+ {skip, "Failed to start local http-server"}
+ end.
+
+
+%%-------------------------------------------------------------------------
+
otp_8371(doc) ->
["OTP-8371"];
otp_8371(suite) ->
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index 34c18c4d13..746517eed5 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -19,7 +19,7 @@
APPLICATION = inets
INETS_VSN = 5.3
-PRE_VSN =-p10
+PRE_VSN =-p13
APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"
TICKETS = \
@@ -32,6 +32,7 @@ TICKETS = \
OTP-8327 \
OTP-8349 \
OTP-8351 \
+ OTP-8352 \
OTP-8359 \
OTP-8371
diff --git a/lib/jinterface/doc/src/Makefile b/lib/jinterface/doc/src/Makefile
index c4cfde0e9c..acd5307dee 100644
--- a/lib/jinterface/doc/src/Makefile
+++ b/lib/jinterface/doc/src/Makefile
@@ -2,20 +2,20 @@
#
# %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%
#
include $(ERL_TOP)/make/target.mk
@@ -53,6 +53,9 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
+XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
GIF_FILES = \
notes.gif \
ref_man.gif \
diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl
index fef11d7e6e..89d893f8c1 100644
--- a/lib/kernel/src/code.erl
+++ b/lib/kernel/src/code.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(code).
@@ -63,7 +63,7 @@
which/1,
where_is_file/1,
where_is_file/2,
- set_primary_archive/2,
+ set_primary_archive/3,
clash/0]).
-include_lib("kernel/include/file.hrl").
@@ -101,7 +101,7 @@
%% unstick_dir(Dir) -> ok | error
%% is_sticky(Module) -> true | false
%% which(Module) -> Filename
-%% set_primary_archive((FileName, Bin) -> ok | {error, Reason}
+%% set_primary_archive((FileName, Bin, FileInfo) -> ok | {error, Reason}
%% clash() -> -> print out
%%----------------------------------------------------------------------------
@@ -420,11 +420,15 @@ where_is_file(Path, File) when is_list(Path), is_list(File) ->
which(File, ".", Path)
end.
--spec set_primary_archive(ArchiveFile :: file:filename(), ArchiveBin :: binary()) -> 'ok' | {'error', atom()}.
+-spec set_primary_archive(ArchiveFile :: file:filename(),
+ ArchiveBin :: binary(),
+ FileInfo :: #file_info{})
+ -> 'ok' | {'error', atom()}.
-set_primary_archive(ArchiveFile0, ArchiveBin) when is_list(ArchiveFile0), is_binary(ArchiveBin) ->
+set_primary_archive(ArchiveFile0, ArchiveBin, FileInfo)
+ when is_list(ArchiveFile0), is_binary(ArchiveBin), is_record(FileInfo, file_info) ->
ArchiveFile = filename:absname(ArchiveFile0),
- case call({set_primary_archive, ArchiveFile, ArchiveBin}) of
+ case call({set_primary_archive, ArchiveFile, ArchiveBin, FileInfo}) of
{ok, []} ->
ok;
{ok, _Mode, Ebins} ->
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index d4e3f0bcf8..7aeddb73d1 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1998-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(code_server).
@@ -384,8 +384,8 @@ handle_call(stop,{_From,_Tag}, S) ->
handle_call({is_cached,_File}, {_From,_Tag}, S=#state{cache=no_cache}) ->
{reply, no, S};
-handle_call({set_primary_archive, File, ArchiveBin}, {_From,_Tag}, S=#state{mode=Mode}) ->
- case erl_prim_loader:set_primary_archive(File, ArchiveBin) of
+handle_call({set_primary_archive, File, ArchiveBin, FileInfo}, {_From,_Tag}, S=#state{mode=Mode}) ->
+ case erl_prim_loader:set_primary_archive(File, ArchiveBin, FileInfo) of
{ok, Files} ->
{reply, {ok, Mode, Files}, S};
{error, Reason} ->
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index 7e26d57ced..42eab67478 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -96,6 +96,14 @@ load_hipe_modules() ->
%% code:load_file/1) and the atom `no_native' on failure.
load_native_code(Mod, Bin) when is_atom(Mod), is_binary(Bin) ->
+ erlang:system_flag(multi_scheduling, block),
+ try
+ load_native_code_nosmp(Mod, Bin)
+ after
+ erlang:system_flag(multi_scheduling, unblock)
+ end.
+
+load_native_code_nosmp(Mod, Bin) ->
Architecture = erlang:system_info(hipe_architecture),
try chunk_name(Architecture) of
ChunkTag ->
@@ -120,6 +128,14 @@ load_native_code(Mod, Bin) when is_atom(Mod), is_binary(Bin) ->
-spec post_beam_load(atom()) -> 'ok'.
post_beam_load(Mod) when is_atom(Mod) ->
+ erlang:system_flag(multi_scheduling, block),
+ try
+ post_beam_load_nosmp(Mod)
+ after
+ erlang:system_flag(multi_scheduling, unblock)
+ end.
+
+post_beam_load_nosmp(Mod) ->
Architecture = erlang:system_info(hipe_architecture),
try chunk_name(Architecture) of _ChunkTag -> patch_to_emu(Mod)
catch _:_ -> ok
@@ -141,6 +157,14 @@ version_check(Version, Mod) when is_atom(Mod) ->
-spec load_module(Mod, binary(), _) -> 'bad_crc' | {'module',Mod}
when is_subtype(Mod,atom()).
load_module(Mod, Bin, Beam) ->
+ erlang:system_flag(multi_scheduling, block),
+ try
+ load_module_nosmp(Mod, Bin, Beam)
+ after
+ erlang:system_flag(multi_scheduling, unblock)
+ end.
+
+load_module_nosmp(Mod, Bin, Beam) ->
load_module(Mod, Bin, Beam, []).
load_module(Mod, Bin, Beam, OldReferencesToPatch) ->
@@ -154,6 +178,14 @@ load_module(Mod, Bin, Beam, OldReferencesToPatch) ->
-spec load(Mod, binary()) -> 'bad_crc' | {'module',Mod}
when is_subtype(Mod,atom()).
load(Mod, Bin) ->
+ erlang:system_flag(multi_scheduling, block),
+ try
+ load_nosmp(Mod, Bin)
+ after
+ erlang:system_flag(multi_scheduling, unblock)
+ end.
+
+load_nosmp(Mod, Bin) ->
?debug_msg("********* Loading funs in module ~w *********\n",[Mod]),
%% Loading just some functions in a module; patch closures separately.
put(hipe_patch_closures, true),
diff --git a/lib/kernel/test/erl_prim_loader_SUITE.erl b/lib/kernel/test/erl_prim_loader_SUITE.erl
index 4d090f4db5..19c84ab34c 100644
--- a/lib/kernel/test/erl_prim_loader_SUITE.erl
+++ b/lib/kernel/test/erl_prim_loader_SUITE.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(erl_prim_loader_SUITE).
@@ -27,7 +27,7 @@
inet_existing/1, inet_coming_up/1, inet_disconnects/1,
multiple_slaves/1, file_requests/1,
local_archive/1, remote_archive/1,
- primary_archive/1]).
+ primary_archive/1, virtual_dir_in_archive/1]).
-export([init_per_testcase/2, fin_per_testcase/2]).
@@ -41,10 +41,11 @@ all(suite) ->
inet_existing, inet_coming_up,
inet_disconnects, multiple_slaves,
file_requests, local_archive,
- remote_archive, primary_archive
+ remote_archive, primary_archive,
+ virtual_dir_in_archive
].
-init_per_testcase(Func, Config) when atom(Func), list(Config) ->
+init_per_testcase(Func, Config) when is_atom(Func), is_list(Config) ->
Dog=?t:timetrap(?t:minutes(3)),
[{watchdog, Dog}|Config].
@@ -81,7 +82,7 @@ set_path(Config) when is_list(Config) ->
get_file(doc) -> [];
get_file(Config) when is_list(Config) ->
?line case erl_prim_loader:get_file("lists" ++ code:objfile_extension()) of
- {ok,Bin,File} when binary(Bin), list(File) ->
+ {ok,Bin,File} when is_binary(Bin), is_list(File) ->
ok;
_ ->
test_server:fail(get_valid_file)
@@ -344,8 +345,9 @@ local_archive(Config) when is_list(Config) ->
Node = node(),
BeamName = "inet.beam",
?line ok = test_archive(Node, Archive, KernelDir, BeamName),
- ?line ok = rpc:call(Node, erl_prim_loader, release_archives, []),
+ %% Cleanup
+ ?line ok = rpc:call(Node, erl_prim_loader, release_archives, []),
?line ok = file:delete(Archive),
ok.
@@ -365,6 +367,7 @@ remote_archive(Config) when is_list(Config) ->
BeamName = "inet.beam",
?line ok = test_archive(Node, Archive, KernelDir, BeamName),
+ %% Cleanup
?line stop_node(Node),
?line unlink(BootPid),
?line exit(BootPid, kill),
@@ -401,21 +404,22 @@ primary_archive(Config) when is_list(Config) ->
?line Args = " -setcookie " ++ Cookie,
?line {ok,Node} = start_node(primary_archive, Args),
?line wait_really_started(Node, 25),
+ ?line {_,_,_} = rpc:call(Node, erlang, date, []),
%% Set primary archive
- ?line {_,_,_} = rpc:call(Node, erlang, date, []),
- ?line {ok, Ebins} = rpc:call(Node, erl_prim_loader, set_primary_archive, [Archive, ArchiveBin]),
ExpectedEbins = [Archive, DictDir ++ "/ebin", DummyDir ++ "/ebin"],
io:format("ExpectedEbins: ~p\n", [ExpectedEbins]),
- ?line ExpectedEbins = lists:sort(Ebins),
+ ?line {ok, FileInfo} = prim_file:read_file_info(Archive),
+ ?line {ok, Ebins} = rpc:call(Node, erl_prim_loader, set_primary_archive, [Archive, ArchiveBin, FileInfo]),
+ ?line ExpectedEbins = lists:sort(Ebins), % assert
?line {ok, TopFiles2} = rpc:call(Node, erl_prim_loader, list_dir, [Archive]),
?line [DictDir, DummyDir] = lists:sort(TopFiles2),
BeamName = "primary_archive_dict_app.beam",
?line ok = test_archive(Node, Archive, DictDir, BeamName),
- ?line {ok, []} = rpc:call(Node, erl_prim_loader, set_primary_archive, [undefined, undefined]),
-
+ %% Cleanup
+ ?line {ok, []} = rpc:call(Node, erl_prim_loader, set_primary_archive, [undefined, undefined, undefined]),
?line stop_node(Node),
?line ok = file:delete(Archive),
ok.
@@ -461,6 +465,46 @@ create_archive(Archive, AppDirs) ->
io:format("zip:create(~p,\n\t~p,\n\t~p).\n", [Archive, AppDirs, Opts]),
zip:create(Archive, AppDirs, Opts).
+
+virtual_dir_in_archive(suite) ->
+ [];
+virtual_dir_in_archive(doc) ->
+ ["Read virtual directories from archive."];
+virtual_dir_in_archive(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ Data = <<"A little piece of data.">>,
+ ArchiveBase = "archive_with_virtual_dirs",
+ Archive = filename:join([PrivDir, ArchiveBase ++ init:archive_extension()]),
+ FileBase = "a_data_file.beam",
+ EbinBase = "ebin",
+ FileInArchive = filename:join([ArchiveBase, EbinBase, FileBase]),
+ BinFiles = [{FileInArchive, Data}],
+ Opts = [{compress, []}],
+ ?line file:delete(Archive),
+ io:format("zip:create(~p,\n\t~p,\n\t~p).\n", [Archive, BinFiles, Opts]),
+ ?line {ok, Archive} = zip:create(Archive, BinFiles, Opts),
+
+ %% Verify that there is no directories
+ ?line {ok, BinFiles} = zip:unzip(Archive, [memory]),
+
+ FullPath = filename:join([Archive, FileInArchive]),
+ ?line {ok, _} = erl_prim_loader:read_file_info(FullPath),
+
+ %% Read one virtual dir
+ EbinDir = filename:dirname(FullPath),
+ ?line {ok, _} = erl_prim_loader:read_file_info(EbinDir),
+ ?line {ok, [FileBase]} = erl_prim_loader:list_dir(EbinDir),
+
+ %% Read another virtual dir
+ AppDir = filename:dirname(EbinDir),
+ ?line {ok, _} = erl_prim_loader:read_file_info(AppDir),
+ ?line {ok, [EbinBase]} = erl_prim_loader:list_dir(AppDir),
+
+ %% Cleanup
+ ?line ok = erl_prim_loader:release_archives(),
+ ?line ok = file:delete(Archive),
+ ok.
+
%% Misc. functions
ip_str({A, B, C, D}) ->
diff --git a/lib/odbc/doc/src/Makefile b/lib/odbc/doc/src/Makefile
index 136ddfb980..e2f09733d0 100644
--- a/lib/odbc/doc/src/Makefile
+++ b/lib/odbc/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1999-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%
#
@@ -63,6 +63,9 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
+XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
GIF_FILES = \
book.gif \
odbc.gif \
diff --git a/lib/percept/doc/src/Makefile b/lib/percept/doc/src/Makefile
index c841d17c01..f0d43c5a01 100644
--- a/lib/percept/doc/src/Makefile
+++ b/lib/percept/doc/src/Makefile
@@ -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%
#
@@ -153,10 +153,10 @@ gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
xml: $(MODULE_XML_FILES)
$(PERCEPT_XML_FILES):
- docb_gen $(PERCEPT_DIR)/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript $(PERCEPT_DIR)/$(@:%.xml=%.erl)
$(RUNTIME_TOOLS_XML_FILES):
- docb_gen $(RUNTIME_TOOLS_DIR)/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript $(RUNTIME_TOOLS_DIR)/$(@:%.xml=%.erl)
info:
@echo "XML_PART_FILES: $(XML_PART_FILES)"
diff --git a/lib/public_key/doc/src/Makefile b/lib/public_key/doc/src/Makefile
index 08d1396cca..298c28a740 100644
--- a/lib/public_key/doc/src/Makefile
+++ b/lib/public_key/doc/src/Makefile
@@ -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%
#
@@ -56,6 +56,9 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
+XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
GIF_FILES = note.gif
# ----------------------------------------------------
diff --git a/lib/public_key/src/pubkey_cert_records.erl b/lib/public_key/src/pubkey_cert_records.erl
index 36b7c47a9c..c7d4080adb 100644
--- a/lib/public_key/src/pubkey_cert_records.erl
+++ b/lib/public_key/src/pubkey_cert_records.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%
%%
@@ -23,7 +23,7 @@
-include("public_key.hrl").
--export([decode_cert/2, encode_cert/1, encode_tbs_cert/1]).
+-export([decode_cert/2, encode_cert/1, encode_tbs_cert/1, transform/2]).
-export([old_decode_cert/2, old_encode_cert/1]). %% Debugging and testing new code.
diff --git a/lib/public_key/src/public_key.erl b/lib/public_key/src/public_key.erl
index b0b0b7a832..52c695523f 100644
--- a/lib/public_key/src/public_key.erl
+++ b/lib/public_key/src/public_key.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%
%%
@@ -30,7 +30,7 @@
sign/2, sign/3,
verify_signature/3, verify_signature/4, verify_signature/5,
pem_to_der/1, pem_to_der/2,
- pkix_decode_cert/2, pkix_encode_cert/1,
+ pkix_decode_cert/2, pkix_encode_cert/1, pkix_transform/2,
pkix_is_self_signed/1, pkix_is_fixed_dh_cert/1,
pkix_issuer_id/2,
pkix_is_issuer/2, pkix_normalize_general_name/1,
@@ -162,6 +162,20 @@ pkix_encode_cert(Cert) ->
pubkey_cert_records:encode_cert(Cert).
%%--------------------------------------------------------------------
+%% Function: pkix_transform(CertPart, Op) -> TransformedCertPart
+%%
+%% CertPart = pkix part data
+%% Op = encode | decode
+%%
+%% Description: Transform parts of a pkix certificate between 'plain' format
+%% and the internal 'otp' format, see pkix_decode_cert/2.
+%% Decode transforms from 'plain' to 'otp' and encode from 'otp' to 'plain'
+%% format.
+%%--------------------------------------------------------------------
+pkix_transform(CertPart, Op) ->
+ pubkey_cert_records:transform(CertPart, Op).
+
+%%--------------------------------------------------------------------
%% Function: pkix_path_validation(TrustedCert, CertChain, Options) ->
%% {ok, {{algorithm(), public_key(), public_key_params()} policy_tree()}} |
%% {error, Reason}
diff --git a/lib/public_key/test/Makefile b/lib/public_key/test/Makefile
index 2a4687677c..c7215020c7 100644
--- a/lib/public_key/test/Makefile
+++ b/lib/public_key/test/Makefile
@@ -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%
#
@@ -21,7 +21,7 @@ include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
-INCLUDES= -I. -I$(ERL_TOP)/lib/test_server/include/ -I ../include \
+INCLUDES= -I. -I ../include
# ----------------------------------------------------
# Target Specs
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index 93ae6e6eda..8cc36e490d 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.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%
%%
@@ -23,8 +23,9 @@
%% Note: This directive should only be used in test suites.
-compile(export_all).
--include("test_server.hrl").
--include("test_server_line.hrl").
+-include_lib("test_server/include/test_server.hrl").
+-include_lib("test_server/include/test_server_line.hrl").
+
-include("public_key.hrl").
-define(TIMEOUT, 120000). % 2 min
diff --git a/lib/reltool/test/Makefile b/lib/reltool/test/Makefile
new file mode 100644
index 0000000000..00d2add3e5
--- /dev/null
+++ b/lib/reltool/test/Makefile
@@ -0,0 +1,82 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2009. 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%
+
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ rtt \
+ reltool_wx_SUITE \
+ reltool_server_SUITE \
+ reltool_test_lib
+
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+HRL_FILES= reltool_test_lib.hrl
+
+TARGET_FILES= \
+ $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+
+INSTALL_PROGS= $(TARGET_FILES)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/reltool_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+#ERL_COMPILE_FLAGS +=
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+tests debug opt: $(TARGET_FILES)
+
+clean:
+ rm -f $(TARGET_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)
+ $(INSTALL_DATA) reltool.spec $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)
+ $(INSTALL_PROGRAM) rtt $(INSTALL_PROGS) $(RELSYSDIR)
+# chmod -f -R u+w $(RELSYSDIR)
+# @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
+
+release_docs_spec:
+
+
diff --git a/lib/reltool/test/README b/lib/reltool/test/README
new file mode 100644
index 0000000000..031bd2c961
--- /dev/null
+++ b/lib/reltool/test/README
@@ -0,0 +1,30 @@
+
+Testing and running reltool tests.
+
+Testing gui api/applications can be hard, but we can at least
+test that wxerlang behaves as we expected, i.e. that the api
+is consistent and that it don't crash.
+
+The tests are structured as they are because we want you to
+be able to run them in three different ways.
+ - direct via an erlang shell
+ - via common_test application
+ - via erlang/OTP inhouse ts tool.
+
+To run all the tests compile them and on unix
+run ./rtt to create an erlang terminal.
+
+Invoke rtt:t(). in the erlang shell to run all regression tests.
+If you want to specific tests invoke rtt:t(Module)
+or rtt:t(Module, TestCase).
+
+To run all tests including the ones that require manual intervention run.
+rtt:t(all, [{user,true}]).
+
+To see every test_case window use
+rtt:t(all, [{user,step}]).
+This requires that you manually close each window to step to the
+next test_case.
+
+If you want to run specific test_cases use:
+rtt:t({Module,TestCase}, [{user,step}]).
diff --git a/lib/reltool/test/reltool.spec b/lib/reltool/test/reltool.spec
new file mode 100644
index 0000000000..252232e09d
--- /dev/null
+++ b/lib/reltool/test/reltool.spec
@@ -0,0 +1,2 @@
+{topcase, {dir, "../reltool_test"}}.
+
diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl
new file mode 100644
index 0000000000..cf951191a0
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE.erl
@@ -0,0 +1,494 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009. 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(reltool_server_SUITE).
+
+-export([all/0, init_per_suite/1, end_per_suite/1,
+ init_per_testcase/2, fin_per_testcase/2, end_per_testcase/2]).
+
+-compile(export_all).
+
+-include("reltool_test_lib.hrl").
+
+-define(NODE_NAME, '__RELTOOL__TEMPORARY_TEST__NODE__').
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Initialization functions.
+
+init_per_suite(Config) ->
+ reltool_test_lib:init_per_suite(Config).
+
+end_per_suite(Config) ->
+ reltool_test_lib:end_per_suite(Config).
+
+init_per_testcase(Func,Config) ->
+ reltool_test_lib:init_per_testcase(Func,Config).
+end_per_testcase(Func,Config) ->
+ reltool_test_lib:end_per_testcase(Func,Config).
+fin_per_testcase(Func,Config) -> %% For test_server
+ reltool_test_lib:end_per_testcase(Func,Config).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% SUITE specification
+
+all() ->
+ all(suite).
+all(suite) ->
+ [
+ start_server,
+ set_config,
+ create_release,
+ create_script,
+ create_target,
+ create_embedded,
+ create_standalone,
+ create_old_target
+ ].
+
+%% The test cases
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Start a server process and check that it does not crash
+
+start_server(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+start_server(_Config) ->
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([])),
+ Libs = lists:sort(erl_libs()),
+ StrippedDefault =
+ case Libs of
+ [] -> {sys, []};
+ _ -> {sys, [{lib_dirs, Libs}]}
+ end,
+ ?m({ok, StrippedDefault}, reltool:get_config(Pid)),
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Start a server process and check that it does not crash
+
+set_config(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+set_config(_Config) ->
+ Libs = lists:sort(erl_libs()),
+ Default =
+ {sys,
+ [
+ {mod_cond, all},
+ {incl_cond, derived},
+ {root_dir, code:root_dir()},
+ {lib_dirs, Libs}
+ ]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Default}])),
+ StrippedDefault =
+ case Libs of
+ [] -> {sys, []};
+ _ -> {sys, [{lib_dirs, Libs}]}
+ end,
+ ?m({ok, StrippedDefault}, reltool:get_config(Pid)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate releases
+
+create_release(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+create_release(_Config) ->
+ %% Configure the server
+ RelName = "Just testing...",
+ RelVsn = "1.0",
+ Config =
+ {sys,
+ [
+ {lib_dirs, []},
+ {boot_rel, RelName},
+ {rel, RelName, RelVsn, [kernel, stdlib]}
+ ]},
+ %% Generate release
+ ErtsVsn = erlang:system_info(version),
+ Apps = application:loaded_applications(),
+ {value, {_, _, KernelVsn}} = lists:keysearch(kernel, 1, Apps),
+ {value, {_, _, StdlibVsn}} = lists:keysearch(stdlib, 1, Apps),
+ Rel = {release, {RelName, RelVsn},
+ {erts, ErtsVsn},
+ [{kernel, KernelVsn},
+ {stdlib, StdlibVsn}]},
+ ?m({ok, Rel}, reltool:get_rel([{config, Config}], RelName)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate boot scripts
+
+create_script(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+create_script(_Config) ->
+ %% Configure the server
+ RelName = "Just testing",
+ RelVsn = "1.0",
+ Config =
+ {sys,
+ [
+ {lib_dirs, []},
+ {boot_rel, RelName},
+ {rel, RelName, RelVsn, [stdlib, kernel]}
+ ]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Config}])),
+
+ %% Generate release file
+ ErtsVsn = erlang:system_info(version),
+ Apps = application:loaded_applications(),
+ {value, {_, _, KernelVsn}} = lists:keysearch(kernel, 1, Apps),
+ {value, {_, _, StdlibVsn}} = lists:keysearch(stdlib, 1, Apps),
+ Rel = {release,
+ {RelName, RelVsn},
+ {erts, ErtsVsn},
+ [{stdlib, StdlibVsn}, {kernel, KernelVsn}]},
+ ?m({ok, Rel}, reltool:get_rel(Pid, RelName)),
+ RelFile = RelName ++ ".rel",
+ ?m(ok, file:write_file(RelFile, io_lib:format("~p.\n", [Rel]))),
+
+ %% Generate script file
+ ?m(ok, systools:make_script(RelName, [])),
+ ScriptFile = RelName ++ ".script",
+ {ok, [OrigScript]} = ?msym({ok, [_]}, file:consult(ScriptFile)),
+ {ok, Script} = ?msym({ok, _}, reltool:get_script(Pid, RelName)),
+ %% OrigScript2 = sort_script(OrigScript),
+ %% Script2 = sort_script(Script),
+ %% ?m(OrigScript2, Script2),
+
+ ?m(equal, diff_script(OrigScript, Script)),
+
+ %% Stop server
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate target system
+
+create_target(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+create_target(_Config) ->
+ %% Configure the server
+ RelName1 = "Just testing",
+ RelName2 = "Just testing with SASL",
+ RelVsn = "1.0",
+ Config =
+ {sys,
+ [
+ {root_dir, code:root_dir()},
+ {lib_dirs, []},
+ {boot_rel, RelName2},
+ {rel, RelName1, RelVsn, [stdlib, kernel]},
+ {rel, RelName2, RelVsn, [sasl, stdlib, kernel]},
+ {app, sasl, [{incl_cond, include}]}
+ ]},
+
+ %% Generate target file
+ TargetDir = "reltool_target_dir_development",
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+
+ Erl = filename:join([TargetDir, "bin", "erl"]),
+ {ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
+ ?msym(ok, stop_node(Node)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate embedded target system
+
+create_embedded(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+create_embedded(_Config) ->
+ %% Configure the server
+ RelName1 = "Just testing",
+ RelName2 = "Just testing with SASL",
+ RelVsn = "1.0",
+ Config =
+ {sys,
+ [
+ {lib_dirs, []},
+ {profile, embedded},
+ {boot_rel, RelName2},
+ {rel, RelName1, RelVsn, [stdlib, kernel]},
+ {rel, RelName2, RelVsn, [sasl, stdlib, kernel]},
+ {app, sasl, [{incl_cond, include}]}
+ ]},
+
+ %% Generate target file
+ TargetDir = "reltool_target_dir_embedded",
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+
+ Erl = filename:join([TargetDir, "bin", "erl"]),
+ {ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
+ ?msym(ok, stop_node(Node)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate standalone system
+
+create_standalone(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+create_standalone(_Config) ->
+ %% Configure the server
+ ExDir = code:lib_dir(reltool, examples),
+ EscriptName = "display_args",
+ Escript = filename:join([ExDir, EscriptName]),
+ Config =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ %% Generate target file
+ TargetDir = "reltool_target_dir_standalone",
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+
+ BinDir = filename:join([TargetDir, "bin"]),
+ Erl = filename:join([BinDir, "erl"]),
+ {ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
+ RootDir = ?ignore(rpc:call(Node, code, root_dir, [])),
+ ?msym(ok, stop_node(Node)),
+
+ Expected = iolist_to_binary(["Root dir: ", RootDir, "\n"
+ "Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
+ "Smp: false\n",
+ "ExitCode:0"]),
+ io:format("Expected: ~s\n", [Expected]),
+ ?m(Expected, run(BinDir, EscriptName ++ " -arg1 arg2 arg3")),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate old type of target system
+
+create_old_target(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+create_old_target(_Config) ->
+ %% Configure the server
+ RelName1 = "Just testing",
+ RelName2 = "Just testing with SASL",
+ RelVsn = "1.0",
+ Config =
+ {sys,
+ [
+ {lib_dirs, []},
+ {boot_rel, RelName2},
+ {rel, RelName1, RelVsn, [stdlib, kernel]},
+ {rel, RelName2, RelVsn, [sasl, stdlib, kernel]},
+ {relocatable, false}, % Implies explicit old style installation
+ {app, sasl, [{incl_cond, include}]}
+ ]},
+
+ %% Generate target file
+ TargetDir = "reltool_target_dir_old",
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+
+ %% io:format("Will fail on Windows (should patch erl.ini)\n", []),
+ ?m(ok, reltool:install(RelName2, TargetDir)),
+
+ Erl = filename:join([TargetDir, "bin", "erl"]),
+ {ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
+ ?msym(ok, stop_node(Node)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Library functions
+
+erl_libs() ->
+ case os:getenv("ERL_LIBS") of
+ false -> [];
+ LibStr -> string:tokens(LibStr, ":;")
+ end.
+
+diff_script(Script, Script) ->
+ equal;
+diff_script({script, Rel, Commands1}, {script, Rel, Commands2}) ->
+ diff_cmds(Commands1, Commands2);
+diff_script({script, Rel1, _}, {script, Rel2, _}) ->
+ {error, {Rel1, Rel2}}.
+
+diff_cmds([Cmd | Commands1], [Cmd | Commands2]) ->
+ diff_cmds(Commands1, Commands2);
+diff_cmds([Cmd1 | _Commands1], [Cmd2 | _Commands2]) ->
+ {diff, {expected, Cmd1}, {actual, Cmd2}};
+diff_cmds([], []) ->
+ equal.
+
+os_cmd(Cmd) when is_list(Cmd) ->
+ %% Call the plain os:cmd with an echo command appended to print command status
+ %% io:format("os:cmd(~p).\n", [Cmd]),
+ case os:cmd(Cmd++";echo \"#$?\"") of
+ %% There is (as far as I can tell) only one thing that will match this
+ %% and that is too silly to ever be used, but...
+ []->
+ {99, []};
+ Return->
+ %% Find the position of the status code wich is last in the string
+ %% prepended with #
+ case string:rchr(Return, $#) of
+
+ %% This happens only if the sh command pipe is somehow interrupted
+ 0->
+ {98, Return};
+
+ Position->
+ Result = string:left(Return,Position - 1),
+ Status = string:substr(Return,Position + 1, length(Return) - Position - 1),
+ {list_to_integer(Status), Result}
+ end
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Node handling
+
+start_node(Name, ErlPath) ->
+ FullName = full_node_name(Name),
+ CmdLine = mk_node_cmdline(Name, ErlPath),
+ io:format("Starting node ~p: ~s~n", [FullName, CmdLine]),
+ case open_port({spawn, CmdLine}, []) of
+ Port when is_port(Port) ->
+ unlink(Port),
+ erlang:port_close(Port),
+ case ping_node(FullName, 50) of
+ ok -> {ok, FullName};
+ Other -> exit({failed_to_start_node, FullName, Other})
+ end;
+ Error ->
+ exit({failed_to_start_node, FullName, Error})
+ end.
+
+stop_node(Node) ->
+ monitor_node(Node, true),
+ spawn(Node, fun () -> halt() end),
+ receive {nodedown, Node} -> ok end.
+
+mk_node_cmdline(Name) ->
+ Prog = case catch init:get_argument(progname) of
+ {ok,[[P]]} -> P;
+ _ -> exit(no_progname_argument_found)
+ end,
+ mk_node_cmdline(Name, Prog).
+
+mk_node_cmdline(Name, Prog) ->
+ Static = "-detached -noinput",
+ Pa = filename:dirname(code:which(?MODULE)),
+ NameSw = case net_kernel:longnames() of
+ false -> "-sname ";
+ true -> "-name ";
+ _ -> exit(not_distributed_node)
+ end,
+ {ok, Pwd} = file:get_cwd(),
+ NameStr = atom_to_list(Name),
+ Prog ++ " "
+ ++ Static ++ " "
+ ++ NameSw ++ " " ++ NameStr ++ " "
+ ++ "-pa " ++ Pa ++ " "
+ ++ "-env ERL_CRASH_DUMP " ++ Pwd ++ "/erl_crash_dump." ++ NameStr ++ " "
+ ++ "-setcookie " ++ atom_to_list(erlang:get_cookie()).
+
+full_node_name(PreName) ->
+ HostSuffix = lists:dropwhile(fun ($@) -> false; (_) -> true end,
+ atom_to_list(node())),
+ list_to_atom(atom_to_list(PreName) ++ HostSuffix).
+
+ping_node(_Node, 0) ->
+ {error, net_adm};
+ping_node(Node, N) when is_integer(N), N > 0 ->
+ case catch net_adm:ping(Node) of
+ pong ->
+ wait_for_process(Node, code_server, 50);
+ _ ->
+ timer:sleep(1000),
+ ping_node(Node, N-1)
+ end.
+
+wait_for_process(_Node, Name, 0) ->
+ {error, Name};
+wait_for_process(Node, Name, N) when is_integer(N), N > 0 ->
+ case rpc:call(Node, erlang, whereis, [Name]) of
+ undefined ->
+ timer:sleep(1000),
+ wait_for_process(Node, Name, N-1);
+ {badrpc, _} = Reason ->
+ erlang:error({Reason, Node});
+ Pid when is_pid(Pid) ->
+ ok
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Run escript
+
+run(Dir, Cmd0) ->
+ Cmd = case os:type() of
+ {win32,_} -> filename:nativename(Dir) ++ "\\" ++ Cmd0;
+ _ -> Cmd0
+ end,
+ do_run(Dir, Cmd).
+
+run(Dir, Opts, Cmd0) ->
+ Cmd = case os:type() of
+ {win32,_} -> Opts ++ " " ++ filename:nativename(Dir) ++ "\\" ++ Cmd0;
+ _ -> Opts ++ " " ++ Dir ++ "/" ++ Cmd0
+ end,
+ do_run(Dir, Cmd).
+
+do_run(Dir, Cmd) ->
+ io:format("Run: ~p\n", [Cmd]),
+ Env = [{"PATH",Dir++":"++os:getenv("PATH")}],
+ Port = open_port({spawn,Cmd}, [exit_status,eof,in,{env,Env}]),
+ Res = get_data(Port, []),
+ receive
+ {Port,{exit_status,ExitCode}} ->
+ iolist_to_binary([Res,"ExitCode:"++integer_to_list(ExitCode)])
+ end.
+
+get_data(Port, SoFar) ->
+ receive
+ {Port,{data,Bytes}} ->
+ get_data(Port, [SoFar|Bytes]);
+ {Port,eof} ->
+ erlang:port_close(Port),
+ SoFar
+ end.
+
+expected_output([data_dir|T], Data) ->
+ Slash = case os:type() of
+ {win32,_} -> "\\";
+ _ -> "/"
+ end,
+ [filename:nativename(Data)++Slash|expected_output(T, Data)];
+expected_output([H|T], Data) ->
+ [H|expected_output(T, Data)];
+expected_output([], _) ->
+ [];
+expected_output(Bin, _) when is_binary(Bin) ->
+ Bin.
diff --git a/lib/reltool/test/reltool_test_lib.erl b/lib/reltool/test/reltool_test_lib.erl
new file mode 100644
index 0000000000..25978294ee
--- /dev/null
+++ b/lib/reltool/test/reltool_test_lib.erl
@@ -0,0 +1,329 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009. 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(reltool_test_lib).
+-compile(export_all).
+
+-include("reltool_test_lib.hrl").
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init_per_suite(Config) when is_list(Config)->
+ incr_timetrap(Config, 5).
+
+end_per_suite(Config) when is_list(Config)->
+ ok.
+
+incr_timetrap(Config, Times) ->
+ Key = tc_timeout,
+ KeyPos = 1,
+ NewTime =
+ case lists:keysearch(Key, KeyPos, Config) of
+ {value, {Key, OldTime}} ->
+ (timer:minutes(1) + OldTime) * Times;
+ false ->
+ timer:minutes(1) * Times
+ end,
+ lists:keystore(Key, KeyPos, Config, {Key, NewTime}).
+
+set_kill_timer(Config) ->
+ case init:get_argument(reltool_test_timeout) of
+ {ok, _} ->
+ Config;
+ _ ->
+ Time =
+ case lookup_config(tc_timeout, Config) of
+ [] ->
+ timer:minutes(5);
+ ConfigTime when is_integer(ConfigTime) ->
+ ConfigTime
+ end,
+ WatchDog = test_server:timetrap(Time),
+ [{kill_timer, WatchDog} | Config]
+ end.
+
+reset_kill_timer(Config) ->
+ DogKiller =
+ case get(reltool_test_server) of
+ true ->
+ fun(P) when is_pid(P) -> P ! stop;
+ (_) -> ok
+ end;
+ _ ->
+ fun(Ref) -> test_server:timetrap_cancel(Ref) end
+ end,
+ case lists:keysearch(kill_timer, 1, Config) of
+ {value, {kill_timer, WatchDog}} ->
+ DogKiller(WatchDog),
+ lists:keydelete(kill_timer, 1, Config);
+ _ ->
+ Config
+ end.
+
+lookup_config(Key,Config) ->
+ case lists:keysearch(Key, 1, Config) of
+ {value,{Key,Val}} ->
+ Val;
+ _ ->
+ []
+ end.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+wx_init_per_suite(Config) ->
+ {_Pid, Ref} =
+ spawn_monitor(fun() ->
+ %% Avoid test case crash if wx master process dies
+ process_flag(trap_exit, true),
+ try
+ case os:type() of
+ {unix,darwin} ->
+ exit({skipped, "Can not test on MacOSX"});
+ {unix, _} ->
+ io:format("DISPLAY ~s~n", [os:getenv("DISPLAY")]),
+ case proplists:get_value(xserver, Config, none) of
+ none -> ignore;
+ Server -> os:putenv("DISPLAY", Server)
+ end;
+ _ ->
+ ignore
+ end,
+ wx:new(),
+ wx:destroy()
+ catch
+ error:undef ->
+ exit({skipped, "No wx compiled for this platform"});
+ _:Reason ->
+ exit({skipped, lists:flatten(io_lib:format("Start wx failed: ~p", [Reason]))})
+ end,
+ exit(normal)
+ end),
+ receive
+ {'DOWN', Ref, _, _, normal} ->
+ init_per_suite(Config);
+ {'DOWN', Ref, _, _, {skipped, _} = Skipped} ->
+ Skipped;
+ {'DOWN', Ref, _, _, Reason} ->
+ exit({wx_init_per_suite, Reason})
+ after timer:minutes(1) ->
+ exit({wx_init_per_suite, timeout})
+ end.
+
+wx_end_per_suite(Config) ->
+ end_per_suite(Config).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init_per_testcase(_Func, Config) when is_list(Config) ->
+ set_kill_timer(Config),
+ global:register_name(reltool_global_logger, group_leader()),
+ Config.
+
+end_per_testcase(_Func, Config) when is_list(Config) ->
+ global:unregister_name(reltool_global_logger),
+ reset_kill_timer(Config),
+ Config.
+
+%% Backwards compatible with test_server
+tc_info(suite) -> [];
+tc_info(doc) -> "".
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Use ?log(Format, Args) as wrapper
+log(Format, Args, LongFile, Line) ->
+ File = filename:basename(LongFile),
+ Format2 = lists:concat([File, "(", Line, ")", ": ", Format]),
+ log(Format2, Args).
+
+log(Format, Args) ->
+ case global:whereis_name(reltool_global_logger) of
+ undefined ->
+ io:format(user, Format, Args);
+ Pid ->
+ io:format(Pid, Format, Args)
+ end.
+
+verbose(Format, Args, File, Line) ->
+ Arg = reltool_test_verbose,
+ case get(Arg) of
+ false ->
+ ok;
+ true ->
+ log(Format, Args, File, Line);
+ undefined ->
+ case init:get_argument(Arg) of
+ {ok, List} when is_list(List) ->
+ case lists:last(List) of
+ ["true"] ->
+ put(Arg, true),
+ log(Format, Args, File, Line);
+ _ ->
+ put(Arg, false),
+ ok
+ end;
+ _ ->
+ put(Arg, false),
+ ok
+ end
+ end.
+
+error(Format, Args, File, Line) ->
+ global:send(reltool_global_logger, {failed, File, Line}),
+ Fail = {filename:basename(File),Line,Args},
+ case global:whereis_name(reltool_test_case_sup) of
+ undefined -> ignore;
+ Pid -> Pid ! Fail
+ %% global:send(reltool_test_case_sup, Fail),
+ end,
+ log("<ERROR>~n" ++ Format, Args, File, Line).
+
+
+pick_msg() ->
+ receive
+ Message -> Message
+ after 4000 -> timeout
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Utility functions
+
+user_available(Config) ->
+ false /= proplists:get_value(user, Config, false).
+
+
+wx_destroy(Frame, Config) ->
+ case proplists:get_value(user, Config, false) of
+ false ->
+ timer:sleep(100),
+ ?m(ok, wxFrame:destroy(Frame)),
+ ?m(ok, wx:destroy());
+ true ->
+ timer:sleep(500),
+ ?m(ok, wxFrame:destroy(Frame)),
+ ?m(ok, wx:destroy());
+ step -> %% Wait for user to close window
+ ?m(ok, wxEvtHandler:connect(Frame, close_window, [{skip,true}])),
+ wait_for_close()
+ end.
+
+wait_for_close() ->
+ receive
+ #wx{event=#wxClose{}} ->
+ ?log("Got close~n",[]),
+ ?m(ok, wx:destroy());
+ #wx{obj=Obj, event=Event} ->
+ try
+ Name = wxTopLevelWindow:getTitle(Obj),
+ ?log("~p Event: ~p~n", [Name, Event])
+ catch _:_ ->
+ ?log("Event: ~p~n", [Event])
+ end,
+ wait_for_close();
+ Other ->
+ ?log("Unexpected: ~p~n", [Other]),
+ wait_for_close()
+ end.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% A small test server, which can be run standalone in a shell
+
+run_test(Test = {_,_},Config) ->
+ run_test([Test],Config);
+run_test([{Module, TC} | Rest], Config) ->
+ log("\n\n=== Eval test suite: ~w ===~n", [Module]),
+ case catch Module:init_per_suite(Config) of
+ {skipped, Reason} ->
+ log("Test suite skipped: ~s~n", [Reason]),
+ [{skipped, Reason}];
+ NewConfig when is_list(NewConfig) ->
+ Res =
+ if
+ TC =:= all ->
+ [do_run_test(Module, Test, NewConfig) || Test <- Module:all()];
+ is_list(TC) ->
+ [do_run_test(Module, Test, NewConfig) || Test <- TC];
+ true ->
+ [do_run_test(Module, TC, NewConfig)]
+ end,
+ Module:end_per_suite(NewConfig),
+ Res ++ run_test(Rest, NewConfig);
+ Error ->
+ ?error("Test suite skipped: ~w~n", [Error]),
+ [{skipped, Error}]
+ end;
+run_test([], _Config) ->
+ [].
+
+do_run_test(Module, all, Config) ->
+ All = [{Module, Test} || Test <- Module:all()],
+ run_test(All, Config);
+do_run_test(Module, TestCase, Config) ->
+ log("Eval test case: ~w~n", [{Module, TestCase}]),
+ Sec = timer:seconds(1) * 1000,
+ {T, Res} =
+ timer:tc(?MODULE, eval_test_case, [Module, TestCase, Config]),
+ log("Tested ~w in ~w sec~n", [TestCase, T div Sec]),
+ {T div Sec, Res}.
+
+eval_test_case(Mod, Fun, Config) ->
+ flush(),
+ global:register_name(reltool_test_case_sup, self()),
+ Flag = process_flag(trap_exit, true),
+ Pid = spawn_link(?MODULE, test_case_evaluator, [Mod, Fun, [Config]]),
+ R = wait_for_evaluator(Pid, Mod, Fun, Config),
+ global:unregister_name(reltool_test_case_sup),
+ process_flag(trap_exit, Flag),
+ R.
+
+test_case_evaluator(Mod, Fun, [Config]) ->
+ NewConfig = Mod:init_per_testcase(Fun, Config),
+ R = apply(Mod, Fun, [NewConfig]),
+ Mod:fin_per_testcase(Fun, NewConfig),
+ exit({test_case_ok, R}).
+
+wait_for_evaluator(Pid, Mod, Fun, Config) ->
+ receive
+ {'EXIT', Pid, {test_case_ok, _PidRes}} ->
+ Errors = flush(),
+ Res =
+ case Errors of
+ [] -> ok;
+ Errors -> failed
+ end,
+ {Res, {Mod, Fun}, Errors};
+ {'EXIT', Pid, {skipped, Reason}} ->
+ log("<WARNING> Test case ~w skipped, because ~p~n",
+ [{Mod, Fun}, Reason]),
+ Mod:fin_per_testcase(Fun, Config),
+ {skip, {Mod, Fun}, Reason};
+ {'EXIT', Pid, Reason} ->
+ log("<ERROR> Eval process ~w exited, because\n\t~p~n",
+ [{Mod, Fun}, Reason]),
+ Mod:fin_per_testcase(Fun, Config),
+ {crash, {Mod, Fun}, Reason}
+ end.
+
+flush() ->
+ receive Msg -> [Msg | flush()]
+ after 0 -> []
+ end.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/reltool/test/reltool_test_lib.hrl b/lib/reltool/test/reltool_test_lib.hrl
new file mode 100644
index 0000000000..93134144ea
--- /dev/null
+++ b/lib/reltool/test/reltool_test_lib.hrl
@@ -0,0 +1,91 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009. 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%
+
+-include_lib("wx/include/wx.hrl").
+
+-define(log(Format,Args), reltool_test_lib:log(Format,Args,?FILE,?LINE)).
+-define(warning(Format,Args), ?log("<WARNING>\n " ++ Format,Args)).
+-define(error(Format,Args), reltool_test_lib:error(Format,Args,?FILE,?LINE)).
+-define(verbose(Format,Args), reltool_test_lib:verbose(Format,Args,?FILE,?LINE)).
+
+-define(fatal(Format,Args),
+ ?error(Format, Args),
+ exit({test_case_fatal, Format, Args, ?FILE, ?LINE})).
+
+-define(skip(Format,Args),
+ ?warning(Format, Args),
+ exit({skipped, ?flat_format(Format, Args)})).
+
+-define(ignore(Expr),
+ fun() ->
+ AcTuAlReS = (catch (Expr)),
+ ?verbose("ok: ~p\n",[AcTuAlReS]),
+ AcTuAlReS
+ end()).
+
+-define(msym(ExpectedRes, Expr),
+ fun() ->
+ AcTuAlReS = (catch (Expr)),
+ case AcTuAlReS of
+ ExpectedRes ->
+ ?verbose("ok: ~p\n",[AcTuAlReS]),
+ AcTuAlReS;
+ _ ->
+ reltool_test_lib:error("Not matching actual result was:\n ~p \nExpected ~s\n",
+ [AcTuAlReS, ??ExpectedRes],
+ ?FILE, ?LINE),
+ AcTuAlReS
+ end
+ end()).
+
+-define(m(ExpectedRes, Expr),
+ fun() ->
+ AcTuAlReS = (catch (Expr)),
+ case AcTuAlReS of
+ ExpectedRes ->
+ ?verbose("ok: ~p\n",[AcTuAlReS]),
+ AcTuAlReS;
+ _ ->
+ reltool_test_lib:error("Not matching actual result was:\n\t~p \nExpected:\n\t~p\n",
+ [AcTuAlReS, ExpectedRes],
+ ?FILE, ?LINE),
+ AcTuAlReS
+ end
+ end()).
+
+-define(m_receive(ExpectedMsg),
+ ?m(ExpectedMsg,reltool_test_lib:pick_msg())).
+
+-define(m_multi_receive(ExpectedMsgs),
+ fun() ->
+ TmPeXpCtEdMsGs = lists:sort(ExpectedMsgs),
+ AcTuAlReS =
+ lists:sort(lists:map(fun(_) ->
+ reltool_test_lib:pick_msg()
+ end, TmPeXpCtEdMsGs)),
+ case AcTuAlReS of
+ TmPeXpCtEdMsGs ->
+ ?verbose("ok: ~p\n",[AcTuAlReS]),
+ AcTuAlReS;
+ _ ->
+ reltool_test_lib:error("Not matching actual result was:\n ~p \nExpected ~p\n",
+ [AcTuAlReS, ExpectedMsgs],
+ ?FILE, ?LINE),
+ AcTuAlReS
+ end
+ end()).
diff --git a/lib/reltool/test/reltool_wx_SUITE.erl b/lib/reltool/test/reltool_wx_SUITE.erl
new file mode 100644
index 0000000000..2e2b355e07
--- /dev/null
+++ b/lib/reltool/test/reltool_wx_SUITE.erl
@@ -0,0 +1,62 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009. 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(reltool_wx_SUITE).
+
+-export([all/0, init_per_suite/1, end_per_suite/1,
+ init_per_testcase/2, fin_per_testcase/2, end_per_testcase/2]).
+
+-compile(export_all).
+
+-include("reltool_test_lib.hrl").
+
+%% Initialization functions.
+init_per_suite(Config) ->
+ reltool_test_lib:wx_init_per_suite(Config).
+
+end_per_suite(Config) ->
+ reltool_test_lib:wx_end_per_suite(Config).
+
+init_per_testcase(Func,Config) ->
+ reltool_test_lib:init_per_testcase(Func,Config).
+end_per_testcase(Func,Config) ->
+ reltool_test_lib:end_per_testcase(Func,Config).
+fin_per_testcase(Func,Config) -> %% For test_server
+ reltool_test_lib:end_per_testcase(Func,Config).
+
+%% SUITE specification
+all() ->
+ all(suite).
+all(suite) ->
+ [
+ start_all_windows
+ ].
+
+%% The test cases
+
+%% Display all windows and see if something crashes
+start_all_windows(TestInfo) when is_atom(TestInfo) ->
+ reltool_test_lib:tc_info(TestInfo);
+start_all_windows(_Config) ->
+ {ok, SysPid} = ?msym({ok, _}, reltool:start([{trap_exit, false}])),
+ {ok, AppPid} = ?msym({ok, _}, reltool_sys_win:open_app(SysPid, stdlib)),
+ ?msym({ok, _}, reltool_app_win:open_mod(AppPid, escript)),
+ timer:sleep(timer:seconds(10)),
+ ?m(ok, reltool:stop(SysPid)),
+
+ ok.
diff --git a/lib/reltool/test/rtt b/lib/reltool/test/rtt
new file mode 100755
index 0000000000..2411195338
--- /dev/null
+++ b/lib/reltool/test/rtt
@@ -0,0 +1,55 @@
+#! /bin/sh -f
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2009. 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%
+
+# Usage: rtt [-cerl] <args to erlang startup script>
+
+emu=erl
+while [ $# -gt 0 ]; do
+ case "$1" in
+ "-cerl")
+ shift
+ emu=cerl
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+log=test_log_$$
+latest=test_log_latest
+args=${1+"$@"}
+
+erlcmd="$emu -sname test_server -smp -pa ../../reltool/ebin $p $args -reltool_test_verbose true -reltool_test_timeout"
+
+echo "Give the following command in order to see the outcome:"
+echo ""
+echo " less $log"
+
+rm "$latest" 2>/dev/null
+ln -s "$log" "$latest"
+touch "$log"
+
+ostype=`uname -s`
+if [ "$ostype" = "SunOS" ] ; then
+ /usr/openwin/bin/xterm -T "Testing reltool" -l -lf "$log" -e $erlcmd &
+else
+ xterm -T "Testing reltool" -e script -f -c "$erlcmd" "$log" &
+fi
+
+tail -f "$log" | egrep 'Eval|<ERROR>|NYI'
diff --git a/lib/reltool/test/rtt.erl b/lib/reltool/test/rtt.erl
new file mode 100644
index 0000000000..6755b8400f
--- /dev/null
+++ b/lib/reltool/test/rtt.erl
@@ -0,0 +1,154 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009. 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(rtt).
+-compile(export_all).
+
+%% Modules or suites can be shortcuts, for example server expands to reltool_server_SUITE.
+%%
+%% t(Tests) run reltool testcases.
+%% Tests can be module, {module, test_case} or [module|{module,test_case}]
+
+t() ->
+ t(read_test_case()).
+t(Test) ->
+ t(Test, []).
+
+t(Mod, TC) when is_atom(Mod), is_atom(TC) ->
+ t({Mod,TC}, []);
+t(all, Config) when is_list(Config) ->
+ Fs = filelib:wildcard("reltool_*_SUITE.erl"),
+ t([list_to_atom(filename:rootname(File)) || File <- Fs], Config);
+t(Test,Config) when is_list(Config) ->
+ Tests = resolve(Test),
+ write_test_case(Test),
+ Res = reltool_test_lib:run_test(Tests, Config),
+ append_test_case_info(Test, Res).
+
+user() ->
+ user(read_test_case()).
+user(Mod) ->
+ t(Mod, [{user,step}]).
+user(Mod,Tc) when is_atom(Tc) ->
+ t({Mod,Tc}, [{user,step}]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Resolves the name of test suites and test cases
+%% according to the alias definitions. Single atoms
+%% are assumed to be the name of a test suite.
+
+resolve(Suite0) when is_atom(Suite0) ->
+ case alias(Suite0) of
+ Suite when is_atom(Suite) ->
+ {Suite, all};
+ {Suite, Case} ->
+ {Suite, Case}
+ end;
+resolve({Suite0, Case}) when is_atom(Suite0), is_atom(Case) ->
+ case alias(Suite0) of
+ Suite when is_atom(Suite) ->
+ {Suite, Case};
+ {Suite, Case2} ->
+ {Suite, Case2}
+ end;
+resolve(List) when is_list(List) ->
+ [resolve(Case) || Case <- List].
+
+alias(Suite) when is_atom(Suite) ->
+ Str = atom_to_list(Suite),
+ case {Str, lists:reverse(Str)} of
+ {"reltool" ++ _, "ETIUS" ++ _} ->
+ Suite;
+ _ ->
+ list_to_atom("reltool_" ++ Str ++ "_SUITE")
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+config_fname() ->
+ "reltool_test_case_config".
+
+%% Read default config file
+read_config() ->
+ Fname = config_fname(),
+ reltool_test_lib:log("Consulting file ~s...~n", [Fname]),
+ case file:consult(Fname) of
+ {ok, Config} ->
+ reltool_test_lib:log("Read config ~w~n", [Config]),
+ Config;
+ _Error ->
+ Config = reltool_test_lib:default_config(),
+ reltool_test_lib:log("<>WARNING<> Using default config: ~w~n", [Config]),
+ Config
+ end.
+
+%% Write new default config file
+write_config(Config) when is_list(Config) ->
+ Fname = config_fname(),
+ {ok, Fd} = file:open(Fname, write),
+ write_list(Fd, Config),
+ file:close(Fd).
+
+write_list(Fd, [H | T]) ->
+ ok = io:format(Fd, "~p.~n",[H]),
+ write_list(Fd, T);
+write_list(_, []) ->
+ ok.
+
+test_case_fname() ->
+ "reltool_test_case_info".
+
+%% Read name of test case
+read_test_case() ->
+ Fname = test_case_fname(),
+ case file:open(Fname, [read]) of
+ {ok, Fd} ->
+ Res = io:read(Fd, []),
+ file:close(Fd),
+ case Res of
+ {ok, TestCase} ->
+ reltool_test_lib:log("Using test case ~w from file ~s~n",
+ [TestCase, Fname]),
+ TestCase;
+ {error, _} ->
+ default_test_case(Fname)
+ end;
+ {error, _} ->
+ default_test_case(Fname)
+ end.
+
+default_test_case(Fname) ->
+ TestCase = all,
+ reltool_test_lib:log("<>WARNING<> Cannot read file ~s, "
+ "using default test case: ~w~n",
+ [Fname, TestCase]),
+ TestCase.
+
+write_test_case(TestCase) ->
+ Fname = test_case_fname(),
+ {ok, Fd} = file:open(Fname, write),
+ ok = io:format(Fd, "~p.~n",[TestCase]),
+ file:close(Fd).
+
+append_test_case_info(TestCase, TestCaseInfo) ->
+ Fname = test_case_fname(),
+ {ok, Fd} = file:open(Fname, [read, write]),
+ ok = io:format(Fd, "~p.~n",[TestCase]),
+ ok = io:format(Fd, "~p.~n",[TestCaseInfo]),
+ file:close(Fd),
+ TestCaseInfo.
diff --git a/lib/ssl/doc/src/Makefile b/lib/ssl/doc/src/Makefile
index 54d274ef83..fa263d28ab 100644
--- a/lib/ssl/doc/src/Makefile
+++ b/lib/ssl/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1999-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%
#
@@ -52,6 +52,9 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
+XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
GIF_FILES = warning.gif
PS_FILES =
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 178c055cdf..d9377fe3d6 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.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%
%%
@@ -1115,13 +1115,12 @@ do_server_hello(Type, #state{negotiated_version = Version,
case ssl_handshake:master_secret(Version, Session,
ConnectionStates0, server) of
{_, ConnectionStates1} ->
- {ConnectionStates, Hashes} =
- finished(State#state{connection_states =
- ConnectionStates1}),
- {next_state, abbreviated,
- next_record(State#state{connection_states =
- ConnectionStates,
- tls_handshake_hashes = Hashes})};
+ State1 = State#state{connection_states=ConnectionStates1,
+ session = Session},
+ {ConnectionStates, Hashes} = finalize_server_handshake(State1),
+ Resumed = State1#state{connection_states = ConnectionStates,
+ tls_handshake_hashes = Hashes},
+ {next_state, abbreviated, next_record(Resumed)};
#alert{} = Alert ->
handle_own_alert(Alert, Version, hello, State),
{stop, normal, State}
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index 829e0c2ba6..8c598135ca 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.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%
%%
@@ -860,9 +860,31 @@ certificate_types(_) ->
%% a RSA_FIXED_DH or DSS_FIXED_DH
<<?BYTE(?RSA_SIGN)>>.
-certificate_authorities(_) ->
- %%TODO Make list of know CA:s
- <<>>.
+certificate_authorities(CertDbRef) ->
+ Authorities = certificate_authorities_from_db(CertDbRef),
+ Enc = fun(#'OTPCertificate'{tbsCertificate=TBSCert}) ->
+ OTPSubj = TBSCert#'OTPTBSCertificate'.subject,
+ Subj = public_key:pkix_transform(OTPSubj, encode),
+ {ok, DNEncoded} = 'OTP-PUB-KEY':encode('Name', Subj),
+ DNEncodedBin = iolist_to_binary(DNEncoded),
+ DNEncodedLen = byte_size(DNEncodedBin),
+ <<?UINT16(DNEncodedLen), DNEncodedBin/binary>>
+ end,
+ list_to_binary([Enc(Cert) || {_, Cert} <- Authorities]).
+
+certificate_authorities_from_db(CertDbRef) ->
+ certificate_authorities_from_db(CertDbRef, no_candidate, []).
+
+certificate_authorities_from_db(CertDbRef, PrevKey, Acc) ->
+ case ssl_certificate_db:issuer_candidate(PrevKey) of
+ no_more_candidates ->
+ lists:reverse(Acc);
+ {{CertDbRef, _, _} = Key, Cert} ->
+ certificate_authorities_from_db(CertDbRef, Key, [Cert|Acc]);
+ {Key, _Cert} ->
+ %% skip certs not from this ssl connection
+ certificate_authorities_from_db(CertDbRef, Key, Acc)
+ end.
digitally_signed(Hashes, #'RSAPrivateKey'{} = Key) ->
public_key:encrypt_private(Hashes, Key,
diff --git a/lib/ssl/test/Makefile.src b/lib/ssl/test/Makefile.src
deleted file mode 100644
index c70894707c..0000000000
--- a/lib/ssl/test/Makefile.src
+++ /dev/null
@@ -1,16 +0,0 @@
-# Dummy Makefile.src defined to provide backward compatibility for
-# applications that use both the new SSL (3.0 or later), and older
-# versions of SSL.
-#
-
-SSL_LIB_DIR = @ssl_libdir@
-TARGET = @target@
-SSLEAY_LIB = @SSLEAY_ROOT@/lib
-
-all:
- -echo "Begin dummy make"
- -echo SSL_LIB_DIR = $(SSL_LIB_DIR)
- -echo TARGET = $(TARGET)
- -echo SSLEAY_LIB = $(SSLEAY_LIB)
- -echo SSL_LIB_DIR = $(SSL_LIB_DIR)
- -echo "End dummy make"
diff --git a/lib/ssl/test/ssl_packet_SUITE.erl b/lib/ssl/test/ssl_packet_SUITE.erl
index 929f69c6c6..c59a5c9256 100644
--- a/lib/ssl/test/ssl_packet_SUITE.erl
+++ b/lib/ssl/test/ssl_packet_SUITE.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%
%%
@@ -37,7 +37,7 @@
-define(uint24(X), << ?UINT24(X) >> ).
-define(uint32(X), << ?UINT32(X) >> ).
-define(uint64(X), << ?UINT64(X) >> ).
--define(TIMEOUT, 60000).
+-define(TIMEOUT, 120000).
-define(MANY, 1000).
-define(SOME, 50).
diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk
index 603c419653..2239f2eff4 100644
--- a/lib/ssl/vsn.mk
+++ b/lib/ssl/vsn.mk
@@ -1,25 +1,26 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1999-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%
#
-SSL_VSN = 3.10.7
+SSL_VSN = 3.10.8
-TICKETS = OTP-8260 OTP-8218 OTP-8250
+TICKETS = OTP-8327
+#TICKETS_3.10.7 = OTP-8260 OTP-8218 OTP-8250
#TICKETS_3.10.6 = OTP-8275
diff --git a/lib/stdlib/doc/src/beam_lib.xml b/lib/stdlib/doc/src/beam_lib.xml
index f2a9c2a671..b9286f1402 100644
--- a/lib/stdlib/doc/src/beam_lib.xml
+++ b/lib/stdlib/doc/src/beam_lib.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</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>beam_lib</title>
@@ -70,82 +70,88 @@
using <seealso marker="#strip/1">strip/1</seealso>,
<seealso marker="#strip_files/1">strip_files/1</seealso> and/or
<seealso marker="#strip_release/1">strip_release/1</seealso>.</p>
- <p><em>Reconstructing source code</em></p>
- <p>Here is an example of how to reconstruct source code from
- the debug information in a BEAM file <c>Beam</c>:</p>
- <code type="none">
+ <section>
+ <title>Reconstructing source code</title>
+ <p>Here is an example of how to reconstruct source code from
+ the debug information in a BEAM file <c>Beam</c>:</p>
+ <code type="none">
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(Beam,[abstract_code]).
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).</code>
- <p><em>Encrypted debug information</em></p>
- <p>The debug information can be encrypted in order to keep
- the source code secret, but still being able to use tools such as
- Xref or Debugger. </p>
- <p>To use encrypted debug information, a key must be provided to
- the compiler and <c>beam_lib</c>. The key is given as a string and
- it is recommended that it contains at least 32 characters and
- that both upper and lower case letters as well as digits and
- special characters are used.</p>
- <p></p>
- <p>The default type -- and currently the only type -- of crypto
- algorithm is <c>des3_cbc</c>, three rounds of DES. The key string
- will be scrambled using <c>erlang:md5/1</c> to generate
- the actual keys used for <c>des3_cbc</c>.</p>
- <note>
- <p>As far as we know by the time of writing, it is
- infeasible to break <c>des3_cbc</c> encryption without any
- knowledge of the key. Therefore, as long as the key is kept
- safe and is unguessable, the encrypted debug information
- <em>should</em> be safe from intruders.</p>
- </note>
- <p>There are two ways to provide the key:</p>
- <list type="ordered">
- <item>
- <p>Use the compiler option <c>{debug_info,Key}</c>, see
- <seealso marker="compiler:compile#debug_info_key">compile(3)</seealso>,
- and the function
- <seealso marker="#crypto_key_fun/1">crypto_key_fun/1</seealso>
- to register a fun which returns the key whenever
- <c>beam_lib</c> needs to decrypt the debug information.</p>
- <p>If no such fun is registered, <c>beam_lib</c> will instead
- search for a <c>.erlang.crypt</c> file, see below.</p>
- </item>
- <item>
- <p>Store the key in a text file named <c>.erlang.crypt</c>.</p>
- <p>In this case, the compiler option <c>encrypt_debug_info</c>
- can be used, see
- <seealso marker="compiler:compile#encrypt_debug_info">compile(3)</seealso>.</p>
- </item>
- </list>
- <p><em>.erlang.crypt</em></p>
- <p><c>beam_lib</c> searches for <c>.erlang.crypt</c> in the current
- directory and then the home directory for the current user. If
- the file is found and contains a key, <c>beam_lib</c> will
- implicitly create a crypto key fun and register it.</p>
- <p>The <c>.erlang.crypt</c> file should contain a single list of
- tuples:</p>
- <code type="none">
+ </section>
+ <section>
+ <title>Encrypted debug information</title>
+ <p>The debug information can be encrypted in order to keep
+ the source code secret, but still being able to use tools such as
+ Xref or Debugger. </p>
+ <p>To use encrypted debug information, a key must be provided to
+ the compiler and <c>beam_lib</c>. The key is given as a string and
+ it is recommended that it contains at least 32 characters and
+ that both upper and lower case letters as well as digits and
+ special characters are used.</p>
+ <p></p>
+ <p>The default type -- and currently the only type -- of crypto
+ algorithm is <c>des3_cbc</c>, three rounds of DES. The key string
+ will be scrambled using <c>erlang:md5/1</c> to generate
+ the actual keys used for <c>des3_cbc</c>.</p>
+ <note>
+ <p>As far as we know by the time of writing, it is
+ infeasible to break <c>des3_cbc</c> encryption without any
+ knowledge of the key. Therefore, as long as the key is kept
+ safe and is unguessable, the encrypted debug information
+ <em>should</em> be safe from intruders.</p>
+ </note>
+ <p>There are two ways to provide the key:</p>
+ <list type="ordered">
+ <item>
+ <p>Use the compiler option <c>{debug_info,Key}</c>, see
+ <seealso marker="compiler:compile#debug_info_key">compile(3)</seealso>,
+ and the function
+ <seealso marker="#crypto_key_fun/1">crypto_key_fun/1</seealso>
+ to register a fun which returns the key whenever
+ <c>beam_lib</c> needs to decrypt the debug information.</p>
+ <p>If no such fun is registered, <c>beam_lib</c> will instead
+ search for a <c>.erlang.crypt</c> file, see below.</p>
+ </item>
+ <item>
+ <p>Store the key in a text file named <c>.erlang.crypt</c>.</p>
+ <p>In this case, the compiler option <c>encrypt_debug_info</c>
+ can be used, see
+ <seealso marker="compiler:compile#encrypt_debug_info">compile(3)</seealso>.</p>
+ </item>
+ </list>
+ </section>
+ <section>
+ <title>.erlang.crypt</title>
+ <p><c>beam_lib</c> searches for <c>.erlang.crypt</c> in the current
+ directory and then the home directory for the current user. If
+ the file is found and contains a key, <c>beam_lib</c> will
+ implicitly create a crypto key fun and register it.</p>
+ <p>The <c>.erlang.crypt</c> file should contain a single list of
+ tuples:</p>
+ <code type="none">
{debug_info, Mode, Module, Key}</code>
- <p><c>Mode</c> is the type of crypto algorithm; currently, the only
- allowed value thus is <c>des3_cbc</c>. <c>Module</c> is either an
- atom, in which case <c>Key</c> will only be used for the module
- <c>Module</c>, or <c>[]</c>, in which case <c>Key</c> will be
- used for all modules. <c>Key</c> is the non-empty key string.</p>
- <p>The <c>Key</c> in the first tuple where both <c>Mode</c> and
- <c>Module</c> matches will be used.</p>
- <p>Here is an example of an <c>.erlang.crypt</c> file that returns
- the same key for all modules:</p>
- <code type="none"><![CDATA[
+ <p><c>Mode</c> is the type of crypto algorithm; currently, the only
+ allowed value thus is <c>des3_cbc</c>. <c>Module</c> is either an
+ atom, in which case <c>Key</c> will only be used for the module
+ <c>Module</c>, or <c>[]</c>, in which case <c>Key</c> will be
+ used for all modules. <c>Key</c> is the non-empty key string.</p>
+ <p>The <c>Key</c> in the first tuple where both <c>Mode</c> and
+ <c>Module</c> matches will be used.</p>
+ <p>Here is an example of an <c>.erlang.crypt</c> file that returns
+ the same key for all modules:</p>
+ <code type="none"><![CDATA[
[{debug_info, des3_cbc, [], "%>7}|pc/DM6Cga*68$Mw]L#&_Gejr]G^"}].]]></code>
- <p>And here is a slightly more complicated example of an
- <c>.erlang.crypt</c> which provides one key for the module
- <c>t</c>, and another key for all other modules:</p>
- <code type="none"><![CDATA[
+ <p>And here is a slightly more complicated example of an
+ <c>.erlang.crypt</c> which provides one key for the module
+ <c>t</c>, and another key for all other modules:</p>
+ <code type="none"><![CDATA[
[{debug_info, des3_cbc, t, "My KEY"},
{debug_info, des3_cbc, [], "%>7}|pc/DM6Cga*68$Mw]L#&_Gejr]G^"}].]]></code>
- <note>
- <p>Do not use any of the keys in these examples. Use your own
- keys.</p>
- </note>
+ <note>
+ <p>Do not use any of the keys in these examples. Use your own
+ keys.</p>
+ </note>
+ </section>
</section>
<section>
diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
index c075f11792..6f9d979c9a 100644
--- a/lib/stdlib/doc/src/io.xml
+++ b/lib/stdlib/doc/src/io.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>io</title>
@@ -1003,7 +1003,8 @@ enter><input>bar.</input>
<title>Standard Error</title>
<p>In certain situations, especially when the standard output is redirected, access to an io_server() specific for error messages might be convenient. The io_device 'standard_error' can be used to direct output to whatever the current operating system considers a suitable device for error output. Example on a Unix-like operating system:</p>
<pre>
-$ <input>erl -noshell -noinput -eval 'io:format(standard_error,"Error: ~s~n",["error 11"]),init:stop().' > /dev/null</input>
+$ <input>erl -noshell -noinput -eval 'io:format(standard_error,"Error: ~s~n",["error 11"]),'\</input>
+<input>'init:stop().' > /dev/null</input>
Error: error 11</pre>
diff --git a/lib/stdlib/doc/src/unicode.xml b/lib/stdlib/doc/src/unicode.xml
index b3aad51591..60edd8ade9 100644
--- a/lib/stdlib/doc/src/unicode.xml
+++ b/lib/stdlib/doc/src/unicode.xml
@@ -51,7 +51,9 @@ charlist() = [unicode_char() | unicode_binary() | charlist()]
a unicode_binary is allowed as the tail of the list</code>
<code type="none">
-external_unicode_binary() = binary() with characters coded in a user specified Unicode encoding other than UTF-8 (UTF-16 or UTF-32)
+external_unicode_binary() = binary()
+ with characters coded in a user specified Unicode encoding other
+ than UTF-8 (UTF-16 or UTF-32)
external_chardata() = external_charlist() | external_unicode_binary()
diff --git a/lib/stdlib/doc/src/unicode_usage.xml b/lib/stdlib/doc/src/unicode_usage.xml
index 06347b3aae..c5bf10b63d 100644
--- a/lib/stdlib/doc/src/unicode_usage.xml
+++ b/lib/stdlib/doc/src/unicode_usage.xml
@@ -76,7 +76,8 @@ charlist() = [unicode_char() | unicode_binary() | charlist()]
a unicode_binary is allowed as the tail of the list</code>
<p>The module <c>unicode</c> in stdlib even supports similar mixes with binaries containing other encodings than UTF-8, but that is a special case to allow for conversions to and from external data:</p>
<code type="none">
-external_unicode_binary() = binary() with characters coded in a user specified Unicode encoding other than UTF-8 (UTF-16 or UTF-32)
+external_unicode_binary() = binary() with characters coded in a user specified Unicode
+ encoding other than UTF-8 (UTF-16 or UTF-32)
external_chardata() = external_charlist() | external_unicode_binary()
@@ -93,7 +94,8 @@ external_charlist() = [unicode_char() | external_unicode_binary() | external_cha
<code>
&lt;&lt;Ch/utf8,_/binary&gt;&gt; = Bin1,
&lt;&lt;Ch/utf16-little,_/binary&gt;&gt; = Bin2,
-Bin3 = &lt;&lt;$H/utf32-little, $e/utf32-little, $l/utf32-little, $l/utf32-little, $o/utf32-little&gt;&gt;,</code>
+Bin3 = &lt;&lt;$H/utf32-little, $e/utf32-little, $l/utf32-little, $l/utf32-little,
+ $o/utf32-little&gt;&gt;,</code>
<p>For convenience, literal strings can be encoded with a Unicode encoding in binaries using the following (or similar) syntax:</p>
<code>
Bin4 = &lt;&lt;"Hello"/utf16&gt;&gt;,</code>
diff --git a/lib/stdlib/src/edlin.erl b/lib/stdlib/src/edlin.erl
index 31a653bda0..0e98bbaa06 100644
--- a/lib/stdlib/src/edlin.erl
+++ b/lib/stdlib/src/edlin.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(edlin).
@@ -281,12 +281,32 @@ do_op(_, Bef, Aft, Rs) ->
%% Step over word/non-word characters pushing the stepped over ones on
%% the stack.
-over_word([C|Cs], Stack, N) ->
+
+over_word(Cs, Stack, N) ->
+ L = length([1 || $\' <- Cs]),
+ case L rem 2 of
+ 0 ->
+ over_word1(Cs, Stack, N);
+ 1 ->
+ until_quote(Cs, Stack, N)
+ end.
+
+until_quote([$\'|Cs], Stack, N) ->
+ {Cs, [$\'|Stack], N+1};
+until_quote([C|Cs], Stack, N) ->
+ until_quote(Cs, [C|Stack], N+1).
+
+over_word1([$\'=C|Cs], Stack, N) ->
+ until_quote(Cs, [C|Stack], N+1);
+over_word1(Cs, Stack, N) ->
+ over_word2(Cs, Stack, N).
+
+over_word2([C|Cs], Stack, N) ->
case word_char(C) of
- true -> over_word(Cs, [C|Stack], N+1);
+ true -> over_word2(Cs, [C|Stack], N+1);
false -> {[C|Cs],Stack,N}
end;
-over_word([], Stack, N) when is_integer(N) ->
+over_word2([], Stack, N) when is_integer(N) ->
{[],Stack,N}.
over_non_word([C|Cs], Stack, N) ->
diff --git a/lib/stdlib/src/edlin_expand.erl b/lib/stdlib/src/edlin_expand.erl
index 7ed76a6b09..516c0aa30b 100644
--- a/lib/stdlib/src/edlin_expand.erl
+++ b/lib/stdlib/src/edlin_expand.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2005-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(edlin_expand).
@@ -46,23 +46,38 @@ expand_module_name(Prefix) ->
match(Prefix, code:all_loaded(), ":").
expand_function_name(ModStr, FuncPrefix) ->
- Mod = list_to_atom(ModStr),
- case erlang:module_loaded(Mod) of
- true ->
- L = Mod:module_info(),
- case lists:keyfind(exports, 1, L) of
- {_, Exports} ->
- match(FuncPrefix, Exports, "(");
- _ ->
- {no, [], []}
- end;
- false ->
+ case to_atom(ModStr) of
+ {ok, Mod} ->
+ case erlang:module_loaded(Mod) of
+ true ->
+ L = Mod:module_info(),
+ case lists:keyfind(exports, 1, L) of
+ {_, Exports} ->
+ match(FuncPrefix, Exports, "(");
+ _ ->
+ {no, [], []}
+ end;
+ false ->
+ {no, [], []}
+ end;
+ error ->
{no, [], []}
end.
+%% if it's a quoted atom, atom_to_list/1 will do the wrong thing.
+to_atom(Str) ->
+ case erl_scan:string(Str) of
+ {ok, [{atom,_,A}], _} ->
+ {ok, A};
+ _ ->
+ error
+ end.
+
match(Prefix, Alts, Extra) ->
Len = length(Prefix),
- Matches = [{S, A} || {H, A} <- Alts, prefix(Prefix, S=atom_to_list(H))],
+ Matches = lists:sort(
+ [{S, A} || {H, A} <- Alts,
+ prefix(Prefix, S=hd(io_lib:fwrite("~w",[H])))]),
case longest_common_head([N || {N, _} <- Matches]) of
{partial, []} ->
{no, [], Matches}; % format_matches(Matches)};
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl
index 697a69b801..c0f71fb3f5 100644
--- a/lib/stdlib/src/escript.erl
+++ b/lib/stdlib/src/escript.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(escript).
@@ -180,7 +180,8 @@ parse_and_run(File, Args, Options) ->
is_binary(FormsOrBin) ->
case Source of
archive ->
- case code:set_primary_archive(File, FormsOrBin) of
+ {ok, FileInfo} = file:read_file_info(File),
+ case code:set_primary_archive(File, FormsOrBin, FileInfo) of
ok when CheckOnly ->
case code:load_file(Module) of
{module, _} ->
diff --git a/lib/stdlib/src/filelib.erl b/lib/stdlib/src/filelib.erl
index 3acc40ea20..74c5172137 100644
--- a/lib/stdlib/src/filelib.erl
+++ b/lib/stdlib/src/filelib.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(filelib).
diff --git a/lib/stdlib/src/re.erl b/lib/stdlib/src/re.erl
index 5417ac02e5..296a6b3d23 100644
--- a/lib/stdlib/src/re.erl
+++ b/lib/stdlib/src/re.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%
%%
-module(re).
@@ -32,18 +32,7 @@ split(Subject,RE,Options) ->
try
{NewOpt,Convert,Unicode,Limit,Strip,Group} =
process_split_params(Options,iodata,false,-1,false,false),
- FlatSubject =
- case is_binary(Subject) of
- true ->
- Subject;
- false ->
- case Unicode of
- true ->
- unicode:characters_to_binary(Subject,unicode);
- false ->
- iolist_to_binary(Subject)
- end
- end,
+ FlatSubject = to_binary(Subject, Unicode),
case compile_split(RE,NewOpt) of
{error,_Err} ->
throw(badre);
@@ -217,19 +206,9 @@ replace(Subject,RE,Replacement,Options) ->
try
{NewOpt,Convert,Unicode} =
process_repl_params(Options,iodata,false),
- FlatSubject =
- case is_binary(Subject) of
- true ->
- Subject;
- false ->
- case Unicode of
- true ->
- unicode:characters_to_binary(Subject,unicode);
- false ->
- iolist_to_binary(Subject)
- end
- end,
- case do_replace(FlatSubject,Subject,RE,Replacement,NewOpt) of
+ FlatSubject = to_binary(Subject, Unicode),
+ FlatReplacement = to_binary(Replacement, Unicode),
+ case do_replace(FlatSubject,Subject,RE,FlatReplacement,NewOpt) of
{error,_Err} ->
throw(badre);
IoList ->
@@ -237,7 +216,12 @@ replace(Subject,RE,Replacement,Options) ->
iodata ->
IoList;
binary ->
- iolist_to_binary(IoList);
+ case Unicode of
+ false ->
+ iolist_to_binary(IoList);
+ true ->
+ unicode:characters_to_binary(IoList,unicode)
+ end;
list ->
case Unicode of
false ->
@@ -324,8 +308,7 @@ process_split_params([H|T],C,U,L,S,G) ->
{[H|NT],NC,NU,NL,NS,NG}.
apply_mlist(Subject,Replacement,Mlist) ->
- do_mlist(Subject,Subject,0,precomp_repl(iolist_to_binary(Replacement)),
- Mlist).
+ do_mlist(Subject,Subject,0,precomp_repl(Replacement), Mlist).
precomp_repl(<<>>) ->
@@ -545,7 +528,7 @@ process_uparams([],Type) ->
ucompile(RE,Options) ->
try
- re:compile(unicode:characters_to_binary(RE,unicode))
+ re:compile(unicode:characters_to_binary(RE,unicode),Options)
catch
error:AnyError ->
{'EXIT',{new_stacktrace,[{Mod,_,L}|Rest]}} =
@@ -618,18 +601,7 @@ grun(Subject,RE,{Options,NeedClean,OrigRE}) ->
grun2(Subject,RE,{Options,NeedClean}) ->
Unicode = check_for_unicode(RE,Options),
- FlatSubject =
- case is_binary(Subject) of
- true ->
- Subject;
- false ->
- case Unicode of
- true ->
- unicode:characters_to_binary(Subject,unicode);
- false ->
- iolist_to_binary(Subject)
- end
- end,
+ FlatSubject = to_binary(Subject, Unicode),
do_grun(FlatSubject,Subject,Unicode,RE,{Options,NeedClean}).
do_grun(FlatSubject,Subject,Unicode,RE,{Options0,NeedClean}) ->
@@ -749,3 +721,10 @@ runopt(global) ->
true;
runopt(_) ->
false.
+
+to_binary(Bin, _IsUnicode) when is_binary(Bin) ->
+ Bin;
+to_binary(Data, true) ->
+ unicode:characters_to_binary(Data,unicode);
+to_binary(Data, false) ->
+ iolist_to_binary(Data).
diff --git a/lib/stdlib/test/ExpandTestCaps.erl b/lib/stdlib/test/ExpandTestCaps.erl
new file mode 100644
index 0000000000..96c4115354
--- /dev/null
+++ b/lib/stdlib/test/ExpandTestCaps.erl
@@ -0,0 +1,32 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 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('ExpandTestCaps').
+
+-export([a_fun_name/1,
+ a_less_fun_name/1,
+ b_comes_after_a/1]).
+
+a_fun_name(X) ->
+ X.
+
+a_less_fun_name(X) ->
+ X.
+
+b_comes_after_a(X) ->
+ X.
diff --git a/lib/stdlib/test/ExpandTestCaps1.erl b/lib/stdlib/test/ExpandTestCaps1.erl
new file mode 100644
index 0000000000..09ee9f81c4
--- /dev/null
+++ b/lib/stdlib/test/ExpandTestCaps1.erl
@@ -0,0 +1,44 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 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('ExpandTestCaps1').
+
+-export([a_fun_name/1,
+ a_less_fun_name/1,
+ b_comes_after_a/1,
+ 'Quoted_fun_name'/0,
+ 'Quoted_fun_too'/0,
+ '#weird-fun-name'/0]).
+
+a_fun_name(X) ->
+ X.
+
+a_less_fun_name(X) ->
+ X.
+
+b_comes_after_a(X) ->
+ X.
+
+'Quoted_fun_name'() ->
+ whoopee.
+
+'Quoted_fun_too'() ->
+ too.
+
+'#weird-fun-name'() ->
+ weird.
diff --git a/lib/stdlib/test/Makefile b/lib/stdlib/test/Makefile
index 7a87eef5f3..ac8cbba375 100644
--- a/lib/stdlib/test/Makefile
+++ b/lib/stdlib/test/Makefile
@@ -18,6 +18,7 @@ MODULES= \
digraph_utils_SUITE \
dummy1_h \
dummy_h \
+ edlin_expand_SUITE \
epp_SUITE \
erl_eval_helper \
erl_eval_SUITE \
@@ -29,6 +30,10 @@ MODULES= \
escript_SUITE \
ets_SUITE \
ets_tough_SUITE \
+ expand_test \
+ expand_test1 \
+ ExpandTestCaps \
+ ExpandTestCaps1 \
filelib_SUITE \
file_sorter_SUITE \
filename_SUITE \
diff --git a/lib/stdlib/test/edlin_expand_SUITE.erl b/lib/stdlib/test/edlin_expand_SUITE.erl
new file mode 100644
index 0000000000..613bfd000e
--- /dev/null
+++ b/lib/stdlib/test/edlin_expand_SUITE.erl
@@ -0,0 +1,156 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 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(edlin_expand_SUITE).
+-export([all/1]).
+
+-export([normal/1, quoted_fun/1, quoted_module/1, quoted_both/1]).
+
+-export([init_per_testcase/2, fin_per_testcase/2]).
+
+-include("test_server.hrl").
+
+% Default timetrap timeout (set in init_per_testcase).
+-define(default_timeout, ?t:minutes(1)).
+
+init_per_testcase(_Case, Config) ->
+ ?line Dog = ?t:timetrap(?default_timeout),
+ [{watchdog, Dog} | Config].
+fin_per_testcase(_Case, Config) ->
+ Dog = ?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+all(doc) ->
+ ["Test cases for edlin_expand."];
+all(suite) ->
+ [normal, quoted_fun, quoted_module, quoted_both].
+
+normal(doc) ->
+ [""];
+normal(suite) ->
+ [];
+normal(Config) when is_list(Config) ->
+ ?line {module,expand_test} = c:l(expand_test),
+ % These tests might fail if another module with the prefix "expand_" happens
+ % to also be loaded.
+ ?line {yes, "test:", []} = edlin_expand:expand(lists:reverse("expand_")),
+ ?line {no, [], []} = edlin_expand:expand(lists:reverse("expandXX_")),
+ ?line {no,[],
+ [{"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = edlin_expand:expand(lists:reverse("expand_test:")),
+ ?line {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = edlin_expand:expand(
+ lists:reverse("expand_test:a_")),
+ ok.
+
+quoted_fun(doc) ->
+ ["Normal module name, some function names using quoted atoms"];
+quoted_fun(suite) ->
+ [];
+quoted_fun(Config) when is_list(Config) ->
+ ?line {module,expand_test} = c:l(expand_test),
+ ?line {module,expand_test1} = c:l(expand_test1),
+ %% should be no colon after test this time
+ ?line {yes, "test", []} = edlin_expand:expand(lists:reverse("expand_")),
+ ?line {no, [], []} = edlin_expand:expand(lists:reverse("expandXX_")),
+ ?line {no,[],[{"'#weird-fun-name'",0},
+ {"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0},
+ {"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = edlin_expand:expand(
+ lists:reverse("expand_test1:")),
+ ?line {yes,"_",[]} = edlin_expand:expand(
+ lists:reverse("expand_test1:a")),
+ ?line {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = edlin_expand:expand(
+ lists:reverse("expand_test1:a_")),
+ ?line {yes,[],
+ [{"'#weird-fun-name'",0},
+ {"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
+ lists:reverse("expand_test1:'")),
+ ?line {yes,"uoted_fun_",[]} = edlin_expand:expand(
+ lists:reverse("expand_test1:'Q")),
+ ?line {yes,[],
+ [{"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
+ lists:reverse("expand_test1:'Quoted_fun_")),
+ ?line {yes,"weird-fun-name'(",[]} = edlin_expand:expand(
+ lists:reverse("expand_test1:'#")),
+ ok.
+
+quoted_module(doc) ->
+ [""];
+quoted_module(suite) ->
+ [];
+quoted_module(Config) when is_list(Config) ->
+ ?line {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
+ ?line {yes, "Caps':", []} = edlin_expand:expand(lists:reverse("'ExpandTest")),
+ ?line {no,[],
+ [{"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = edlin_expand:expand(lists:reverse("'ExpandTestCaps':")),
+ ?line {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = edlin_expand:expand(
+ lists:reverse("'ExpandTestCaps':a_")),
+ ok.
+
+quoted_both(suite) ->
+ [];
+quoted_both(Config) when is_list(Config) ->
+ ?line {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
+ ?line {module,'ExpandTestCaps1'} = c:l('ExpandTestCaps1'),
+ %% should be no colon (or quote) after test this time
+ ?line {yes, "Caps", []} = edlin_expand:expand(lists:reverse("'ExpandTest")),
+ ?line {no,[],[{"'#weird-fun-name'",0},
+ {"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0},
+ {"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = edlin_expand:expand(
+ lists:reverse("'ExpandTestCaps1':")),
+ ?line {yes,"_",[]} = edlin_expand:expand(
+ lists:reverse("'ExpandTestCaps1':a")),
+ ?line {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = edlin_expand:expand(
+ lists:reverse("'ExpandTestCaps1':a_")),
+ ?line {yes,[],
+ [{"'#weird-fun-name'",0},
+ {"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
+ lists:reverse("'ExpandTestCaps1':'")),
+ ?line {yes,"uoted_fun_",[]} = edlin_expand:expand(
+ lists:reverse("'ExpandTestCaps1':'Q")),
+ ?line {yes,[],
+ [{"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
+ lists:reverse("'ExpandTestCaps1':'Quoted_fun_")),
+ ?line {yes,"weird-fun-name'(",[]} = edlin_expand:expand(
+ lists:reverse("'ExpandTestCaps1':'#")),
+ ok.
diff --git a/lib/stdlib/test/expand_test.erl b/lib/stdlib/test/expand_test.erl
new file mode 100644
index 0000000000..63e4bc3aa0
--- /dev/null
+++ b/lib/stdlib/test/expand_test.erl
@@ -0,0 +1,32 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 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(expand_test).
+
+-export([a_fun_name/1,
+ a_less_fun_name/1,
+ b_comes_after_a/1]).
+
+a_fun_name(X) ->
+ X.
+
+a_less_fun_name(X) ->
+ X.
+
+b_comes_after_a(X) ->
+ X.
diff --git a/lib/stdlib/test/expand_test1.erl b/lib/stdlib/test/expand_test1.erl
new file mode 100644
index 0000000000..11b6fec0f3
--- /dev/null
+++ b/lib/stdlib/test/expand_test1.erl
@@ -0,0 +1,44 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 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(expand_test1).
+
+-export([a_fun_name/1,
+ a_less_fun_name/1,
+ b_comes_after_a/1,
+ 'Quoted_fun_name'/0,
+ 'Quoted_fun_too'/0,
+ '#weird-fun-name'/0]).
+
+a_fun_name(X) ->
+ X.
+
+a_less_fun_name(X) ->
+ X.
+
+b_comes_after_a(X) ->
+ X.
+
+'Quoted_fun_name'() ->
+ whoopee.
+
+'Quoted_fun_too'() ->
+ too.
+
+'#weird-fun-name'() ->
+ weird.
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl
index d6abc1fba3..d54741051f 100644
--- a/lib/stdlib/test/filelib_SUITE.erl
+++ b/lib/stdlib/test/filelib_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2005-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%
%%
diff --git a/lib/stdlib/test/io_proto_SUITE.erl b/lib/stdlib/test/io_proto_SUITE.erl
index 46407193d7..59aa175c73 100644
--- a/lib/stdlib/test/io_proto_SUITE.erl
+++ b/lib/stdlib/test/io_proto_SUITE.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(io_proto_SUITE).
@@ -48,9 +48,12 @@
-ifdef(debug).
-define(format(S, A), io:format(S, A)).
-define(dbg(Data),io:format(standard_error, "DBG: ~p\r\n",[Data])).
+-define(RM_RF(Dir),begin io:format(standard_error, "Not Removed: ~p\r\n",[Dir]),
+ ok end).
-else.
-define(format(S, A), ok).
-define(dbg(Data),noop).
+-define(RM_RF(Dir),rm_rf(Dir)).
-endif.
@@ -197,6 +200,15 @@ setopts_getopts(Config) when is_list(Config) ->
{getline_re, ".*<<\"hej\\\\n\">>"}
],[],[],"-oldshell"),
ok.
+
+
+get_lc_ctype() ->
+ case {os:type(),os:version()} of
+ {{unix,sunos},{5,N,_}} when N =< 8 ->
+ "iso_8859_1";
+ _ ->
+ "ISO-8859-1"
+ end.
unicode_options(suite) ->
[];
@@ -369,7 +381,7 @@ unicode_options(Config) when is_list(Config) ->
{getline,
binary_to_list(unicode:characters_to_binary(
[1024],unicode,utf8))}
- ],[],"LC_CTYPE=\"ISO-8859-1\"; export LC_CTYPE; "),
+ ],[],"LC_CTYPE=\""++get_lc_ctype()++"\"; export LC_CTYPE; "),
?line rtnode([{putline,""},
{putline, "2."},
{getline_re, ".*2."},
@@ -384,7 +396,7 @@ unicode_options(Config) when is_list(Config) ->
{getline_re,
".*"++binary_to_list(unicode:characters_to_binary(
[1024],unicode,utf8))}
- ],[],"LC_CTYPE=\"ISO-8859-1\"; export LC_CTYPE; ",
+ ],[],"LC_CTYPE=\""++get_lc_ctype()++"\"; export LC_CTYPE; ",
" -oldshell "),
ok.
@@ -974,7 +986,7 @@ answering_machine1(OthNode,OthReg,Me) ->
{putline, TestDataUtf},
{getline_re, ".*Okej"}
- ],Me,"LC_CTYPE=\"ISO-8859-1\"; export LC_CTYPE; "),
+ ],Me,"LC_CTYPE=\""++get_lc_ctype()++"\"; export LC_CTYPE; "),
O = list_to_atom(OthReg),
O ! {self(),done},
ok.
@@ -1045,7 +1057,7 @@ answering_machine2(OthNode,OthReg,Me) ->
{putline, TestDataUtf},
{getline_re, ".*Okej"}
- ],Me,"LC_CTYPE=\"ISO-8859-1\"; export LC_CTYPE; "," -oldshell "),
+ ],Me,"LC_CTYPE=\""++get_lc_ctype()++"\"; export LC_CTYPE; "," -oldshell "),
O = list_to_atom(OthReg),
O ! {self(),done},
ok.
@@ -1087,7 +1099,9 @@ read_modes_gl_1(_Config,Machine) ->
[MyNodeList, "io_proto_suite", N2List]),
?line GL = receive X when is_pid(X) -> X end,
+ ?dbg({group_leader,X}),
%% get_line
+ ?line receive after 500 -> ok end, % Dont clash with the new shell...
?line "Hej\n" = io:get_line(GL,"Prompt\n"),
?line io:setopts(GL,[binary]),
?line io:format(GL,"Okej~n",[]),
@@ -1287,7 +1301,7 @@ rtnode(Commands,Nodename,ErlPrefix,Extra) ->
?line ok
end,
?line wait_for_runerl_server(SPid),
- ?line ok = rm_rf(Tempdir),
+ ?line ok = ?RM_RF(Tempdir),
?line ok = Res
end
end.
@@ -1308,7 +1322,7 @@ timeout(normal) ->
%% stop_noshell_node(Node) ->
%% test_server:stop_node(Node).
-
+-ifndef(debug).
rm_rf(Dir) ->
try
{ok,List} = file:list_dir(Dir),
@@ -1324,7 +1338,7 @@ rm_rf(Dir) ->
catch
_:Exception -> {error, {Exception,Dir}}
end.
-
+-endif.
get_and_put(_CPid,[],_) ->
ok;
@@ -1527,6 +1541,8 @@ start_runerl_node(RunErl,Erl,Tempdir,Nodename,Extra) ->
" "++Extra
end,
spawn(fun() ->
+ ?dbg(RunErl++" "++Tempdir++"/ "++Tempdir++" \""++
+ Erl++XArg++XXArg++"\""),
os:cmd(RunErl++" "++Tempdir++"/ "++Tempdir++" \""++
Erl++XArg++XXArg++"\"")
end).
diff --git a/lib/stdlib/test/re_SUITE.erl b/lib/stdlib/test/re_SUITE.erl
index 98eb66d1fb..fa50ba3b7a 100644
--- a/lib/stdlib/test/re_SUITE.erl
+++ b/lib/stdlib/test/re_SUITE.erl
@@ -1,29 +1,29 @@
%%
%% %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%
%%
-module(re_SUITE).
--export([all/1, pcre/1,compile_options/1,run_options/1,combined_options/1,replace_autogen/1,global_capture/1,replace_return/1,split_autogen/1,split_options/1,split_specials/1,error_handling/1]).
+-export([all/1, pcre/1,compile_options/1,run_options/1,combined_options/1,replace_autogen/1,global_capture/1,replace_input_types/1,replace_return/1,split_autogen/1,split_options/1,split_specials/1,error_handling/1]).
-include("test_server.hrl").
-include_lib("kernel/include/file.hrl").
-all(suite) -> [pcre,compile_options,run_options,combined_options,replace_autogen,global_capture,replace_return,split_autogen,split_options,split_specials,error_handling].
+all(suite) -> [pcre,compile_options,run_options,combined_options,replace_autogen,global_capture,replace_input_types,replace_return,split_autogen,split_options,split_specials,error_handling].
pcre(doc) ->
["Run all applicable tests from the PCRE testsuites."];
@@ -268,7 +268,17 @@ global_capture(Config) when is_list(Config) ->
?line {match,[[{3,5},{5,3}],[{11,4},{12,3}]]} = re:run("ABC�bcdABCabcdA",".(?<FOO>bcd)",[global,{capture,all,index},unicode]),
?t:timetrap_cancel(Dog),
ok.
-
+
+replace_input_types(doc) ->
+ ["Tests replace with different input types"];
+replace_input_types(Config) when is_list(Config) ->
+ Dog = ?t:timetrap(?t:minutes(3)),
+ ?line <<"abcd">> = re:replace("abcd","Z","X",[{return,binary},unicode]),
+ ?line <<"abcd">> = re:replace("abcd","\x{400}","X",[{return,binary},unicode]),
+ ?line <<"a",208,128,"cd">> = re:replace(<<"abcd">>,"b","\x{400}",[{return,binary},unicode]),
+ ?t:timetrap_cancel(Dog),
+ ok.
+
replace_return(doc) ->
["Tests return options of replace together with global searching"];
replace_return(Config) when is_list(Config) ->
@@ -289,6 +299,10 @@ replace_return(Config) when is_list(Config) ->
?line <<"iXk">> = re:replace("abcdefghijk","(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)","\\9X",[{return,binary}]),
?line <<"jXk">> = re:replace("abcdefghijk","(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)","\\10X",[{return,binary}]),
?line <<"Xk">> = re:replace("abcdefghijk","(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)","\\11X",[{return,binary}]),
+ ?line "a\x{400}bcX" = re:replace("a\x{400}bcd","d","X",[global,{return,list},unicode]),
+ ?line <<"a",208,128,"bcX">> = re:replace("a\x{400}bcd","d","X",[global,{return,binary},unicode]),
+ ?line "a\x{400}bcd" = re:replace("a\x{400}bcd","Z","X",[global,{return,list},unicode]),
+ ?line <<"a",208,128,"bcd">> = re:replace("a\x{400}bcd","Z","X",[global,{return,binary},unicode]),
?t:timetrap_cancel(Dog),
ok.
diff --git a/lib/stdlib/test/re_SUITE_data/mod_testoutput8 b/lib/stdlib/test/re_SUITE_data/mod_testoutput8
new file mode 100644
index 0000000000..b7e7b02d6c
--- /dev/null
+++ b/lib/stdlib/test/re_SUITE_data/mod_testoutput8
@@ -0,0 +1,877 @@
+/-- Do not use the \x{} construct except with patterns that have the --/
+/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
+No match
+/-- that option is set. However, the latest Perls recognize them always. --/
+No match
+
+\x{100}ab/8
+ \x{100}ab
+ 0: \x{100}ab
+
+/a\x{100}*b/8
+ ab
+ 0: ab
+ a\x{100}b
+ 0: a\x{100}b
+ a\x{100}\x{100}b
+ 0: a\x{100}\x{100}b
+
+/a\x{100}+b/8
+ a\x{100}b
+ 0: a\x{100}b
+ a\x{100}\x{100}b
+ 0: a\x{100}\x{100}b
+ *** Failers
+No match
+ ab
+No match
+
+/\bX/8
+ Xoanon
+ 0: X
+ +Xoanon
+ 0: X
+ \x{300}Xoanon
+ 0: X
+ *** Failers
+No match
+ YXoanon
+No match
+
+/\BX/8
+ YXoanon
+ 0: X
+ *** Failers
+No match
+ Xoanon
+No match
+ +Xoanon
+No match
+ \x{300}Xoanon
+No match
+
+/X\b/8
+ X+oanon
+ 0: X
+ ZX\x{300}oanon
+ 0: X
+ FAX
+ 0: X
+ *** Failers
+No match
+ Xoanon
+No match
+
+/X\B/8
+ Xoanon
+ 0: X
+ *** Failers
+No match
+ X+oanon
+No match
+ ZX\x{300}oanon
+No match
+ FAX
+No match
+
+/[^a]/8
+ abcd
+ 0: b
+ a\x{100}
+ 0: \x{100}
+
+/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
+ ab99
+ 0: ab9
+ \x{123}\x{123}45
+ 0: \x{123}\x{123}4
+ \x{400}\x{401}\x{402}6
+ 0: \x{400}\x{401}\x{402}6
+ *** Failers
+No match
+ d99
+No match
+ \x{123}\x{122}4
+No match
+ \x{400}\x{403}6
+No match
+ \x{400}\x{401}\x{402}\x{402}6
+No match
+
+/abc/8
+ �]
+Error -10
+ �
+Error -10
+ ���
+Error -10
+ ���\?
+No match
+
+/a.b/8
+ acb
+ 0: acb
+ a\x7fb
+ 0: a\x{7f}b
+ a\x{100}b
+ 0: a\x{100}b
+ *** Failers
+No match
+ a\nb
+No match
+
+/^[a\x{c0}]/8
+ *** Failers
+No match
+ \x{100}
+No match
+
+/(?<=aXb)cd/8
+ aXbcd
+ 0: cd
+
+/(?<=a\x{100}b)cd/8
+ a\x{100}bcd
+ 0: cd
+
+/(?<=a\x{100000}b)cd/8
+ a\x{100000}bcd
+ 0: cd
+
+/(?:\x{100}){3}b/8
+ \x{100}\x{100}\x{100}b
+ 0: \x{100}\x{100}\x{100}b
+ *** Failers
+No match
+ \x{100}\x{100}b
+No match
+
+/\x{ab}/8
+ \x{ab}
+ 0: \x{ab}
+ \xc2\xab
+ 0: \x{ab}
+ *** Failers
+No match
+ \x00{ab}
+No match
+
+/^[^a]{2}/8
+ \x{100}bc
+ 0: \x{100}b
+
+/^[^a]{2,}/8
+ \x{100}bcAa
+ 0: \x{100}bcA
+
+/^[^a]{2,}?/8
+ \x{100}bca
+ 0: \x{100}b
+
+/^[^a]{2}/8i
+ \x{100}bc
+ 0: \x{100}b
+
+/^[^a]{2,}/8i
+ \x{100}bcAa
+ 0: \x{100}bc
+
+/^[^a]{2,}?/8iU
+ \x{100}bca
+ 0: \x{100}bc
+
+/\x{100}{0,0}/8
+ abcd
+ 0:
+
+/\x{100}?/8
+ abcd
+ 0:
+ \x{100}\x{100}
+ 0: \x{100}
+
+/\x{100}{0,3}/8
+ \x{100}\x{100}
+ 0: \x{100}\x{100}
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}
+
+/\x{100}*/8
+ abce
+ 0:
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+
+/\x{100}{1,1}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}
+
+/\x{100}{1,3}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}
+
+/\x{100}+/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+
+/\x{100}{3}/8
+ abcd\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}
+
+/\x{100}{3,5}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}
+
+/\x{100}{3,}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+
+/(?<=a\x{100}{2}b)X/8
+ Xyyya\x{100}\x{100}bXzzz
+ 0: X
+
+/\D*/8
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\D*/8
+ \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+
+/\D/8
+ 1X2
+ 0: X
+ 1\x{100}2
+ 0: \x{100}
+
+/>\S/8
+ > >X Y
+ 0: >X
+ > >\x{100} Y
+ 0: >\x{100}
+
+/\d/8
+ \x{100}3
+ 0: 3
+
+/\s/8
+ \x{100} X
+ 0:
+
+/\D+/8
+ 12abcd34
+ 0: abcd
+ *** Failers
+ 0: *** Failers
+ 1234
+No match
+
+/\d+/8
+ 12abcd34
+ 0: 12
+ *** Failers
+No match
+
+/\d{2,3}/8
+ 12abcd34
+ 0: 12
+ 1234abcd
+ 0: 123
+ *** Failers
+No match
+ 1.4
+No match
+
+/\S+/8
+ 12abcd34
+ 0: 12abcd34
+ *** Failers
+ 0: ***
+ \ \
+No match
+
+/>\s+</8
+ 12> <34
+ 0: > <
+ *** Failers
+No match
+
+/>\s{2,3}</8
+ ab> <cd
+ 0: > <
+ ab> <ce
+ 0: > <
+ *** Failers
+No match
+ ab> <cd
+No match
+
+/>\s{2,3}?</8
+ ab> <cd
+ 0: > <
+ ab> <ce
+ 0: > <
+ *** Failers
+No match
+ ab> <cd
+No match
+
+/\w+/8
+ 12 34
+ 0: 12
+ *** Failers
+ 0: Failers
+ +++=*!
+No match
+
+/\w{2,3}/8
+ ab cd
+ 0: ab
+ abcd ce
+ 0: abc
+ *** Failers
+ 0: Fai
+ a.b.c
+No match
+
+/\W+/8
+ 12====34
+ 0: ====
+ *** Failers
+ 0: ***
+ abcd
+No match
+
+/\W{2,3}/8
+ ab====cd
+ 0: ===
+ ab==cd
+ 0: ==
+ *** Failers
+ 0: ***
+ a.b.c
+No match
+
+/\W{2,3}?/8U
+ ab====cd
+ 0: ===
+ ab==cd
+ 0: ==
+ *** Failers
+ 0: ***
+ a.b.c
+No match
+
+/[\x{100}]/8
+ \x{100}
+ 0: \x{100}
+ Z\x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
+No match
+
+/[Z\x{100}]/8
+ Z\x{100}
+ 0: Z
+ \x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
+No match
+
+/[\x{100}\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ *** Failers
+No match
+
+/[\x{100}-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ *** Failers
+No match
+
+/[z-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ abzcd
+ 0: z
+ ab|cd
+ 0: |
+ *** Failers
+No match
+
+/[Q\x{100}\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ Q?
+ 0: Q
+ *** Failers
+No match
+
+/[Q\x{100}-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ Q?
+ 0: Q
+ *** Failers
+No match
+
+/[Qz-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ abzcd
+ 0: z
+ ab|cd
+ 0: |
+ Q?
+ 0: Q
+ *** Failers
+No match
+
+/[\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ *** Failers
+No match
+
+/[\x{100}\x{200}]{1,3}?/8U
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ *** Failers
+No match
+
+/[Q\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ *** Failers
+No match
+
+/[Q\x{100}\x{200}]{1,3}?/8U
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ *** Failers
+No match
+
+/(?<=[\x{100}\x{200}])X/8
+ abc\x{200}X
+ 0: X
+ abc\x{100}X
+ 0: X
+ *** Failers
+No match
+ X
+No match
+
+/(?<=[Q\x{100}\x{200}])X/8
+ abc\x{200}X
+ 0: X
+ abc\x{100}X
+ 0: X
+ abQX
+ 0: X
+ *** Failers
+No match
+ X
+No match
+
+/(?<=[\x{100}\x{200}]{3})X/8
+ abc\x{100}\x{200}\x{100}X
+ 0: X
+ *** Failers
+No match
+ abc\x{200}X
+No match
+ X
+No match
+
+/[^\x{100}\x{200}]X/8
+ AX
+ 0: AX
+ \x{150}X
+ 0: \x{150}X
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
+No match
+ \x{100}X
+No match
+ \x{200}X
+No match
+
+/[^Q\x{100}\x{200}]X/8
+ AX
+ 0: AX
+ \x{150}X
+ 0: \x{150}X
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
+No match
+ \x{100}X
+No match
+ \x{200}X
+No match
+ QX
+No match
+
+/[^\x{100}-\x{200}]X/8
+ AX
+ 0: AX
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
+No match
+ \x{100}X
+No match
+ \x{150}X
+No match
+ \x{200}X
+No match
+
+/[z-\x{100}]/8i
+ z
+ 0: z
+ Z
+ 0: Z
+ \x{100}
+ 0: \x{100}
+ *** Failers
+No match
+ \x{102}
+No match
+ y
+No match
+
+/[\xFF]/
+ >\xff<
+ 0: \xff
+
+/[\xff]/8
+ >\x{ff}<
+ 0: \x{ff}
+
+/[^\xFF]/
+ XYZ
+ 0: X
+
+/[^\xff]/8
+ XYZ
+ 0: X
+ \x{123}
+ 0: \x{123}
+
+/^[ac]*b/8
+ xb
+No match
+
+/^[ac\x{100}]*b/8
+ xb
+No match
+
+/^[^x]*b/8i
+ xb
+No match
+
+/^[^x]*b/8
+ xb
+No match
+
+/^\d*b/8
+ xb
+No match
+
+/^\x{85}$/8i
+ \x{85}
+ 0: \x{85}
+
+/^abc./mgx8<any>
+ abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
+ 0: abc1
+ 0: abc2
+ 0: abc3
+ 0: abc4
+ 0: abc5
+ 0: abc6
+ 0: abc7
+ 0: abc8
+ 0: abc9
+
+/abc.$/mgx8<any>
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
+ 0: abc1
+ 0: abc2
+ 0: abc3
+ 0: abc4
+ 0: abc5
+ 0: abc6
+ 0: abc7
+ 0: abc8
+ 0: abc9
+
+/^a\Rb/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0cb
+ 0: a\x{0c}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x{2028}b
+ 0: a\x{2028}b
+ a\x{2029}b
+ 0: a\x{2029}b
+ ** Failers
+No match
+ a\n\rb
+No match
+
+/^a\R*b/8<bsr_unicode>
+ ab
+ 0: ab
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0c\x{2028}\x{2029}b
+ 0: a\x{0c}\x{2028}\x{2029}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}\x0cb
+ 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+
+/^a\R+b/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0c\x{2028}\x{2029}b
+ 0: a\x{0c}\x{2028}\x{2029}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}\x0cb
+ 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+ ** Failers
+No match
+ ab
+No match
+
+/^a\R{1,3}b/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}b
+ 0: a\x{0a}\x{0d}\x{85}b
+ a\r\n\r\nb
+ 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
+ a\r\n\r\n\r\nb
+ 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
+ a\n\r\n\rb
+ 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
+ a\n\n\r\nb
+ 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\n\n\n\rb
+No match
+ a\r
+No match
+
+/\h+\V?\v{3,4}/8
+ \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
+
+/\V?\v{3,4}/8
+ \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: X\x{0a}\x{0b}\x{0c}\x{0d}
+
+/\h+\V?\v{3,4}/8
+ >\x09\x20\x{a0}X\x0a\x0a\x0a<
+ 0: \x{09} \x{a0}X\x{0a}\x{0a}\x{0a}
+
+/\V?\v{3,4}/8
+ >\x09\x20\x{a0}X\x0a\x0a\x0a<
+ 0: X\x{0a}\x{0a}\x{0a}
+
+/\H\h\V\v/8
+ X X\x0a
+ 0: X X\x{0a}
+ X\x09X\x0b
+ 0: X\x{09}X\x{0b}
+ ** Failers
+No match
+ \x{a0} X\x0a
+No match
+
+/\H*\h+\V?\v{3,4}/8
+ \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
+ \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
+ \x09\x20\x{a0}\x0a\x0b\x0c
+ 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
+ ** Failers
+No match
+ \x09\x20\x{a0}\x0a\x0b
+No match
+
+/\H\h\V\v/8
+ \x{3001}\x{3000}\x{2030}\x{2028}
+ 0: \x{3001}\x{3000}\x{2030}\x{2028}
+ X\x{180e}X\x{85}
+ 0: X\x{180e}X\x{85}
+ ** Failers
+No match
+ \x{2009} X\x0a
+No match
+
+/\H*\h+\V?\v{3,4}/8
+ \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
+ 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
+ \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
+ 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
+ \x09\x20\x{202f}\x0a\x0b\x0c
+ 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
+ ** Failers
+No match
+ \x09\x{200a}\x{a0}\x{2028}\x0b
+No match
+
+/a\Rb/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\Rb/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
+No match
+ a\x{85}b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/a\R?b/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\R?b/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
+No match
+ a\x{85}b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/ End of testinput 8 /
diff --git a/lib/stdlib/test/run_pcre_tests.erl b/lib/stdlib/test/run_pcre_tests.erl
index 0ef3986918..8c6424e708 100644
--- a/lib/stdlib/test/run_pcre_tests.erl
+++ b/lib/stdlib/test/run_pcre_tests.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%
%%
-module(run_pcre_tests).
@@ -25,7 +25,7 @@ test(RootDir) ->
erts_debug:set_internal_state(available_internal_state,true),
io:format("oldlimit: ~p~n",[ erts_debug:set_internal_state(re_loop_limit,10)]),
Testfiles0 = ["testoutput1", "testoutput2", "testoutput3", "testoutput4",
- "testoutput5", "testoutput6", "testoutput10"],
+ "testoutput5", "testoutput6","mod_testoutput8","testoutput10"],
Testfiles = [ filename:join([RootDir,FN]) || FN <- Testfiles0 ],
Res = [ begin io:format("~s~n",[X]), t(X) end || X <- Testfiles ],
io:format("limit was: ~p~n",[ erts_debug:set_internal_state(re_loop_limit,default)]),
@@ -42,12 +42,14 @@ t(OneFile,Num) ->
put(error_limit,Num),
put(skipped,0),
Res =
- [test(Structured,true,index),
- test(Structured,false,index),
- test(Structured,true,binary),
- test(Structured,false,binary),
- test(Structured,true,list),
- test(Structured,false,list)],
+ [test(Structured,true,index,false),
+ test(Structured,false,index,false),
+ test(Structured,true,index,true),
+ test(Structured,false,index,true),
+ test(Structured,true,binary,false),
+ test(Structured,false,binary,false),
+ test(Structured,true,list,false),
+ test(Structured,false,list,false)],
{lists:sum(Res),length(Structured)*6,get(skipped)}.
@@ -63,11 +65,21 @@ pick_exec_options([Opt|T]) ->
pick_exec_options([]) ->
{[],[]}.
-test([],_,_) ->
+test([],_,_,_) ->
0;
-test([{RE,Line,Options0,Tests}|T],PreCompile,XMode) ->
+test([{RE0,Line,Options0,Tests}|T],PreCompile,XMode,REAsList) ->
%io:format("."),
%case RE of <<>> -> io:format("Empty re:~w~n",[Line]); _ -> ok end,
+ Unicode = lists:member(unicode,Options0),
+ RE = case REAsList of
+ true ->
+ if
+ Unicode -> unicode:characters_to_list(RE0);
+ true -> binary_to_list(RE0)
+ end;
+ false ->
+ RE0
+ end,
{Options,ExecOptions} = pick_exec_options(Options0),
{Cres, Xopt} = case PreCompile of
true ->
@@ -80,7 +92,7 @@ test([{RE,Line,Options0,Tests}|T],PreCompile,XMode) ->
%erlang:display({testrun,RE,P,Tests,ExecOptions,Xopt,XMode}),
case (catch testrun(RE,P,Tests,ExecOptions,Xopt,XMode)) of
N when is_integer(N) ->
- N + test(T,PreCompile,XMode);
+ N + test(T,PreCompile,XMode,REAsList);
limit ->
io:format("Error limit reached.~n"),
1;
@@ -91,12 +103,12 @@ test([{RE,Line,Options0,Tests}|T],PreCompile,XMode) ->
_ ->
put(skipped,1)
end,
- test(T,PreCompile,XMode)
+ test(T,PreCompile,XMode,REAsList)
end;
{error,Err} ->
io:format("Compile error(~w): ~w~n",[Line,Err]),
case get(error_limit) of
- infinite -> 1 + test(T,PreCompile,XMode);
+ infinite -> 1 + test(T,PreCompile,XMode,REAsList);
X ->
case X-1 of
Y when Y =< 0 ->
@@ -104,7 +116,7 @@ test([{RE,Line,Options0,Tests}|T],PreCompile,XMode) ->
1;
Y ->
put(error_limit,Y),
- 1 + test(T,PreCompile,XMode)
+ 1 + test(T,PreCompile,XMode,REAsList)
end
end
end.
@@ -549,6 +561,8 @@ tr_option($N) ->
[no_auto_capture];
tr_option($8) ->
[unicode];
+tr_option($U) ->
+ [ungreedy];
tr_option($g) ->
[{exec_option,g}];
tr_option(_) ->
diff --git a/lib/syntax_tools/Makefile b/lib/syntax_tools/Makefile
index 08ede67209..37e84a80a5 100644
--- a/lib/syntax_tools/Makefile
+++ b/lib/syntax_tools/Makefile
@@ -58,10 +58,10 @@ include $(ERL_TOP)/make/otp_subdir.mk
version:
@echo "$(VSN)"
-docs:
- erl -noshell -pa "$(BINDIR)" -run edoc_run application "'$(APPNAME)'" '"."' '$(DOC_OPTS)' -s init stop
+# The overriding "docs" target have been removed so the default make rules work properly.
-edocs: docs
+edocs:
+ erl -noshell -pa "$(BINDIR)" -run edoc_run application "'$(APPNAME)'" '"."' '$(DOC_OPTS)' -s init stop
app_release: tar
diff --git a/lib/syntax_tools/doc/src/Makefile b/lib/syntax_tools/doc/src/Makefile
index 2065614251..291b3e3047 100644
--- a/lib/syntax_tools/doc/src/Makefile
+++ b/lib/syntax_tools/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2006-2009. All Rights Reserved.
-#
+#
+# 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 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%
#
include $(ERL_TOP)/make/target.mk
@@ -101,10 +101,10 @@ html: gifs $(HTML_REF_MAN_FILE)
man: $(MAN3_FILES)
$(XML_REF3_FILES):
- docb_gen $(SRC_DIR)/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript $(SRC_DIR)/$(@:%.xml=%.erl)
$(XML_CHAPTER_FILES):
- docb_gen -chapter -def vsn $(VSN) ../overview.edoc
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -chapter ../overview.edoc
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
diff --git a/lib/syntax_tools/src/Makefile b/lib/syntax_tools/src/Makefile
index 5ffe85c975..62a24d98c0 100644
--- a/lib/syntax_tools/src/Makefile
+++ b/lib/syntax_tools/src/Makefile
@@ -34,15 +34,15 @@ OBJECTS=$(SOURCES:%.erl=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
APP_FILE= syntax_tools.app
APP_SRC= $(APP_FILE).src
APP_TARGET= $(EBIN)/$(APP_FILE)
-
+
APPUP_FILE= syntax_tools.appup
APPUP_SRC= $(APPUP_FILE).src
APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
-
+
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-
+
debug opt: $(OBJECTS)
all: $(OBJECTS)
@@ -52,6 +52,8 @@ clean:
rm -f $(OBJECTS)
rm -f core *~
+docs:
+
distclean: clean
realclean: clean
@@ -62,10 +64,10 @@ $(EBIN)/%.$(EMULATOR):%.erl
# ----------------------------------------------------
# Special Build Targets
# ----------------------------------------------------
-
+
$(APP_TARGET): $(APP_SRC) ../vsn.mk
sed -e 's;%VSN%;$(VSN);' $< > $@
-
+
$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
sed -e 's;%VSN%;$(VSN);' $< > $@
diff --git a/lib/test_server/doc/src/Makefile b/lib/test_server/doc/src/Makefile
index e3c1b8ce92..c7ba415e5b 100644
--- a/lib/test_server/doc/src/Makefile
+++ b/lib/test_server/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2002-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%
#
@@ -60,6 +60,9 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
+XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
GIF_FILES =
# ----------------------------------------------------
diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile
index 2d7e5b28bc..d55a3a597d 100644
--- a/lib/test_server/src/Makefile
+++ b/lib/test_server/src/Makefile
@@ -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%
#
@@ -104,7 +104,7 @@ clean:
rm -f $(TARGET_FILES) $(TS_TARGET_FILES)
rm -f core
-doc:
+docs:
configure: configure.in
autoconf configure.in > configure
diff --git a/lib/tools/test/Makefile b/lib/tools/test/Makefile
new file mode 100644
index 0000000000..a846a3a6f4
--- /dev/null
+++ b/lib/tools/test/Makefile
@@ -0,0 +1,90 @@
+#
+# %CopyrightBegin%
+#
+# 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%
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+MODULES = \
+ cover_SUITE \
+ eprof_SUITE \
+ emem_SUITE \
+ fprof_SUITE \
+ cprof_SUITE \
+ instrument_SUITE \
+ make_SUITE \
+ tools_SUITE \
+ xref_SUITE \
+ ignore_cores
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+SPEC_FILES= tools.spec tools.spec.win
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/tools_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+.PHONY: make_emakefile
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES)\
+ > $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) $(RELSYSDIR)
+ $(INSTALL_DATA) $(SPEC_FILES) $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR)
+ chmod -f -R u+w $(RELSYSDIR)
+ @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
+
+release_docs_spec:
+
+
diff --git a/lib/tools/test/cover_SUITE.erl b/lib/tools/test/cover_SUITE.erl
new file mode 100644
index 0000000000..b9ccd62d0b
--- /dev/null
+++ b/lib/tools/test/cover_SUITE.erl
@@ -0,0 +1,1198 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2001-2009. 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(cover_SUITE).
+
+-export([all/1]).
+-export([start/1, compile/1, analyse/1, misc/1, stop/1,
+ distribution/1, export_import/1,
+ otp_5031/1, eif/1, otp_5305/1, otp_5418/1, otp_6115/1, otp_7095/1,
+ otp_8188/1, otp_8270/1, otp_8273/1, otp_8340/1]).
+
+-include("test_server.hrl").
+
+%%----------------------------------------------------------------------
+%% The following directory structure is assumed:
+%% cwd __________________________________________
+%% | \ \ \ \ \ \ \
+%% a b cc d f d1 compile_beam_____ otp_6115
+%% | \ \ \ \ \ \ \
+%% e crypt v w x d f1 f2
+%% |
+%% y
+%%----------------------------------------------------------------------
+
+all(suite) ->
+ case whereis(cover_server) of
+ undefined ->
+ [start, compile, analyse, misc, stop, distribution,
+ export_import,
+ otp_5031, eif, otp_5305, otp_5418, otp_6115, otp_7095,
+ otp_8188, otp_8270, otp_8273, otp_8340];
+ _pid ->
+ {skip,"It looks like the test server is running cover. "
+ "Can't run cover test."}
+ end.
+
+start(suite) -> [];
+start(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(?config(data_dir, Config)),
+
+ ?line Files = lsfiles(),
+ ?line remove(files(Files, ".out")),
+
+ ?line {ok, Pid} = cover:start(),
+ ?line {error, {already_started, Pid}} = cover:start().
+
+compile(suite) -> [];
+compile(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(?config(data_dir, Config)),
+
+ ?line Result1 = cover:compile_directory(),
+ ?line SortedResult = lists:sort(Result1),
+ ?line {ok, CWD} = file:get_cwd(),
+ ?line Result2 = cover:compile_directory(CWD),
+ ?line SortedResult = lists:sort(Result2),
+ ?line [{error,_DFile},{ok,a},{ok,b},{ok,cc},{ok,f}] = SortedResult,
+ ?line [{ok,e}] = cover:compile_directory("d1"),
+ ?line {error,enoent} = cover:compile_directory("d2"),
+
+ ?line {ok,a} = cover:compile(a),
+ ?line {ok,b} = compile:file(b),
+ ?line code:purge(b),
+ ?line {module,b} = code:load_file(b),
+ ?line {ok,d} = cover:compile("d.erl", [{d,'AGE',42}]),
+ ?line {error,_BBFile} = cover:compile(bb),
+
+ ?line StdlibDir = code:lib_dir(stdlib),
+ ?line Lists = filename:join([StdlibDir, "src", "lists.erl"]),
+ ?line {error, Lists} = cover:compile(Lists),
+
+ %% For compiling beam: using dummy files v,w,x,y and z
+ ?line file:set_cwd("compile_beam"),
+ ?line {ok,_} = compile:file(v,[debug_info,report]),
+ ?line {ok,_} = compile:file(w,[debug_info,report]),
+ ?line {ok,_} = compile:file(x),
+ ?line {ok,_} = compile:file("d/y",[debug_info,{outdir,"d"},report]),
+ ?line Key = "A Krypto Key",
+ ?line {ok,_} = compile:file(crypt, [debug_info,{debug_info_key,Key},report]),
+ ?line {ok,v} = cover:compile_beam(v),
+ ?line {ok,w} = cover:compile_beam("w.beam"),
+ ?line {error,{encrypted_abstract_code,_}} =
+ cover:compile_beam("crypt.beam"),
+ ?line ok = beam_lib:crypto_key_fun(simple_crypto_fun(Key)),
+ ?line {ok,crypt} = cover:compile_beam("crypt.beam"),
+ ?line {error,{no_abstract_code,"./x.beam"}} = cover:compile_beam(x),
+ ?line {error,{already_cover_compiled,no_beam_found,a}}=cover:compile_beam(a),
+ ?line {error,non_existing} = cover:compile_beam(z),
+ ?line [{ok,y}] = cover:compile_beam_directory("d"),
+ ?line Result3 = lists:sort(cover:compile_beam_directory()),
+ ?line [{error,{no_abstract_code,_XBeam}},{ok,crypt},{ok,v},{ok,w}] = Result3,
+ ?line {error,enoent} = cover:compile_beam_directory("d2"),
+ ?line decompile([v,w,y]),
+ ?line Files = lsfiles(),
+ ?line remove(files(Files, ".beam")).
+
+simple_crypto_fun(Key) ->
+ fun(init) -> ok;
+ ({debug_info, des3_cbc, crypt, _}) -> Key
+ end.
+
+analyse(suite) -> [];
+analyse(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(?config(data_dir, Config)),
+
+ ?line done = a:start(5),
+
+ ?line {ok, {a,{17,2}}} = cover:analyse(a, coverage, module),
+ ?line {ok, [{{a,start,1},{6,0}},
+ {{a,stop,1},{0,1}},
+ {{a,pong,1},{1,0}},
+ {{a,loop,3},{5,1}},
+ {{a,trycatch,1},{4,0}},
+ {{a,exit_kalle,0},{1,0}}]} = cover:analyse(a, coverage, function),
+ ?line {ok, [{{a,start,1,1},{6,0}},
+ {{a,stop,1,1},{0,1}},
+ {{a,pong,1,1},{1,0}},
+ {{a,loop,3,1},{3,1}},
+ {{a,loop,3,2},{2,0}},
+ {{a,trycatch,1,1},{4,0}},
+ {{a,exit_kalle,0,1},{1,0}}]} = cover:analyse(a, coverage, clause),
+ ?line {ok, [{{a,9},{1,0}},
+ {{a,10},{1,0}},
+ {{a,11},{1,0}},
+ {{a,13},{1,0}},
+ {{a,14},{1,0}},
+ {{a,15},{1,0}},
+ {{a,21},{0,1}},
+ {{a,26},{1,0}},
+ {{a,31},{1,0}},
+ {{a,32},{1,0}},
+ {{a,34},{1,0}},
+ {{a,36},{0,1}},
+ {{a,39},{1,0}},
+ {{a,40},{1,0}},
+ {{a,44},{1,0}},
+ {{a,47},{1,0}},
+ {{a,49},{1,0}},
+ {{a,51},{1,0}},
+ {{a,55},{1,0}}]} = cover:analyse(a, coverage, line),
+
+ ?line {ok, {a,15}} = cover:analyse(a, calls, module),
+ ?line {ok, [{{a,start,1},1},
+ {{a,stop,1},0},
+ {{a,pong,1},5},
+ {{a,loop,3},6},
+ {{a,trycatch,1},2},
+ {{a,exit_kalle,0},1}]} = cover:analyse(a, calls, function),
+ ?line {ok, [{{a,start,1,1},1},
+ {{a,stop,1,1},0},
+ {{a,pong,1,1},5},
+ {{a,loop,3,1},5},
+ {{a,loop,3,2},1},
+ {{a,trycatch,1,1},2},
+ {{a,exit_kalle,0,1},1}]} = cover:analyse(a, calls, clause),
+ ?line {ok, [{{a,9},1},
+ {{a,10},1},
+ {{a,11},1},
+ {{a,13},1},
+ {{a,14},1},
+ {{a,15},1},
+ {{a,21},0},
+ {{a,26},5},
+ {{a,31},5},
+ {{a,32},5},
+ {{a,34},5},
+ {{a,36},0},
+ {{a,39},1},
+ {{a,40},1},
+ {{a,44},2},
+ {{a,47},1},
+ {{a,49},1},
+ {{a,51},2},
+ {{a,55},1}]} = cover:analyse(a, calls, line),
+
+ ?line {ok, [{{a,start,1},{6,0}},
+ {{a,stop,1},{0,1}},
+ {{a,pong,1},{1,0}},
+ {{a,loop,3},{5,1}},
+ {{a,trycatch,1},{4,0}},
+ {{a,exit_kalle,0},{1,0}}]} = cover:analyse(a),
+ ?line {ok, {a,{17,2}}} = cover:analyse(a, module),
+ ?line {ok, [{{a,start,1},1},
+ {{a,stop,1},0},
+ {{a,pong,1},5},
+ {{a,loop,3},6},
+ {{a,trycatch,1},2},
+ {{a,exit_kalle,0},1}]} = cover:analyse(a, calls),
+
+ ?line {ok, "a.COVER.out"} = cover:analyse_to_file(a),
+ ?line {ok, "e.COVER.out"} = cover:analyse_to_file(e),
+ ?line {ok, "a.COVER.html"} = cover:analyse_to_file(a,[html]),
+ ?line {ok, "e.COVER.html"} = cover:analyse_to_file(e,[html]),
+
+ %% analyse_to_file of file which is compiled from beam
+ ?line {ok,f} = compile:file(f,[debug_info]),
+ ?line code:purge(f),
+ ?line {module,f} = code:load_file(f),
+ ?line {ok,f} = cover:compile_beam(f),
+ ?line f:f2(),
+ ?line {ok, "f.COVER.out"} = cover:analyse_to_file(f),
+
+ %% Source code cannot be found by analyse_to_file
+ ?line {ok,v} = compile:file("compile_beam/v",[debug_info]),
+ ?line code:purge(v),
+ ?line {module,v} = code:load_file(v),
+ ?line {ok,v} = cover:compile_beam(v),
+ ?line {error,no_source_code_found} = cover:analyse_to_file(v),
+
+ ?line {error,{not_cover_compiled,b}} = cover:analyse(b),
+ ?line {error,{not_cover_compiled,g}} = cover:analyse(g),
+ ?line {error,{not_cover_compiled,b}} = cover:analyse_to_file(b),
+ ?line {error,{not_cover_compiled,g}} = cover:analyse_to_file(g).
+
+misc(suite) -> [];
+misc(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(?config(data_dir, Config)),
+
+ ?line [a,cc,crypt,d,e,f,v] = lists:sort(cover:modules()),
+
+ ?line {ok,cc} = compile:file(cc),
+ ?line code:purge(cc),
+ ?line {module,cc} = code:load_file(cc),
+ ?line [a,crypt,d,e,f,v] = lists:sort(cover:modules()),
+
+ ?line {file, _File} = cover:is_compiled(a),
+ ?line false = cover:is_compiled(b),
+ ?line false = cover:is_compiled(g),
+
+ ?line ok = cover:reset(a),
+ ?line {ok, {a,{0,19}}} = cover:analyse(a, module),
+ ?line ok = cover:reset().
+
+stop(suite) -> [];
+stop(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(?config(data_dir, Config)),
+
+ ?line cover_compiled = code:which(a),
+ ?line {ok,d} = compile:file(d, [{d,'AGE',42}]),
+ ?line code:purge(d),
+ ?line {module,d} = code:load_file(d),
+ ?line ok = cover:stop(),
+ ?line Beam = code:which(a),
+ ?line true = is_unloaded(Beam),
+
+ ?line Files = lsfiles(),
+ ?line remove(files(Files, ".out")),
+ ?line remove(files(Files, ".html")),
+ ?line remove(files(Files, ".beam")).
+
+distribution(suite) -> [];
+distribution(Config) when is_list(Config) ->
+ ?line DataDir = ?config(data_dir, Config),
+ ?line ok = file:set_cwd(DataDir),
+
+ ?line {ok,N1} = ?t:start_node(cover_SUITE_distribution1,slave,[]),
+ ?line {ok,N2} = ?t:start_node(cover_SUITE_distribution2,slave,[]),
+ ?line {ok,N3} = ?t:start_node(cover_SUITE_distribution3,slave,[]),
+
+ %% Check that an already compiled module is loaded on new nodes
+ ?line {ok,f} = cover:compile(f),
+ ?line {ok,[_,_,_]} = cover:start(nodes()),
+ ?line cover_compiled = code:which(f),
+ ?line cover_compiled = rpc:call(N1,code,which,[f]),
+ ?line cover_compiled = rpc:call(N2,code,which,[f]),
+ ?line cover_compiled = rpc:call(N3,code,which,[f]),
+
+ %% Check that a node cannot be started twice
+ ?line {ok,[]} = cover:start(N2),
+
+ %% Check that the current node (i.e. the main node) is not started with
+ %% start/1 and not stopped with stop/1
+ ?line {ok,[]} = cover:start(node()),
+ ?line ok = cover:stop(node()),
+ ?line true = is_pid(whereis(cover_server)),
+
+ %% Check that a new compiled module is loaded on all existing nodes
+ ?line compile:file("compile_beam/v",[debug_info]),
+ ?line {ok,v} = cover:compile_beam(v),
+ ?line cover_compiled = code:which(v),
+ ?line cover_compiled = rpc:call(N1,code,which,[v]),
+ ?line cover_compiled = rpc:call(N2,code,which,[v]),
+ ?line cover_compiled = rpc:call(N3,code,which,[v]),
+
+ %% this is lost when the node is killed
+ ?line rpc:call(N3,f,f2,[]),
+ ?line rpc:call(N3,erlang,halt,[]),
+
+ %% this should be visible in analyse
+ ?line rpc:call(N1,f,f1,[]),
+
+ %% Check that data is collected from remote node when stopped
+ ?line ok = cover:stop(N1),
+ ?line N1Beam = rpc:call(N1,code,which,[f]),
+ ?line true = is_unloaded(N1Beam),
+ ?line check_f_calls(1,0),
+
+ %% Call f:f1() again on another node and check that number of calls is
+ %% accumulated.
+ ?line f:f1(),
+ ?line check_f_calls(2,0),
+
+ %% Check that reset works on all nodes
+ ?line f:f1(),
+ ?line rpc:call(N2,f,f1,[]),
+ ?line ok = cover:reset(f),
+ ?line check_f_calls(0,0),
+
+ %% Check that data is collected from all nodes
+ ?line rpc:call(N2,f,f1,[]),
+ ?line f:f2(),
+ ?line check_f_calls(1,1),
+
+ %% Check that same data is not fetched again (i.e. that analyse does
+ %% reset on the remote node(s))
+ ?line check_f_calls(1,1),
+
+ %% Check that stop() unloads on all nodes
+ ?line ok = cover:stop(),
+ ?line LocalBeam = code:which(f),
+ ?line N2Beam = rpc:call(N2,code,which,[f]),
+ ?line true = is_unloaded(LocalBeam),
+ ?line true = is_unloaded(N2Beam),
+
+ %% Check that cover_server on remote node dies if main node dies
+ ?line {ok,[N1]} = cover:start(N1),
+ ?line true = is_pid(rpc:call(N1,erlang,whereis,[cover_server])),
+ ?line exit(whereis(cover_server),kill),
+ ?line timer:sleep(10),
+ ?line undefined = rpc:call(N1,erlang,whereis,[cover_server]),
+
+ %% Cleanup
+ ?line Files = lsfiles(),
+ ?line remove(files(Files, ".beam")),
+ ?line ?t:stop_node(N1),
+ ?line ?t:stop_node(N2).
+
+
+export_import(suite) -> [];
+export_import(Config) when is_list(Config) ->
+ ?line DataDir = ?config(data_dir, Config),
+ ?line ok = file:set_cwd(DataDir),
+
+ %% Export one module
+ ?line {ok,f} = cover:compile(f),
+ ?line f:f1(),
+ %% check that no info is written about where data comes from when no
+ %% files are imported
+ ?line ?t:capture_start(),
+ ?line check_f_calls(1,0),
+ ?line [] = ?t:capture_get(),
+ ?line ?t:capture_stop(),
+ ?line ok = cover:export("f_exported",f),
+ ?line check_f_calls(1,0),
+ ?line ok = cover:stop(),
+
+ %% Check that same data exists after import and that info is written about
+ %% data comming from imported file
+ ?line ok = cover:import("f_exported"),
+ ?line ?t:capture_start(),
+ ?line check_f_calls(1,0),
+ ?line [Text1] = ?t:capture_get(),
+ ?line "Analysis includes data from imported files"++_ = lists:flatten(Text1),
+ ?line ?t:capture_stop(),
+
+ %% Export all modules
+ ?line {ok,a} = cover:compile(a),
+ ?line ?t:capture_start(),
+ ?line ok = cover:export("all_exported"),
+ ?line [Text2] = ?t:capture_get(),
+ ?line "Export includes data from imported files"++_ = lists:flatten(Text2),
+ ?line ?t:capture_stop(),
+ ?line ok = cover:stop(),
+ ?line ok = cover:import("all_exported"),
+ ?line check_f_calls(1,0),
+
+ %% Check that data is reset when module is compiled again, and that
+ %% warning is written when data is deleted for imported module.
+ ?line ?t:capture_start(),
+ ?line {ok,f} = cover:compile(f),
+ ?line timer:sleep(10), % capture needs some time
+ ?line [Text3] = ?t:capture_get(),
+ ?line "WARNING: Deleting data for module f imported from" ++ _ =
+ lists:flatten(Text3),
+ ?line ?t:capture_stop(),
+ ?line check_f_calls(0,0),
+
+ %% Check that data is summed up when first compiled and then imported
+ %% The module which has been compiled (f) is loaded from the file
+ %% all_exported again (since it has been reset during cover compiling),
+ %% but the other module (a) is not loaded since it is already loaded
+ ?line f:f1(),
+ ?line f:f2(),
+ ?line ok = cover:import("f_exported"),
+ ?line ?t:capture_start(),
+ ?line ok = cover:import("all_exported"),
+ ?line [Text4] = ?t:capture_get(), % a is not loaded again
+ ?line "WARNING: Module a already imported from " ++ _ = lists:flatten(Text4),
+ ?line ?t:capture_stop(),
+ ?line check_f_calls(3,1),
+
+ %% Check that warning is written when same file is imported twice,
+ %% and that data is not imported again
+ ?line ?t:capture_start(),
+ ?line ok = cover:import("all_exported"),
+ ?line [Text5,Text6] = ?t:capture_get(),
+ ?line "WARNING: Module f already imported from " ++ _ = lists:flatten(Text5),
+ ?line "WARNING: Module a already imported from " ++ _ = lists:flatten(Text6),
+ ?line ?t:capture_stop(),
+ ?line check_f_calls(3,1),
+
+ %% Check that reset removes all data and that the file which has been
+ %% reset can be imported again with no warning
+ ?line cover:reset(f),
+ ?line check_f_calls(0,0),
+ ?line ?t:capture_start(),
+ ?line ok = cover:import("all_exported"),
+ ?line [Text7] = ?t:capture_get(), % warning only on mod a
+ ?line "WARNING: Module a already imported from " ++ _ = lists:flatten(Text7),
+ ?line ?t:capture_stop(),
+ ?line check_f_calls(1,0),
+
+ %% same as above - only reset all
+ ?line cover:reset(),
+ ?line check_f_calls(0,0),
+ ?line ?t:capture_start(),
+ ?line ok = cover:import("all_exported"),
+ ?line [] = ?t:capture_get(), % no warnings
+ ?line ?t:capture_stop(),
+ ?line check_f_calls(1,0),
+
+ %% Cleanup
+ ?line ok = cover:stop(),
+ ?line Files = lsfiles(),
+ ?line remove(["f_exported","all_exported"|files(Files, ".beam")]).
+
+
+otp_5031(suite) -> [];
+otp_5031(Config) when is_list(Config) ->
+
+ Dog = ?t:timetrap(?t:seconds(10)),
+
+ ?line {ok,N1} = ?t:start_node(cover_SUITE_distribution1,slave,[]),
+ ?line {ok,[N1]} = cover:start(N1),
+ ?line {error,not_main_node} = rpc:call(N1,cover,modules,[]),
+ ?line cover:stop(),
+
+ ?t:timetrap_cancel(Dog),
+ ok.
+
+eif(doc) ->
+ ["Test the \'Exclude Included Functions\' functionality"];
+eif(suite) ->
+ [];
+eif(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(filename:join(?config(data_dir, Config),
+ "included_functions")),
+ ?line {ok, cover_inc} = compile:file(cover_inc,[debug_info]),
+ ?line {ok, cover_inc} = cover:compile_beam(cover_inc),
+
+ %% This function will cause an included function to be executed.
+ %% The analysis should only show the lines that actually exist
+ %% in cover_inc.beam - not the ones from the included file.
+ ?line cover_inc:func(),
+ ?line {ok, [_, _]} = cover:analyse(cover_inc, line),
+ ?line cover:stop(),
+ ok.
+
+otp_5305(suite) -> [];
+otp_5305(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(?config(priv_dir, Config)),
+
+ File = "t.erl",
+ Test = <<"-module(t).
+ -export([t/0]).
+ -include_lib(\"stdlib/include/ms_transform.hrl\").
+ t() ->
+ ets:fun2ms(fun(X) -> X end).
+ ">>,
+ ?line ok = file:write_file(File, Test),
+ ?line {ok, t} = cover:compile(File),
+ ?line cover:stop(),
+ ?line ok = file:delete(File),
+
+ ok.
+
+otp_5418(suite) -> [];
+otp_5418(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(?config(priv_dir, Config)),
+
+ File = "t.erl",
+ Test = <<"-module(t).
+ ">>,
+ ?line ok = file:write_file(File, Test),
+ ?line {ok, t} = cover:compile(File),
+ ?line {ok,{t,{0,0}}} = cover:analyse(t, module),
+ ?line cover:stop(),
+ ?line ok = file:delete(File),
+
+ ok.
+
+otp_6115(suite) -> [];
+otp_6115(Config) when is_list(Config) ->
+ case erlang:system_info(heap_type) of
+ hybrid -> {skip,"Hybrid-heap emulator doesn't keep track of funs"};
+ _ -> otp_6115_1(Config)
+ end.
+
+otp_6115_1(Config) ->
+ ?line {ok, CWD} = file:get_cwd(),
+ ?line Dir = filename:join(?config(data_dir, Config), otp_6115),
+ ?line ok = file:set_cwd(Dir),
+ ?line {ok, f1} = compile:file(f1, [debug_info]),
+ ?line {ok, f2} = compile:file(f2, [debug_info]),
+
+ %% Cover compile f1, but not f2
+ ?line {ok, f1} = cover:compile(f1),
+
+ %% If f1 is cover compiled, a process P is started with a
+ %% reference to the fun created in start_fail/0, and cover:stop() is
+ %% called, then P should be killed.
+ %% This is because (the fun held by P) references the cover
+ %% compiled code which should be *unloaded* when cover:stop() is
+ %% called -- running cover compiled code when there is no cover
+ %% server and thus no ets tables to bump counters in, makes no
+ %% sense.
+ ?line Pid1 = f1:start_fail(),
+
+ %% If f1 is cover compiled, a process P is started with a
+ %% reference to the fun created in start_ok/0, and
+ %% cover:stop() is called, then P should survive.
+ %% This is because (the fun held by) P always references the current
+ %% version of the module, and is thus not affected by the cover
+ %% compiled version being unloaded.
+ ?line Pid2 = f1:start_ok(),
+
+ %% Now stop cover
+ ?line cover:stop(),
+
+ %% Ensure that f1 is loaded (and not cover compiled), that Pid1
+ %% is dead and Pid2 is alive, but with no reference to old code
+ case code:which(f1) of
+ Beam when is_list(Beam) ->
+ ok;
+ Other ->
+ ?line ?t:fail({"f1 is not reloaded", Other})
+ end,
+ case process_info(Pid1) of
+ undefined ->
+ ok;
+ _PI1 ->
+ RefToOldP = erlang:check_process_code(Pid1, f1),
+ ?line ?t:fail({"Pid1 still alive", RefToOldP})
+ end,
+ case process_info(Pid2) of
+ PI2 when is_list(PI2) ->
+ case erlang:check_process_code(Pid2, f2) of
+ false ->
+ ok;
+ true ->
+ ?line ?t:fail("Pid2 has ref to old code")
+ end;
+ undefined ->
+ ?line ?t:fail("Pid2 has died")
+ end,
+
+ ?line file:set_cwd(CWD),
+ ok.
+
+otp_7095(doc) ->
+ ["andalso/orelse"];
+otp_7095(suite) -> [];
+otp_7095(Config) when is_list(Config) ->
+ ?line ok = file:set_cwd(?config(priv_dir, Config)),
+
+ File = "t.erl",
+ Test = <<"-module(t).
+ -export([t/0]).
+ t() ->
+ t1(),
+ t2(),
+ t3(),
+ t4(),
+ t5(),
+ put(t6, 0),
+ 0 = t6(),
+ 1 = erase(t6),
+ t7(),
+ put(t8, 0),
+ {'EXIT',{{badarg,0},_}} = (catch t8()),
+ 1 = erase(t8),
+ t9(),
+ ok.
+
+ t1() ->
+ false % 20
+ andalso
+ true. % 22
+
+ t2() ->
+ true % 25
+ andalso
+ true. % 27
+
+ t3() ->
+ false % 30
+ orelse
+ true. % 32
+
+ t4() ->
+ true % 35
+ orelse
+ true. % 37
+
+ t5() ->
+ true % 40
+ andalso
+ true % 42
+ andalso
+ false. % 44
+
+ t6() ->
+ true andalso % 47
+ add_one(t6). % 48
+
+ t7() ->
+ true % 51
+ andalso
+ false % 53
+ andalso
+ not_ok. % 55
+
+ t8() ->
+ true % 58
+ andalso
+ true % 60
+ andalso
+ add_one(t8) % 62
+ andalso
+ false. % 64
+
+ t9() ->
+ if % 67
+ true ->
+ true % 69
+ andalso
+ false % 71
+ end
+ orelse
+ case ok of % 74
+ true ->
+ a; % 76
+ _ ->
+ true % 78
+ end.
+
+ add_one(T) ->
+ put(T, get(T) + 1). % 82
+ ">>,
+ ?line ok = file:write_file(File, Test),
+ ?line {ok, t} = cover:compile(File),
+ ?line ok = t:t(),
+ ?line {ok,[{{t,4},1},{{t,5},1},{{t,6},1},{{t,7},1},{{t,8},1},{{t,9},1},
+ {{t,10},1},{{t,11},1},{{t,12},1},{{t,13},1},{{t,14},1},
+ {{t,15},1},{{t,16},1},{{t,17},1},
+ {{t,20},1},{{t,22},0},
+ {{t,25},1},{{t,27},1},
+ {{t,30},1},{{t,32},1},
+ {{t,35},1},{{t,37},0},
+ {{t,40},1},{{t,42},1},{{t,44},1},
+ {{t,47},1},{{t,48},1},
+ {{t,51},1},{{t,53},1},{{t,55},0},
+ {{t,58},1},{{t,60},1},{{t,62},1},{{t,64},0},
+ {{t,67},1},{{t,69},1},{{t,71},1},{{t,74},1},
+ {{t,76},0},{{t,78},1},
+ {{t,82},2}]} = cover:analyse(t, calls, line),
+ ?line cover:stop(),
+ ?line ok = file:delete(File),
+
+ ok.
+
+otp_8270(doc) ->
+ ["OTP-8270. Bug."];
+otp_8270(suite) -> [];
+otp_8270(Config) when is_list(Config) ->
+ ?line DataDir = ?config(data_dir, Config),
+ ?line ok = file:set_cwd(DataDir),
+
+ ?line PrivDir = ?config(priv_dir, Config),
+
+ As = [{args," -pa " ++ PrivDir}],
+ ?line {ok,N1} = ?t:start_node(cover_n1,slave,As),
+ ?line {ok,N2} = ?t:start_node(cover_n2,slave,As),
+ ?line {ok,N3} = ?t:start_node(cover_n3,slave,As),
+
+ timer:sleep(500),
+ cover:start(nodes()),
+
+ Test = <<
+ "-module(m).\n"
+ "-compile(export_all).\n"
+ "t() -> t(0).\n"
+ "l() ->\n"
+ " catch ets:tab2list(cover_internal_data_table).\n"
+ "t(Sz) ->\n"
+ " case ets:info(cover_internal_data_table, size) of\n"
+ " Sz ->\n"
+ " m:t(Sz); % Not a local call! Newly loaded code is entered.\n"
+ " NSz ->\n"
+ " % error_logger:info_msg(\"~p: ~p ~p change~n L1 ~p~n\", \n"
+ " % [node(), Sz, NSz, l()]),\n"
+ " m:t(NSz)\n"
+ " end.\n">>,
+ ?line _File = c_mod(m, Test, Config),
+ Fun = fun m:t/0,
+ ?line Pid1 = spawn(Fun),
+ ?line Pid2 = spawn(N1, Fun),
+ ?line Pid3 = spawn(N2, Fun),
+ ?line Pid4 = spawn(N3, Fun),
+
+ ?line {ok, m} = cover:compile_beam(m),
+
+ timer:sleep(1000),
+
+ ?line Info = erlang:process_info(Pid1),
+ ?line N1_info = rpc:call(N1, erlang, process_info, [Pid2]),
+ ?line N2_info = rpc:call(N2, erlang, process_info, [Pid3]),
+ ?line N3_info = rpc:call(N3, erlang, process_info, [Pid4]),
+
+ ?line true = is_list(Info),
+ ?line {N1,true} = {N1,is_list(N1_info)},
+ ?line {N2,true} = {N2,is_list(N2_info)},
+ ?line {N3,true} = {N3,is_list(N3_info)},
+
+ ?line ?t:stop_node(N1),
+ ?line ?t:stop_node(N2),
+ ?line ?t:stop_node(N3),
+ ok.
+
+otp_8273(doc) ->
+ ["OTP-8270. Bug."];
+otp_8273(suite) -> [];
+otp_8273(Config) when is_list(Config) ->
+ Test = <<"-module(t).
+ -export([t/0]).
+ t() ->
+ foo = true andalso foo,
+ bar = false orelse bar,
+ ok.
+ ">>,
+ ?line File = cc_mod(t, Test, Config),
+ ?line ok = t:t(),
+ ?line cover:stop(),
+ ?line ok = file:delete(File),
+
+ ok.
+
+otp_8340(doc) ->
+ ["OTP-8340. Bug."];
+otp_8340(suite) -> [];
+otp_8340(Config) when is_list(Config) ->
+ ?line [{{t,1},1},{{t,2},1},{{t,4},1}] =
+ analyse_expr(<<"<< \n"
+ " <<3:2, \n"
+ " SeqId:62>> \n"
+ " || SeqId <- [64] >>">>, Config),
+
+ ok.
+
+otp_8188(doc) ->
+ ["Clauses on the same line."];
+otp_8188(suite) -> [];
+otp_8188(Config) when is_list(Config) ->
+ %% This example covers the bug report:
+ Test = <<"-module(t).
+ -export([test/1]).
+
+ -define(FOOBAR(X),
+ case X of
+ ok -> true;
+ _ -> false
+ end).
+
+ test(X)->
+ _Res =
+ ?FOOBAR(X).
+ ">>,
+ ?line File = cc_mod(t, Test, Config),
+ ?line false = t:test(nok),
+ ?line {ok,[{{t,11},1},{{t,12},1}]} = cover:analyse(t, calls, line),
+ ?line cover:stop(),
+ ?line ok = file:delete(File),
+
+ %% Bit string comprehensions are now traversed;
+ %% the handling of list comprehensions has been improved:
+ comprehension_8188(Config),
+
+ %% Variants of the reported bug:
+ bug_8188(Config),
+ ok.
+
+bug_8188(Cf) ->
+ ?line [{{t,1},1},{{t,2},1},{{t,3},1}] =
+ analyse_expr(<<"A = 3,\n" % 1
+ " case A of\n" % 1
+ " 2 -> two; 3 -> three end, A + 2">>, % 1
+ Cf),
+
+ ?line [{{t,1},1},
+ {{t,2},0},
+ {{t,3},1},
+ {{t,4},1},
+ {{t,5},1},
+ {{t,6},0},
+ {{t,7},1},
+ {{t,9},2}] =
+ analyse_expr(<<"case two() of\n" % 1
+ " 1 -> 2;\n" % 0
+ " _ -> begin 3 end\n" % 1
+ " +\n" % 1
+ " begin 4 end end, case two() of\n" % 1
+ " 1 -> a;\n" % 0
+ " 2 -> b; 3 -> c\n" % 1
+ " end.\n"
+ "two() -> 2">>, Cf), % 2
+
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},1},
+ {{t,4},1}, {{t,5},1}, {{t,6},0}] =
+ analyse_expr(<<" self() ! 1,\n"
+ " receive \n"
+ " X=1 -> a;\n"
+ " X=2 -> b end, case X of \n"
+ " 1 -> a;\n"
+ " 2 -> b\n"
+ " end">>, Cf),
+
+ T0 = <<"t1(X) ->\n "
+ "case X of\n"
+ " 1 -> A=a,B=A,B; % bump Li\n"
+ " 2 -> b; 3 -> case X of % 2 -> b shall bump Li\n"
+ " 3 -> a; % bump Li\n"
+ " 2 -> b end; 4 -> d end, case X of % Li\n"
+ " 1 -> a;\n"
+ " 2 -> b; 3 -> c;\n"
+ " 4 -> d\n"
+ " end">>,
+
+ T1 = [<<"a = t1(1). ">>,T0],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},1}, {{t,4},0},
+ {{t,5},0}, {{t,6},1}, {{t,7},1}, {{t,8},0}, {{t,9},0}] =
+ analyse_expr(T1, Cf),
+
+ T2 = [<<"b = t1(2). ">>,T0],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0}, {{t,4},1},
+ {{t,5},0}, {{t,6},1}, {{t,7},0}, {{t,8},1}, {{t,9},0}] =
+ analyse_expr(T2, Cf),
+
+ T3 = [<<"c = t1(3). ">>,T0],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0}, {{t,4},1},
+ {{t,5},1}, {{t,6},1}, {{t,7},0}, {{t,8},1}, {{t,9},0}] =
+ analyse_expr(T3, Cf),
+
+ T4 = [<<"d = t1(4). ">>,T0],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0}, {{t,4},0},
+ {{t,5},0}, {{t,6},1}, {{t,7},0}, {{t,8},0}, {{t,9},1}] =
+ analyse_expr(T4, Cf),
+
+ ?line [{{t,1},1},{{t,2},1},{{t,3},1},{{t,4},1},{{t,5},1}] =
+ analyse_expr(
+ <<"2 = x3(1). "
+ "x3(X) ->\n"
+ " case X of \n"
+ " 1 -> case X of\n"
+ " 1 -> a, Y = 2;\n"
+ " 2 -> b, Y = 3 end, Y; 2 -> Y = 4 end, Y">>, Cf),
+
+ ?line [{{t,1},1},{{t,2},1},{{t,3},1},{{t,4},1}] =
+ analyse_expr(
+ <<"1 = x4(1). "
+ "x4(X) ->\n"
+ " case X of\n"
+ " 1 -> case X of\n"
+ " 1 -> Y = 1 end, case X of 1 -> Y = 1 end, Y end">>,
+ Cf),
+
+ T10 = <<"t1(X) ->\n"
+ "if\n"
+ " X =:= 1 -> a;\n"
+ " X =:= 2 -> b; X =:= 3 -> c end, case X of \n"
+ " 1 -> a;\n"
+ " 2 -> b; 3 -> c end, case X of\n"
+ " 1 -> a;\n"
+ " 2 -> b; 3 -> c\n"
+ " end">>,
+ T11 = [<<"a = t1(1). ">>,T10],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},1}, {{t,4},1},
+ {{t,5},1}, {{t,6},1}, {{t,7},1}, {{t,8},0}] =
+ analyse_expr(T11, Cf),
+
+ T12 = [<<"b = t1(2). ">>,T10],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0}, {{t,4},1},
+ {{t,5},0}, {{t,6},1}, {{t,7},0}, {{t,8},1}] =
+ analyse_expr(T12, Cf),
+
+ T13 = [<<"c = t1(3). ">>,T10],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0}, {{t,4},1},
+ {{t,5},0}, {{t,6},1}, {{t,7},0}, {{t,8},1}] =
+ analyse_expr(T13, Cf),
+
+ T20 = <<"t1(X) ->\n"
+ "case X of\n"
+ " 1 -> a;\n"
+ " 2 -> b; 3 -> case X of\n"
+ " 1 -> a;\n"
+ " 2 -> b; 3 -> c end end, case X of\n"
+ " 1 -> a;\n"
+ " 2 -> b; 3 -> c\n"
+ " end">>,
+
+ T21 = [<<"a = t1(1). ">>,T20],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},1}, {{t,4},0},
+ {{t,5},0}, {{t,6},1}, {{t,7},1}, {{t,8},0}] =
+ analyse_expr(T21, Cf),
+
+ T22 = [<<"b = t1(2). ">>,T20],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0}, {{t,4},1},
+ {{t,5},0}, {{t,6},1}, {{t,7},0}, {{t,8},1}] =
+ analyse_expr(T22, Cf),
+
+ T23 = [<<"c = t1(3). ">>,T20],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0}, {{t,4},1},
+ {{t,5},0}, {{t,6},1}, {{t,7},0}, {{t,8},1}] =
+ analyse_expr(T23, Cf),
+
+ T30 = <<
+ "t1(X) ->\n"
+ "case X of\n"
+ " 1 -> a;\n"
+ " 2 -> b; 3 -> case X of 1 -> a; 2 -> b; 3 -> c end end, case X of\n"
+ " 1 -> a;\n"
+ " 2 -> b; 3 -> c\n"
+ " end\n">>,
+
+ T31 = [<<"a = t1(1). ">>,T30],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},1},
+ {{t,4},1}, {{t,5},1}, {{t,6},0}] =
+ analyse_expr(T31, Cf),
+
+ T32 = [<<"b = t1(2). ">>,T30],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0},
+ {{t,4},1}, {{t,5},0}, {{t,6},1}] =
+ analyse_expr(T32, Cf),
+
+ T33 = [<<"c = t1(3). ">>,T30],
+ ?line [{{t,1},1}, {{t,2},1}, {{t,3},0},
+ {{t,4},1}, {{t,5},0}, {{t,6},1}] =
+ analyse_expr(T33, Cf),
+
+ %% 'try' now traverses the body as a body...
+ ?line [{{t,1},1},{{t,2},1},{{t,3},1},{{t,4},0},{{t,6},1}] =
+ analyse_expr(<<"try \n"
+ " B = 2, \n"
+ " C = erlang:error(foo), \n"
+ " {B,C} \n"
+ "catch _:_ -> \n"
+ " foo \n"
+ "end">>, Cf),
+
+ %% receive after:
+ ?line [{{t,1},1},{{t,2},0},{{t,3},1}] =
+ analyse_expr(<<"receive \n"
+ " X=1 -> a; \n"
+ " X=2 -> b after begin 10 end -> X=3 end">>, Cf),
+ ?line [{{t,1},1},{{t,2},0},{{t,3},1}] =
+ analyse_expr(<<"receive \n"
+ " X=1 -> a; \n"
+ " X=2 -> b after 10 -> begin X=3 end end">>, Cf),
+ ok.
+
+comprehension_8188(Cf) ->
+ ?line [{{t,1},1}] =
+ analyse_expr(<<"[begin X end || X <- [1,2,3], X > 1]">>, Cf),
+ ?line [{{t,1},1},{{t,2},1}] =
+ analyse_expr(<<"[begin X end || \n"
+ " X <- [1,2,3], X > 1]">>, Cf),
+ ?line [{{t,1},1},{{t,2},1},{{t,3},3}] =
+ analyse_expr(<<"[begin X end || \n "
+ " X <- [1,2,3], \n "
+ " X > 1]">>, Cf),
+ ?line [{{t,1},1},{{t,3},1},{{t,4},3}] =
+ analyse_expr(<<"[begin X end || \n "
+ " X <- \n "
+ " [1,2,3], \n "
+ " X > 1]">>, Cf),
+ ?line [{{t,1},1},{{t,2},2}] =
+ analyse_expr(<<"[ \n "
+ " X || X <- [1,2,3], X > 1]">>, Cf),
+ ?line [{{t,1},1},{{t,2},2},{{t,3},3}] =
+ analyse_expr(<<"[ \n"
+ " X || X <- [1,2,3], \n"
+ " X > 1]">>, Cf),
+ ?line [{{t,1},1},{{t,2},1},{{t,3},2}] =
+ analyse_expr(<<"[ \n "
+ " X || X <- [1,2,3], X > 1, \n"
+ " X > 2]">>, Cf),
+
+ ?line [{{t,1},1},
+ {{t,3},2},
+ {{t,5},1},
+ {{t,7},1},
+ {{t,8},0},
+ {{t,12},3},
+ {{t,15},2},
+ {{t,17},2},
+ {{t,18},1}] =
+ analyse_expr(<<"[ \n" % 1
+ " begin\n"
+ " X * 2\n" % 2
+ " end ||\n"
+ " X <- [1,\n" % 1
+ " case two() of\n"
+ " 2 -> 2;\n" % 1
+ " _ -> two\n" % 0
+ " end,\n"
+ " 3],\n"
+ " begin\n"
+ " math:sqrt(X) > 1.0\n" % 3
+ " end,\n"
+ " begin\n"
+ " true\n" % 2
+ " end,\n"
+ " true]. \n" % 2
+ " two() -> 2">>, Cf), % 1
+
+ ?line [{{t,1},1},
+ {{t,2},2},
+ {{t,3},1},
+ {{t,5},1},
+ {{t,6},0},
+ {{t,9},3},
+ {{t,10},2},
+ {{t,11},2},
+ {{t,12},1}] =
+ analyse_expr(<<"[ \n"
+ " X * 2 || \n" % 2
+ " X <- [1,\n" % 1
+ " case two() of\n"
+ " 2 -> 2;\n" % 1
+ " _ -> two\n" % 0
+ " end,\n"
+ " 3],\n"
+ " math:sqrt(X) > 1.0,\n" % 3
+ " true,\n" % 2
+ " true]. \n" % 2
+ " two() -> 2">>, Cf), % 1
+
+ ?line [{{t,1},1},
+ {{t,2},2},
+ {{t,3},1},
+ {{t,4},1},
+ {{t,5},0},
+ {{t,8},1},
+ {{t,9},0},
+ {{t,12},3},
+ {{t,13},2},
+ {{t,14},2}] =
+ analyse_expr(<<"<< \n" % 1
+ " << (X*2) >> || \n" % 2
+ " <<X>> <= << (case two() of\n"
+ " 2 -> 1;\n" % 1
+ " _ -> 2\n" % 0
+ " end)/integer,\n"
+ " (case two() of \n"
+ " 2 -> 2;\n" % 1
+ " _ -> two\n" % 0
+ " end)/integer,\n"
+ " 3 >>, \n"
+ " math:sqrt(X) > 1.0,\n" % 3
+ " true >>.\n" % 2
+ "two() -> 2">>, Cf),
+
+ ?line [{{t,1},1},
+ {{t,2},4},
+ {{t,4},1},
+ {{t,6},1},
+ {{t,7},0},
+ {{t,10},3},
+ {{t,11},2},
+ {{t,12},4},
+ {{t,13},1}] =
+ analyse_expr(<<"<< \n" % 1
+ " << (2)\n" % 4
+ " :(8) >> || \n"
+ " <<X>> <= << 1,\n" % 1
+ " (case two() of \n"
+ " 2 -> 2;\n" % 1
+ " _ -> two\n" % 0
+ " end)/integer,\n"
+ " 3 >>, \n"
+ " math:sqrt(X) > 1.0,\n" % 3
+ " <<_>> <= << 1, 2 >>,\n" % 2
+ " true >>.\n" % 4
+ "two() -> 2">>, Cf), % 1
+
+ ok.
+
+%%--Auxiliary------------------------------------------------------------
+
+analyse_expr(Expr, Config) ->
+ Binary = [<<"-module(t). "
+ "-export([t/0]). "
+ "t() -> ">>, Expr, <<".\n">>],
+ File = cc_mod(t, Binary, Config),
+ t:t(),
+ {ok, Result} = cover:analyse(t, calls, line),
+ ok = file:delete(File),
+ Result.
+
+cc_mod(M, Binary, Config) ->
+ {ok, Dir} = file:get_cwd(),
+ PrivDir = ?config(priv_dir, Config),
+ ok = file:set_cwd(PrivDir),
+ File = atom_to_list(M) ++ ".erl",
+ try
+ ok = file:write_file(File, Binary),
+ {ok, M} = cover:compile(File),
+ filename:join(PrivDir, File)
+ after file:set_cwd(Dir)
+ end.
+
+c_mod(M, Binary, Config) ->
+ {ok, Dir} = file:get_cwd(),
+ PrivDir = ?config(priv_dir, Config),
+ ok = file:set_cwd(PrivDir),
+ File = atom_to_list(M) ++ ".erl",
+ try
+ ok = file:write_file(File, Binary),
+ {ok, M} = compile:file(File, [debug_info]),
+ code:purge(M),
+ AbsFile = filename:rootname(File, ".erl"),
+ code:load_abs(AbsFile, M),
+ filename:join(PrivDir, File)
+ after file:set_cwd(Dir)
+ end.
+
+lsfiles() ->
+ {ok, CWD} = file:get_cwd(),
+ lsfiles(CWD).
+
+lsfiles(Dir) ->
+ {ok, Files} = file:list_dir(Dir),
+ Files.
+
+files(Files, Ext) ->
+ lists:filter(fun(File) ->
+ case filename:extension(File) of
+ Ext -> true;
+ _ -> false
+ end
+ end,
+ Files).
+
+remove([File|Files]) ->
+ ok = file:delete(File),
+ remove(Files);
+remove([]) ->
+ ok.
+
+decompile([Mod|Mods]) ->
+ code:purge(Mod),
+ code:delete(Mod),
+ decompile(Mods);
+decompile([]) ->
+ ok.
+
+is_unloaded(What) ->
+ if
+ is_list(What) -> true;
+ What==non_existing -> true;
+ true -> false
+ end.
+
+check_f_calls(F1,F2) ->
+ {ok,[{{f,f1,0},F1},{{f,f2,0},F2}]} = cover:analyse(f,calls,function).
diff --git a/lib/tools/test/cover_SUITE_data/a.erl b/lib/tools/test/cover_SUITE_data/a.erl
new file mode 100644
index 0000000000..31119821cd
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/a.erl
@@ -0,0 +1,55 @@
+-module(a).
+-export([start/1, stop/1]).
+-export([pong/1]).
+-export([loop/3,exit_kalle/0]).
+
+%% start(N) -> pid()
+%% N = integer()
+start(N) ->
+ Pong = b:start(),
+ spawn(?MODULE, loop, [self(), N, Pong]),
+ receive
+ done ->
+ {exit,kalle} = trycatch(fun ?MODULE:exit_kalle/0),
+ {throw,kalle} = trycatch(fun() -> throw(kalle) end),
+ done
+ end.
+
+%% stop(Ping) -> stop
+%% Ping = pid()
+stop(Ping) ->
+ Ping ! stop.
+
+%% pong(Ping) -> pong
+%% Ping = pid()
+pong(Ping) ->
+ Ping ! pong.
+
+%%--Internal functions------------------------------------------------
+
+loop(Starter, N, Pong) when N>0 ->
+ Pong ! {ping, self()},
+ receive
+ pong ->
+ loop(Starter, N-1, Pong);
+ stop ->
+ done
+ end;
+loop(Starter, 0, Pong) ->
+ Pong ! stop,
+ Starter ! done.
+
+
+trycatch(Fun) ->
+ try Fun()
+ catch
+ Throw ->
+ {throw,Throw};
+ exit:Reason ->
+ {exit,Reason}
+ after
+ cleanup
+ end.
+
+exit_kalle() ->
+ exit(kalle).
diff --git a/lib/tools/test/cover_SUITE_data/b.erl b/lib/tools/test/cover_SUITE_data/b.erl
new file mode 100644
index 0000000000..13f39b8cb9
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/b.erl
@@ -0,0 +1,14 @@
+-module(b).
+-export([start/0, loop/0]).
+
+start() ->
+ spawn(?MODULE, loop, []).
+
+loop() ->
+ receive
+ {ping, Ping} ->
+ a:pong(Ping),
+ loop();
+ stop ->
+ done
+ end.
diff --git a/lib/tools/test/cover_SUITE_data/cc.erl b/lib/tools/test/cover_SUITE_data/cc.erl
new file mode 100644
index 0000000000..587bdbe493
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/cc.erl
@@ -0,0 +1,88 @@
+-module(cc).
+-export([epp/1, epp/2, dbg/1, dbg/2, cvr/1, cvr/2]).
+-export([p/2, pp/2]).
+
+%% epp(Module) - Creates Module.epp which contains all forms of Module
+%% as obtained by using epp.
+%%
+%% dbg(Module) - Creates Module.dbg which contains all forms of Module
+%% as obtained by using beam_lib:chunks/2.
+%%
+%% cvr(Module) - Creates Module.cvr which contains all forms of Module
+%% as obtained by using cover:transform/3.
+%%
+
+epp(Module) ->
+ epp(Module, p).
+epp(Module, P) ->
+ File = atom_to_list(Module)++".erl",
+ {ok,Cwd} = file:get_cwd(),
+ {ok, Fd1} = epp:open(File, [Cwd], []),
+ {ok, Fd2} = file:open(atom_to_list(Module)++".epp", write),
+
+ epp(Fd1, Fd2, P),
+
+ epp:close(Fd1),
+ file:close(Fd2),
+ ok.
+
+epp(Fd1, Fd2, P) ->
+ case epp:parse_erl_form(Fd1) of
+ {ok, {attribute,Line,Attr,Data}} ->
+ epp(Fd1, Fd2, P);
+ {ok, Form} when P==p ->
+ io:format(Fd2, "~p.~n", [Form]),
+ epp(Fd1, Fd2, P);
+ {ok, Form} when P==pp ->
+ io:format(Fd2, "~p.~n", [erl_pp:form(Form)]),
+ epp(Fd1, Fd2, P);
+ {eof, Line} ->
+ ok
+ end.
+
+cvr(Module) ->
+ cvr(Module, p).
+cvr(Module, P) ->
+ case beam_lib:chunks(Module, [abstract_code]) of
+ {ok, {Module, [{abstract_code, no_abstract_code}]}} ->
+ {error, {no_debug_info,Module}};
+ {ok, {Module, [{abstract_code, {Vsn, Forms}}]}} ->
+ Vars = {vars,Module,Vsn, [],
+ undefined, undefined, undefined, undefined, undefined,
+ undefined,
+ false},
+ {ok, TForms, _Vars2} = cover:transform(Forms, [], Vars),
+ File = atom_to_list(Module)++".cvr",
+ apply(?MODULE, P, [File, TForms]);
+ Error ->
+ Error
+ end.
+
+dbg(Module) ->
+ dbg(Module, p).
+dbg(Module, P) ->
+ case beam_lib:chunks(Module, [abstract_code]) of
+ {ok, {Module, [{abstract_code, no_abstract_code}]}} ->
+ {error, {no_debug_info,Module}};
+ {ok, {Module, [{abstract_code, {Vsn, Forms}}]}} ->
+ File = atom_to_list(Module)++".dbg",
+ apply(?MODULE, P, [File, Forms]);
+ Error ->
+ Error
+ end.
+
+p(File, Forms) ->
+ {ok, Fd} = file:open(File, write),
+ lists:foreach(fun(Form) ->
+ io:format(Fd, "~p.~n", [Form])
+ end,
+ Forms),
+ file:close(Fd).
+
+pp(File, Forms) ->
+ {ok, Fd} = file:open(File, write),
+ lists:foreach(fun(Form) ->
+ io:format(Fd, "~s", [erl_pp:form(Form)])
+ end,
+ Forms),
+ file:close(Fd).
diff --git a/lib/tools/test/cover_SUITE_data/compile_beam/crypt.erl b/lib/tools/test/cover_SUITE_data/compile_beam/crypt.erl
new file mode 100644
index 0000000000..1596777edf
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/compile_beam/crypt.erl
@@ -0,0 +1,6 @@
+-module(crypt).
+
+-export([f/0]).
+
+f() ->
+ ok.
diff --git a/lib/tools/test/cover_SUITE_data/compile_beam/d/y.erl b/lib/tools/test/cover_SUITE_data/compile_beam/d/y.erl
new file mode 100644
index 0000000000..14b9461410
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/compile_beam/d/y.erl
@@ -0,0 +1,6 @@
+-module(y).
+
+-export([f/0]).
+
+f() ->
+ ok.
diff --git a/lib/tools/test/cover_SUITE_data/compile_beam/v.erl b/lib/tools/test/cover_SUITE_data/compile_beam/v.erl
new file mode 100644
index 0000000000..007957297a
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/compile_beam/v.erl
@@ -0,0 +1,6 @@
+-module(v).
+
+-export([f/0]).
+
+f() ->
+ ok.
diff --git a/lib/tools/test/cover_SUITE_data/compile_beam/w.erl b/lib/tools/test/cover_SUITE_data/compile_beam/w.erl
new file mode 100644
index 0000000000..88ad606db8
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/compile_beam/w.erl
@@ -0,0 +1,6 @@
+-module(w).
+
+-export([f/0]).
+
+f() ->
+ ok.
diff --git a/lib/tools/test/cover_SUITE_data/compile_beam/x.erl b/lib/tools/test/cover_SUITE_data/compile_beam/x.erl
new file mode 100644
index 0000000000..8953f6d05d
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/compile_beam/x.erl
@@ -0,0 +1,6 @@
+-module(x).
+
+-export([f/0]).
+
+f() ->
+ ok.
diff --git a/lib/tools/test/cover_SUITE_data/d.erl b/lib/tools/test/cover_SUITE_data/d.erl
new file mode 100644
index 0000000000..696e27e49b
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/d.erl
@@ -0,0 +1,156 @@
+-module(d).
+
+-export([start/0, stop/0]).
+-export([store/2, store/3, move/2,
+ location/1, who_are_at/1, who_are_older/1,
+ size/0]).
+-export([init/0]). % spawn
+
+-record(person, {name, age, location, moved=false}).
+
+%%%----------------------------------------------------------------------
+%%% User interface functions
+%%%----------------------------------------------------------------------
+
+%%% start() -> pid()
+start() ->
+ spawn(?MODULE, init, []).
+
+%%% stop()
+stop() ->
+ arne ! stop.
+
+%%% store(Name, Location) ->
+%%% store(Name, Age, Location) -> ok | {error,Reason}
+%%% Name = Location = atom()
+%%% Age = integer()
+%%% Reason = not_started | no_response | {internal_error,term()}
+store(Name, Location) ->
+ store(Name, ?AGE, Location).
+store(Name, Age, Location) when atom(Name), integer(Age), atom(Location) ->
+ send({store, Name, Age, Location}).
+
+%%% move(OldLocation, NewLocation) -> Names | {error,Reason}
+%%% OldLocation = NewLocation = atom()
+%%% Names = [Name]
+%%% Name = atom()
+%%% Reason = not_started | no_response | {internal_error,term()}
+move(OldLocation, NewLocation) ->
+ send({move, OldLocation, NewLocation}).
+
+%%% location(Name) -> Location | no_such_person | {error,Reason}
+%%% Name = atom()
+%%% Reason = not_started | no_response | {internal_error,term()}
+location(Name) when atom(Name) ->
+ send({location, Name}).
+
+%%% who_are_at(Location) -> Names | {error,Reason}
+%%% Location = atom()
+%%% Names = [Name]
+%%% Name = atom()
+%%% Reason = not_started | no_response | {internal_error,term()}
+who_are_at(Location) when atom(Location) ->
+ send({who_are_at, Location}).
+
+%%% who_are_older(Age) -> Names | {error,Reason}
+%%% Age = integer()
+%%% Names = [Name]
+%%% Name = atom()
+%%% Reason = not_started | no_response | {internal_error,term()}
+who_are_older(Age) when integer(Age) ->
+ send({who_are_older, Age}).
+
+%%% size() -> N | {error,Reason}
+%%% N = integer()
+%%% Reason = not_started | no_response | {internal_error,term()}
+size() ->
+ send(size).
+
+%%%----------------------------------------------------------------------
+%%% Main loop
+%%%----------------------------------------------------------------------
+send(Request) ->
+ Pid = whereis(arne),
+ if
+ Pid==undefined ->
+ {error, not_started};
+ true ->
+ send(Pid, Request)
+ end.
+send(Pid, Request) ->
+ Pid ! {request, self(), Request},
+ receive
+ {reply, Reply} ->
+ Reply
+ after
+ 1000 ->
+ {error, no_response}
+ end.
+
+init() ->
+ register(arne, self()),
+ loop([]).
+
+loop(Db) ->
+ receive
+ stop ->
+ true;
+ {request, From, Request} ->
+ case catch handle(Request, Db) of
+ {reply, Reply, NewDb} ->
+ From ! {reply, Reply},
+ loop(NewDb);
+ {'EXIT', Reason} ->
+ From ! {reply, {error, {internal_error, Reason}}},
+ loop(Db)
+ end
+ end.
+
+%%%----------------------------------------------------------------------
+%%% DB functionality
+%%%----------------------------------------------------------------------
+handle({store, Name, Age, Location}, Db) ->
+ {reply, ok, [#person{name=Name, age=Age, location=Location} | Db]};
+handle({move, OldLocation, NewLocation}, Db) ->
+ {Names, NewDb} = move(OldLocation, NewLocation, Db, [], []),
+ {reply, Names, NewDb};
+handle({location, Name}, Db) ->
+ case lists:keysearch(Name, #person.name, Db) of
+ {value, #person{location=Location}} when atom(Location) ->
+ {reply, Location, Db};
+ false ->
+ {reply, no_such_name, Db}
+ end;
+handle({who_are_at, Location}, Db) ->
+ Result = lists:foldl(fun(Person, Names) ->
+ case Person#person.location of
+ Location ->
+ [Person#person.name | Names];
+ _OtherLocation ->
+ Names
+ end
+ end,
+ [],
+ Db),
+ {reply, Result, Db};
+handle({who_are_older, Old}, Db) ->
+ Result = [Name || {person,Name,Age,Location} <- Db,
+ Age>Old],
+ {reply, Result, Db};
+handle(size, Db) ->
+ Result = count(Db, 0), {reply, Result, Db}.
+
+count([H|T], N) ->
+ count(T, N+1);
+count([], N) ->
+ N.
+
+move(OldLoc, NewLoc, [#person{location=OldLoc} = Person|T], Db, Names) ->
+ NewPerson = Person#person{location=NewLoc,
+ moved=true},
+ NewNames = [Person#person.name|Names],
+ move(OldLoc, NewLoc, T, [NewPerson|Db], NewNames);
+move(OldLoc, NewLoc, [Person|T], Db, Names) ->
+ move(OldLoc, NewLoc, T, [Person|Db], Names);
+move(OldLoc, NewLoc, [], Db, Names) ->
+ {lists:reverse(Names), lists:reverse(Db)}.
diff --git a/lib/tools/test/cover_SUITE_data/d1/e.erl b/lib/tools/test/cover_SUITE_data/d1/e.erl
new file mode 100644
index 0000000000..b4041d48e6
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/d1/e.erl
@@ -0,0 +1,127 @@
+-module(e).
+-behaviour(gen_server).
+
+%% External exports
+-export([start_link/0]).
+-export([hello/0]).
+
+%% gen_server callbacks
+-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
+ code_change/3]).
+
+-record(state, {}).
+
+%%%----------------------------------------------------------------------
+%%% API
+%%%----------------------------------------------------------------------
+start_link() ->
+ gen_server:start_link({local, myserver}, myserver, [], []).
+
+hello() ->
+ gen_server:call(myserver, hello).
+
+%%%----------------------------------------------------------------------
+%%% Callback functions from gen_server
+%%%----------------------------------------------------------------------
+
+%%----------------------------------------------------------------------
+%% Func: init/1
+%% Returns: {ok, State} |
+%% {ok, State, Timeout} |
+%% ignore |
+%% {stop, Reason}
+%%----------------------------------------------------------------------
+init([]) ->
+ {ok, #state{}}.
+
+%%----------------------------------------------------------------------
+%% Func: handle_call/3
+%% Returns: {reply, Reply, State} |
+%% {reply, Reply, State, Timeout} |
+%% {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, Reply, State} | (terminate/2 is called)
+%% {stop, Reason, State} (terminate/2 is called)
+%%----------------------------------------------------------------------
+handle_call(Request, From, State) ->
+ Reply = case Request of
+ char ->
+ $B;
+ integer ->
+ 17;
+ float ->
+ 32.76;
+ string ->
+ "hi there";
+ atom ->
+ hello;
+ block ->
+ begin
+ a,
+ b
+ end;
+ binary ->
+ <<1, 2, 3>>
+ end,
+ {reply, Reply, State}.
+
+%%----------------------------------------------------------------------
+%% Func: handle_cast/2
+%% Returns: {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, State} (terminate/2 is called)
+%%----------------------------------------------------------------------
+handle_cast(Msg, State) when atom(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when binary(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when not is_tuple(Msg), not is_list(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when float(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when function(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when integer(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when list(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when number(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when pid(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when port(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when reference(Msg) ->
+ {noreply, State};
+handle_cast(Msg, State) when tuple(Msg) ->
+ {noreply, State}.
+
+%%----------------------------------------------------------------------
+%% Func: handle_info/2
+%% Returns: {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, State} (terminate/2 is called)
+%%----------------------------------------------------------------------
+handle_info(Info, State) ->
+ {noreply, State}.
+
+%%----------------------------------------------------------------------
+%% Func: terminate/2
+%% Purpose: Shutdown the server
+%% Returns: any (ignored by gen_server)
+%%----------------------------------------------------------------------
+terminate(Reason, State) ->
+ ok.
+
+%%----------------------------------------------------------------------
+%% Func: code_change/3
+%% Purpose: Convert process state when code is changed
+%% Returns: {ok, NewState}
+%%----------------------------------------------------------------------
+code_change(OldVsn, State, Extra) ->
+ {ok, State}.
+
+%%%----------------------------------------------------------------------
+%%% Internal functions
+%%%----------------------------------------------------------------------
+
diff --git a/lib/tools/test/cover_SUITE_data/f.erl b/lib/tools/test/cover_SUITE_data/f.erl
new file mode 100644
index 0000000000..1ef8bbdb49
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/f.erl
@@ -0,0 +1,10 @@
+-module(f).
+-export([f1/0,f2/0]).
+
+f1() ->
+ f1_line1,
+ f1_line2.
+
+f2() ->
+ f2_line1,
+ f2_line2.
diff --git a/lib/tools/test/cover_SUITE_data/included_functions/cover_inc.erl b/lib/tools/test/cover_SUITE_data/included_functions/cover_inc.erl
new file mode 100644
index 0000000000..fa8eebfd00
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/included_functions/cover_inc.erl
@@ -0,0 +1,8 @@
+-module(cover_inc).
+-compile(export_all).
+-include("cover_inc.hrl").
+
+func() ->
+ func1(),
+ ok.
+
diff --git a/lib/tools/test/cover_SUITE_data/included_functions/cover_inc.hrl b/lib/tools/test/cover_SUITE_data/included_functions/cover_inc.hrl
new file mode 100644
index 0000000000..cbdfe601d1
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/included_functions/cover_inc.hrl
@@ -0,0 +1,7 @@
+func1() ->
+ A = line_2_in_include_file,
+ erlang:display(A),
+ line_4_in_include_file.
+
+
+
diff --git a/lib/tools/test/cover_SUITE_data/otp_6115/f1.erl b/lib/tools/test/cover_SUITE_data/otp_6115/f1.erl
new file mode 100644
index 0000000000..b659e5d818
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/otp_6115/f1.erl
@@ -0,0 +1,12 @@
+-module(f1).
+-export([start_fail/0, start_ok/0]).
+
+start_fail() ->
+ f2:start(fun() ->
+ io:format("this does not work\n",[])
+ end).
+
+start_ok() ->
+ f2:start(fun fun1/0).
+fun1() ->
+ io:format("this works\n",[]).
diff --git a/lib/tools/test/cover_SUITE_data/otp_6115/f2.erl b/lib/tools/test/cover_SUITE_data/otp_6115/f2.erl
new file mode 100644
index 0000000000..72a6a64c4d
--- /dev/null
+++ b/lib/tools/test/cover_SUITE_data/otp_6115/f2.erl
@@ -0,0 +1,13 @@
+-module(f2).
+-export([start/1]).
+
+start(Fun) ->
+ spawn(fun() ->
+ wait(Fun)
+ end).
+
+wait(Fun) ->
+ receive
+ go ->
+ Fun()
+ end.
diff --git a/lib/tools/test/cprof_SUITE.erl b/lib/tools/test/cprof_SUITE.erl
new file mode 100644
index 0000000000..e697cc1571
--- /dev/null
+++ b/lib/tools/test/cprof_SUITE.erl
@@ -0,0 +1,309 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2002-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%
+%%
+
+%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%
+%%% Define to run outside of test server
+%%%
+%%% -define(STANDALONE,1).
+%%%
+%%%
+%%% Define for debug output
+%%%
+%%% -define(debug,1).
+
+-module(cprof_SUITE).
+
+%% Exported end user tests
+-export([basic_test/0, on_load_test/1, modules_test/1]).
+
+%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test server related stuff
+%%
+
+-ifdef(STANDALONE).
+-define(config(A,B),config(A,B)).
+-export([config/2]).
+-else.
+-include("test_server.hrl").
+-endif.
+
+-ifdef(debug).
+-ifdef(STANDALONE).
+-define(line, erlang:display({?MODULE,?LINE}), ).
+-endif.
+-define(dbgformat(A,B),io:format(A,B)).
+-else.
+-ifdef(STANDALONE).
+-define(line, noop, ).
+-endif.
+-define(dbgformat(A,B),noop).
+-endif.
+
+-ifdef(STANDALONE).
+config(priv_dir, _) ->
+ ".";
+config(data_dir, _) ->
+ "cprof_SUITE_data".
+-else.
+%% When run in test server.
+-export([all/1, init_per_testcase/2, fin_per_testcase/2, not_run/1]).
+-export([basic/1, on_load/1, modules/1]).
+
+init_per_testcase(_Case, Config) ->
+ ?line Dog=test_server:timetrap(test_server:seconds(30)),
+ [{watchdog, Dog}|Config].
+
+fin_per_testcase(_Case, Config) ->
+ erlang:trace_pattern({'_','_','_'}, false, [local,meta,call_count]),
+ erlang:trace_pattern(on_load, false, [local,meta,call_count]),
+ erlang:trace(all, false, [all]),
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+all(doc) ->
+ ["Test the cprof profiling tool."];
+all(suite) ->
+ case test_server:is_native(?MODULE) of
+ true -> [not_run];
+ false -> [basic, on_load, modules]
+%, on_and_off, info,
+% pause_and_restart, combo]
+ end.
+
+not_run(Config) when is_list(Config) ->
+ {skipped,"Native code"}.
+
+basic(suite) ->
+ [];
+basic(doc) ->
+ ["Tests basic profiling"];
+basic(Config) when is_list(Config) ->
+ basic_test().
+
+on_load(suite) ->
+ [];
+on_load(doc) ->
+ ["Tests profiling of unloaded module"];
+on_load(Config) when is_list(Config) ->
+ on_load_test(Config).
+
+modules(suite) ->
+ [];
+modules(doc) ->
+ ["Tests profiling of several modules"];
+modules(Config) when is_list(Config) ->
+ modules_test(Config).
+
+-endif. %-ifdef(STANDALONE). ... -else.
+
+%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% The Tests
+%%%
+
+basic_test() ->
+ ?line M = 1000,
+ %%
+ ?line M2 = M*2,
+ ?line M3 = M*3,
+ ?line M2__1 = M2 + 1,
+ ?line M3__1 = M3 + 1,
+ ?line N = cprof:stop(),
+ %%
+ ?line 2 = cprof:start(?MODULE, seq_r),
+ ?line 1 = cprof:start(?MODULE, seq, 3),
+ ?line L = seq(1, M, fun succ/1),
+ ?line Lr = seq_r(1, M, fun succ/1),
+ ?line L = lists:reverse(Lr),
+ %%
+ ?line io:format("~p~n~p~n~p~n",
+ [erlang:trace_info({?MODULE,sec_r,3}, all),
+ erlang:trace_info({?MODULE,sec_r,4}, all),
+ erlang:trace_info({?MODULE,sec,3}, all)]),
+ %%
+ ?line ModAna1 = {?MODULE,M2__1,[{{?MODULE,seq_r,4},M},
+ {{?MODULE,seq,3},M},
+ {{?MODULE,seq_r,3},1}]},
+ ?line ModAna1 = cprof:analyse(?MODULE,0),
+ ?line {M2__1, [ModAna1]} = cprof:analyse(),
+ ?line ModAna1 = cprof:analyse(?MODULE, 1),
+ ?line {M2__1, [ModAna1]} = cprof:analyse(1),
+ %%
+ ?line ModAna2 = {?MODULE,M2__1,[{{?MODULE,seq_r,4},M},
+ {{?MODULE,seq,3},M}]},
+ ?line ModAna2 = cprof:analyse(?MODULE, 2),
+ ?line {M2__1, [ModAna2]} = cprof:analyse(2),
+ %%
+ 2 = cprof:pause(?MODULE, seq_r),
+ ?line L = seq(1, M, fun succ/1),
+ ?line Lr = seq_r(1, M, fun succ/1),
+ %%
+ ?line ModAna3 = {?MODULE,M3__1,[{{?MODULE,seq,3},M2},
+ {{?MODULE,seq_r,4},M},
+ {{?MODULE,seq_r,3},1}]},
+ ?line ModAna3 = cprof:analyse(?MODULE),
+ %%
+ ?line N = cprof:pause(),
+ ?line L = seq(1, M, fun succ/1),
+ ?line Lr = seq_r(1, M, fun succ/1),
+ %%
+ ?line {M3__1, [ModAna3]} = cprof:analyse(),
+ %%
+ ?line N = cprof:restart(),
+ ?line L = seq(1, M, fun succ/1),
+ ?line Lr = seq_r(1, M, fun succ/1),
+ %%
+ ?line ModAna1 = cprof:analyse(?MODULE),
+ %%
+ ?line N = cprof:stop(),
+ ?line {?MODULE,0,[]} = cprof:analyse(?MODULE),
+ ?line {0,[]} = cprof:analyse(),
+ ok.
+
+%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+on_load_test(Config) ->
+ ?line Priv = ?config(priv_dir, Config),
+ ?line Data = ?config(data_dir, Config),
+ ?line File = filename:join(Data, "cprof_SUITE_test"),
+ ?line Module = cprof_SUITE_test,
+ ?line M = 1000,
+ %%
+ ?line M2 = M*2,
+ ?line M2__1 = M2 + 1,
+ ?line N1 = cprof:start(),
+
+ ?line {ok,Module} = c:c(File, [{outdir,Priv}]),
+
+ %% If this system is hipe-enabled, the loader may have called module_info/1
+ %% when Module was loaded above. Reset the call count to avoid seeing
+ %% the call in the analysis below.
+
+ ?line 1 = cprof:restart(Module, module_info, 1),
+
+ ?line L = Module:seq(1, M, fun succ/1),
+ ?line Lr = Module:seq_r(1, M, fun succ/1),
+ ?line Lr = lists:reverse(L),
+ ?line N2 = cprof:pause(),
+ ?line N3 = cprof:pause(Module),
+ ?line {Module,M2__1,[{{Module,seq_r,4},M},
+ {{Module,seq,3},M},
+ {{Module,seq_r,3},1}]} = cprof:analyse(Module),
+ ?line io:format("~p ~p ~p~n", [N1, N2, N3]),
+ ?line code:purge(Module),
+ ?line code:delete(Module),
+ ?line N4 = N2 - N3,
+ %%
+ ?line N4 = cprof:restart(),
+ ?line {ok,Module} = c:c(File, [{outdir,Priv}]),
+ ?line L = Module:seq(1, M, fun succ/1),
+ ?line Lr = Module:seq_r(1, M, fun succ/1),
+ ?line L = seq(1, M, fun succ/1),
+ ?line Lr = seq_r(1, M, fun succ/1),
+ ?line N2 = cprof:pause(),
+ ?line {Module,0,[]} = cprof:analyse(Module),
+ ?line M_1 = M - 1,
+ ?line M4__4 = M*4 - 4,
+ ?line M10_7 = M*10 - 7,
+ ?line {?MODULE,M10_7,[{{?MODULE,succ,1},M4__4},
+ {{?MODULE,seq_r,4},M},
+ {{?MODULE,seq,3},M},
+ {{?MODULE,'-on_load_test/1-fun-5-',1},M_1},
+ {{?MODULE,'-on_load_test/1-fun-4-',1},M_1},
+ {{?MODULE,'-on_load_test/1-fun-3-',1},M_1},
+ {{?MODULE,'-on_load_test/1-fun-2-',1},M_1},
+ {{?MODULE,seq_r,3},1}]}
+ = cprof:analyse(?MODULE),
+ ?line N2 = cprof:stop(),
+ ok.
+
+%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+modules_test(Config) ->
+ ?line Priv = ?config(priv_dir, Config),
+ ?line Data = ?config(data_dir, Config),
+ ?line File = filename:join(Data, "cprof_SUITE_test"),
+ ?line Module = cprof_SUITE_test,
+ ?line {ok,Module} = c:c(File, [{outdir,Priv}]),
+ ?line M = 10,
+ %%
+ ?line M2 = M*2,
+ ?line M2__1 = M2 + 1,
+ ?line erlang:yield(),
+ ?line N = cprof:start(),
+ ?line L = Module:seq(1, M, fun succ/1),
+ ?line Lr = Module:seq_r(1, M, fun succ/1),
+ ?line L = seq(1, M, fun succ/1),
+ ?line Lr = seq_r(1, M, fun succ/1),
+ ?line N = cprof:pause(),
+ ?line Lr = lists:reverse(L),
+ ?line M_1 = M - 1,
+ ?line M4_4 = M*4 - 4,
+ ?line M10_7 = M*10 - 7,
+ ?line M2__1 = M*2 + 1,
+ ?line {Tot,ModList} = cprof:analyse(),
+ ?line {value,{?MODULE,M10_7,[{{?MODULE,succ,1},M4_4},
+ {{?MODULE,seq_r,4},M},
+ {{?MODULE,seq,3},M},
+ {{?MODULE,'-modules_test/1-fun-3-',1},M_1},
+ {{?MODULE,'-modules_test/1-fun-2-',1},M_1},
+ {{?MODULE,'-modules_test/1-fun-1-',1},M_1},
+ {{?MODULE,'-modules_test/1-fun-0-',1},M_1},
+ {{?MODULE,seq_r,3},1}]}} =
+ lists:keysearch(?MODULE, 1, ModList),
+ ?line {value,{Module,M2__1,[{{Module,seq_r,4},M},
+ {{Module,seq,3},M},
+ {{Module,seq_r,3},1}]}} =
+ lists:keysearch(Module, 1, ModList),
+ ?line Tot = lists:foldl(fun ({_,C,_}, A) -> C+A end, 0, ModList),
+ ?line {cprof,_,Prof} = cprof:analyse(cprof),
+ ?line {value,{{cprof,pause,0},1}} =
+ lists:keysearch({cprof,pause,0}, 1, Prof),
+ ?line N = cprof:stop(),
+ ok.
+
+
+
+%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Local helpers
+
+
+
+%% Stack recursive seq
+seq(Stop, Stop, Succ) when is_function(Succ) ->
+ [Stop];
+seq(Start, Stop, Succ) when is_function(Succ) ->
+ [Start | seq(Succ(Start), Stop, Succ)].
+
+
+
+%% Tail recursive seq, result list is reversed
+seq_r(Start, Stop, Succ) when is_function(Succ) ->
+ seq_r(Start, Stop, Succ, []).
+
+seq_r(Stop, Stop, _, R) ->
+ [Stop | R];
+seq_r(Start, Stop, Succ, R) ->
+ seq_r(Succ(Start), Stop, Succ, [Start | R]).
+
+
+
+%% Successor
+succ(X) -> X+1.
diff --git a/lib/tools/test/cprof_SUITE_data/cprof_SUITE_test.erl b/lib/tools/test/cprof_SUITE_data/cprof_SUITE_test.erl
new file mode 100644
index 0000000000..02d8b027e5
--- /dev/null
+++ b/lib/tools/test/cprof_SUITE_data/cprof_SUITE_test.erl
@@ -0,0 +1,25 @@
+-module(cprof_SUITE_test).
+
+-export([seq/3, seq_r/3]).
+
+
+
+%% Stack recursive seq
+seq(Stop, Stop, Succ) when function(Succ) ->
+ [Stop];
+seq(Start, Stop, Succ) when function(Succ) ->
+ [Start | seq(Succ(Start), Stop, Succ)].
+
+
+
+%% Tail recursive seq, result list is reversed
+seq_r(Start, Stop, Succ) when function(Succ) ->
+ seq_r(Start, Stop, Succ, []).
+
+seq_r(Stop, Stop, _, R) ->
+ [Stop | R];
+seq_r(Start, Stop, Succ, R) ->
+ seq_r(Succ(Start), Stop, Succ, [Start | R]).
+
+
+
diff --git a/lib/tools/test/emem_SUITE.erl b/lib/tools/test/emem_SUITE.erl
new file mode 100644
index 0000000000..430fa86c6c
--- /dev/null
+++ b/lib/tools/test/emem_SUITE.erl
@@ -0,0 +1,713 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2005-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(emem_SUITE).
+
+%%-define(line_trace, 1).
+
+-export([init_per_suite/1, end_per_suite/1,
+ receive_and_save_trace/2, send_trace/2]).
+
+
+-export([all/1, init_per_testcase/2, fin_per_testcase/2]).
+
+-export([live_node/1,
+ 'sparc_sunos5.8_32b_emt2.0'/1,
+ 'pc_win2000_32b_emt2.0'/1,
+ 'pc.smp_linux2.2.19pre17_32b_emt2.0'/1,
+ 'powerpc_darwin7.7.0_32b_emt2.0'/1,
+ 'alpha_osf1v5.1_64b_emt2.0'/1,
+ 'sparc_sunos5.8_64b_emt2.0'/1,
+ 'sparc_sunos5.8_32b_emt1.0'/1,
+ 'pc_win2000_32b_emt1.0'/1,
+ 'powerpc_darwin7.7.0_32b_emt1.0'/1,
+ 'alpha_osf1v5.1_64b_emt1.0'/1,
+ 'sparc_sunos5.8_64b_emt1.0'/1]).
+
+-include_lib("kernel/include/file.hrl").
+
+-include("test_server.hrl").
+
+-define(DEFAULT_TIMEOUT, ?t:minutes(5)).
+
+-define(EMEM_64_32_COMMENT,
+ "64 bit trace; this build of emem can only handle 32 bit traces").
+
+-record(emem_res, {nodename,
+ hostname,
+ pid,
+ start_time,
+ trace_version,
+ max_word_size,
+ word_size,
+ last_values,
+ maximum,
+ exit_code}).
+
+%%
+%%
+%% Exported suite functions
+%%
+%%
+
+all(doc) -> [];
+all(suite) ->
+ case is_debug_compiled() of
+ true -> {skipped, "Not run when debug compiled"};
+ false -> test_cases()
+ end.
+
+test_cases() ->
+ [live_node,
+ 'sparc_sunos5.8_32b_emt2.0',
+ 'pc_win2000_32b_emt2.0',
+ 'pc.smp_linux2.2.19pre17_32b_emt2.0',
+ 'powerpc_darwin7.7.0_32b_emt2.0',
+ 'alpha_osf1v5.1_64b_emt2.0',
+ 'sparc_sunos5.8_64b_emt2.0',
+ 'sparc_sunos5.8_32b_emt1.0',
+ 'pc_win2000_32b_emt1.0',
+ 'powerpc_darwin7.7.0_32b_emt1.0',
+ 'alpha_osf1v5.1_64b_emt1.0',
+ 'sparc_sunos5.8_64b_emt1.0'].
+
+init_per_testcase(Case, Config) when is_list(Config) ->
+ case maybe_skip(Config) of
+ {skip, _}=Skip -> Skip;
+ ok ->
+ Dog = ?t:timetrap(?DEFAULT_TIMEOUT),
+
+ %% Until emem is completely stable we run these tests in a working
+ %% directory with an ignore_core_files file which will make the
+ %% search for core files ignore cores generated by this suite.
+ ignore_cores:setup(?MODULE,
+ Case,
+ [{watchdog, Dog}, {testcase, Case} | Config])
+ end.
+
+fin_per_testcase(_Case, Config) when is_list(Config) ->
+ ignore_cores:restore(Config),
+ Dog = ?config(watchdog, Config),
+ ?t:timetrap_cancel(Dog),
+ ok.
+
+maybe_skip(Config) ->
+ DataDir = ?config(data_dir, Config),
+ case filelib:is_dir(DataDir) of
+ false ->
+ {skip, "No data directory"};
+ true ->
+ case ?config(emem, Config) of
+ undefined ->
+ {skip, "emem not found"};
+ _ ->
+ ok
+ end
+ end.
+
+init_per_suite(Config) when is_list(Config) ->
+ BinDir = filename:join([code:lib_dir(tools), "bin"]),
+ Target = erlang:system_info(system_architecture),
+ Res = (catch begin
+ case check_dir(filename:join([BinDir, Target])) of
+ not_found -> ok;
+ TDir ->
+ check_emem(TDir, purecov),
+ check_emem(TDir, purify),
+ check_emem(TDir, debug),
+ check_emem(TDir, opt)
+ end,
+ check_emem(BinDir, opt),
+ ""
+ end),
+ Res ++ ignore_cores:init(Config).
+
+end_per_suite(Config) when is_list(Config) ->
+ Config1 = lists:keydelete(emem, 1, Config),
+ Config2 = lists:keydelete(emem_comment, 1, Config1),
+ ignore_cores:fini(Config2).
+
+%%
+%%
+%% Test cases
+%%
+%%
+
+live_node(doc) -> [];
+live_node(suite) -> [];
+live_node(Config) when is_list(Config) ->
+ ?line {ok, EmuFlag, Port} = start_emem(Config),
+ ?line Nodename = mk_nodename(Config),
+ ?line {ok, Node} = start_node(Nodename, EmuFlag),
+ ?line NP = spawn(Node,
+ fun () ->
+ receive go -> ok end,
+ I = spawn(fun () -> ignorer end),
+ GC = fun () ->
+ GCP = fun (P) ->
+ garbage_collect(P)
+ end,
+ lists:foreach(GCP, processes())
+ end,
+ Seq = fun () -> I ! lists:seq(1, 1000000) end,
+ spawn_link(Seq),
+ B1 = <<0:10000000>>,
+ spawn_link(Seq),
+ B2 = <<0:10000000>>,
+ spawn_link(Seq),
+ B3 = <<0:10000000>>,
+ I ! {B1, B2, B3},
+ GC(),
+ GC(),
+ GC()
+ end),
+ ?line MRef = erlang:monitor(process, NP),
+ NP ! go,
+ ?line receive
+ {'DOWN', MRef, process, NP, Reason} ->
+ ?line spawn(Node, fun () -> halt(17) end),
+ ?line normal = Reason
+ end,
+ ?line Res = get_emem_result(Port),
+ ?line {ok, Hostname} = inet:gethostname(),
+ ?line ShortHostname = short_hostname(Hostname),
+ ?line {true, _} = has_prefix(Nodename, Res#emem_res.nodename),
+ ?line ShortHostname = short_hostname(Res#emem_res.hostname),
+ ?line Bits = case erlang:system_info(wordsize) of
+ 4 -> ?line "32 bits";
+ 8 -> ?line "64 bits"
+ end,
+ ?line Bits = Res#emem_res.word_size,
+ ?line "17" = Res#emem_res.exit_code,
+ ?line emem_comment(Config).
+
+'sparc_sunos5.8_32b_emt2.0'(doc) -> [];
+'sparc_sunos5.8_32b_emt2.0'(suite) -> [];
+'sparc_sunos5.8_32b_emt2.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "test_server" = Res#emem_res.nodename,
+ ?line "gorbag" = Res#emem_res.hostname,
+ ?line "17074" = Res#emem_res.pid,
+ ?line "2005-01-14 17:28:37.881980" = Res#emem_res.start_time,
+ ?line "2.0" = Res#emem_res.trace_version,
+ ?line "32 bits" = Res#emem_res.word_size,
+ ?line ["15",
+ "2665739", "8992", "548986", "16131", "539994",
+ "4334192", "1", "99", "15", "98",
+ "0", "0", "49", "0", "49"] = Res#emem_res.last_values,
+ ?line ["5972061", "9662",
+ "7987824", "5",
+ "2375680", "3"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config).
+
+'pc_win2000_32b_emt2.0'(doc) -> [];
+'pc_win2000_32b_emt2.0'(suite) -> [];
+'pc_win2000_32b_emt2.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "test_server" = Res#emem_res.nodename,
+ ?line "E-788FCF5191B54" = Res#emem_res.hostname,
+ ?line "504" = Res#emem_res.pid,
+ ?line "2005-01-24 17:27:28.224000" = Res#emem_res.start_time,
+ ?line "2.0" = Res#emem_res.trace_version,
+ ?line "32 bits" = Res#emem_res.word_size,
+ ?line ["11",
+ "2932575", "8615", "641087", "68924", "632472"]
+ = Res#emem_res.last_values,
+ ?line ["5434206", "9285"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config).
+
+'pc.smp_linux2.2.19pre17_32b_emt2.0'(doc) -> [];
+'pc.smp_linux2.2.19pre17_32b_emt2.0'(suite) -> [];
+'pc.smp_linux2.2.19pre17_32b_emt2.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "test_server" = Res#emem_res.nodename,
+ ?line "four-roses" = Res#emem_res.hostname,
+ ?line "20689" = Res#emem_res.pid,
+ ?line "2005-01-20 13:11:26.143077" = Res#emem_res.start_time,
+ ?line "2.0" = Res#emem_res.trace_version,
+ ?line "32 bits" = Res#emem_res.word_size,
+ ?line ["49",
+ "2901817", "9011", "521610", "10875", "512599",
+ "5392096", "2", "120", "10", "118",
+ "0", "0", "59", "0", "59"] = Res#emem_res.last_values,
+ ?line ["6182918", "9681",
+ "9062112", "6",
+ "2322432", "3"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config).
+
+
+'powerpc_darwin7.7.0_32b_emt2.0'(doc) -> [];
+'powerpc_darwin7.7.0_32b_emt2.0'(suite) -> [];
+'powerpc_darwin7.7.0_32b_emt2.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "test_server" = Res#emem_res.nodename,
+ ?line "grima" = Res#emem_res.hostname,
+ ?line "13021" = Res#emem_res.pid,
+ ?line "2005-01-20 15:08:17.568668" = Res#emem_res.start_time,
+ ?line "2.0" = Res#emem_res.trace_version,
+ ?line "32 bits" = Res#emem_res.word_size,
+ ?line ["9",
+ "2784323", "8641", "531105", "15893", "522464"]
+ = Res#emem_res.last_values,
+ ?line ["6150376", "9311"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config).
+
+'alpha_osf1v5.1_64b_emt2.0'(doc) -> [];
+'alpha_osf1v5.1_64b_emt2.0'(suite) -> [];
+'alpha_osf1v5.1_64b_emt2.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "test_server" = Res#emem_res.nodename,
+ ?line "thorin" = Res#emem_res.hostname,
+ ?line "224630" = Res#emem_res.pid,
+ ?line "2005-01-20 22:38:01.299632" = Res#emem_res.start_time,
+ ?line "2.0" = Res#emem_res.trace_version,
+ ?line "64 bits" = Res#emem_res.word_size,
+ ?line case Res#emem_res.max_word_size of
+ "32 bits" ->
+ ?line emem_comment(Config, ?EMEM_64_32_COMMENT);
+ "64 bits" ->
+ ?line ["22",
+ "6591992", "8625", "516785", "14805", "508160",
+ "11429184", "5", "127", "254", "122",
+ "0", "0", "61", "0", "61"] = Res#emem_res.last_values,
+ ?line ["7041775", "9295",
+ "11593024", "7",
+ "2097152", "3"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config)
+ end.
+
+'sparc_sunos5.8_64b_emt2.0'(doc) -> [];
+'sparc_sunos5.8_64b_emt2.0'(suite) -> [];
+'sparc_sunos5.8_64b_emt2.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "test_server" = Res#emem_res.nodename,
+ ?line "gorbag" = Res#emem_res.hostname,
+ ?line "10907" = Res#emem_res.pid,
+ ?line "2005-01-20 13:48:34.677068" = Res#emem_res.start_time,
+ ?line "2.0" = Res#emem_res.trace_version,
+ ?line "64 bits" = Res#emem_res.word_size,
+ ?line case Res#emem_res.max_word_size of
+ "32 bits" ->
+ ?line emem_comment(Config, ?EMEM_64_32_COMMENT);
+ "64 bits" ->
+ ?line ["16",
+ "5032887", "8657", "530635", "14316", "521978",
+ "8627140", "5", "139", "19", "134",
+ "0", "0", "67", "0", "67"] = Res#emem_res.last_values,
+ ?line ["11695070", "9324",
+ "16360388", "10",
+ "4136960", "3"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config)
+ end.
+
+'sparc_sunos5.8_32b_emt1.0'(doc) -> [];
+'sparc_sunos5.8_32b_emt1.0'(suite) -> [];
+'sparc_sunos5.8_32b_emt1.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "" = Res#emem_res.nodename,
+ ?line "" = Res#emem_res.hostname,
+ ?line "" = Res#emem_res.pid,
+ ?line "" = Res#emem_res.start_time,
+ ?line "1.0" = Res#emem_res.trace_version,
+ ?line "32 bits" = Res#emem_res.word_size,
+ ?line ["11",
+ "2558261", "8643", "560610", "15325", "551967"]
+ = Res#emem_res.last_values,
+ ?line ["2791121", "9317"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config).
+
+'pc_win2000_32b_emt1.0'(doc) -> [];
+'pc_win2000_32b_emt1.0'(suite) -> [];
+'pc_win2000_32b_emt1.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "" = Res#emem_res.nodename,
+ ?line "" = Res#emem_res.hostname,
+ ?line "" = Res#emem_res.pid,
+ ?line "" = Res#emem_res.start_time,
+ ?line "1.0" = Res#emem_res.trace_version,
+ ?line "32 bits" = Res#emem_res.word_size,
+ ?line ["6",
+ "2965248", "8614", "640897", "68903", "632283"]
+ = Res#emem_res.last_values,
+ ?line ["3147090", "9283"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config).
+
+
+'powerpc_darwin7.7.0_32b_emt1.0'(doc) -> [];
+'powerpc_darwin7.7.0_32b_emt1.0'(suite) -> [];
+'powerpc_darwin7.7.0_32b_emt1.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "" = Res#emem_res.nodename,
+ ?line "" = Res#emem_res.hostname,
+ ?line "" = Res#emem_res.pid,
+ ?line "" = Res#emem_res.start_time,
+ ?line "1.0" = Res#emem_res.trace_version,
+ ?line "32 bits" = Res#emem_res.word_size,
+ ?line ["8",
+ "2852991", "8608", "529662", "15875", "521054"]
+ = Res#emem_res.last_values,
+ ?line ["3173335", "9278"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config).
+
+'alpha_osf1v5.1_64b_emt1.0'(doc) -> [];
+'alpha_osf1v5.1_64b_emt1.0'(suite) -> [];
+'alpha_osf1v5.1_64b_emt1.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "" = Res#emem_res.nodename,
+ ?line "" = Res#emem_res.hostname,
+ ?line "" = Res#emem_res.pid,
+ ?line "" = Res#emem_res.start_time,
+ ?line "1.0" = Res#emem_res.trace_version,
+ ?line "64 bits" = Res#emem_res.word_size,
+ ?line case Res#emem_res.max_word_size of
+ "32 bits" ->
+ ?line emem_comment(Config, ?EMEM_64_32_COMMENT);
+ "64 bits" ->
+ ?line ["22",
+ "6820094", "8612", "515518", "14812", "506906"]
+ = Res#emem_res.last_values,
+ ?line ["7292413", "9282"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config)
+ end.
+
+'sparc_sunos5.8_64b_emt1.0'(doc) -> [];
+'sparc_sunos5.8_64b_emt1.0'(suite) -> [];
+'sparc_sunos5.8_64b_emt1.0'(Config) when is_list(Config) ->
+ ?line Res = run_emem_on_casefile(Config),
+ ?line "" = Res#emem_res.nodename,
+ ?line "" = Res#emem_res.hostname,
+ ?line "" = Res#emem_res.pid,
+ ?line "" = Res#emem_res.start_time,
+ ?line "1.0" = Res#emem_res.trace_version,
+ ?line "64 bits" = Res#emem_res.word_size,
+ ?line case Res#emem_res.max_word_size of
+ "32 bits" ->
+ ?line emem_comment(Config, ?EMEM_64_32_COMMENT);
+ "64 bits" ->
+ ?line ["15",
+ "4965746", "8234", "543940", "14443", "535706"]
+ = Res#emem_res.last_values,
+ ?line ["11697645", "8908"] = Res#emem_res.maximum,
+ ?line "0" = Res#emem_res.exit_code,
+ ?line emem_comment(Config)
+ end.
+
+%%
+%%
+%% Auxiliary functions
+%%
+%%
+
+receive_and_save_trace(PortNumber, FileName) when is_integer(PortNumber),
+ is_list(FileName) ->
+ {ok, F} = file:open(FileName, [write, compressed]),
+ {ok, LS} = gen_tcp:listen(PortNumber, [inet, {reuseaddr,true}, binary]),
+ {ok, S} = gen_tcp:accept(LS),
+ gen_tcp:close(LS),
+ receive_loop(S,F).
+
+receive_loop(Socket, File) ->
+ receive
+ {tcp, Socket, Data} ->
+ ok = file:write(File, Data),
+ receive_loop(Socket, File);
+ {tcp_closed, Socket} ->
+ file:close(File),
+ ok;
+ {tcp_error, Socket, Reason} ->
+ file:close(File),
+ {error, Reason}
+ end.
+
+send_trace({Host, PortNumber}, FileName) when is_list(Host),
+ is_integer(PortNumber),
+ is_list(FileName) ->
+ ?line {ok, F} = file:open(FileName, [read, compressed]),
+ ?line {ok, S} = gen_tcp:connect(Host, PortNumber, [inet,{packet, 0}]),
+ ?line send_loop(S, F);
+send_trace(EmuFlag, FileName) when is_list(EmuFlag),
+ is_list(FileName) ->
+ ?line ["+Mit", IpAddrStr, PortNoStr] = string:tokens(EmuFlag, " :"),
+ ?line send_trace({IpAddrStr, list_to_integer(PortNoStr)}, FileName).
+
+send_loop(Socket, File) ->
+ ?line case file:read(File, 128) of
+ {ok, Data} ->
+ ?line case gen_tcp:send(Socket, Data) of
+ ok -> ?line send_loop(Socket, File);
+ Error ->
+ ?line gen_tcp:close(Socket),
+ ?line file:close(File),
+ Error
+ end;
+ eof ->
+ ?line gen_tcp:close(Socket),
+ ?line file:close(File),
+ ?line ok;
+ Error ->
+ ?line gen_tcp:close(Socket),
+ ?line file:close(File),
+ ?line Error
+ end.
+
+check_emem(Dir, Type) when is_atom(Type) ->
+ ExeSuffix = case ?t:os_type() of
+ {win32, _} -> ".exe";
+ _ -> ""
+ end,
+ TypeSuffix = case Type of
+ opt -> "";
+ _ -> "." ++ atom_to_list(Type)
+ end,
+ Emem = "emem" ++ TypeSuffix ++ ExeSuffix,
+ case check_file(filename:join([Dir, Emem])) of
+ not_found -> ok;
+ File ->
+ Comment = case Type of
+ opt -> "";
+ _ -> "[emem " ++ atom_to_list(Type) ++ " compiled]"
+ end,
+ throw([{emem, File}, {emem_comment, Comment}])
+ end.
+
+check_dir(DirName) ->
+ case file:read_file_info(DirName) of
+ {ok, #file_info {type = directory, access = A}} when A == read;
+ A == read_write ->
+ DirName;
+ _ ->
+ not_found
+ end.
+
+check_file(FileName) ->
+ case file:read_file_info(FileName) of
+ {ok, #file_info {type = regular, access = A}} when A == read;
+ A == read_write ->
+ ?line FileName;
+ _ ->
+ ?line not_found
+ end.
+
+emem_comment(Config) when is_list(Config) ->
+ emem_comment(Config, "").
+
+emem_comment(Config, ExtraComment)
+ when is_list(Config), is_list(ExtraComment) ->
+ case {?config(emem_comment, Config), ExtraComment} of
+ {"", ""} -> ?line ok;
+ {"", XC} -> ?line {comment, XC};
+ {EmemC, ""} -> ?line {comment, EmemC};
+ {EmemC, XC} -> ?line {comment, EmemC ++ " " ++ XC}
+ end.
+
+run_emem_on_casefile(Config) ->
+ CaseName = atom_to_list(?config(testcase, Config)),
+ ?line File = filename:join([?config(data_dir, Config), CaseName ++ ".gz"]),
+ ?line case check_file(File) of
+ not_found ->
+ ?line ?t:fail({error, {filenotfound, File}});
+ _ ->
+ ?line ok
+ end,
+ ?line {ok, EmuFlag, Port} = start_emem(Config),
+ ?line Parent = self(),
+ ?line Ref = make_ref(),
+ ?line spawn_link(fun () ->
+ SRes = send_trace(EmuFlag, File),
+ Parent ! {Ref, SRes}
+ end),
+ ?line Res = get_emem_result(Port),
+ ?line receive
+ {Ref, ok} ->
+ ?line ok;
+ {Ref, SendError} ->
+ ?line ?t:format("Send result: ~p~n", [SendError])
+ end,
+ ?line Res.
+
+get_emem_result(Port) ->
+ ?line {Res, LV} = get_emem_result(Port, {#emem_res{}, []}),
+ ?line Res#emem_res{last_values = string:tokens(LV, " ")}.
+
+get_emem_result(Port, {_EmemRes, _LastValues} = Res) ->
+ ?line case get_emem_line(Port) of
+ eof ->
+ ?line Res;
+ Line ->
+ ?line get_emem_result(Port, parse_emem_line(Line, Res))
+ end.
+
+parse_emem_main_header_footer_line(Line, {ER, LV} = Res) ->
+
+ %% Header
+ ?line case has_prefix("> Nodename:", Line) of
+ {true, NN} ->
+ ?line throw({ER#emem_res{nodename = strip(NN)}, LV});
+ false -> ?line ok
+ end,
+ ?line case has_prefix("> Hostname:", Line) of
+ {true, HN} ->
+ ?line throw({ER#emem_res{hostname = strip(HN)}, LV});
+ false -> ?line ok
+ end,
+ ?line case has_prefix("> Pid:", Line) of
+ {true, P} ->
+ ?line throw({ER#emem_res{pid = strip(P)}, LV});
+ false -> ?line ok
+ end,
+ ?line case has_prefix("> Start time (UTC):", Line) of
+ {true, ST} ->
+ ?line throw({ER#emem_res{start_time = strip(ST)}, LV});
+ false -> ?line ok
+ end,
+ ?line case has_prefix("> Actual trace version:", Line) of
+ {true, TV} ->
+ ?line throw({ER#emem_res{trace_version = strip(TV)}, LV});
+ false -> ?line ok
+ end,
+ ?line case has_prefix("> Maximum trace word size:", Line) of
+ {true, MWS} ->
+ ?line throw({ER#emem_res{max_word_size = strip(MWS)}, LV});
+ false -> ?line ok
+ end,
+ ?line case has_prefix("> Actual trace word size:", Line) of
+ {true, WS} ->
+ ?line throw({ER#emem_res{word_size = strip(WS)}, LV});
+ false -> ?line ok
+ end,
+
+ %% Footer
+ ?line case has_prefix("> Maximum:", Line) of
+ {true, M} ->
+ ?line throw({ER#emem_res{maximum = string:tokens(M," ")}, LV});
+ false -> ?line ok
+ end,
+ ?line case has_prefix("> Emulator exited with code:", Line) of
+ {true, EC} ->
+ ?line throw({ER#emem_res{exit_code = strip(EC)}, LV});
+ false -> ?line ok
+ end,
+ ?line Res.
+
+parse_emem_header_line(_Line, {_ER, _LV} = Res) ->
+ ?line Res.
+
+parse_emem_value_line(Line, {EmemRes, _OldLastValues}) ->
+ ?line {EmemRes, Line}.
+
+parse_emem_line("", Res) ->
+ ?line Res;
+parse_emem_line(Line, Res) ->
+ ?line [Prefix | _] = Line,
+ case Prefix of
+ $> -> ?line catch parse_emem_main_header_footer_line(Line, Res);
+ $| -> ?line catch parse_emem_header_line(Line, Res);
+ _ -> ?line catch parse_emem_value_line(Line, Res)
+ end.
+
+start_emem(Config) when is_list(Config) ->
+ ?line Emem = ?config(emem, Config),
+ ?line Cd = case ignore_cores:dir(Config) of
+ false -> [];
+ Dir -> [{cd, Dir}]
+ end,
+ ?line case open_port({spawn, Emem ++ " -t -n -o -i 1"},
+ Cd ++ [{line, 1024}, eof]) of
+ Port when is_port(Port) -> ?line {ok, read_emu_flag(Port), Port};
+ Error -> ?line ?t:fail(Error)
+ end.
+
+read_emu_flag(Port) ->
+ ?line Line = case get_emem_line(Port) of
+ eof -> ?line ?t:fail(unexpected_end_of_file);
+ L -> ?line L
+ end,
+ ?line case has_prefix("> Emulator command line argument:", Line) of
+ {true, EmuFlag} -> EmuFlag;
+ false -> ?line read_emu_flag(Port)
+ end.
+
+get_emem_line(Port, Acc) ->
+ ?line receive
+ {Port, {data, {eol, Data}}} ->
+ ?line Res = case Acc of
+ [] -> ?line Data;
+ _ -> ?line lists:flatten([Acc|Data])
+ end,
+ ?line ?t:format("~s", [Res]),
+ ?line Res;
+ {Port, {data, {noeol, Data}}} ->
+ ?line get_emem_line(Port, [Acc|Data]);
+ {Port, eof} ->
+ ?line port_close(Port),
+ ?line eof
+ end.
+
+get_emem_line(Port) ->
+ ?line get_emem_line(Port, []).
+
+short_hostname([]) ->
+ [];
+short_hostname([$.|_]) ->
+ [];
+short_hostname([C|Cs]) ->
+ [C | short_hostname(Cs)].
+
+has_prefix([], List) when is_list(List) ->
+ {true, List};
+has_prefix([P|Xs], [P|Ys]) ->
+ has_prefix(Xs, Ys);
+has_prefix(_, _) ->
+ false.
+
+strip(Str) -> string:strip(Str).
+
+mk_nodename(Config) ->
+ {A, B, C} = now(),
+ atom_to_list(?MODULE)
+ ++ "-" ++ atom_to_list(?config(testcase, Config))
+ ++ "-" ++ integer_to_list(A*1000000000000 + B*1000000 + C).
+
+start_node(Name, Args) ->
+ ?line Pa = filename:dirname(code:which(?MODULE)),
+ ?line ?t:start_node(Name, peer, [{args, Args ++ " -pa " ++ Pa}]).
+
+% stop_node(Node) ->
+% ?t:stop_node(Node).
+
+is_debug_compiled() ->
+ is_debug_compiled(erlang:system_info(system_version)).
+
+is_debug_compiled([$d,$e,$b,$u,$g | _]) ->
+ true;
+is_debug_compiled([ _, _, _, _]) ->
+ false;
+is_debug_compiled([]) ->
+ false;
+is_debug_compiled([_|Rest]) ->
+ is_debug_compiled(Rest).
diff --git a/lib/tools/test/eprof_SUITE.erl b/lib/tools/test/eprof_SUITE.erl
new file mode 100644
index 0000000000..028fea8fe1
--- /dev/null
+++ b/lib/tools/test/eprof_SUITE.erl
@@ -0,0 +1,97 @@
+%%
+%% %CopyrightBegin%
+%%
+%% 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(eprof_SUITE).
+
+-include("test_server.hrl").
+
+-export([all/1,tiny/1,eed/1]).
+
+all(suite) -> [tiny,eed].
+
+
+tiny(suite) -> [];
+tiny(Config) when is_list(Config) ->
+ ?line ensure_eprof_stopped(),
+ ?line {ok, OldCurDir} = file:get_cwd(),
+ Datadir = ?config(data_dir, Config),
+ Privdir = ?config(priv_dir, Config),
+ ?line TTrap=?t:timetrap(60*1000),
+ % (Trace)Compile to priv_dir and make sure the correct version is loaded.
+ ?line {ok,eprof_suite_test} = compile:file(filename:join(Datadir,
+ "eprof_suite_test"),
+ [trace,{outdir, Privdir}]),
+ ?line ok = file:set_cwd(Privdir),
+ ?line code:purge(eprof_suite_test),
+ ?line {module,eprof_suite_test} = code:load_file(eprof_suite_test),
+ ?line {ok,_Pid} = eprof:start(),
+ ?line nothing_to_analyse = eprof:analyse(),
+ ?line nothing_to_analyse = eprof:total_analyse(),
+ ?line eprof:profile([], eprof_suite_test, test, [Config]),
+ ?line ok = eprof:analyse(),
+ ?line ok = eprof:total_analyse(),
+ ?line ok = eprof:log("eprof_SUITE_logfile"),
+ ?line stopped = eprof:stop(),
+ ?line ?t:timetrap_cancel(TTrap),
+ ?line ok = file:set_cwd(OldCurDir),
+ ok.
+
+eed(suite) -> [];
+eed(Config) when is_list(Config) ->
+ ?line ensure_eprof_stopped(),
+ ?line Datadir = ?config(data_dir, Config),
+ ?line Privdir = ?config(priv_dir, Config),
+ ?line TTrap=?t:timetrap(5*60*1000),
+
+ %% (Trace)Compile to priv_dir and make sure the correct version is loaded.
+ ?line code:purge(eed),
+ ?line {ok,eed} = c:c(filename:join(Datadir, "eed"), [trace,{outdir,Privdir}]),
+ ?line {ok,_Pid} = eprof:start(),
+ ?line Script = filename:join(Datadir, "ed.script"),
+ ?line ok = file:set_cwd(Datadir),
+ ?line {T1,_} = statistics(runtime),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line ok = eed:file(Script),
+ ?line {T2,_} = statistics(runtime),
+ ?line {ok,ok} = eprof:profile([], eed, file, [Script]),
+ ?line {T3,_} = statistics(runtime),
+ ?line profiling_already_stopped = eprof:stop_profiling(),
+ ?line ok = eprof:analyse(),
+ ?line ok = eprof:total_analyse(),
+ ?line ok = eprof:log("eprof_SUITE_logfile"),
+ ?line stopped = eprof:stop(),
+ ?line ?t:timetrap_cancel(TTrap),
+ S = lists:flatten(io_lib:format("~p times slower", [10*(T3-T2)/(T2-T1)])),
+ {comment,S}.
+
+ensure_eprof_stopped() ->
+ Pid = whereis(eprof),
+ case whereis(eprof) of
+ undefined ->
+ ok;
+ Pid ->
+ ?line stopped=eprof:stop()
+ end.
diff --git a/lib/tools/test/eprof_SUITE_data/ed.script b/lib/tools/test/eprof_SUITE_data/ed.script
new file mode 100644
index 0000000000..94531a9e98
--- /dev/null
+++ b/lib/tools/test/eprof_SUITE_data/ed.script
@@ -0,0 +1,8 @@
+H
+r eed.erl
+g/^[a-z][a-zA-Z_]*\(/i\
+%%% -------------------------------------------------------------\
+%%% A stupid function header.\
+%%% -------------------------------------------------------------
+1,$p
+q
diff --git a/lib/tools/test/eprof_SUITE_data/eed.erl b/lib/tools/test/eprof_SUITE_data/eed.erl
new file mode 100644
index 0000000000..0175abdd0e
--- /dev/null
+++ b/lib/tools/test/eprof_SUITE_data/eed.erl
@@ -0,0 +1,815 @@
+%%%----------------------------------------------------------------------
+%%% File : eed.erl
+%%% Author : Bjorn Gustavsson <bjorn@strider>
+%%% Purpose : Unix `ed' look-alike.
+%%% Created : 24 Aug 1997 by Bjorn Gustavsson <bjorn@strider>
+%%%----------------------------------------------------------------------
+
+-module(eed).
+-author('bjorn@strider').
+
+-export([edit/0, edit/1, file/1, cmd_line/1]).
+
+-record(state, {dot = 0, % Line number of dot.
+ upto_dot = [], % Lines up to dot (reversed).
+ after_dot = [], % Lines after dot.
+ lines = 0, % Total number of lines.
+ print=false, % Print after command.
+ filename=[], % Current file.
+ pattern, % Current pattern.
+ in_global=false, % True if executing global command.
+ input=[], % Global input stream.
+ undo, % Last undo state.
+ marks=[], % List of marks.
+ modified=false, % Buffer is modified.
+ opts=[{prompt, ''}], % Options.
+ last_error, % The last error encountered.
+ input_fd % Input file descriptor.
+ }).
+
+-record(line, {contents, % Contents of line.
+ mark=false % Marked (for global prefix).
+ }).
+
+cmd_line([Script]) ->
+ file(Script),
+ halt().
+
+file(Script) ->
+ case file:open(Script, [read]) of
+ {ok,Fd} ->
+ loop(#state{input_fd=Fd}),
+ ok;
+ {error,E} ->
+ {error,E}
+ end.
+
+edit() ->
+ loop(#state{input_fd=group_leader()}).
+
+edit(Name) ->
+ loop(command([$e|Name], #state{input_fd=group_leader()})).
+
+loop(St0) ->
+ {ok, St1, Cmd} = get_line(St0),
+ case catch command(lib:nonl(Cmd), St1) of
+ {'EXIT', Reason} ->
+ %% XXX Should clear outstanding global command here.
+ loop(print_error({'EXIT', Reason}, St1));
+ quit ->
+ ok;
+ {error, Reason} ->
+ loop(print_error(Reason, St1));
+ St2 when record(St2, state) ->
+ loop(St2)
+ end.
+
+command(Cmd, St) ->
+ case parse_command(Cmd, St) of
+ quit ->
+ quit;
+ St1 when function(St1#state.print) ->
+ if
+ St1#state.dot /= 0 ->
+ print_current(St1);
+ true ->
+ ok
+ end,
+ St1#state{print=false};
+ St1 when record(St1, state) ->
+ St1
+ end.
+
+get_line(St) ->
+ Opts = St#state.opts,
+ {value, {prompt, Prompt}} = lists:keysearch(prompt, 1, Opts),
+ get_line(Prompt, St).
+
+get_line(Prompt, St) when St#state.input == [] ->
+ Line = get_line1(St#state.input_fd, Prompt, []),
+ {ok, St, Line};
+get_line(_, St) ->
+ get_input(St#state.input, St, []).
+
+get_input([eof], St, []) ->
+ {ok, St, eof};
+get_input([eof], St, Result) ->
+ {ok, St#state{input=[eof]}, lists:reverse(Result)};
+get_input([$\n|Rest], St, Result) ->
+ {ok, St#state{input=Rest}, lists:reverse(Result)};
+get_input([C|Rest], St, Result) ->
+ get_input(Rest, St, [C|Result]).
+
+get_line1(Io, Prompt, Result) ->
+ get_line2(Io, io:get_line(Io, Prompt), Result).
+
+get_line2(Io, eof, []) ->
+ eof;
+get_line2(Io, eof, Result) ->
+ lists:reverse(Result);
+get_line2(Io, [$\\, $\n], Result) ->
+ get_line1(Io, '', [$\n|Result]);
+get_line2(Io, [$\n], Result) ->
+ lists:reverse(Result, [$\n]);
+get_line2(Io, [C|Rest], Result) ->
+ get_line2(Io, Rest, [C|Result]).
+
+print_error(Reason, St0) ->
+ St1 = St0#state{last_error=Reason},
+ io:put_chars("?\n"),
+ case lists:member(help_always, St1#state.opts) of
+ true ->
+ help_command([], [], St1),
+ St1;
+ false ->
+ St1
+ end.
+
+format_error(bad_command) -> "unknown command";
+format_error(bad_filename) -> "illegal or missing filename";
+format_error(bad_file) -> "cannot open input file";
+format_error(bad_linenum) -> "line out of range";
+format_error(bad_delimiter) -> "illegal or missing delimiter";
+format_error(bad_undo) -> "nothing to undo";
+format_error(bad_mark) -> "mark not lower case ascii";
+format_error(bad_pattern) -> "invalid regular expression";
+format_error(buffer_modified) -> "warning: expecting `w'";
+format_error(nested_globals) -> "multiple globals not allowed";
+format_error(nomatch) -> "search string not found";
+format_error(missing_space) -> "no space after command";
+format_error(garbage_after_command) -> "illegal suffix";
+format_error(not_implemented) -> "not implemented yet";
+format_error({'EXIT', {Code, {Mod, Func, Args}}}) ->
+ lists:flatten(io_lib:format("aborted due to bug (~p)",
+ [{Code, {Mod, Func, length(Args)}}]));
+format_error(A) -> atom_to_list(A).
+
+
+
+%%% Parsing commands.
+
+parse_command(Cmd, St) ->
+ parse_command(Cmd, St, []).
+
+parse_command(Cmd, State, Nums) ->
+ case get_one(Cmd, State) of
+ {ok, Num, Rest, NewState} ->
+ parse_next_address(Rest, NewState, [Num|Nums]);
+ false ->
+ parse_command1(Cmd, State, Nums)
+ end.
+
+parse_next_address([$,|Rest], State, Nums) ->
+ parse_command(Rest, State, Nums);
+parse_next_address([$;|Rest], State, [Num|Nums]) ->
+ parse_command(Rest, move_to(Num, State), [Num|Nums]);
+parse_next_address(Rest, State, Nums) ->
+ parse_command1(Rest, State, Nums).
+
+parse_command1([Letter|Rest], State, Nums) ->
+ Cont = fun(Fun, NumLines, Def) ->
+ execute_command(Fun, NumLines, Def, State, Nums, Rest) end,
+ parse_cmd_char(Letter, Cont);
+parse_command1([], State, Nums) ->
+ execute_command(fun print_command/3, 1, next, State, Nums, []).
+
+get_one(Cmd, St) ->
+ case get_address(Cmd, St) of
+ {ok, Addr, Cmd1, St1} ->
+ get_one1(Cmd1, Addr, St1);
+ false ->
+ get_one1(Cmd, false, St)
+ end.
+
+get_one1([D|Rest], false, St) when $0 =< D, D =< $9 ->
+ get_one2(get_number([D|Rest]), 1, 0, St);
+get_one1([D|Rest], Sum, St) when $0 =< D, D =< $9 ->
+ get_one2(get_number([D|Rest]), 1, Sum, St);
+get_one1([$+, D|Rest], Sum, St) when $0 =< D, D =< $9 ->
+ get_one2(get_number([D|Rest]), 1, Sum, St);
+get_one1([$-, D|Rest], Sum, St) when $0 =< D, D =< $9 ->
+ get_one2(get_number([D|Rest]), -1, Sum, St);
+get_one1([$+|Rest], Sum, St) ->
+ get_one2({ok, 1, Rest}, 1, Sum, St);
+get_one1([$-|Rest], Sum, St) ->
+ get_one2({ok, 1, Rest}, -1, Sum, St);
+get_one1(Cmd, false, St) ->
+ false;
+get_one1(Cmd, Sum, St) ->
+ {ok, Sum, Cmd, St}.
+
+get_one2({ok, Number, Rest}, Mul, false, St) ->
+ get_one1(Rest, St#state.dot+Mul*Number, St);
+get_one2({ok, Number, Rest}, Mul, Sum, St) ->
+ get_one1(Rest, Sum+Mul*Number, St).
+
+get_number(Cmd) ->
+ get_number(Cmd, 0).
+
+get_number([D|Rest], Result) when $0 =< D, D =< $9 ->
+ get_number(Rest, Result*10+D-$0);
+get_number(Rest, Result) ->
+ {ok, Result, Rest}.
+
+get_address([$.|Rest], State) ->
+ {ok, State#state.dot, Rest, State};
+get_address([$$|Rest], State) ->
+ {ok, State#state.lines, Rest, State};
+get_address([$', Mark|Rest], St) when $a =< Mark, Mark =< $z ->
+ case lists:keysearch(Mark, 2, St#state.marks) of
+ {value, {Line, Mark}} ->
+ {ok, Line, Rest, St};
+ false ->
+ {ok, 0, Rest, St}
+ end;
+get_address([$'|Rest], State) ->
+ error(bad_mark);
+get_address([$/|Rest], State) ->
+ scan_forward($/, Rest, State);
+get_address([$?|Rest], State) ->
+ error(not_implemented);
+get_address(Cmd, St) ->
+ false.
+
+scan_forward(End, Patt0, State) ->
+ {ok, Rest, NewState} = get_pattern(End, Patt0, State),
+ Dot = NewState#state.dot,
+ After = NewState#state.after_dot,
+ scan_forward1(Dot+1, After, NewState, Rest).
+
+scan_forward1(Linenum, [Line|Rest], State, RestCmd) ->
+ case regexp:first_match(Line#line.contents, State#state.pattern) of
+ {match, _, _} ->
+ {ok, Linenum, RestCmd, State};
+ nomatch ->
+ scan_forward1(Linenum+1, Rest, State, RestCmd)
+ end;
+scan_forward1(_, [], State, RestCmd) ->
+ Dot = State#state.dot,
+ Upto = State#state.upto_dot,
+ case scan_forward2(Dot, Upto, State, RestCmd) of
+ false ->
+ error(bad_linenum);
+ Other ->
+ Other
+ end.
+
+scan_forward2(0, [], State, RestCmd) ->
+ false;
+scan_forward2(Linenum, [Line|Rest], State, RestCmd) ->
+ case scan_forward2(Linenum-1, Rest, State, RestCmd) of
+ false ->
+ case regexp:first_match(Line#line.contents, State#state.pattern) of
+ {match, _, _} ->
+ {ok, Linenum, RestCmd, State};
+ nomatch ->
+ false
+ end;
+ Other ->
+ Other
+ end.
+
+parse_cmd_char($S, Cont) -> Cont(fun quest_command/3, 0, none);
+parse_cmd_char($T, Cont) -> Cont(fun time_command/3, 0, none);
+parse_cmd_char($=, Cont) -> Cont(fun print_linenum/3, 1, last);
+parse_cmd_char($a, Cont) -> Cont(fun append_command/3, 1, dot);
+parse_cmd_char($c, Cont) -> Cont(fun change_command/3, 2, dot);
+parse_cmd_char($d, Cont) -> Cont(fun delete_command/3, 2, dot);
+parse_cmd_char($e, Cont) -> Cont(fun enter_command/3, 0, none);
+parse_cmd_char($E, Cont) -> Cont(fun enter_always_command/3, 0, none);
+parse_cmd_char($f, Cont) -> Cont(fun file_command/3, 0, none);
+parse_cmd_char($g, Cont) -> Cont(fun global_command/3, 2, all);
+parse_cmd_char($h, Cont) -> Cont(fun help_command/3, 0, none);
+parse_cmd_char($H, Cont) -> Cont(fun help_always_command/3, 0, none);
+parse_cmd_char($i, Cont) -> Cont(fun insert_command/3, 1, dot);
+parse_cmd_char($k, Cont) -> Cont(fun mark_command/3, 1, dot);
+parse_cmd_char($l, Cont) -> Cont(fun list_command/3, 2, dot);
+parse_cmd_char($m, Cont) -> Cont(fun move_command/3, 2, dot);
+parse_cmd_char($n, Cont) -> Cont(fun number_command/3, 2, dot);
+parse_cmd_char($p, Cont) -> Cont(fun print_command/3, 2, dot);
+parse_cmd_char($P, Cont) -> Cont(fun prompt_command/3, 0, none);
+parse_cmd_char($q, Cont) -> Cont(fun quit_command/3, 0, none);
+parse_cmd_char($Q, Cont) -> Cont(fun quit_always_command/3, 0, none);
+parse_cmd_char($r, Cont) -> Cont(fun read_command/3, 1, last);
+parse_cmd_char($s, Cont) -> Cont(fun subst_command/3, 2, dot);
+parse_cmd_char($t, Cont) -> Cont(fun transpose_command/3, 2, dot);
+parse_cmd_char($u, Cont) -> Cont(fun undo_command/3, 0, none);
+parse_cmd_char($v, Cont) -> Cont(fun vglobal_command/3, 2, all);
+parse_cmd_char($w, Cont) -> Cont(fun write_command/3, 2, all);
+parse_cmd_char(_, Cont) -> error(bad_command).
+
+execute_command(Fun, NumLines, Def, State, Nums, Rest) ->
+ Lines = check_lines(NumLines, Def, Nums, State),
+ Fun(Rest, Lines, State).
+
+check_lines(0, _, [], _State) ->
+ [];
+check_lines(1, dot, [], #state{dot=Dot}) ->
+ [Dot];
+check_lines(1, next, [], State) when State#state.dot < State#state.lines ->
+ [State#state.dot+1];
+check_lines(1, last, [], State) ->
+ [State#state.lines];
+check_lines(1, _, [Num|_], State) when 0 =< Num, Num =< State#state.lines ->
+ [Num];
+check_lines(2, dot, [], #state{dot=Dot}) ->
+ [Dot, Dot];
+check_lines(2, all, [], #state{lines=Lines}) ->
+ [1, Lines];
+check_lines(2, _, [Num], State) when 0 =< Num, Num =< State#state.lines ->
+ [Num, Num];
+check_lines(2, _, [Num2, Num1|_], State)
+when 0 =< Num1, Num1 =< Num2, Num2 =< State#state.lines ->
+ [Num1, Num2];
+check_lines(_, _, _, _) ->
+ error(bad_linenum).
+
+
+%%% Executing commands.
+
+%% ($)= - print line number
+
+print_linenum(Rest, [Line], State) ->
+ NewState = check_trailing_p(Rest, State),
+ io:format("~w\n", [Line]),
+ NewState.
+
+%% ? - print state (for debugging)
+
+quest_command([], [], State) ->
+ io:format("~p\n", [State]),
+ State.
+
+%% Tcmd - time command
+
+time_command(Cmd, [], St) ->
+ Fun = fun parse_command/2,
+ erlang:garbage_collect(),
+ {Elapsed, Val} = timer:tc(erlang, apply, [Fun, [Cmd, St]]),
+ io:format("Time used: ~p s~n", [Elapsed/1000000.0]),
+ case Val of
+ {error, Reason} ->
+ throw({error, Reason});
+ Other ->
+ Other
+ end.
+
+%% (.)a - append text
+
+append_command(Rest, [Line], St0) ->
+ St1 = save_for_undo(St0),
+ append(move_to(Line, check_trailing_p(Rest, St1))).
+
+append(St0) ->
+ {ok, St1, Line0} = get_line('', St0),
+ case Line0 of
+ eof ->
+ St1;
+ ".\n" ->
+ St1;
+ Line ->
+ append(insert_line(Line, St1))
+ end.
+
+%% (.,.)c
+
+change_command(Rest, Lines, St0) ->
+ St1 = delete_command(Rest, Lines, St0),
+ St2 = append_command([], [St1#state.dot-1], St1),
+ save_for_undo(St2, St0).
+
+%% (.,.)d - delete lines
+
+delete_command(Rest, [0, Last], St) ->
+ error(bad_linenum);
+delete_command(Rest, [First, Last], St0) ->
+ St1 = check_trailing_p(Rest, save_for_undo(St0)),
+ delete(Last-First+1, move_to(Last, St1)).
+
+delete(0, St) when St#state.dot == St#state.lines ->
+ St;
+delete(0, St) ->
+ next_line(St);
+delete(Left, St0) ->
+ St1 = delete_current_line(St0),
+ delete(Left-1, St1).
+
+%% e file - replace buffer with new file
+
+enter_command(Name, [], St) when St#state.modified == true ->
+ error(buffer_modified);
+enter_command(Name, [], St0) ->
+ enter_always_command(Name, [], St0).
+
+%% E file - replace buffer with new file
+
+enter_always_command(Name, [], St0) ->
+ St1 = read_command(Name, [0], #state{filename=St0#state.filename,
+ opts=St0#state.opts}),
+ St1#state{modified=false}.
+
+%% f file - print filename; set filename
+
+file_command([], [], St) ->
+ io:format("~s~n", [St#state.filename]),
+ St;
+file_command([$_|Name0], [], St) ->
+ Name = skip_blanks(Name0),
+ file_command([], [], St#state{filename=Name});
+file_command(_, _, _) ->
+ error(missing_space).
+
+%% (1,$)g/RE/commands - execute commands on all matching lines.
+%% (1,$)v/RE/commands - execute commands on all non-matching lines.
+
+global_command(Cmd, Lines, St) ->
+ check_global0(true, Cmd, Lines, St).
+
+vglobal_command(Cmd, Lines, St) ->
+ check_global0(false, Cmd, Lines, St).
+
+check_global0(_, _, _, St) when St#state.in_global == true ->
+ error(nested_globals);
+check_global0(Sense, [Sep|Pattern], Lines, St0) ->
+ {ok, Cmd, St1} = get_pattern(Sep, Pattern, St0),
+ St2 = mark(Sense, Lines, St1),
+ do_global_command(Cmd, St2#state{in_global=true}, 0).
+
+mark(Sense, [First, Last], St0) ->
+ St1 = move_to(Last, St0),
+ mark1(Sense, First-1, St1).
+
+mark1(Sense, First, St) when St#state.dot == First ->
+ St;
+mark1(Sense, First, St) ->
+ [Line|Prev] = St#state.upto_dot,
+ NewLine = case match(St) of
+ true -> Line#line{mark=Sense};
+ false -> Line#line{mark=not(Sense)}
+ end,
+ mark1(Sense, First, prev_line(St#state{upto_dot=[NewLine|Prev]})).
+
+do_global_command(Cmd, St0, Matches) ->
+ case find_mark(St0) of
+ {ok, St1} ->
+ St2 = St1#state{input=Cmd++[eof]},
+ {ok, St3, Cmd1} = get_line(St2),
+ St4 = command(Cmd1, St3),
+ %% XXX There might be several commands.
+ do_global_command(Cmd, St4, Matches+1);
+ false when Matches == 0 ->
+ error(nomatch);
+ false ->
+ St0#state{in_global=false, input=[]}
+ end.
+
+find_mark(State) ->
+ find_mark(State#state.lines, State).
+
+find_mark(0, _State) ->
+ false;
+find_mark(Limit, State) when State#state.dot == 0 ->
+ find_mark(Limit, next_line(State));
+find_mark(Limit, State) ->
+ case State#state.upto_dot of
+ [Line|Prev] when Line#line.mark == true ->
+ NewLine = Line#line{mark=false},
+ {ok, State#state{upto_dot=[NewLine|Prev]}};
+ _Other ->
+ find_mark(Limit-1, wrap_next_line(State))
+ end.
+
+%% h - print info about last error
+
+help_command([], [], St) ->
+ case St#state.last_error of
+ undefined ->
+ St;
+ Reason ->
+ io:put_chars(format_error(Reason)),
+ io:nl(),
+ St
+ end;
+help_command(_, _, _) ->
+ error(garbage_after_command).
+
+%% H - toggle automatic help mode on/off
+
+help_always_command([], [], St) ->
+ Opts = St#state.opts,
+ case lists:member(help_always, Opts) of
+ true ->
+ St#state{opts=Opts--[help_always]};
+ false ->
+ help_command([], [], St),
+ St#state{opts=[help_always|Opts]}
+ end.
+
+%% (.)i - insert text
+
+insert_command(Rest, [0], State) ->
+ error(bad_linenum);
+insert_command(Rest, [Line], State) ->
+ append_command(Rest, [Line-1], State).
+
+%% (.)kx - mark line
+
+mark_command(_, [0], St) ->
+ error(bad_linenum);
+mark_command([Mark|Rest], [Line], St) when $a =< Mark, Mark =< $z ->
+ error(not_implemented);
+mark_command(_, _, _) ->
+ error(bad_mark).
+
+%% (.,.)l - list lines
+
+list_command(Rest, Lines, St) ->
+ print([$l|Rest], Lines, St).
+
+%% (.,.)m - move lines
+
+move_command(Cmd, [First, Last], St) ->
+ error(not_implemented).
+
+%% (.,.)t - copy lines
+
+transpose_command(Cmd, [First, Last], St) ->
+ error(not_implemented).
+
+%% (.,.)n - print lines with line numbers
+
+number_command(Rest, Lines, St) ->
+ print([$n|Rest], Lines, St).
+
+%% (.,.)p - print lines
+
+print_command(Rest, Lines, St) ->
+ print([$p|Rest], Lines, St).
+
+%% P - toggle prompt
+
+prompt_command([], [], St) ->
+ Opts = St#state.opts,
+ case lists:keysearch(prompt, 1, Opts) of
+ {value, {prompt, ''}} ->
+ St#state{opts=[{prompt, '*'}|Opts]};
+ {value, Value} ->
+ St#state{opts=[{prompt, ''} | Opts--[Value]]}
+ end;
+prompt_command(_, _, _) ->
+ error(garbage_after_command).
+
+%% q - quit editor
+
+quit_command([], [], _) ->
+ quit;
+quit_command(_, _, _) ->
+ error(garbage_after_command).
+
+%% Q - quit editor
+
+quit_always_command([], [], _) ->
+ quit;
+quit_always_command(_, _, _) ->
+ error(garbage_after_command).
+
+%% ($)r file - read file
+
+read_command([], _, St) when St#state.filename == [] ->
+ error(bad_filename);
+read_command([], [After], St) ->
+ read(After, St#state.filename, St);
+read_command([$ |Name0], [After], St) when St#state.filename == [] ->
+ Name = skip_blanks(Name0),
+ read(After, Name, St#state{filename=Name});
+read_command([$ |Name0], [After], St) ->
+ Name = skip_blanks(Name0),
+ read(After, Name, St);
+read_command(_, _, _) ->
+ error(missing_space).
+
+read(After, Name, St0) ->
+ case file:read_file(Name) of
+ {ok, Bin} ->
+ Chars = size(Bin),
+ St1 = move_to(After, St0),
+ St2 = insert_line(binary_to_list(Bin), St1),
+ io:format("~w~n", [Chars]),
+ St2;
+ {error, _} ->
+ error(bad_file)
+ end.
+
+%% s/pattern/replacement/gp
+
+subst_command(_, [0, _], _) ->
+ error(bad_linenum);
+subst_command([$ |Cmd0], [First, Last], St0) ->
+ error(bad_delimiter);
+subst_command([$\n|Cmd0], [First, Last], St0) ->
+ error(bad_delimiter);
+subst_command([Sep|Cmd0], [First, Last], St0) ->
+ St1 = save_for_undo(St0),
+ {ok, Cmd1, St2} = get_pattern(Sep, Cmd0, St1),
+ {ok, Replacement, Cmd2} = get_replacement(Sep, Cmd1),
+ {ok, Sub, Cmd3} = subst_check_gflag(Cmd2),
+ St3 = check_trailing_p(Cmd3, St2),
+ subst_command(Last-First+1, Sub, Replacement, move_to(First-1, St3), nomatch);
+subst_command([], _, _) ->
+ error(bad_delimiter).
+
+subst_command(0, _, _, _, nomatch) ->
+ error(nomatch);
+subst_command(0, _, _, _, StLast) when record(StLast, state) ->
+ StLast;
+subst_command(Left, Sub, Repl, St0, LastMatch) ->
+ St1 = next_line(St0),
+ [Line|_] = St1#state.upto_dot,
+ case regexp:Sub(Line#line.contents, St1#state.pattern, Repl) of
+ {ok, _, 0} ->
+ subst_command(Left-1, Sub, Repl, St1, LastMatch);
+ {ok, NewContents, _} ->
+ %% XXX This doesn't work with marks.
+ St2 = delete_current_line(St1),
+ St3 = insert_line(NewContents, St2),
+ subst_command(Left-1, Sub, Repl, St3, St3)
+ end.
+
+subst_check_gflag([$g|Cmd]) -> {ok, gsub, Cmd};
+subst_check_gflag(Cmd) -> {ok, sub, Cmd}.
+
+%% u - undo
+
+undo_command([], [], St) when St#state.undo == undefined ->
+ error(bad_undo);
+undo_command([], [], #state{undo=Undo}) ->
+ Undo;
+undo_command(_, _, _) ->
+ error(garbage_after_command).
+
+%% (1,$)w - write buffer to file
+
+write_command(Cmd, [First, Last], St) ->
+ error(not_implemented).
+
+
+%%% Primitive buffer operations.
+
+print_current(St) ->
+ [Line|_] = St#state.upto_dot,
+ Printer = St#state.print,
+ Printer(Line#line.contents, St).
+
+delete_current_line(St) when St#state.dot == 0 ->
+ error(bad_linenum);
+delete_current_line(St) ->
+ Lines = St#state.lines,
+ [_|Prev] = St#state.upto_dot,
+ St#state{dot=St#state.dot-1, upto_dot=Prev, lines=Lines-1, modified=true}.
+
+insert_line(Line, State) ->
+ insert_line1(Line, State, []).
+
+insert_line1([$\n|Rest], State, Result) ->
+ NewState = insert_single_line(lists:reverse(Result, [$\n]), State),
+ insert_line1(Rest, NewState, []);
+insert_line1([C|Rest], State, Result) ->
+ insert_line1(Rest, State, [C|Result]);
+insert_line1([], State, []) ->
+ State;
+insert_line1([], State, Result) ->
+ insert_single_line(lists:reverse(Result, [$\n]), State).
+
+insert_single_line(Line0, State) ->
+ Line = #line{contents=Line0},
+ Dot = State#state.dot,
+ Before = State#state.upto_dot,
+ Lines = State#state.lines,
+ %% XXX Avoid updating the record every time.
+ State#state{dot=Dot+1, upto_dot=[Line|Before], lines=Lines+1, modified=true}.
+
+move_to(Line, State) when Line < State#state.dot ->
+ move_to(Line, prev_line(State));
+move_to(Line, State) when State#state.dot < Line ->
+ move_to(Line, next_line(State));
+move_to(Line, State) when Line == State#state.dot ->
+ State.
+
+prev_line(State) ->
+ Dot = State#state.dot,
+ Before = State#state.upto_dot,
+ After = State#state.after_dot,
+ State#state{dot=Dot-1, upto_dot=tl(Before), after_dot=[hd(Before)|After]}.
+
+next_line(State) ->
+ Dot = State#state.dot,
+ Before = State#state.upto_dot,
+ After = State#state.after_dot,
+ State#state{dot=Dot+1, upto_dot=[hd(After)|Before], after_dot=tl(After)}.
+
+wrap_next_line(State) when State#state.dot == State#state.lines ->
+ move_to(1, State);
+wrap_next_line(State) ->
+ next_line(State).
+
+
+%%% Utilities.
+
+get_pattern(End, Cmd, State) ->
+ get_pattern(End, Cmd, State, []).
+
+get_pattern(End, [End|Rest], State, []) when State#state.pattern /= undefined ->
+ {ok, Rest, State};
+get_pattern(End, [End|Rest], State, Result) ->
+ case regexp:parse(lists:reverse(Result)) of
+ {error, _} ->
+ error(bad_pattern);
+ {ok, Re} ->
+ {ok, Rest, State#state{pattern=Re}}
+ end;
+get_pattern(End, [C|Rest], State, Result) ->
+ get_pattern(End, Rest, State, [C|Result]);
+get_pattern(End, [], State, Result) ->
+ get_pattern(End, [End], State, Result).
+
+get_replacement(End, Cmd) ->
+ get_replacement(End, Cmd, []).
+
+get_replacement(End, [End|Rest], Result) ->
+ {ok, lists:reverse(Result), Rest};
+get_replacement(End, [$\\, $&|Rest], Result) ->
+ get_replacement(End, Rest, [$&, $\\|Result]);
+get_replacement(End, [$\\, C|Rest], Result) ->
+ get_replacement(End, Rest, [C|Result]);
+get_replacement(End, [C|Rest], Result) ->
+ get_replacement(End, Rest, [C|Result]);
+get_replacement(End, [], Result) ->
+ get_replacement(End, [End], Result).
+
+check_trailing_p([$l], St) ->
+ St#state{print=fun(Line, _) -> lister(Line, 0) end};
+check_trailing_p([$n], St) ->
+ St#state{print=fun numberer/2};
+check_trailing_p([$p], St) ->
+ St#state{print=fun(Line, _) -> io:put_chars(Line) end};
+check_trailing_p([], State) ->
+ State;
+check_trailing_p(Other, State) ->
+ error(garbage_after_command).
+
+error(Reason) ->
+ throw({error, Reason}).
+
+match(State) when State#state.dot == 0 ->
+ false;
+match(State) ->
+ [Line|_] = State#state.upto_dot,
+ Re = State#state.pattern,
+ case regexp:first_match(Line#line.contents, Re) of
+ {match, _, _} -> true;
+ nomatch -> false
+ end.
+
+skip_blanks([$ |Rest]) ->
+ skip_blanks(Rest);
+skip_blanks(Rest) ->
+ Rest.
+
+print(Rest, [Line], St0) when Line > 0 ->
+ St1 = check_trailing_p(Rest, St0),
+ print(Line, move_to(Line-1, St1));
+print(Rest, [First, Last], St0) when First > 0 ->
+ St1 = check_trailing_p(Rest, St0),
+ print(Last, move_to(First-1, St1)).
+
+print(Last, St) when St#state.dot == Last ->
+ St#state{print=false};
+print(Last, St0) ->
+ St1 = next_line(St0),
+ print_current(St1),
+ print(Last, St1).
+
+lister(Rest, 64) ->
+ io:put_chars("\\\n"),
+ lister(Rest, 0);
+lister([C|Rest], Num) ->
+ list_char(C),
+ lister(Rest, Num+1);
+lister([], _) ->
+ ok.
+
+list_char($\t) ->
+ io:put_chars("\\t");
+list_char($\n) ->
+ io:put_chars("$\n");
+list_char(C) ->
+ io:put_chars([C]).
+
+numberer(Line, St) ->
+ io:format("~w\t~s", [St#state.dot, Line]).
+
+save_for_undo(St) ->
+ St#state{undo=St#state{undo=undefined, print=false}}.
+
+save_for_undo(St, OldSt) ->
+ St#state{undo=OldSt#state{undo=undefined, print=false}}.
diff --git a/lib/tools/test/eprof_SUITE_data/eprof_suite_test.erl b/lib/tools/test/eprof_SUITE_data/eprof_suite_test.erl
new file mode 100644
index 0000000000..a88b6e21f2
--- /dev/null
+++ b/lib/tools/test/eprof_SUITE_data/eprof_suite_test.erl
@@ -0,0 +1,74 @@
+%% ``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/.
+%%
+%% 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$
+%%
+%%%----------------------------------------------------------------------
+%%% Purpose : A priority queue.
+%%%----------------------------------------------------------------------
+%%% This module implements a priority queue as defined in
+%%% "Priority Queues and the STL" by Mark Nelson in Dr.Dobb's Journal, Jan 1996
+%%% see http://web2.airmail.net/markn/articles/pq_stl/priority.htm for more
+%%% information. (A heap implementation is planned aswell)
+%%%----------------------------------------------------------------------
+%%% The items of the queue is kept priority sorted, and because of that,
+%%% a push() operation costs more than a pop() operation (wich only
+%%% needs to return the top item of the queue(read: list)).
+%%%----------------------------------------------------------------------
+%%% The priority queue can be deceptively nice to use when creating for
+%%% example a Huffman coding tree.
+%%% See http://web2.airmail.net/markn/articles/pq_stl/priority.htm or
+%%% Dr.Dobb's Journal Jan, 96 for more information on this.
+%%%----------------------------------------------------------------------
+
+-module(eprof_suite_test).
+-export([test/1]).
+-export([new/0, push/3, pop/1]).
+
+test(Config) ->
+ Q1=new(),
+ Q2=push(Q1, "monkey", 3),
+ Q3=push(Q2, "banana", 4),
+ Q4=push(Q3, "jungle", 2),
+ Q5=push(Q4, "world", 5),
+ Q6=push(Q5, "universe",6),
+ Q7=push(Q6, "peanut", 1),
+% io:format("~p~n",[Q7]),
+ {Itm, Q8}=pop(Q7),
+ ok.
+
+%% Returns a new priority queue.
+new() ->
+ [].
+
+%% Pushes a new item with a set priority into the queue.
+push(Queue, Itm, Pri) ->
+ insert(Queue, Itm, Pri, []).
+
+%% Pops the item with the highest priority out of the queue.
+pop([{Itm, Pri}|Queue]) ->
+ {Itm, Queue}.
+
+%% --- -- -
+%% Support functions.
+insert([], Itm, Pri, NewQ) ->
+ lists:flatten([lists:reverse(NewQ)|[{Itm, Pri}]]);
+% Itm>QItm>NewQ>Queue
+insert([{QItm,QPri}|Queue], Itm, Pri, NewQ) when Pri>QPri->
+ A = [{Itm, Pri}|[{QItm, QPri}]],
+ lists:flatten([[A|NewQ]|Queue]);
+insert([QItm|Rest], Itm, Pri, NewQ) ->
+ insert(Rest, Itm, Pri, [QItm|NewQ]).
+%% --- -- -
diff --git a/lib/tools/test/fprof_SUITE.erl b/lib/tools/test/fprof_SUITE.erl
new file mode 100644
index 0000000000..e437007e76
--- /dev/null
+++ b/lib/tools/test/fprof_SUITE.erl
@@ -0,0 +1,1191 @@
+%%
+%% %CopyrightBegin%
+%%
+%% 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(fprof_SUITE).
+
+-include("test_server.hrl").
+
+%% Test server framework exports
+-export([all/1, not_run/1]).
+
+%% Test suites
+-export([stack_seq/1, tail_seq/1, create_file_slow/1, spawn_simple/1,
+ imm_tail_seq/1, imm_create_file_slow/1, imm_compile/1,
+ cpu_create_file_slow/1]).
+
+%% Other exports
+-export([create_file_slow/2]).
+
+
+%% Debug exports
+-export([parse/1, verify/2]).
+-export([spawn_simple_test/3]).
+
+
+-define(line_trace,true).
+
+%-define(debug,true).
+-ifdef(debug).
+-define(dbg(Str,Args), io:format(Str,Args)).
+-else.
+-define(dbg(Str,Args), ok).
+-endif.
+
+
+
+%%%---------------------------------------------------------------------
+%%% Test suites
+%%%---------------------------------------------------------------------
+
+
+
+all(doc) ->
+ ["Test the 'fprof' profiling tool."];
+all(suite) ->
+ case test_server:is_native(?MODULE) of
+ true ->
+ [not_run];
+ false ->
+ [stack_seq, tail_seq, create_file_slow, spawn_simple,
+ imm_tail_seq, imm_create_file_slow, imm_compile,
+ cpu_create_file_slow]
+ end.
+
+not_run(Config) when is_list(Config) ->
+ {skipped, "Native code"}.
+
+%%%---------------------------------------------------------------------
+
+stack_seq(doc) ->
+ ["Tests a stack recursive variant of lists:seq/3"];
+stack_seq(suite) ->
+ [];
+stack_seq(Config) when is_list(Config) ->
+ ?line Timetrap = ?t:timetrap(?t:seconds(20)),
+ ?line PrivDir = ?config(priv_dir, Config),
+ ?line TraceFile =
+ filename:join(PrivDir, ?MODULE_STRING"_stack_seq.trace"),
+ ?line AnalysisFile =
+ filename:join(PrivDir, ?MODULE_STRING"_stack_seq.analysis"),
+ ?line Start = 1,
+ ?line Stop = 1000,
+ ?line Succ = fun (X) -> X + 1 end,
+ ?line ok = fprof:stop(kill),
+ %%
+ ?line TS0 = erlang:now(),
+ ?line R0 = fprof:apply(fun seq/3, [Start, Stop, Succ], [{file, TraceFile}]),
+ ?line TS1 = erlang:now(),
+ ?line R = seq(Start, Stop, Succ),
+ ?line TS2 = erlang:now(),
+ ?line ok = fprof:profile(file, TraceFile),
+ ?line ok = fprof:analyse(),
+ ?line ok = fprof:analyse(dest, AnalysisFile),
+ ?line ok = fprof:stop(),
+ ?line R = R0,
+ %%
+ ?line {ok, [T, P]} = parse(AnalysisFile),
+ ?line io:format("~p~n~n~p~n", [P, ets:tab2list(T)]),
+ ?line ok = (catch verify(T, P)),
+ ?line Proc = pid_to_list(self()),
+ ?line case P of
+ [{analysis_options, _},
+ [{totals, _, Acc, _}],
+ [{Proc, _, undefined, _} | _]] ->
+ ok
+ end,
+ %%
+ ?line check_own_and_acc(TraceFile,AnalysisFile),
+ %%
+ ?line ets:delete(T),
+ ?line file:delete(TraceFile),
+ ?line file:delete(AnalysisFile),
+ ?line ?t:timetrap_cancel(Timetrap),
+ ?line Acc1 = ts_sub(TS1, TS0),
+ ?line Acc2 = ts_sub(TS2, TS1),
+ ?line io:format("ts:~w, fprof:~w, bare:~w.~n", [Acc, Acc1, Acc2]),
+ {comment, io_lib:format("~p times slower", [Acc1/Acc2])}.
+
+%%%---------------------------------------------------------------------
+
+tail_seq(doc) ->
+ ["Tests a tail recursive variant of lists:seq/3"];
+tail_seq(suite) ->
+ [];
+tail_seq(Config) when is_list(Config) ->
+ ?line Timetrap = ?t:timetrap(?t:seconds(10)),
+ ?line PrivDir = ?config(priv_dir, Config),
+ ?line TraceFile =
+ filename:join(PrivDir, ?MODULE_STRING"_tail_seq.trace"),
+ ?line AnalysisFile =
+ filename:join(PrivDir, ?MODULE_STRING"_tail_seq.analysis"),
+ ?line Start = 1,
+ ?line Stop = 1000,
+ ?line Succ = fun (X) -> X + 1 end,
+ ?line ok = fprof:stop(kill),
+ %%
+ ?line TS0 = erlang:now(),
+ ?line R = seq_r(Start, Stop, Succ),
+ ?line TS1 = erlang:now(),
+ %%
+ ?line R1 = fprof:apply(fun seq_r/3, [Start, Stop, Succ],
+ [{file, TraceFile}]),
+ ?line TS2 = erlang:now(),
+ ?line ok = fprof:profile([{file,TraceFile}]),
+ ?line ok = fprof:analyse(),
+ ?line ok = fprof:analyse(dest, AnalysisFile),
+ ?line ok = fprof:stop(),
+ ?line R = R1,
+ %%
+ ?line {ok, [T, P]} = parse(AnalysisFile),
+ ?line io:format("~p~n~n~p~n", [P, ets:tab2list(T)]),
+ ?line ok = verify(T, P),
+ ?line Proc = pid_to_list(self()),
+ ?line case P of
+ [{analysis_options, _},
+ [{totals, _, Acc, _}],
+ [{Proc, _, undefined, _} | _]] ->
+ ok
+ end,
+ %%
+ ?line check_own_and_acc(TraceFile,AnalysisFile),
+ %%
+ ?line ets:delete(T),
+ ?line file:delete(TraceFile),
+ ?line file:delete(AnalysisFile),
+ ?line ?t:timetrap_cancel(Timetrap),
+ ?line Acc1 = ts_sub(TS1, TS0),
+ ?line Acc2 = ts_sub(TS2, TS1),
+ ?line io:format("ts:~w, fprof:~w, bare:~w.~n", [Acc, Acc2, Acc1]),
+ {comment, io_lib:format("~p times slower", [Acc2/Acc1])}.
+
+%%%---------------------------------------------------------------------
+
+create_file_slow(doc) ->
+ ["Tests the create_file_slow benchmark"];
+create_file_slow(suite) ->
+ [];
+create_file_slow(Config) when is_list(Config) ->
+ ?line Timetrap = ?t:timetrap(?t:seconds(40)),
+ ?line PrivDir = ?config(priv_dir, Config),
+ ?line TraceFile =
+ filename:join(PrivDir, ?MODULE_STRING"_create_file_slow.trace"),
+ ?line AnalysisFile =
+ filename:join(PrivDir, ?MODULE_STRING"_create_file_slow.analysis"),
+ ?line DataFile =
+ filename:join(PrivDir, ?MODULE_STRING"_create_file_slow.data"),
+ ?line ok = fprof:stop(kill),
+ %%
+ ?line TS0 = erlang:now(),
+ ?line ok = create_file_slow(DataFile, 1024),
+ ?line TS1 = erlang:now(),
+ %%
+ ?line ok = file:delete(DataFile),
+ ?line TS2 = erlang:now(),
+ ?line ok = fprof:apply(?MODULE, create_file_slow, [DataFile, 1024],
+ [{file, TraceFile}]),
+ ?line TS3 = erlang:now(),
+ ?line ok = fprof:profile(file, TraceFile),
+ ?line ok = fprof:analyse(),
+ ?line ok = fprof:analyse(dest, AnalysisFile),
+ ?line ok = fprof:stop(),
+ %%
+ ?line {ok, [T, P]} = parse(AnalysisFile),
+ ?line io:format("~p~n~n~p~n", [P, ets:tab2list(T)]),
+ ?line ok = verify(T, P),
+ ?line Proc = pid_to_list(self()),
+ ?line case P of
+ [{analysis_options, _},
+ [{totals, _, Acc, _}],
+ [{Proc, _, undefined, _} | _]] ->
+ ok
+ end,
+ %%
+ ?line check_own_and_acc(TraceFile,AnalysisFile),
+ %%
+ ?line ets:delete(T),
+ ?line file:delete(DataFile),
+ ?line file:delete(TraceFile),
+ ?line file:delete(AnalysisFile),
+ ?line ?t:timetrap_cancel(Timetrap),
+ ?line Acc1 = ts_sub(TS1, TS0),
+ ?line Acc3 = ts_sub(TS3, TS2),
+ ?line io:format("ts:~w, fprof:~w, bare:~w.~n", [Acc, Acc3, Acc1]),
+ {comment, io_lib:format("~p times slower", [Acc3/Acc1])}.
+
+
+
+%%%---------------------------------------------------------------------
+
+spawn_simple(doc) ->
+ ["Tests process spawn"];
+spawn_simple(suite) ->
+ [];
+spawn_simple(Config) when is_list(Config) ->
+ ?line Timetrap = ?t:timetrap(?t:seconds(30)),
+ ?line PrivDir = ?config(priv_dir, Config),
+ ?line TraceFile =
+ filename:join(PrivDir, ?MODULE_STRING"_spawn_simple.trace"),
+ ?line AnalysisFile =
+ filename:join(PrivDir, ?MODULE_STRING"_spawn_simple.analysis"),
+ ?line Start = 1,
+ ?line Stop = 1000,
+ ?line Succ = fun (X) -> X + 1 end,
+ ?line ok = fprof:stop(kill),
+ %%
+ ?line TS0 = erlang:now(),
+ ?line {{_, R1}, {_, R2}} = spawn_simple_test(Start, Stop, Succ),
+ ?line TS1 = erlang:now(),
+ %%
+ ?line ok = fprof:trace(start, TraceFile),
+ ?line {{P1, R3}, {P2, R4}} = spawn_simple_test(Start, Stop, Succ),
+ ?line ok = fprof:trace(stop),
+ ?line TS2 = erlang:now(),
+ ?line ok = fprof:profile(file, TraceFile),
+ ?line ok = fprof:analyse(),
+ ?line ok = fprof:analyse(dest, AnalysisFile),
+ ?line ok = fprof:stop(),
+ ?line R1 = R3,
+ ?line R2 = R4,
+ %%
+ ?line {ok, [T, P]} = parse(AnalysisFile),
+ ?line io:format("~p~n~n~p~n", [P, ets:tab2list(T)]),
+ ?line ok = verify(T, P),
+ ?line Proc1 = pid_to_list(P1),
+ ?line Proc2 = pid_to_list(P2),
+ ?line Proc0 = pid_to_list(self()),
+ ?line io:format("~p~n ~p ~p ~p~n", [P, Proc0, Proc1, Proc2]),
+ ?line [{analysis_options, _}, [{totals, _, Acc, _}] | Procs] = P,
+ ?line [[{Proc0, _, undefined, _} | _]] =
+ lists:filter(fun ([Pt | _]) when element(1, Pt) == Proc0 -> true;
+ (_) -> false
+ end, Procs),
+ ?line [[{Proc1, _, undefined, _},
+ {spawned_by, Proc0},
+ {spawned_as, {erlang, apply, ["#Fun"++_, []]}},
+ {initial_calls, [{erlang, apply, 2},
+ {?MODULE, '-spawn_simple_test/3-fun-0-', 4}]}
+ | _]] =
+ lists:filter(fun ([Pt | _]) when element(1, Pt) == Proc1 -> true;
+ (_) -> false
+ end, Procs),
+ ?line [[{Proc2, _, undefined, _},
+ {spawned_by, Proc0},
+ {spawned_as, {erlang, apply, ["#Fun"++_, []]}},
+ {initial_calls, [{erlang, apply, 2},
+ {?MODULE, '-spawn_simple_test/3-fun-1-', 4}]}
+ | _]] =
+ lists:filter(fun ([Pt | _]) when element(1, Pt) == Proc2 -> true;
+ (_) -> false
+ end, Procs),
+ ?line 3 = length(Procs),
+ ?line R1 = lists:reverse(R2),
+ %%
+ ?line check_own_and_acc(TraceFile,AnalysisFile),
+ %%
+ ?line ets:delete(T),
+ ?line file:delete(TraceFile),
+ ?line file:delete(AnalysisFile),
+ ?line ?t:timetrap_cancel(Timetrap),
+ ?line Acc1 = ts_sub(TS1, TS0),
+ ?line Acc2 = ts_sub(TS2, TS1),
+ ?line io:format("ts:~w, fprof:~w, bare:~w.~n", [Acc, Acc2, Acc1]),
+ {comment, io_lib:format("~p times slower", [Acc2/Acc1])}.
+
+
+spawn_simple_test(Start, Stop, Succ) ->
+ Parent = self(),
+ Seq =
+ spawn_link(
+ fun () ->
+ Parent ! {self(), seq(Start, Stop, Succ)}
+ end),
+ SeqR =
+ spawn_link(
+ fun () ->
+ Parent ! {self(), seq_r(Start, Stop, Succ)}
+ end),
+ receive {Seq, SeqResult} ->
+ receive {SeqR, SeqRResult} ->
+ {{Seq, SeqResult}, {SeqR, SeqRResult}}
+ end
+ end.
+
+
+
+%%%---------------------------------------------------------------------
+
+imm_tail_seq(doc) ->
+ ["Tests a tail recursive variant of lists:seq/3 ",
+ "with immediate trace to profile"];
+imm_tail_seq(suite) ->
+ [];
+imm_tail_seq(Config) when is_list(Config) ->
+ ?line Timetrap = ?t:timetrap(?t:seconds(10)),
+ ?line PrivDir = ?config(priv_dir, Config),
+ ?line AnalysisFile =
+ filename:join(PrivDir, ?MODULE_STRING"_imm_tail_seq.analysis"),
+ ?line Start = 1,
+ ?line Stop = 1000,
+ ?line Succ = fun (X) -> X + 1 end,
+ ?line ok = fprof:stop(kill),
+ ?line catch eprof:stop(),
+ %%
+ ?line TS0 = erlang:now(),
+ ?line R0 = seq_r(Start, Stop, Succ),
+ ?line TS1 = erlang:now(),
+ %%
+ ?line profiling = eprof:start_profiling([self()]),
+ ?line TS2 = erlang:now(),
+ ?line R2 = seq_r(Start, Stop, Succ),
+ ?line TS3 = erlang:now(),
+ ?line profiling_stopped = eprof:stop_profiling(),
+ ?line R2 = R0,
+ %%
+ ?line eprof:analyse(),
+ ?line stopped = eprof:stop(),
+ %%
+ ?line {ok, Tracer} = fprof:profile(start),
+ ?line ok = fprof:trace([start, {tracer, Tracer}]),
+ ?line TS4 = erlang:now(),
+ ?line R4 = seq_r(Start, Stop, Succ),
+ ?line TS5 = erlang:now(),
+ ?line ok = fprof:trace(stop),
+ ?line ok = fprof:analyse(),
+ ?line ok = fprof:analyse(dest, AnalysisFile),
+ ?line ok = fprof:stop(),
+ ?line R4 = R0,
+ %%
+ ?line {ok, [T, P]} = parse(AnalysisFile),
+ ?line io:format("~p~n~n~p~n", [P, ets:tab2list(T)]),
+ ?line ok = verify(T, P),
+ ?line Proc = pid_to_list(self()),
+ ?line case P of
+ [{analysis_options, _},
+ [{totals, _, Acc, _}],
+ [{Proc, _, undefined, _} | _]] ->
+ ok
+ end,
+ %%
+ ?line ets:delete(T),
+ ?line file:delete(AnalysisFile),
+ ?line ?t:timetrap_cancel(Timetrap),
+ ?line Acc1 = ts_sub(TS1, TS0),
+ ?line Acc3 = ts_sub(TS3, TS2),
+ ?line Acc5 = ts_sub(TS5, TS4),
+ ?line io:format("~p (plain), ~p (eprof), ~p (fprof), ~p (cpu)~n",
+ [Acc1/1000, Acc3/1000, Acc5/1000, Acc/1000]),
+ {comment, io_lib:format("~p/~p (fprof/eprof) times slower",
+ [Acc5/Acc1, Acc3/Acc1])}.
+
+%%%---------------------------------------------------------------------
+
+imm_create_file_slow(doc) ->
+ ["Tests a tail recursive variant of lists:seq/3 ",
+ "with immediate trace to profile"];
+imm_create_file_slow(suite) ->
+ [];
+imm_create_file_slow(Config) when is_list(Config) ->
+ ?line Timetrap = ?t:timetrap(?t:seconds(60)),
+ ?line PrivDir = ?config(priv_dir, Config),
+ ?line DataFile =
+ filename:join(PrivDir, ?MODULE_STRING"_imm_create_file_slow.data"),
+ ?line AnalysisFile =
+ filename:join(PrivDir, ?MODULE_STRING"_imm_create_file_slow.analysis"),
+ ?line ok = fprof:stop(kill),
+ %%
+ ?line TS0 = erlang:now(),
+ ?line ok = create_file_slow(DataFile, 1024),
+ ?line TS1 = erlang:now(),
+ ?line ok = file:delete(DataFile),
+ %%
+ ?line {ok, Tracer} = fprof:profile(start),
+ ?line TS2 = erlang:now(),
+ ?line ok = fprof:apply(?MODULE, create_file_slow, [DataFile, 1024],
+ [{tracer, Tracer}, continue]),
+ ?line TS3 = erlang:now(),
+ ?line ok = fprof:profile(stop),
+ ?line ok = fprof:analyse(),
+ ?line ok = fprof:analyse(dest, AnalysisFile),
+ ?line ok = fprof:stop(),
+ %%
+ ?line {ok, [T, P]} = parse(AnalysisFile),
+ ?line io:format("~p~n~n~p~n", [P, ets:tab2list(T)]),
+ ?line ok = verify(T, P),
+ ?line Proc = pid_to_list(self()),
+ ?line case P of
+ [{analysis_options, _},
+ [{totals, _, Acc, _}],
+ [{Proc, _, undefined, _} | _]] ->
+ ok
+ end,
+ %%
+ ?line ets:delete(T),
+ ?line file:delete(DataFile),
+ ?line file:delete(AnalysisFile),
+ ?line ?t:timetrap_cancel(Timetrap),
+ ?line Acc1 = ts_sub(TS1, TS0),
+ ?line Acc3 = ts_sub(TS3, TS2),
+ ?line io:format("ts:~w, fprof:~w, bare:~w.~n", [Acc, Acc3, Acc1]),
+ {comment, io_lib:format("~p times slower", [Acc3/Acc1])}.
+
+%%%---------------------------------------------------------------------
+
+imm_compile(doc) ->
+ ["Tests to compile a small source file ",
+ "with immediate trace to profile"];
+imm_compile(suite) ->
+ [];
+imm_compile(Config) when is_list(Config) ->
+ ?line Timetrap = ?t:timetrap(?t:minutes(20)),
+ ?line DataDir = ?config(data_dir, Config),
+ ?line SourceFile = filename:join(DataDir, "foo.erl"),
+ ?line PrivDir = ?config(priv_dir, Config),
+ ?line AnalysisFile =
+ filename:join(PrivDir, ?MODULE_STRING"_imm_compile.analysis"),
+ ?line ok = fprof:stop(kill),
+ ?line catch eprof:stop(),
+ %%
+ ?line {ok, foo, _} = compile:file(SourceFile, [binary]),
+ ?line TS0 = erlang:now(),
+ ?line {ok, foo, _} = compile:file(SourceFile, [binary]),
+ ?line TS1 = erlang:now(),
+ %%
+ ?line profiling = eprof:start_profiling([self()]),
+ ?line TS2 = erlang:now(),
+ ?line {ok, foo, _} = compile:file(SourceFile, [binary]),
+ ?line TS3 = erlang:now(),
+ ?line profiling_stopped = eprof:stop_profiling(),
+ %%
+ ?line eprof:analyse(),
+ ?line stopped = eprof:stop(),
+ %%
+ ?line {ok, Tracer} = fprof:profile(start),
+ ?line ok = fprof:trace([start, {tracer, Tracer}]),
+ ?line TS4 = erlang:now(),
+ ?line {ok, foo, _} = compile:file(SourceFile, [binary]),
+ ?line TS5 = erlang:now(),
+ ?line ok = fprof:trace(stop),
+ %%
+ ?line io:format("Analysing...~n"),
+ ?line ok = fprof:analyse(dest, AnalysisFile),
+ ?line ok = fprof:stop(),
+ %%
+ ?line {ok, [T, P]} = parse(AnalysisFile),
+ ?line io:format("~p~n", [P]),
+ ?line Acc1 = ts_sub(TS1, TS0),
+ ?line Acc3 = ts_sub(TS3, TS2),
+ ?line Acc5 = ts_sub(TS5, TS4),
+ ?line io:format("Verifying...~n"),
+ ?line ok = verify(T, P),
+ ?line case P of
+ [{analysis_options, _},
+ [{totals, _, Acc, _}] | _] ->
+ ok
+ end,
+ %%
+ ?line ets:delete(T),
+ ?line file:delete(AnalysisFile),
+ ?line ?t:timetrap_cancel(Timetrap),
+ ?line io:format("~p (plain), ~p (eprof), ~p (fprof), ~p(cpu)~n",
+ [Acc1/1000, Acc3/1000, Acc5/1000, Acc/1000]),
+ {comment, io_lib:format("~p/~p (fprof/eprof) times slower",
+ [Acc5/Acc1, Acc3/Acc1])}.
+
+%%%---------------------------------------------------------------------
+
+cpu_create_file_slow(doc) ->
+ ["Tests the create_file_slow benchmark using cpu_time"];
+cpu_create_file_slow(suite) ->
+ [];
+cpu_create_file_slow(Config) when is_list(Config) ->
+ ?line Timetrap = ?t:timetrap(?t:seconds(40)),
+ ?line PrivDir = ?config(priv_dir, Config),
+ ?line TraceFile =
+ filename:join(PrivDir, ?MODULE_STRING"_cpu_create_file_slow.trace"),
+ ?line AnalysisFile =
+ filename:join(PrivDir, ?MODULE_STRING"_cpu_create_file_slow.analysis"),
+ ?line DataFile =
+ filename:join(PrivDir, ?MODULE_STRING"_cpu_create_file_slow.data"),
+ ?line ok = fprof:stop(kill),
+ %%
+ ?line TS0 = erlang:now(),
+ ?line Result = (catch fprof:apply(?MODULE, create_file_slow,
+ [DataFile, 1024],
+ [{file, TraceFile}, cpu_time])),
+ ?line TS1 = erlang:now(),
+ ?line TestResult =
+ case Result of
+ ok ->
+ ?line ok = fprof:profile(file, TraceFile),
+ ?line ok = fprof:analyse(),
+ ?line ok = fprof:analyse(dest, AnalysisFile),
+ ?line ok = fprof:stop(),
+ %%
+ ?line {ok, [T, P]} = parse(AnalysisFile),
+ ?line io:format("~p~n~n~p~n", [P, ets:tab2list(T)]),
+ ?line ok = verify(T, P),
+ ?line Proc = pid_to_list(self()),
+ ?line case P of
+ [{analysis_options, _},
+ [{totals, _, Acc, _}],
+ [{Proc, _, undefined, _} | _]] ->
+ ok
+ end,
+ %%
+ ?line check_own_and_acc(TraceFile,AnalysisFile),
+ %%
+ ?line ets:delete(T),
+ ?line file:delete(DataFile),
+ ?line file:delete(TraceFile),
+ ?line file:delete(AnalysisFile),
+ ?line Acc1 = ts_sub(TS1, TS0),
+ ?line io:format("cpu_ts:~w, fprof:~w~n", [Acc, Acc1]),
+ {comment, io_lib:format("~p% cpu utilization",
+ [100*Acc/Acc1])};
+ {'EXIT', not_supported} ->
+ case {os:type(), os:version()} of
+ {{unix, sunos}, {Major, Minor, _}}
+ when Major >= 5, Minor >= 7 ->
+ test_server:fail(Result);
+ _ ->
+ {skipped, "not_supported"}
+ end;
+ _ ->
+ test_server:fail(Result)
+ end,
+ ?line ?t:timetrap_cancel(Timetrap),
+ TestResult.
+
+
+
+%%%---------------------------------------------------------------------
+%%% Functions to test
+%%%---------------------------------------------------------------------
+
+
+
+%% Stack recursive seq
+seq(Stop, Stop, Succ) when is_function(Succ) ->
+ [Stop];
+seq(Start, Stop, Succ) when is_function(Succ) ->
+ [Start | seq(Succ(Start), Stop, Succ)].
+
+
+
+%% Tail recursive seq, result list is reversed
+seq_r(Start, Stop, Succ) when is_function(Succ) ->
+ seq_r(Start, Stop, Succ, []).
+
+seq_r(Stop, Stop, _, R) ->
+ [Stop | R];
+seq_r(Start, Stop, Succ, R) ->
+ seq_r(Succ(Start), Stop, Succ, [Start | R]).
+
+
+
+create_file_slow(Name, N) when is_integer(N), N >= 0 ->
+ {ok, FD} =
+ file:open(Name, [raw, write, delayed_write, binary]),
+ if N > 256 ->
+ ok = file:write(FD,
+ lists:map(fun (X) -> <<X:32/unsigned>> end,
+ lists:seq(0, 255))),
+ ok = create_file_slow(FD, 256, N);
+ true ->
+ ok = create_file_slow(FD, 0, N)
+ end,
+ ok = file:close(FD).
+
+create_file_slow(_FD, M, M) ->
+ ok;
+create_file_slow(FD, M, N) ->
+ ok = file:write(FD, <<M:32/unsigned>>),
+ create_file_slow(FD, M+1, N).
+
+
+
+%%%---------------------------------------------------------------------
+%%% Profile verification functions
+%%%---------------------------------------------------------------------
+
+
+
+verify(Tab, [{analysis_options, _},
+ [{totals, Cnt, Acc, Own} | _] | Processes]) ->
+ Processes_1 =
+ lists:map(
+ fun ([{Proc, Cnt_P, undefined, Own_P} | _]) ->
+ case sum_process(Tab, Proc) of
+ {Proc, Cnt_P, Acc_P, Own_P} = Clocks
+ when Acc_P >= Own_P ->
+ Clocks;
+ Weird ->
+ throw({error, [?MODULE, ?LINE, Weird]})
+ end
+ end,
+ Processes),
+ case lists:foldl(
+ fun ({_, Cnt_P2, Acc_P2, Own_P2},
+ {totals, Cnt_T, Acc_T, Own_T}) ->
+ {totals, Cnt_P2+Cnt_T, Acc_P2+Acc_T, Own_P2+Own_T}
+ end,
+ {totals, 0, 0, 0},
+ Processes_1) of
+ {totals, Cnt, Acc_T, Own} when Acc_T >= Acc ->
+ ok;
+ Weird ->
+ throw({error, [?MODULE, ?LINE, Weird]})
+ end.
+
+
+
+sum_process(Tab, Proc) ->
+ ets_select_fold(
+ Tab, [{{{Proc, '_'}, '_'}, [], ['$_']}], 100,
+ fun ({{P, MFA}, {Callers, {MFA, Cnt, Acc, Own}, Called}},
+ {P, Cnt_P, Acc_P, Own_P}) when P == Proc ->
+ ok = verify_callers(Tab, Proc, MFA, Callers),
+ ok = verify_called(Tab, Proc, MFA, Called),
+ {P, Cnt+Cnt_P, Acc+Acc_P, Own+Own_P};
+ (Weird, Clocks) ->
+ throw({error, [?MODULE, ?LINE, Weird, Clocks]})
+ end,
+ {Proc, 0, 0, 0}).
+
+verify_callers(_, _, _, []) ->
+ ok;
+verify_callers(Tab, Proc, MFA, [{Caller, Cnt, Acc, Own} | Tail]) ->
+ Id = {Proc, Caller},
+ case ets:lookup(Tab, Id) of
+ [{Id, {_, {Caller, _, _, _}, Called}}] ->
+ case lists:keysearch(MFA, 1, Called) of
+ {value, {MFA, Cnt, Acc, Own}} ->
+ verify_callers(Tab, Proc, MFA, Tail);
+ false ->
+ throw({error, [?MODULE, ?LINE, MFA, Id]})
+ end;
+ Weird ->
+ throw({error, [?MODULE, ?LINE, Weird]})
+ end.
+
+verify_called(_, _, _, []) ->
+ ok;
+verify_called(Tab, Proc, MFA, [{Called, Cnt, Acc, Own} | Tail]) ->
+ Id = {Proc, Called},
+ case ets:lookup(Tab, Id) of
+ [{Id, {Callers, {Called, _, _, _}, _}}] ->
+ case lists:keysearch(MFA, 1, Callers) of
+ {value, {MFA, Cnt, Acc, Own}} ->
+ verify_called(Tab, Proc, MFA, Tail);
+ false ->
+ throw({error, [?MODULE, ?LINE, MFA, Id]})
+ end;
+ Weird ->
+ throw({error, [?MODULE, ?LINE, Weird]})
+ end.
+
+
+
+%% Parse a analysis file and return an Ets table with all function entries,
+%% and a list of process entries. Checks the concistency of the function
+%% entries when they are read.
+parse(Filename) ->
+ case file:open(Filename, [read]) of
+ {ok, FD} ->
+ Result = parse_stream(FD),
+ file:close(FD),
+ Result;
+ Error ->
+ Error
+ end.
+
+parse_stream(FD) ->
+ Tab = ets:new(fprof_SUITE, []),
+ parse_stream(FD, Tab, [], void).
+
+parse_stream(FD, Tab, R, Proc) ->
+ case catch io:read(FD, '') of
+ {'EXIT', _} ->
+ {error, [?MODULE, ?LINE]};
+ {ok, Term} ->
+ case parse_term(Term) of
+ {ok, {analysis_options, _} = Term_1}
+ when Proc == void ->
+ parse_stream(FD, Tab, [Term_1 | R], analysis_options);
+ {ok, [{totals, _, _, _} | _] = Term_1}
+ when Proc == analysis_options ->
+ parse_stream(FD, Tab, [Term_1 | R], totals);
+ {ok, [{P, _, _, _} | _] = Term_1} ->
+ parse_stream(FD, Tab, [Term_1 | R], P);
+ {ok, {_Callers, {MFA, _, _, _}, _Called} = Term_1}
+ when Proc == totals; is_list(Proc) ->
+ ets:insert(Tab, {{Proc, MFA}, Term_1}),
+ parse_stream(FD, Tab, R, Proc);
+ {ok, Term_1} ->
+ {error, [?MODULE, ?LINE, Term_1]};
+ E ->
+ E
+ end;
+ eof ->
+ {ok, [Tab, lists:reverse(R)]};
+ Error ->
+ Error
+ end.
+
+parse_term({Callers, Func, Called})
+ when is_list(Callers), is_list(Called) ->
+ Callers_1 = lists:map(fun parse_clocks/1, Callers),
+ Func_1 = parse_clocks(Func),
+ Called_1 = lists:map(fun parse_clocks/1, Called),
+ Result = {Callers_1, Func_1, Called_1},
+ case chk_invariant(Result) of
+ ok ->
+ {ok, Result};
+ Error ->
+ Error
+ end;
+parse_term([{_, _, _, _} = Clocks | Tail]) ->
+ {ok, [parse_clocks(Clocks) | Tail]};
+parse_term(Term) ->
+ {ok, Term}.
+
+parse_clocks({MFA, Cnt, undefined, Own}) ->
+ {MFA, Cnt, undefined, round(Own*1000)};
+parse_clocks({MFA, Cnt, Acc, Own}) ->
+ {MFA, Cnt, round(Acc*1000), round(Own*1000)};
+parse_clocks(Clocks) ->
+ Clocks.
+
+
+
+chk_invariant({Callers, {MFA, Cnt, Acc, Own}, Called} = Term) ->
+ {_, Callers_Cnt, Callers_Acc, Callers_Own} = Callers_Sum = sum(Callers),
+% {_, Called_Cnt, Called_Acc, Called_Own} = Called_Sum = sum(Called),
+ case {MFA,
+ lists:keymember(suspend, 1, Callers),
+ lists:keymember(garbage_collect, 1, Callers),
+ Called} of
+ {suspend, false, _, []} ->
+ ok;
+ {suspend, _, _, _} = Weird ->
+ {error, [?MODULE, ?LINE, Weird, Term]};
+ {garbage_collect, false, false, []} ->
+ ok;
+ {garbage_collect, false, false, [{suspend, _, _, _}]} ->
+ ok;
+ {garbage_collect, _, _, _} = Weird ->
+ {error, [?MODULE, ?LINE, Weird, Term]};
+ {undefined, false, false, _}
+ when Callers == [], Cnt == 0, Acc == 0, Own == 0 ->
+ ok;
+ {undefined, _, _, _} = Weird ->
+ {error, [?MODULE, ?LINE, Weird, Term]};
+ {_, _, _, _} ->
+ case chk_self_call(Term) of
+ true when Callers_Cnt /= Cnt; Callers_Acc /= Acc;
+ Callers_Own /= Own ->
+ {error, [?MODULE, ?LINE, Callers_Sum, Term]};
+% true when Called_Acc + Own /= Acc ->
+% io:format("WARNING: ~p:~p, ~p, ~p.~n",
+% [?MODULE, ?LINE, Term, Called_Sum]),
+% {error, [?MODULE, ?LINE, Term, Called_Sum]};
+% ok;
+ true ->
+ ok;
+ false ->
+ {error, [?MODULE, ?LINE, Term]}
+ end
+ end.
+
+ts_sub({A, B, C}, {A0, B0, C0}) ->
+ ((A - A0)*1000000000000 + (B - B0))*1000000 + C - C0.
+
+sum(Funcs) ->
+ {sum, _Cnt, _Acc, _Own} =
+ lists:foldl(
+ fun ({_, C1, A1, O1}, {sum, C2, A2, O2}) ->
+ {sum, C1+C2, A1+A2, O1+O2}
+ end,
+ {sum, 0, 0, 0},
+ Funcs).
+
+chk_self_call({Callers, {MFA, _Cnt, _Acc, _Own}, Called}) ->
+ case lists:keysearch(MFA, 1, Callers) of
+ false ->
+ true;
+ {value, {MFA, C, 0, O}} ->
+ case lists:keysearch(MFA, 1, Called) of
+ false ->
+ false;
+ {value, {MFA, C, 0, O}} ->
+ true;
+ {value, _} ->
+ false
+ end;
+ {value, _} ->
+ false
+ end.
+
+
+
+%%%---------------------------------------------------------------------
+%%% Fairly generic support functions
+%%%---------------------------------------------------------------------
+
+
+ets_select_fold(Table, MatchSpec, Limit, Fun, Acc) ->
+ ets:safe_fixtable(Table, true),
+ ets_select_fold_1(ets:select(Table, MatchSpec, Limit), Fun, Acc).
+
+ets_select_fold_1('$end_of_table', _, Acc) ->
+ Acc;
+ets_select_fold_1({Matches, Continuation}, Fun, Acc) ->
+ ets_select_fold_1(ets:select(Continuation),
+ Fun,
+ lists:foldl(Fun, Acc, Matches)).
+
+
+
+% ets_select_foreach(Table, MatchSpec, Limit, Fun) ->
+% ets:safe_fixtable(Table, true),
+% ets_select_foreach_1(ets:select(Table, MatchSpec, Limit), Fun).
+
+% ets_select_foreach_1('$end_of_table', _) ->
+% ok;
+% ets_select_foreach_1({Matches, Continuation}, Fun) ->
+% lists:foreach(Fun, Matches),
+% ets_select_foreach_1(ets:select(Continuation), Fun).
+
+
+%%%---------------------------------------------------------------------
+%%% Simple smulation of fprof used for checking own and acc times for
+%%% each function.
+%%% The function 'undefined' is ignored
+%%%---------------------------------------------------------------------
+
+%% check_own_and_acc_traced(TraceFile, AnalysisFile) ->
+%% check_own_and_acc(TraceFile, AnalysisFile, fun handle_trace_traced/2).
+
+check_own_and_acc(TraceFile, AnalysisFile) ->
+ check_own_and_acc(TraceFile, AnalysisFile, fun handle_trace/2).
+
+check_own_and_acc(TraceFile, AnalysisFile, HandlerFun) ->
+ dbg:trace_client(file,TraceFile,{HandlerFun,{init,self()}}),
+ receive {result,Result} ->
+ compare(Result,get_own_and_acc_from_analysis(AnalysisFile))
+ end.
+
+%% handle_trace_traced(Trace, Msg) ->
+%% io:format("handle_trace_traced(~p, ~p).", [Trace, Msg]),
+%% handle_trace(Trace, Msg).
+
+handle_trace(Trace,{init,Parent}) ->
+ ?dbg("~p",[start]),
+ ets:new(fprof_verify_tab,[named_table]),
+ handle_trace(Trace,Parent);
+handle_trace({trace_ts,Pid,in,MFA,TS},P) ->
+ ?dbg("~p",[{{in,Pid,MFA},get(Pid)}]),
+ case get(Pid) of
+ [suspend|[suspend|_]=NewStack] ->
+ T = ts_sub(TS,get({Pid,last_ts})),
+ update_acc(Pid,NewStack,T),
+ put(Pid,NewStack);
+ [suspend|NewStack] = Stack ->
+ T = ts_sub(TS,get({Pid,last_ts})),
+ update_acc(Pid,Stack,T),
+ put(Pid,NewStack);
+ [] ->
+ put(Pid,[MFA]),
+ insert(Pid,MFA);
+ undefined ->
+ put(first_ts,TS),
+ put(Pid,[MFA]),
+ insert(Pid,MFA)
+ end,
+ put({Pid,last_ts},TS),
+ P;
+handle_trace({trace_ts,Pid,out,_MfaOrZero,TS},P) ->
+ ?dbg("~p",[{{out,Pid,_MfaOrZero},get(Pid)}]),
+ T = ts_sub(TS,get({Pid,last_ts})),
+ case get(Pid) of
+ [suspend|S] = Stack ->
+ update_acc(Pid,S,T),
+ put(Pid,[suspend|Stack]);
+ [MFA|_] = Stack ->
+ insert(Pid,suspend),
+ update_own(Pid,MFA,T),
+ update_acc(Pid,Stack,T),
+ put(Pid,[suspend|Stack]);
+ [] ->
+ insert(Pid,suspend),
+ put(Pid,[suspend])
+ end,
+ put({Pid,last_ts},TS),
+ P;
+handle_trace({trace_ts,Pid,call,MFA,{cp,Caller},TS},P) ->
+ ?dbg("~p",[{{call,Pid,MFA},get(Pid)}]),
+ T = ts_sub(TS,get({Pid,last_ts})),
+ case get(Pid) of
+ [MFA|_] = Stack ->
+ %% recursive
+ update_own(Pid,MFA,T),
+ update_acc(Pid,Stack,T);
+ [CallingMFA|_] = Stack when Caller==undefined ->
+ insert(Pid,MFA),
+ update_own(Pid,CallingMFA,T),
+ update_acc(Pid,Stack,T),
+ put(Pid,[MFA|Stack]);
+ [] when Caller==undefined ->
+ insert(Pid,MFA),
+ insert(Pid,MFA),
+ put(Pid,[MFA]);
+ Stack0 ->
+ Stack = [CallingMFA|_] = insert_caller(Caller,Stack0,[]),
+ insert(Pid,MFA),
+ insert(Pid,Caller),
+ update_own(Pid,CallingMFA,T),
+ update_acc(Pid,Stack,T),
+ put(Pid,[MFA|Stack])
+ end,
+ put({Pid,last_ts},TS),
+ P;
+handle_trace({trace_ts,Pid,return_to,MFA,TS},P) ->
+ ?dbg("~p",[{{return_to,Pid,MFA},get(Pid)}]),
+ T = ts_sub(TS,get({Pid,last_ts})),
+ case get(Pid) of
+ [MFA|_] = Stack ->
+ %% recursive
+ update_own(Pid,MFA,T),
+ update_acc(Pid,Stack,T),
+ put(Pid,Stack);
+ [ReturnFromMFA,MFA|RestOfStack] = Stack ->
+ update_own(Pid,ReturnFromMFA,T),
+ update_acc(Pid,Stack,T),
+ put(Pid,[MFA|RestOfStack]);
+ [ReturnFromMFA|RestOfStack] = Stack ->
+ update_own(Pid,ReturnFromMFA,T),
+ update_acc(Pid,Stack,T),
+ case find_return_to(MFA,RestOfStack) of
+ [] when MFA==undefined ->
+ put(Pid,[]);
+ [] ->
+ insert(Pid,MFA),
+ put(Pid,[MFA]);
+ NewStack ->
+ put(Pid,NewStack)
+ end
+ end,
+ put({Pid,last_ts},TS),
+ P;
+handle_trace({trace_ts,Pid,gc_start,_,TS},P) ->
+ ?dbg("~p",[{{gc_start,Pid},get(Pid)}]),
+ case get(Pid) of
+ [suspend|_] = Stack ->
+ T = ts_sub(TS,get({Pid,last_ts})),
+ insert(Pid,garbage_collect),
+ update_acc(Pid,Stack,T),
+ put(Pid,[garbage_collect|Stack]);
+ [CallingMFA|_] = Stack ->
+ T = ts_sub(TS,get({Pid,last_ts})),
+ insert(Pid,garbage_collect),
+ update_own(Pid,CallingMFA,T),
+ update_acc(Pid,Stack,T),
+ put(Pid,[garbage_collect|Stack]);
+ undefined ->
+ put(first_ts,TS),
+ put(Pid,[garbage_collect]),
+ insert(Pid,garbage_collect)
+ end,
+ put({Pid,last_ts},TS),
+ P;
+handle_trace({trace_ts,Pid,gc_end,_,TS},P) ->
+ ?dbg("~p",[{{gc_end,Pid},get(Pid)}]),
+ T = ts_sub(TS,get({Pid,last_ts})),
+ case get(Pid) of
+ [garbage_collect|RestOfStack] = Stack ->
+ update_own(Pid,garbage_collect,T),
+ update_acc(Pid,Stack,T),
+ put(Pid,RestOfStack)
+ end,
+ put({Pid,last_ts},TS),
+ P;
+handle_trace({trace_ts,Pid,spawn,NewPid,{M,F,Args},TS},P) ->
+ MFA = {M,F,length(Args)},
+ ?dbg("~p",[{{spawn,Pid,NewPid,MFA},get(Pid)}]),
+ T = ts_sub(TS,get({Pid,last_ts})),
+ put({NewPid,last_ts},TS),
+ put(NewPid,[suspend,MFA]),
+ insert(NewPid,suspend),
+ insert(NewPid,MFA),
+ case get(Pid) of
+ [SpawningMFA|_] = Stack ->
+ update_own(Pid,SpawningMFA,T),
+ update_acc(Pid,Stack,T)
+ end,
+ put({Pid,last_ts},TS),
+ P;
+handle_trace({trace_ts,Pid,exit,_Reason,TS},P) ->
+ ?dbg("~p",[{{exit,Pid,_Reason},get(Pid)}]),
+ T = ts_sub(TS,get({Pid,last_ts})),
+ case get(Pid) of
+ [DyingMFA|_] = Stack ->
+ update_own(Pid,DyingMFA,T),
+ update_acc(Pid,Stack,T),
+ put(Pid,[]);
+ [] ->
+ ok
+ end,
+ put({Pid,last_ts},TS),
+ P;
+handle_trace({trace_ts,_,Link,_,_},P)
+ when Link==link;
+ Link==unlink;
+ Link==getting_linked;
+ Link==getting_unlinked ->
+ P;
+handle_trace(end_of_trace,P) ->
+ ?dbg("~p",['end']),
+ Result = ets:tab2list(fprof_verify_tab),
+ {TotOwn,ProcOwns} = get_proc_owns(Result,[],0),
+ TotAcc = ts_sub(get_last_ts(),get(first_ts)),
+ P ! {result,[{totals,TotAcc,TotOwn}|ProcOwns]++Result},
+ P;
+handle_trace(Other,_P) ->
+ exit({unexpected,Other}).
+
+find_return_to(MFA,[MFA|_]=Stack) ->
+ Stack;
+find_return_to(MFA,[_|Stack]) ->
+ find_return_to(MFA,Stack);
+find_return_to(_MFA,[]) ->
+ [].
+
+insert_caller(MFA,[MFA|Rest],Result) ->
+ lists:reverse(Result)++[MFA|Rest];
+insert_caller(MFA,[Other|Rest],Result) ->
+ insert_caller(MFA,Rest,[Other|Result]);
+insert_caller(MFA,[],Result) ->
+ lists:reverse([MFA|Result]).
+
+insert(Pid,MFA) ->
+ case ets:member(fprof_verify_tab,{Pid,MFA}) of
+ false ->
+ ets:insert(fprof_verify_tab,{{Pid,MFA},0,0});
+ true ->
+ ok
+ end.
+
+update_own(Pid,MFA,T) ->
+ ets:update_counter(fprof_verify_tab,{Pid,MFA},{3,T}).
+
+update_acc(Pid,[MFA|Rest],T) ->
+ case lists:member(MFA,Rest) of
+ true ->
+ %% Only charge one time for recursive functions
+ ok;
+ false ->
+ ets:update_counter(fprof_verify_tab,{Pid,MFA},{2,T})
+ end,
+ update_acc(Pid,Rest,T);
+update_acc(_Pid,[],_T) ->
+ ok.
+
+
+get_last_ts() ->
+ get_last_ts(get(),{0,0,0}).
+get_last_ts([{{_,last_ts},TS}|Rest],Last) when TS>Last ->
+ get_last_ts(Rest,TS);
+get_last_ts([_|Rest],Last) ->
+ get_last_ts(Rest,Last);
+get_last_ts([],Last) ->
+ Last.
+
+get_proc_owns([{{Pid,_MFA},_Acc,Own}|Rest],Result,Sum) ->
+ NewResult =
+ case lists:keysearch(Pid,1,Result) of
+ {value,{Pid,undefined,PidOwn}} ->
+ lists:keyreplace(Pid,1,Result,{Pid,undefined,PidOwn+Own});
+ false ->
+ [{Pid,undefined,Own}|Result]
+ end,
+ get_proc_owns(Rest,NewResult,Sum+Own);
+get_proc_owns([],Result,Sum) ->
+ {Sum,Result}.
+
+
+compare([X|Rest],FprofResult) ->
+ FprofResult1 =
+ case lists:member(X,FprofResult) of
+ true ->
+ ?dbg("~p",[X]),
+ lists:delete(X,FprofResult);
+ false ->
+ case lists:keysearch(element(1,X),1,FprofResult) of
+ {value,Fprof} ->
+ put(compare_error,true),
+ io:format("Error: Different values\n"
+ "Fprof: ~p\n"
+ "Simulator: ~p",[Fprof,X]),
+ lists:delete(Fprof,FprofResult);
+ false ->
+ put(compare_error,true),
+ io:format("Error: Missing in fprof: ~p",[X]),
+ FprofResult
+ end
+ end,
+ compare(Rest,FprofResult1);
+compare([],Rest) ->
+ case {remove_undefined(Rest,[]),get(compare_error)} of
+ {[],undefined} -> ok;
+ {Error,_} ->
+ case Error of
+ [] -> ok;
+ _ -> io:format("\nMissing in simulator results:\n~p\n",[Error])
+ end,
+ ?t:fail({error,mismatch_between_simulator_and_fprof})
+ end.
+
+remove_undefined([{{_Pid,undefined},_,_}|Rest],Result) ->
+ remove_undefined(Rest,Result);
+remove_undefined([X|Rest],Result) ->
+ remove_undefined(Rest,[X|Result]);
+remove_undefined([],Result) ->
+ Result.
+
+get_own_and_acc_from_analysis(Log) ->
+ case file:consult(Log) of
+ {ok,[_Options,[{totals,_,TotAcc,TotOwn}]|Rest]} ->
+ get_own_and_acc(undefined,Rest,
+ [{totals,m1000(TotAcc),m1000(TotOwn)}]);
+ Error ->
+ exit({error,{cant_open,Log,Error}})
+ end.
+
+get_own_and_acc(_,[[{PidStr,_,Acc,Own}|_]|Rest],Result) ->
+ Pid = list_to_pid(PidStr),
+ get_own_and_acc(Pid,Rest,[{Pid,m1000(Acc),m1000(Own)}|Result]);
+get_own_and_acc(Pid,[{_Callers,{MFA,_,Acc,Own},_Called}|Rest],Result) ->
+ get_own_and_acc(Pid,Rest,[{{Pid,MFA},m1000(Acc),m1000(Own)}|Result]);
+get_own_and_acc(_,[],Result) ->
+ lists:reverse(Result).
+
+m1000(undefined) ->
+ undefined;
+m1000(X) ->
+ round(X*1000).
+
diff --git a/lib/tools/test/fprof_SUITE_data/foo.erl b/lib/tools/test/fprof_SUITE_data/foo.erl
new file mode 100644
index 0000000000..eaa8132b1e
--- /dev/null
+++ b/lib/tools/test/fprof_SUITE_data/foo.erl
@@ -0,0 +1,41 @@
+%% ``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/.
+%%
+%% 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$
+%%
+-module(foo).
+
+-export([create_file_slow/2]).
+
+
+
+create_file_slow(Name, N) when integer(N), N >= 0 ->
+ {ok, FD} =
+ file:open(Name, [raw, write, delayed_write, binary]),
+ if N > 256 ->
+ ok = file:write(FD,
+ lists:map(fun (X) -> <<X:32/unsigned>> end,
+ lists:seq(0, 255))),
+ ok = create_file_slow(FD, 256, N);
+ true ->
+ ok = create_file_slow(FD, 0, N)
+ end,
+ ok = file:close(FD).
+
+create_file_slow(FD, M, M) ->
+ ok;
+create_file_slow(FD, M, N) ->
+ ok = file:write(FD, <<M:32/unsigned>>),
+ create_file_slow(FD, M+1, N).
diff --git a/lib/tools/test/ignore_cores.erl b/lib/tools/test/ignore_cores.erl
new file mode 120000
index 0000000000..8902a469ef
--- /dev/null
+++ b/lib/tools/test/ignore_cores.erl
@@ -0,0 +1 @@
+../../../erts/test/ignore_cores.erl \ No newline at end of file
diff --git a/lib/tools/test/instrument_SUITE.erl b/lib/tools/test/instrument_SUITE.erl
new file mode 100644
index 0000000000..da5930e015
--- /dev/null
+++ b/lib/tools/test/instrument_SUITE.erl
@@ -0,0 +1,129 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1998-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(instrument_SUITE).
+
+-export([all/1,init_per_testcase/2,fin_per_testcase/2]).
+
+-export(['+Mim true'/1, '+Mis true'/1]).
+
+-include("test_server.hrl").
+
+init_per_testcase(_Case, Config) ->
+ ?line Dog=?t:timetrap(10000),
+ [{watchdog, Dog}|Config].
+
+fin_per_testcase(_Case, Config) ->
+ Dog=?config(watchdog, Config),
+ ?t:timetrap_cancel(Dog),
+ ok.
+
+all(suite) -> ['+Mim true', '+Mis true'].
+
+'+Mim true'(doc) -> ["Check that memory data can be read and processed"];
+'+Mim true'(suite) -> [];
+'+Mim true'(Config) when is_list(Config) ->
+ ?line Node = start_slave("+Mim true"),
+ ?line MD = rpc:call(Node, instrument, memory_data, []),
+ ?line [{total,[{sizes,S1,S2,S3},{blocks,B1,B2,B3}]}]
+ = rpc:call(Node, instrument, memory_status, [total]),
+ ?line stop_slave(Node),
+ ?line true = S1 =< S2,
+ ?line true = S2 =< S3,
+ ?line true = B1 =< B2,
+ ?line true = B2 =< B3,
+ ?line MDS = instrument:sort(MD),
+ ?line {Low, High} = instrument:mem_limits(MDS),
+ ?line true = Low < High,
+ ?line {_, AL} = MDS,
+ ?line SumBlocks = instrument:sum_blocks(MD),
+ ?line case SumBlocks of
+ N when is_integer(N) ->
+ ?line N = lists:foldl(fun ({_,_,Size,_}, Sum) ->
+ Size+Sum
+ end,
+ 0,
+ AL),
+ ?line N =< S3;
+ Other ->
+ ?line ?t:fail(Other)
+ end,
+ ?line lists:foldl(
+ fun ({TDescr,Addr,Size,Proc}, MinAddr) ->
+ ?line true = TDescr /= invalid_type,
+ ?line true = is_integer(TDescr),
+ ?line true = is_integer(Addr),
+ ?line true = is_integer(Size),
+ ?line true = Addr >= MinAddr,
+ ?line case Proc of
+ {0, Number, Serial} ->
+ ?line true = is_integer(Number),
+ ?line true = is_integer(Serial);
+ undefined ->
+ ok;
+ BadProc ->
+ ?line ?t:fail({badproc, BadProc})
+ end,
+ ?line NextMinAddr = Addr+Size,
+ ?line true = NextMinAddr =< High,
+ ?line NextMinAddr
+ end,
+ Low,
+ AL),
+ ?line {_, DAL} = instrument:descr(MDS),
+ ?line lists:foreach(
+ fun ({TDescr,_,_,Proc}) ->
+ ?line true = TDescr /= invalid_type,
+ ?line true = is_atom(TDescr) orelse is_list(TDescr),
+ ?line true = is_pid(Proc) orelse Proc == undefined
+ end,
+ DAL),
+ ?line ASL = lists:map(fun ({_,A,S,_}) -> {A,S} end, AL),
+ ?line ASL = lists:map(fun ({_,A,S,_}) -> {A,S} end, DAL),
+ ?line instrument:holes(MDS),
+ ?line {comment,
+ "total status - sum of blocks = " ++ integer_to_list(S1-SumBlocks)}.
+
+'+Mis true'(doc) -> ["Check that memory data can be read and processed"];
+'+Mis true'(suite) -> [];
+'+Mis true'(Config) when is_list(Config) ->
+ ?line Node = start_slave("+Mis true"),
+ ?line [{total,[{sizes,S1,S2,S3},{blocks,B1,B2,B3}]}]
+ = rpc:call(Node, instrument, memory_status, [total]),
+ ?line true = S1 =< S2,
+ ?line true = S2 =< S3,
+ ?line true = B1 =< B2,
+ ?line true = B2 =< B3,
+ ?line true = is_list(rpc:call(Node,instrument,memory_status,[allocators])),
+ ?line true = is_list(rpc:call(Node,instrument,memory_status,[classes])),
+ ?line true = is_list(rpc:call(Node,instrument,memory_status,[types])),
+ ?line ok.
+
+start_slave(Args) ->
+ ?line {A, B, C} = now(),
+ ?line MicroSecs = A*1000000000000 + B*1000000 + C,
+ ?line Name = "instr_" ++ integer_to_list(MicroSecs),
+ ?line Pa = filename:dirname(code:which(?MODULE)),
+ ?line {ok, Node} = ?t:start_node(list_to_atom(Name),
+ slave,
+ [{args, "-pa " ++ Pa ++ " " ++ Args}]),
+ ?line Node.
+
+
+stop_slave(Node) ->
+ ?line true = ?t:stop_node(Node).
diff --git a/lib/tools/test/make_SUITE.erl b/lib/tools/test/make_SUITE.erl
new file mode 100644
index 0000000000..72dccdb465
--- /dev/null
+++ b/lib/tools/test/make_SUITE.erl
@@ -0,0 +1,295 @@
+%%
+%% %CopyrightBegin%
+%%
+%% 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(make_SUITE).
+
+-export([all/1, make_all/1, make_files/1]).
+-export([otp_6057_init/1,
+ otp_6057_a/1, otp_6057_b/1, otp_6057_c/1,
+ otp_6057_end/1]).
+
+-include("test_server.hrl").
+
+-include_lib("kernel/include/file.hrl").
+
+%% in ./make_SUITE_data there are test-files used by this
+%% test suite. There are 4 files named test1.erl ... test5.erl.
+%% The test files are attacked in various ways in order to put make on trial.
+%%
+%% Also, and Emakefile exists in ./make_SUITE_data. This file specifies
+%% that the file :"test5.erl" shall be compiled with the 'S' option,
+%% i.e. produce "test5.S" instead of "test5.<objext>"
+
+all(suite) -> [make_all, make_files,
+ {conf, otp_6057_init,
+ [otp_6057_a,otp_6057_b,otp_6057_c], otp_6057_end}].
+
+test_files() -> ["test1", "test2", "test3", "test4"].
+
+make_all(suite) -> [];
+make_all(Config) when is_list(Config) ->
+ ?line Current = prepare_data_dir(Config),
+ ?line up_to_date = make:all(),
+ ?line ok = ensure_exists(test_files()),
+ ?line ok = ensure_exists(["test5"],".S"), % Emakefile: [{test5,['S']}
+ ?line file:set_cwd(Current),
+ ?line ensure_no_messages(),
+ ok.
+
+make_files(suite) -> [];
+make_files(Config) when is_list(Config) ->
+ ?line Current = prepare_data_dir(Config),
+
+ %% Make files that exist.
+
+ ?line Files = [test1, test2],
+ ?line up_to_date = make:files(Files), % ok files
+ ?line ok = ensure_exists(Files),
+
+ ?line error = make:files([test1,test7]), % non existing file
+ ?line up_to_date = make:files([test1,test2],[debug_info]), % with option
+
+ ?line file:set_cwd(Current),
+ ?line ensure_no_messages(),
+ ok.
+
+
+%% Moves to the data directory of this suite, clean it from any object
+%% files (*.jam for a JAM emulator). Returns the previous directory.
+prepare_data_dir(Config) ->
+ ?line {ok, Current} = file:get_cwd(),
+ ?line {value, {data_dir, Dir}} = lists:keysearch(data_dir, 1, Config),
+ ?line file:set_cwd(Dir),
+ ?line {ok, Files} = file:list_dir("."),
+ ?line delete_obj(Files, code:objfile_extension()),
+ ?line ensure_no_messages(),
+ Current.
+
+delete_obj([File|Rest], ObjExt) ->
+ ?line case filename:extension(File) of
+ ObjExt -> file:delete(File);
+ ".S" -> file:delete(File);
+ _ -> ok
+ end,
+ ?line delete_obj(Rest, ObjExt);
+delete_obj([], _) ->
+ ok.
+
+
+
+%% Ensure that the given object files exists.
+ensure_exists(Names) ->
+ ensure_exists(Names, code:objfile_extension()).
+
+ensure_exists([Name|Rest], ObjExt) when is_atom(Name) ->
+ ensure_exists([atom_to_list(Name)|Rest], ObjExt);
+ensure_exists([Name|Rest], ObjExt) ->
+ case filelib:is_regular(Name++ObjExt) of
+ true ->
+ ensure_exists(Rest, ObjExt);
+ false ->
+ Name++ObjExt
+ end;
+ensure_exists([], _) ->
+ ok.
+
+otp_6057_init(Config) when is_list(Config) ->
+ ?line DataDir = ?config(data_dir, Config),
+ ?line PrivDir = ?config(priv_dir, Config),
+
+ %% Create the directories PrivDir/otp_6057/src1, /src2 and /ebin
+ Src1 = filename:join([PrivDir, otp_6057, src1]),
+ Src2 = filename:join([PrivDir, otp_6057, src2]),
+ Ebin = filename:join([PrivDir, otp_6057, ebin]),
+ ?line ok = file:make_dir(filename:join(PrivDir, otp_6057)),
+ ?line ok = file:make_dir(Src1),
+ ?line ok = file:make_dir(Src2),
+ ?line ok = file:make_dir(Ebin),
+
+ %% Copy test1.erl and test2.erl to src1, and test3.erl to src2
+ Test1orig = filename:join(DataDir, "test1.erl"),
+ Test2orig = filename:join(DataDir, "test2.erl"),
+ Test3orig = filename:join(DataDir, "test3.erl"),
+ Test1 = filename:join(Src1, "test1.erl"),
+ Test2 = filename:join(Src1, "test2.erl"),
+ Test3 = filename:join(Src2, "test3.erl"),
+ ?line {ok, _} = file:copy(Test1orig, Test1),
+ ?line {ok, _} = file:copy(Test2orig, Test2),
+ ?line {ok, _} = file:copy(Test3orig, Test3),
+
+ %% Create an Emakefile in src1
+ Emakefile = filename:join(Src1, "Emakefile"),
+ ?line {ok, Fd} = file:open(Emakefile, write),
+ ?line ok = io:write(Fd, {["test1.erl","test2","../src2/test3"],
+ [{outdir,"../ebin"}]}),
+ ?line ok = io:fwrite(Fd, ".~n", []),
+ ?line ok = file:close(Fd),
+
+ ?line ensure_no_messages(),
+ Config.
+
+otp_6057_a(suite) ->
+ [];
+otp_6057_a(doc) ->
+ ["Test that make:all/0 looks for object file in correct place"];
+otp_6057_a(Config) when is_list(Config) ->
+ ?line PrivDir = ?config(priv_dir, Config),
+
+ %% Go to src1, saving old CWD
+ ?line {ok, CWD} = file:get_cwd(),
+ Src1 = filename:join([PrivDir, otp_6057, src1]),
+ ?line ok = file:set_cwd(Src1),
+
+ %% Call make:all()
+ ?line up_to_date = make:all(),
+
+ %% Ensure that all beam files are created in the ebin directory
+ Ebin = filename:join([PrivDir, otp_6057, ebin]),
+ Test1 = filename:join(Ebin, test1),
+ Test2 = filename:join(Ebin, test2),
+ Test3 = filename:join(Ebin, test3),
+ case ensure_exists([Test1, Test2, Test3]) of
+ ok -> ok;
+ Missing ->
+ ?line ?t:fail({"missing beam file", Missing})
+ end,
+
+ %% Check creation date of test1.beam and make sure it is not
+ %% recompiled if make:all() is called again.
+ %% (Sleep a while, if the file is recompiled within a second then
+ %% mtime will be the same).
+ ?line {ok, FileInfo1} = file:read_file_info(Test1++".beam"),
+ Date1 = FileInfo1#file_info.mtime,
+ ?t:sleep(?t:seconds(2)),
+ ?line up_to_date = make:all(),
+ ?line {ok, FileInfo2} = file:read_file_info(Test1++".beam"),
+ case FileInfo2#file_info.mtime of
+ Date1 -> ok;
+ _Date2 ->
+ ?line ?t:fail({"recompiled beam file", Test1++".beam"})
+ end,
+
+ %% Remove the beam files
+ ?line ok =
+ ensure_removed([Test1++".beam",Test2++".beam",Test2++".beam"]),
+
+ %% Return to original CWD
+ ?line ok = file:set_cwd(CWD),
+
+ ?line ensure_no_messages(),
+ ok.
+
+otp_6057_b(suite) ->
+ [];
+otp_6057_b(doc) ->
+ ["Test that make:files/1 can handle a file in another directory"];
+otp_6057_b(Config) when is_list(Config) ->
+ ?line PrivDir = ?config(priv_dir, Config),
+
+ %% Go to src1, saving old CWD
+ ?line {ok, CWD} = file:get_cwd(),
+ Src1 = filename:join([PrivDir, otp_6057, src1]),
+ ?line ok = file:set_cwd(Src1),
+
+ %% Ensure there is no beam file already
+ Ebin = filename:join([PrivDir, otp_6057, ebin]),
+ Test3 = filename:join(Ebin, "test3"),
+ ?line ok = ensure_removed([Test3++".beam"]),
+
+ %% Call make:files/1
+ ?line up_to_date = make:files(["../src2/test3"]),
+
+ %% Ensure that the beam file is created in the ebin directory
+ case ensure_exists([Test3]) of
+ ok -> ok;
+ Missing ->
+ ?line ?t:fail({"missing beam file", Missing})
+ end,
+
+ %% Remove the beam file
+ ?line ok = ensure_removed([Test3++".beam"]),
+
+ %% Return to original CWD
+ ?line ok = file:set_cwd(CWD),
+
+ ?line ensure_no_messages(),
+ ok.
+
+otp_6057_c(suite) ->
+ [];
+otp_6057_c(doc) ->
+ ["Test that make:files/1 find options in Emakefile if a file is "
+ "given with the .erl extension there"];
+otp_6057_c(Config) when is_list(Config) ->
+ ?line PrivDir = ?config(priv_dir, Config),
+
+ %% Go to src1, saving old CWD
+ ?line {ok, CWD} = file:get_cwd(),
+ Src1 = filename:join([PrivDir, otp_6057, src1]),
+ ?line ok = file:set_cwd(Src1),
+
+ %% Ensure there are no beam files already
+ Ebin = filename:join([PrivDir, otp_6057, ebin]),
+ Test1 = filename:join(Ebin, "test1"),
+ Test2 = filename:join(Ebin, "test2"),
+ ?line ok = ensure_removed([Test1++".beam",Test2++".beam"]),
+
+ %% Call make:files/1
+ ?line up_to_date = make:files([test1, test2]),
+
+ %% Ensure that the beam files are created in the ebin directory
+ Ebin = filename:join([PrivDir, otp_6057, ebin]),
+ case ensure_exists([Test1, Test2]) of
+ ok -> ok;
+ Missing ->
+ ?line ?t:fail({"missing beam file", Missing})
+ end,
+
+ %% Remove the beam files
+ ?line ok = ensure_removed([Test1++".beam", Test2++".beam"]),
+
+ %% Return to original CWD
+ ?line ok = file:set_cwd(CWD),
+
+ ?line ensure_no_messages(),
+ ok.
+
+otp_6057_end(Config) when is_list(Config) ->
+ Config.
+
+ensure_removed([File|Files]) ->
+ file:delete(File),
+ ensure_removed(Files);
+ensure_removed([]) ->
+ ok.
+
+ensure_no_messages() ->
+ ensure_no_messages(0).
+
+ensure_no_messages(N) ->
+ receive
+ Any ->
+ io:format("Unexpected message: ~p", [Any]),
+ ensure_no_messages(N+1)
+ after 0 ->
+ case N of
+ 0 -> ok;
+ N -> ?t:fail()
+ end
+ end.
+
diff --git a/lib/tools/test/make_SUITE_data/Emakefile b/lib/tools/test/make_SUITE_data/Emakefile
new file mode 100644
index 0000000000..ae9abb3cbe
--- /dev/null
+++ b/lib/tools/test/make_SUITE_data/Emakefile
@@ -0,0 +1,20 @@
+%% ``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/.
+%%
+%% 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$
+%%
+
+{test5,['S']}.
+'*'.
diff --git a/lib/tools/test/make_SUITE_data/test1.erl b/lib/tools/test/make_SUITE_data/test1.erl
new file mode 100644
index 0000000000..f4a133008e
--- /dev/null
+++ b/lib/tools/test/make_SUITE_data/test1.erl
@@ -0,0 +1,10 @@
+-module(test1).
+-copyright('Copyright (c) 1991-97 Ericsson Telecom AB').
+-vsn('$Revision: /main/release/2 $').
+-compile(export_all).
+
+f1() ->
+ true.
+
+f2() ->
+ true.
diff --git a/lib/tools/test/make_SUITE_data/test2.erl b/lib/tools/test/make_SUITE_data/test2.erl
new file mode 100644
index 0000000000..5845357c3e
--- /dev/null
+++ b/lib/tools/test/make_SUITE_data/test2.erl
@@ -0,0 +1,10 @@
+-module(test2).
+-copyright('Copyright (c) 1991-97 Ericsson Telecom AB').
+-vsn('$Revision: /main/release/2 $').
+-compile(export_all).
+
+f1() ->
+ true.
+
+f2() ->
+ true.
diff --git a/lib/tools/test/make_SUITE_data/test3.erl b/lib/tools/test/make_SUITE_data/test3.erl
new file mode 100644
index 0000000000..4339260ecb
--- /dev/null
+++ b/lib/tools/test/make_SUITE_data/test3.erl
@@ -0,0 +1,10 @@
+-module(test3).
+-copyright('Copyright (c) 1991-97 Ericsson Telecom AB').
+-vsn('$Revision: /main/release/2 $').
+-compile(export_all).
+
+f1() ->
+ true.
+
+f2() ->
+ true.
diff --git a/lib/tools/test/make_SUITE_data/test4.erl b/lib/tools/test/make_SUITE_data/test4.erl
new file mode 100644
index 0000000000..11b37123f1
--- /dev/null
+++ b/lib/tools/test/make_SUITE_data/test4.erl
@@ -0,0 +1,10 @@
+-module(test4).
+-copyright('Copyright (c) 1991-97 Ericsson Telecom AB').
+-vsn('$Revision: /main/release/2 $').
+-compile(export_all).
+
+f1() ->
+ true.
+
+f2() ->
+ true.
diff --git a/lib/tools/test/make_SUITE_data/test5.erl b/lib/tools/test/make_SUITE_data/test5.erl
new file mode 100644
index 0000000000..108ab8e494
--- /dev/null
+++ b/lib/tools/test/make_SUITE_data/test5.erl
@@ -0,0 +1,10 @@
+-module(test5).
+-copyright('Copyright (c) 1991-97 Ericsson Telecom AB').
+-vsn('$Revision: /main/release/1').
+-compile(export_all).
+
+f1() ->
+ true.
+
+f2() ->
+ true.
diff --git a/lib/tools/test/tools.spec b/lib/tools/test/tools.spec
new file mode 100644
index 0000000000..93d5930472
--- /dev/null
+++ b/lib/tools/test/tools.spec
@@ -0,0 +1 @@
+{topcase, {dir, "../tools_test"}}.
diff --git a/lib/tools/test/tools.spec.win b/lib/tools/test/tools.spec.win
new file mode 100644
index 0000000000..b43d542ff1
--- /dev/null
+++ b/lib/tools/test/tools.spec.win
@@ -0,0 +1,2 @@
+{topcase, {dir, "../tools_test"}}.
+{skip, {emem_SUITE, "Not on windows, yet. FIXME!!!"}}.
diff --git a/lib/tools/test/tools_SUITE.erl b/lib/tools/test/tools_SUITE.erl
new file mode 100644
index 0000000000..6b952f10ab
--- /dev/null
+++ b/lib/tools/test/tools_SUITE.erl
@@ -0,0 +1,56 @@
+%%
+%% %CopyrightBegin%
+%%
+%% 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(tools_SUITE).
+
+-include("test_server.hrl").
+
+%% Default timetrap timeout (set in init_per_testcase).
+-define(default_timeout, ?t:minutes(1)).
+-define(application, tools).
+
+%% Test server specific exports
+-export([all/1]).
+-export([init_per_testcase/2, fin_per_testcase/2]).
+
+%% Test cases must be exported.
+-export([app_test/1]).
+
+all(doc) ->
+ [];
+all(suite) ->
+ [app_test].
+
+init_per_testcase(_Case, Config) ->
+ ?line Dog=test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+fin_per_testcase(_Case, Config) ->
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+%%%
+%%% Test cases starts here.
+%%%
+
+app_test(doc) ->
+ ["Test that the .app file does not contain any `basic' errors"];
+app_test(suite) ->
+ [];
+app_test(Config) when is_list(Config) ->
+ ?line ?t:app_test(tools, tolerant).
diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl
new file mode 100644
index 0000000000..0bbb3ba0f1
--- /dev/null
+++ b/lib/tools/test/xref_SUITE.erl
@@ -0,0 +1,2743 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2000-2009. 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).
+
+%-define(debug, true).
+
+-ifdef(debug).
+-define(format(S, A), io:format(S, A)).
+-define(line, put(line, ?LINE), ).
+-define(config(X,Y), "./log_dir/").
+-define(t,test_server).
+-define(datadir, "xref_SUITE_data").
+-define(privdir, "xref_SUITE_priv").
+-define(copydir, "xref_SUITE_priv/datacopy").
+-else.
+-include("test_server.hrl").
+-define(format(S, A), ok).
+-define(datadir, ?config(data_dir, Conf)).
+-define(privdir, ?config(priv_dir, Conf)).
+-define(copydir, ?config(copy_dir, Conf)).
+-endif.
+
+-export([all/1, init/1, fini/1]).
+
+-export([xref/1,
+ addrem/1, convert/1, intergraph/1, lines/1, loops/1,
+ no_data/1, modules/1]).
+
+-export([files/1,
+ add/1, default/1, info/1, lib/1, read/1, read2/1, remove/1,
+ replace/1, update/1, deprecated/1, trycatch/1,
+ abstract_modules/1, fun_mfa/1, qlc/1]).
+
+-export([analyses/1,
+ analyze/1, basic/1, md/1, q/1, variables/1, unused_locals/1]).
+
+-export([misc/1,
+ format_error/1, otp_7423/1, otp_7831/1]).
+
+-import(lists, [append/2, flatten/1, keysearch/3, member/2, sort/1, usort/1]).
+
+-import(sofs, [converse/1, from_term/1, intersection/2, is_sofs_set/1,
+ range/1, relation_to_family/1, set/1, to_external/1,
+ union/2]).
+
+-export([init_per_testcase/2, fin_per_testcase/2]).
+
+%% Checks some info counters of a server and some relations that should hold.
+-export([check_count/1, check_state/1]).
+
+-include_lib("kernel/include/file.hrl").
+
+-include_lib("tools/src/xref.hrl").
+
+all(suite) ->
+ {conf, init, [xref, files, analyses, misc], fini}.
+
+init(Conf) when is_list(Conf) ->
+ DataDir = ?datadir,
+ PrivDir = ?privdir,
+ ?line CopyDir = fname(PrivDir, "datacopy"),
+ ?line TarFile = fname(PrivDir, "datacopy.tgz"),
+ ?line {ok, Tar} = erl_tar:open(TarFile, [write, compressed]),
+ ?line ok = erl_tar:add(Tar, DataDir, CopyDir, [compressed]),
+ ?line ok = erl_tar:close(Tar),
+ ?line ok = erl_tar:extract(TarFile, [compressed]),
+ ?line ok = file:delete(TarFile),
+ [{copy_dir, CopyDir} | Conf].
+
+fini(Conf) when is_list(Conf) ->
+ %% Nothing.
+ Conf.
+
+init_per_testcase(_Case, Config) ->
+ Dog=?t:timetrap(?t:minutes(2)),
+ [{watchdog, Dog}|Config].
+
+fin_per_testcase(_Case, _Config) ->
+ Dog=?config(watchdog, _Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+xref(suite) ->
+ [addrem, convert, intergraph, lines, loops, no_data, modules].
+
+%% Seems a bit short...
+addrem(suite) -> [];
+addrem(doc) -> ["Simple test of removing modules"];
+addrem(Conf) when is_list(Conf) ->
+ S0 = new(),
+
+ F1 = {m1,f1,1},
+ F2 = {m2,f1,2},
+
+ E1 = {F1,F2},
+ E2 = {F2,F1},
+
+ D1 = {F1,12},
+ DefAt_m1 = [D1],
+ X_m1 = [F1],
+ % L_m1 = [],
+ XC_m1 = [E1],
+ LC_m1 = [],
+ LCallAt_m1 = [],
+ XCallAt_m1 = [{E1,13}],
+ Info1 = #xref_mod{name = m1, app_name = [a1]},
+ ?line S1 = add_module(S0, Info1, DefAt_m1, X_m1, LCallAt_m1, XCallAt_m1,
+ XC_m1, LC_m1),
+
+ D2 = {F2,7},
+ DefAt_m2 = [D2],
+ X_m2 = [F2],
+ % L_m2 = [],
+ XC_m2 = [E2],
+ LC_m2 = [],
+ LCallAt_m2 = [],
+ XCallAt_m2 = [{E2,96}],
+ Info2 = #xref_mod{name = m2, app_name = [a2]},
+ ?line S2 = add_module(S1, Info2, DefAt_m2, X_m2, LCallAt_m2, XCallAt_m2,
+ XC_m2, LC_m2),
+
+ ?line S5 = set_up(S2),
+
+ ?line {ok, XMod1, S6} = remove_module(S5, m1),
+ ?line [a1] = XMod1#xref_mod.app_name,
+ ?line {ok, XMod2, S6a} = remove_module(S6, m2),
+ ?line [a2] = XMod2#xref_mod.app_name,
+ ?line S7 = set_up(S6a),
+
+ ?line AppInfo1 = #xref_app{name = a1, rel_name = [r1]},
+ ?line S9 = add_application(S7, AppInfo1),
+ ?line S10 = set_up(S9),
+ ?line AppInfo2 = #xref_app{name = a2, rel_name = [r1]},
+ ?line _S11 = add_application(S10, AppInfo2),
+ ok.
+
+convert(suite) -> [];
+convert(doc) -> ["Coercion of data"];
+convert(Conf) when is_list(Conf) ->
+ S0 = new(),
+
+ F1 = {m1,f1,1},
+ F6 = {m1,f2,6}, % X
+ F2 = {m2,f1,2},
+ F3 = {m2,f2,3}, % X
+ F7 = {m2,f3,7}, % X
+ F4 = {m3,f1,4}, % X
+ F5 = {m3,f2,5},
+
+ UF1 = {m1,f12,17},
+ UF2 = {m17,f17,177},
+
+ E1 = {F1,F3}, % X
+ E2 = {F6,F7}, % X
+ E3 = {F2,F6}, % X
+ E4 = {F1,F4}, % X
+ E5 = {F4,F5},
+ E6 = {F7,F4}, % X
+
+ UE1 = {F2,UF2}, % X
+ UE2 = {F5,UF1}, % X
+
+ D1 = {F1,12},
+ D6 = {F6,3},
+ DefAt_m1 = [D1,D6],
+ X_m1 = [F6],
+ % L_m1 = [F1],
+ XC_m1 = [E1,E2,E4],
+ LC_m1 = [],
+ LCallAt_m1 = [],
+ XCallAt_m1 = [{E1,13},{E2,17},{E4,7}],
+ Info1 = #xref_mod{name = m1, app_name = [a1]},
+ ?line S1 = add_module(S0, Info1, DefAt_m1, X_m1, LCallAt_m1, XCallAt_m1,
+ XC_m1, LC_m1),
+
+ D2 = {F2,7},
+ D3 = {F3,9},
+ D7 = {F7,19},
+ DefAt_m2 = [D2,D3,D7],
+ X_m2 = [F3,F7],
+ % L_m2 = [F2],
+ XC_m2 = [E3,E6,UE1],
+ LC_m2 = [],
+ LCallAt_m2 = [],
+ XCallAt_m2 = [{E3,96},{E6,12},{UE1,77}],
+ Info2 = #xref_mod{name = m2, app_name = [a2]},
+ ?line S2 = add_module(S1, Info2, DefAt_m2, X_m2, LCallAt_m2, XCallAt_m2,
+ XC_m2, LC_m2),
+
+ D4 = {F4,6},
+ D5 = {F5,97},
+ DefAt_m3 = [D4,D5],
+ X_m3 = [F4],
+ % L_m3 = [F5],
+ XC_m3 = [UE2],
+ LC_m3 = [E5],
+ LCallAt_m3 = [{E5,19}],
+ XCallAt_m3 = [{UE2,22}],
+ Info3 = #xref_mod{name = m3, app_name = [a3]},
+ ?line S3 = add_module(S2, Info3, DefAt_m3, X_m3, LCallAt_m3, XCallAt_m3,
+ XC_m3, LC_m3),
+
+ Info4 = #xref_mod{name = m4, app_name = [a2]},
+ ?line S4 = add_module(S3, Info4, [], [], [], [], [], []),
+
+ AppInfo1 = #xref_app{name = a1, rel_name = [r1]},
+ ?line S9 = add_application(S4, AppInfo1),
+ AppInfo2 = #xref_app{name = a2, rel_name = [r1]},
+ ?line S10 = add_application(S9, AppInfo2),
+ AppInfo3 = #xref_app{name = a3, rel_name = [r2]},
+ ?line S11 = add_application(S10, AppInfo3),
+
+ RelInfo1 = #xref_rel{name = r1},
+ ?line S12 = add_release(S11, RelInfo1),
+ RelInfo2 = #xref_rel{name = r2},
+ ?line S13 = add_release(S12, RelInfo2),
+
+ ?line S = set_up(S13),
+
+ ?line {ok, _} = eval("(Lin)(m1->m1:Mod) * m1->m1", type_error, S),
+ ?line {ok, _} = eval("(XXL)(Lin)(m1->m1:Mod) * m1->m1", type_error, S),
+
+ ?line AllDefAt = eval("(Lin) M", S),
+ ?line AllV = eval("(Fun) M", S),
+ ?line AllCallAt = eval("(XXL)(Lin) E", S),
+ ?line AllE = eval("E", S),
+
+ ?line AM = eval("AM", S),
+ ?line A = eval("A", S),
+ ?line R = eval("R", S),
+
+
+ % vertices
+ % general 1 step
+ ?line {ok, _} = eval("(Fun) (Lin) M", AllV, S),
+ ?line {ok, _} = eval("(Fun) (Lin) (Lin) M", AllV, S),
+ ?line {ok, _} = eval(f("(Fun) (Lin) ~p", [[F1, F3]]), [F1,F3], S),
+ ?line {ok, _} = eval(f("(Mod) ~p", [AllV]), [m1,m17,m2,m3], S),
+ ?line {ok, _} = eval(f("(Mod) ~p", [[F1,F3,F6]]), [m1,m2], S),
+ ?line {ok, _} = eval("(App) M", A, S),
+ ?line {ok, _} = eval(f("(App) ~p", [[m1,m2,m4]]), [a1,a2], S),
+ ?line {ok, _} = eval(f("(Rel) ~p", [A]), R, S),
+ ?line {ok, _} = eval(f("(Rel) ~p", [[a1,a2,a2]]), [r1], S),
+ % general 2 steps
+ ?line {ok, _} = eval("(Mod) (Lin) M", [m1,m17,m2,m3], S),
+ ?line {ok, _} = eval(f("(App) ~p", [AllV]), [a1,a2,a3], S),
+ ?line {ok, _} = eval("(Rel) M", R, S),
+ % general 4 steps
+ ?line {ok, _} = eval("(Rel) (Lin) M", [r1,r2], S),
+
+ % special 1 step
+ ?line {ok, _} = eval(f("(Lin) ~p", [AllV]), AllDefAt, S),
+ ?line {ok, _} = eval(f("(Lin) ~p", [[F1,F3]]), [{F1,12},{F3,9}], S),
+ ?line {ok, _} = eval("(Fun) M", AllV, S),
+ ?line {ok, _} = eval(f("(Fun) ~p", [[m1,m2]]), [F1,F2,F3,F6,F7,UF1], S),
+ ?line {ok, _} = eval(f("(Mod) ~p", [A]), AM, S),
+ ?line {ok, _} = eval(f("(Mod) ~p", [[a1,a2]]), [m1,m2,m4], S),
+ ?line {ok, _} = eval(f("(App) ~p", [R]), A, S),
+ ?line {ok, _} = eval(f("(App) ~p", [[r1]]), [a1,a2], S),
+ % special 2 steps
+ ?line {ok, _} = eval("(Lin) M", AllDefAt, S),
+ ?line AnalyzedV = eval("(Fun) AM", S),
+ ?line {ok, _} = eval(f("(Fun) ~p", [A]), AnalyzedV, S),
+ ?line {ok, _} = eval(f("(Mod) ~p", [R]), AM, S),
+ % special 4 steps
+ ?line AnalyzedAllDefAt = eval("(Lin) AM", S),
+ ?line {ok, _} = eval("(Lin) R", AnalyzedAllDefAt, S),
+
+ % edges
+ Ms = [{m1,m2},{m1,m3},{m2,m1},{m2,m3},{m3,m3}],
+ UMs = [{m2,m17},{m3,m1}],
+ AllMs = append(Ms, UMs),
+ As = [{a1,a2},{a1,a3},{a2,a1},{a2,a3},{a3,a3}],
+ Rs = [{r1,r1},{r1,r2},{r2,r2}],
+
+ % general 1 step
+ ?line {ok, _} = eval("(Fun) (Lin) E", AllE, S),
+ ?line {ok, _} = eval(f("(Fun)(Lin) ~p", [[E1, E6]]), [E1, E6], S),
+ ?line {ok, _} = eval("(Mod) E", AllMs, S),
+ ?line {ok, _} = eval(f("(Mod) ~p", [[E1, E6]]), [{m1,m2},{m2,m3}], S),
+ ?line {ok, _} = eval(f("(App) ~p", [As]), As, S),
+ ?line {ok, _} = eval("(App) [m1->m2,m2->m3]", [{a1,a2},{a2,a3}], S),
+ ?line {ok, _} = eval(f("(Rel) ~p", [As]), Rs, S),
+ ?line {ok, _} = eval("(Rel) a1->a2", [{r1,r1}], S),
+
+ % special 1 step
+ ?line {ok, _} = eval("(XXL) (Lin) (Fun) E", AllCallAt, S),
+ ?line {ok, _} = eval("(XXL) (XXL) (Lin) (Fun) E", AllCallAt, S),
+
+ ?line {ok, _} = eval(f("(XXL) (Lin) ~p", [[E1, E6]]),
+ [{{D1,D3},[13]}, {{D7,D4},[12]}], S),
+ ?line {ok, _} = eval(f("(Fun) ~p", [AllMs]), AllE, S),
+ ?line {ok, _} = eval("(Fun) [m1->m2,m2->m3]", [E1,E2,E6], S),
+ ?line {ok, _} = eval(f("(Mod) ~p", [As]), Ms, S),
+ ?line {ok, _} = eval("(Mod) [a1->a2,a2->a3]", [{m1,m2},{m2,m3}], S),
+ ?line {ok, _} = eval(f("(App) ~p", [Rs]), As, S),
+ ?line {ok, _} = eval("(App) r1->r1", [{a1,a2},{a2,a1}], S),
+ ok.
+
+intergraph(suite) -> [];
+intergraph(doc) -> ["Inter Call Graph"];
+intergraph(Conf) when is_list(Conf) ->
+ S0 = new(),
+
+ F1 = {m1,f1,1}, % X
+ F2 = {m1,f2,2}, % X
+ F3 = {m1,f3,3},
+ F4 = {m1,f4,4},
+ F5 = {m1,f5,5},
+
+ F6 = {m2,f1,6}, % X
+ F7 = {m2,f1,7},
+ F8 = {m2,f1,8},
+ F9 = {m2,f1,9},
+ F10 = {m2,f1,10},
+ F11 = {m2,f1,11},
+
+ % Note: E1 =:= E4!
+ E1 = {F2,F1},
+ E2 = {F2,F3},
+ E3 = {F3,F1},
+ E4 = {F2,F1}, % X
+ E5 = {F4,F2},
+ E6 = {F5,F4},
+ E7 = {F4,F5},
+
+ E8 = {F6,F7},
+ E9 = {F7,F8},
+ E10 = {F8,F1}, % X
+ E11 = {F6,F9},
+ E12 = {F6,F10},
+ E13 = {F9,F11},
+ E14 = {F10,F11},
+ E15 = {F11,F1}, % X
+
+ D1 = {F1,1},
+ D2 = {F2,2},
+ D3 = {F3,3},
+ D4 = {F4,4},
+ D5 = {F5,5},
+ DefAt_m1 = [D1,D2,D3,D4,D5],
+ X_m1 = [F1,F2],
+ % L_m1 = [F3,F4,F5],
+ XC_m1 = [E4],
+ LC_m1 = [E1,E2,E3,E5,E6,E7],
+ % Note: E1 and E4 together!
+ LCallAt_m1 = [{E1,1},{E2,2},{E3,3},{E5,5},{E6,6},{E7,7}],
+ XCallAt_m1 = [{E1,4}],
+ Info1 = #xref_mod{name = m1, app_name = [a1]},
+ ?line S1 = add_module(S0, Info1, DefAt_m1, X_m1, LCallAt_m1, XCallAt_m1,
+ XC_m1, LC_m1),
+
+ D6 = {F6,6},
+ D7 = {F7,7},
+ D8 = {F8,8},
+ D9 = {F9,9},
+ D10 = {F10,10},
+ D11 = {F11,11},
+ DefAt_m2 = [D6,D7,D8,D9,D10,D11],
+ X_m2 = [F6],
+ % L_m2 = [F7,F8,F9,F10,F11],
+ XC_m2 = [E10,E15],
+ LC_m2 = [E8,E9,E11,E12,E13,E14],
+ LCallAt_m2 = [{E8,8},{E9,9},{E11,11},{E12,12},{E13,13},{E14,14}],
+ XCallAt_m2 = [{E10,10},{E15,15}],
+ Info2 = #xref_mod{name = m2, app_name = [a2]},
+ ?line S2 = add_module(S1, Info2, DefAt_m2, X_m2, LCallAt_m2, XCallAt_m2,
+ XC_m2, LC_m2),
+
+ AppInfo1 = #xref_app{name = a1, rel_name = [r1]},
+ ?line S5 = add_application(S2, AppInfo1),
+ AppInfo2 = #xref_app{name = a2, rel_name = [r1]},
+ ?line S6 = add_application(S5, AppInfo2),
+
+ RelInfo = #xref_rel{name = r1},
+ ?line S7 = add_release(S6, RelInfo),
+
+ ?line S = set_up(S7),
+
+ ?line {ok, _} = eval("EE | m1", [E1,E5,E6,E7], S),
+ ?line {ok, _} = eval("EE | m2", [{F6,F1}], S),
+ ?line {ok, _} = eval("EE | m2 + EE | m2", [{F6,F1}], S),
+
+ ?line {ok, _} = eval("(Fun)(Lin)(E | m1)",
+ to_external(union(set(XC_m1), set(LC_m1))), S),
+ ?line {ok, _} = eval("(XXL)(ELin) (EE | m1)",
+ [{{D2,D1},[1,2,4]},{{D4,D2},[5]},{{D5,D4},[6]},{{D4,D5},[7]}],
+ S),
+ ?line {ok, _} = eval("(XXL)(ELin)(EE | m2)", [{{D6,D1},[8,11,12]}], S),
+ ?line {ok, _} = eval("(XXL)(ELin)(ELin)(EE | m2)",
+ [{{D6,D1},[8,11,12]}], S),
+
+ %% Combining graphs (equal or different):
+ ?line {ok, _} = eval("(XXL)(ELin)(EE | m2 + EE | m2)",
+ [{{D6,D1},[8,11,12]}], S),
+ ?line {ok, _} = eval("(XXL)(ELin)(EE | m2 * EE | m2)",
+ [{{D6,D1},[8,11,12]}], S),
+ ?line {ok, _} = eval("(XXL)(ELin)(EE | m2 - EE | m1)",
+ [{{D6,D1},[8,11,12]}], S),
+ ?line {ok, _} = eval("(XXL)(ELin)(EE | m2 - E | m2)",
+ [{{D6,D1},[8,11,12]}], S),
+ ?line {ok, _} = eval("(XXL)(ELin)(Fun)(ELin)(EE | m2)",
+ [{{D6,D1},[8,11,12]}], S),
+ ?line {ok, _} = eval("EE | m1 + E | m1", LC_m1, S),
+ ?line {ok, _} = eval(f("EE | ~p + E | ~p", [F2, F2]), [E1,E2], S),
+ %% [1,4] from 'calls' is a subset of [1,2,4] from Inter Call Graph:
+ ?line {ok, _} = eval(f("(XXL)(Lin) (E | ~p)", [F2]),
+ [{{D2,D1},[1,4]},{{D2,D3},[2]}], S),
+
+ ?line {ok, _} = eval(f("(XXL)(ELin) (EE | ~p)", [F2]),
+ [{{D2,D1},[1,2,4]}], S),
+ ?line {ok, _} = eval(f("(XXL)((ELin)(EE | ~p) + (Lin)(E | ~p))", [F2, F2]),
+ [{{D2,D1},[1,2,4]},{{D2,D3},[2]}], S),
+ ?line {ok, _} =
+ eval(f("(XXL)((ELin) ~p + (Lin) ~p)", [{F2, F1}, {F2, F1}]),
+ [{{D2,D1},[1,2,4]}], S),
+ ?line {ok, _} = eval(f("(Fun)(Lin) ~p", [{F2, F1}]), [E1], S),
+ %% The external call E4 is included in the reply:
+ ?line {ok, _} = eval("(XXL)(Lin)(LC | m1)",
+ [{{D2,D1},[1,4]},{{D2,D3},[2]},{{D3,D1},[3]},
+ {{D4,D2},[5]},{{D4,D5},[7]},{{D5,D4},[6]}], S),
+ %% The local call E1 is included in the reply:
+ ?line {ok, _} = eval("(XXL)(Lin)(XC | m1)", [{{D2,D1},[1,4]}], S),
+
+ ?line {ok, _} = eval(f("(LLin) (E | ~p || ~p) + (XLin) (E | ~p || ~p)",
+ [F2, F1, F2, F1]), [{E4,[1,4]}], S),
+
+ ?line {ok, _} = eval("# (ELin) E", 6, S),
+
+ ok.
+
+lines(suite) -> [];
+lines(doc) -> ["More test of Inter Call Graph, and regular expressions"];
+lines(Conf) when is_list(Conf) ->
+ S0 = new(),
+
+ F1 = {m1,f1,1}, % X
+ F2 = {m1,f2,2},
+ F3 = {m1,f3,3},
+ F4 = {m2,f4,4}, % X
+ F5 = {m1,f5,5}, % X
+ F6 = {m1,f6,6},
+
+ E1 = {F1,F2},
+ E2 = {F2,F1}, % X
+ E3 = {F3,F2},
+ E4 = {F1,F4}, % X
+ E5 = {F2,F4}, % X
+ E6 = {F5,F6},
+ E7 = {F6,F4}, % X
+
+ D1 = {F1,1},
+ D2 = {F2,2},
+ D3 = {F3,3},
+ D4 = {F4,4},
+ D5 = {F5,5},
+ D6 = {F6,6},
+
+ DefAt_m1 = [D1,D2,D3,D5,D6],
+ X_m1 = [F1,F5],
+ % L_m1 = [F2,F3,F6],
+ XC_m1 = [E4,E5,E7],
+ LC_m1 = [E1,E2,E3,E6],
+ LCallAt_m1 = [{E1,1},{E3,3},{E6,6}],
+ XCallAt_m1 = [{E2,2},{E4,4},{E5,5},{E7,7}],
+ Info1 = #xref_mod{name = m1, app_name = [a1]},
+ ?line S1 = add_module(S0, Info1, DefAt_m1, X_m1, LCallAt_m1, XCallAt_m1,
+ XC_m1, LC_m1),
+
+ DefAt_m2 = [D4],
+ X_m2 = [F4],
+ % L_m2 = [],
+ XC_m2 = [],
+ LC_m2 = [],
+ LCallAt_m2 = [],
+ XCallAt_m2 = [],
+ Info2 = #xref_mod{name = m2, app_name = [a2]},
+ ?line S2 = add_module(S1, Info2, DefAt_m2, X_m2, LCallAt_m2, XCallAt_m2,
+ XC_m2, LC_m2),
+
+ AppInfo1 = #xref_app{name = a1, rel_name = [r1]},
+ ?line S5 = add_application(S2, AppInfo1),
+ AppInfo2 = #xref_app{name = a2, rel_name = [r1]},
+ ?line S6 = add_application(S5, AppInfo2),
+
+ RelInfo = #xref_rel{name = r1},
+ ?line S7 = add_release(S6, RelInfo),
+
+ ?line S = set_up(S7),
+
+ ?line {ok, _} = eval("(XXL) (ELin) (EE | m1)",
+ [{{D1,D1},[1]},{{D1,D4},[1,4]},{{D3,D1},[3]},{{D3,D4},[3]},
+ {{D5,D4},[6]}], S),
+ ?line {ok, _} = eval("(XXL)(Lin) (E | m1)",
+ [{{D1,D2},[1]},{{D1,D4},[4]},{{D2,D1},[2]},
+ {{D2,D4},[5]},{{D3,D2},[3]},{{D5,D6},[6]},{{D6,D4},[7]}],
+ S),
+ ?line {ok, _} = eval("(E | m1) + (EE | m1)",
+ [E1,E2,E3,E4,E5,E6,E7,{F1,F1},{F3,F1},{F3,F4},{F5,F4}],
+ S),
+ ?line {ok, _} = eval("(Lin)(E | m1)",
+ [{E4,[4]},{E1,[1]},{E2,[2]},{E5,[5]},
+ {E3,[3]},{E7,[7]},{E6,[6]}], S),
+ ?line {ok, _} = eval("(ELin)(EE | m1)",
+ [{{F1,F1},[1]},{{F1,F4},[1,4]},{{F3,F1},[3]},{{F3,F4},[3]},
+ {{F5,F4},[6]}], S),
+ ?line {ok, _} = eval("(Lin)(E | m1) + (ELin)(EE | m1)",
+ [{E4,[1,4]},{E1,[1]},{E2,[2]},{E5,[5]},
+ {E3,[3]},{E7,[7]},{E6,[6]},
+ {{F1,F1},[1]},{{F3,F1},[3]},{{F3,F4},[3]},
+ {{F5,F4},[6]}], S),
+ ?line {ok, _} = eval("(Lin)(E | m1) - (ELin)(EE | m1)",
+ [{E1,[1]},{E2,[2]},{E5,[5]},
+ {E3,[3]},{E7,[7]},{E6,[6]}], S),
+ ?line {ok, _} = eval("(Lin)(E | m1) * (ELin)(EE | m1)",
+ [{E4,[4]}], S),
+ ?line {ok, _} = eval("(XXL)(Lin) (E | m1)",
+ [{{D1,D4},[4]},{{D1,D2},[1]},{{D2,D1},[2]},{{D2,D4},[5]},
+ {{D3,D2},[3]},{{D6,D4},[7]},{{D5,D6},[6]}], S),
+ ?line {ok, _} = eval("(XXL)(ELin) (EE | m1)",
+ [{{D1,D1},[1]},{{D1,D4},[1,4]},{{D3,D1},[3]},{{D3,D4},[3]},
+ {{D5,D4},[6]}], S),
+ ?line {ok, _} = eval("(XXL)(Lin)(Fun)(Lin) (E | m1)",
+ [{{D1,D4},[4]},{{D1,D2},[1]},{{D2,D1},[2]},{{D2,D4},[5]},
+ {{D3,D2},[3]},{{D6,D4},[7]},{{D5,D6},[6]}], S),
+ ?line {ok, _} = eval("(XXL)(ELin)(Fun)(ELin) (EE | m1)",
+ [{{D1,D1},[1]},{{D1,D4},[1,4]},{{D3,D1},[3]},{{D3,D4},[3]},
+ {{D5,D4},[6]}], S),
+
+ %% A few tests on regexp.
+ ?line {ok, _} = eval("\"(foo\":Mod", parse_error, S),
+ ?line {ok, _} = eval("_Foo:_/_", parse_error, S),
+ ?line {ok, _} = eval("\".*foo\"", parse_error, S),
+ ?line {ok, _} = eval("_:_/_:Lin", parse_error, S),
+ ?line {ok, _} = eval("_:_/_:Mod", parse_error, S),
+ ?line {ok, _} = eval("_:_/_:App", parse_error, S),
+ ?line {ok, _} = eval("_:_/_:Rel", parse_error, S),
+ ?line {ok, _} = eval("m2:_/4", [F4], S),
+ ?line {ok, _} = eval("m2:_/4:Fun", [F4], S),
+ ?line {ok, _} = eval("\"m.?\":\"f.*\"/\"6\"", [F6], S),
+ ?line {ok, _} = eval("_:_/6", [F6], S),
+ ?line {ok, _} = eval("m1:\"f1\"/_", [F1], S),
+ ?line {ok, _} = eval("\"m1\":f1/_", [F1], S),
+ ?line {ok, _} = eval("\"m1\":Mod", [m1], S),
+ ?line {ok, _} = eval("\"a1\":App", [a1], S),
+ ?line {ok, _} = eval("\"r1\":Rel", [r1], S),
+ ?line {ok, _} = eval("_:_/-1", [], S),
+
+ ok.
+
+loops(suite) -> [];
+loops(doc) -> ["More Inter Call Graph, loops and \"unusual\" cases"];
+loops(Conf) when is_list(Conf) ->
+ S0 = new(),
+
+ F1 = {m1,f1,1}, % X
+ F2 = {m1,f2,2},
+ F3 = {m1,f3,3}, % X
+ F4 = {m1,f4,4},
+ F5 = {m1,f5,5},
+ F6 = {m1,f1,6}, % X
+ F7 = {m1,f1,7},
+
+ E1 = {F1,F1}, % X
+ E2 = {F2,F2},
+ E3 = {F3,F4},
+ E4 = {F4,F5},
+ E5 = {F5,F3}, % X
+
+ D1 = {F1,1},
+ D2 = {F2,2},
+ D3 = {F3,3},
+ D4 = {F4,4},
+ D5 = {F5,5},
+ D6 = {F6,6},
+ D7 = {F7,7},
+ DefAt_m1 = [D1,D2,D3,D4,D5,D6,D7],
+ X_m1 = [F1,F3,F6],
+ % L_m1 = [F2,F4,F5],
+ XC_m1 = [],
+ LC_m1 = [E1,E2,E3,E4,E5],
+ LCallAt_m1 = [{E2,2},{E3,3},{E4,4}],
+ XCallAt_m1 = [{E1,1},{E5,5}],
+ Info1 = #xref_mod{name = m1, app_name = [a1]},
+ ?line S1 = add_module(S0, Info1, DefAt_m1, X_m1, LCallAt_m1, XCallAt_m1,
+ XC_m1, LC_m1),
+
+ ?line S = set_up(S1),
+
+ % Neither F6 nor F7 is included. Perhaps one should change that?
+ ?line {ok, _} = eval("EE | m1", [E1,E2,{F3,F3}], S),
+ ?line {ok, _} = eval(f("(XXL)(ELin) (EE | ~p)", [F3]), [{{D3,D3},[3]}], S),
+
+ ?line {ok, _} = eval("m1->m1 | m1->m1", type_error, S),
+ ?line {ok, _} = eval(f("~p | ~p", [F2, F1]), type_error, S),
+
+ ?line {ok, _} = eval(f("range (closure EE | ~p)", [F1]), [F1], S),
+ ?line {ok, _} = eval(f("domain (closure EE || ~p)", [F3]), [F3], S),
+
+ ?line {ok, _} = eval(f("domain (closure E || ~p)", [F3]), [F3,F4,F5], S),
+
+ ?line {ok, _} = eval("components E", [[F1],[F2],[F3,F4,F5]], S),
+ ?line {ok, _} = eval("components EE", [[F1],[F2],[F3]], S),
+
+ ok.
+
+no_data(suite) -> [];
+no_data(doc) -> ["Simple tests when there is no data"];
+no_data(Conf) when is_list(Conf) ->
+ S0 = new(),
+ ?line S1 = set_up(S0),
+ ?line {ok, _} = eval("M", [], S1),
+ ?line {ok, _} = eval("A", [], S1),
+ ?line {ok, _} = eval("R", [], S1),
+
+ ModInfo = #xref_mod{name = m, app_name = []},
+ ?line S2 = add_module(S1, ModInfo, [], [], [], [], [], []),
+ AppInfo = #xref_app{name = a, rel_name = []},
+ ?line S3 = add_application(S2, AppInfo),
+ RelInfo = #xref_rel{name = r, dir = ""},
+ ?line S4 = add_release(S3, RelInfo),
+ ?line S5 = set_up(S4),
+ ?line {ok, _} = eval("M", [m], S5),
+ ?line {ok, _} = eval("A", [a], S5),
+ ?line {ok, _} = eval("R", [r], S5),
+ ok.
+
+modules(suite) -> [];
+modules(doc) -> ["Modules mode"];
+modules(Conf) when is_list(Conf) ->
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir, "rel2"),
+ X = fname(Dir, "x.erl"),
+ Y = fname(Dir, "y.erl"),
+ A1_1 = fname([Dir,"lib","app1-1.1"]),
+ A2 = fname([Dir,"lib","app2-1.1"]),
+ EB1_1 = fname(A1_1, "ebin"),
+ EB2 = fname(A2, "ebin"),
+ Xbeam = fname(EB2, "x.beam"),
+ Ybeam = fname(EB1_1, "y.beam"),
+
+ ?line {ok, x} = compile:file(X, [debug_info, {outdir,EB2}]),
+ ?line {ok, y} = compile:file(Y, [debug_info, {outdir,EB1_1}]),
+
+ ?line {ok, S0} = xref_base:new([{xref_mode, modules}]),
+ ?line {ok, release2, S1} =
+ xref_base:add_release(S0, Dir, [{name,release2}]),
+ ?line S = set_up(S1),
+ ?line {{error, _, {unavailable_analysis, undefined_function_calls}}, _} =
+ xref_base:analyze(S, undefined_function_calls),
+ ?line {{error, _, {unavailable_analysis, locals_not_used}}, _} =
+ xref_base:analyze(S, locals_not_used),
+ ?line {{error, _, {unavailable_analysis, {call, foo}}}, _} =
+ xref_base:analyze(S, {call, foo}),
+ ?line {{error, _, {unavailable_analysis, {use, foo}}}, _} =
+ xref_base:analyze(S, {use, foo}),
+ ?line analyze(undefined_functions, [{x,undef,0}], S),
+ ?line 5 = length(xref_base:info(S)),
+
+ %% More: all info, conversions.
+
+ ?line ok = file:delete(Xbeam),
+ ?line ok = file:delete(Ybeam),
+ ?line ok = xref_base:delete(S),
+ ok.
+
+files(suite) ->
+ [add, default, info, lib, read, read2, remove, replace, update,
+ deprecated, trycatch, abstract_modules, fun_mfa, qlc].
+
+add(suite) -> [];
+add(doc) -> ["Add modules, applications, releases, directories"];
+add(Conf) when is_list(Conf) ->
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir, "rel2"),
+ UDir = fname([CopyDir,"dir","unreadable"]),
+ DDir = fname(CopyDir,"dir"),
+ UFile = fname([DDir, "dir","unreadable.beam"]),
+ X = fname(Dir, "x.erl"),
+ Y = fname(Dir, "y.erl"),
+ A1_1 = fname([Dir,"lib","app1-1.1"]),
+ A2 = fname([Dir,"lib","app2-1.1"]),
+ EB1_1 = fname(A1_1, "ebin"),
+ EB2 = fname(A2, "ebin"),
+ Xbeam = fname(EB2, "x.beam"),
+ Ybeam = fname(EB1_1, "y.beam"),
+
+ ?line {ok, x} = compile:file(X, [debug_info, {outdir,EB2}]),
+ ?line {ok, y} = compile:file(Y, [debug_info, {outdir,EB1_1}]),
+
+ ?line case os:type() of
+ {unix, _} ->
+ ?line make_udir(UDir),
+ ?line make_ufile(UFile);
+ _ ->
+ true
+ end,
+
+ ?line {error, _, {invalid_options,[not_an_option] }} =
+ xref_base:new([not_an_option]),
+ ?line {error, _, {invalid_options,[{verbose,not_a_value}] }} =
+ xref_base:new([{verbose,not_a_value}]),
+ ?line S = new(),
+ ?line {error, _, {invalid_options,[not_an_option]}} =
+ xref_base:set_up(S, [not_an_option]),
+ ?line {error, _, {invalid_options,[{builtins,true},not_an_option]}} =
+ xref_base:add_directory(S, foo, [{builtins,true},not_an_option]),
+ ?line {error, _, {invalid_options,[{builtins,not_a_value}]}} =
+ xref_base:add_directory(S, foo, [{builtins,not_a_value}]),
+ ?line {error, _, {invalid_filename,{foo,bar}}} =
+ xref_base:add_directory(S, {foo,bar}, []),
+ ?line {error, _, {invalid_options,[{builtins,true},not_an_option]}} =
+ xref_base:add_module(S, foo, [{builtins,true},not_an_option]),
+ ?line {error, _, {invalid_options,[{builtins,not_a_value}]}} =
+ xref_base:add_module(S, foo, [{builtins,not_a_value}]),
+ ?line {error, _, {invalid_filename,{foo,bar}}} =
+ xref_base:add_module(S, {foo,bar}, []),
+ ?line {error, _, {invalid_options,[{builtins,true},not_an_option]}} =
+ xref_base:add_application(S, foo, [{builtins,true},not_an_option]),
+ ?line {error, _, {invalid_options,[{builtins,not_a_value}]}} =
+ xref_base:add_application(S, foo, [{builtins,not_a_value}]),
+ ?line {error, _, {invalid_filename,{foo,bar}}} =
+ xref_base:add_application(S, {foo,bar}, []),
+ ?line {error, _, {invalid_options,[not_an_option]}} =
+ xref_base:add_release(S, foo, [not_an_option]),
+ ?line {error, _, {invalid_options,[{builtins,not_a_value}]}} =
+ xref_base:add_release(S, foo, [{builtins,not_a_value}]),
+ ?line {error, _, {invalid_filename,{foo,bar}}} =
+ xref_base:add_release(S, {foo,bar}, []),
+ ?line {ok, S1} =
+ xref_base:set_default(S, [{verbose,false}, {warnings, false}]),
+ ?line case os:type() of
+ {unix, _} ->
+ ?line {error, _, {file_error, _, _}} =
+ xref_base:add_release(S, UDir);
+ _ ->
+ true
+ end,
+ ?line {error, _, {file_error, _, _}} =
+ xref_base:add_release(S, fname(["/a/b/c/d/e/f","__foo"])),
+ ?line {ok, release2, S2} =
+ xref_base:add_release(S1, Dir, [{name,release2}]),
+ ?line {error, _, {module_clash, {x, _, _}}} =
+ xref_base:add_module(S2, Xbeam),
+ ?line {ok, S3} = xref_base:remove_release(S2, release2),
+ ?line {ok, rel2, S4} = xref_base:add_release(S3, Dir),
+ ?line {error, _, {release_clash, {rel2, _, _}}} =
+ xref_base:add_release(S4, Dir),
+ ?line {ok, S5} = xref_base:remove_release(S4, rel2),
+ %% One unreadable file and one JAM file found (no verification here):
+ ?line {ok, [], S6} = xref_base:add_directory(S5, fname(CopyDir,"dir"),
+ [{recurse,true}, {warnings,true}]),
+ ?line case os:type() of
+ {unix, _} ->
+ ?line {error, _, {file_error, _, _}} =
+ xref_base:add_directory(S6, UDir);
+ _ ->
+ true
+ end,
+ ?line {ok, app1, S7} = xref_base:add_application(S6, A1_1),
+ ?line {error, _, {application_clash, {app1, _, _}}} =
+ xref_base:add_application(S7, A1_1),
+ ?line {ok, S8} = xref_base:remove_application(S7, app1),
+ ?line ok = xref_base:delete(S8),
+ ?line ok = file:delete(Xbeam),
+ ?line ok = file:delete(Ybeam),
+ ?line case os:type() of
+ {unix, _} ->
+ ?line ok = file:del_dir(UDir),
+ ?line ok = file:delete(UFile);
+ _ ->
+ true
+ end,
+ ok.
+
+default(suite) -> [];
+default(doc) -> ["Default values of options"];
+default(Conf) when is_list(Conf) ->
+ S = new(),
+ ?line {error, _, {invalid_options,[not_an_option]}} =
+ xref_base:set_default(S, not_an_option, true),
+ ?line {error, _, {invalid_options,[{builtins, not_a_value}]}} =
+ xref_base:set_default(S, builtins, not_a_value),
+ ?line {error, _, {invalid_options,[not_an_option]}} =
+ xref_base:get_default(S, not_an_option),
+ ?line {error, _, {invalid_options,[not_an_option]}} =
+ xref_base:set_default(S, [not_an_option]),
+
+ ?line D = xref_base:get_default(S),
+ ?line [{builtins,false},{recurse,false},{verbose,false},{warnings,true}] =
+ D,
+
+ ?line ok = xref_base:delete(S),
+ ok.
+
+info(suite) -> [];
+info(doc) -> ["The info functions"];
+info(Conf) when is_list(Conf) ->
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"rel2"),
+ LDir = fname(CopyDir,"lib_test"),
+ X = fname(Dir, "x.erl"),
+ Y = fname(Dir, "y.erl"),
+ A1_1 = fname([Dir,"lib","app1-1.1"]),
+ A2 = fname([Dir,"lib","app2-1.1"]),
+ EB1_1 = fname(A1_1, "ebin"),
+ EB2 = fname(A2, "ebin"),
+ Xbeam = fname(EB2, "x.beam"),
+ Ybeam = fname(EB1_1, "y.beam"),
+
+ ?line {ok, x} = compile:file(X, [debug_info, {outdir,EB2}]),
+ ?line {ok, y} = compile:file(Y, [debug_info, {outdir,EB1_1}]),
+
+ ?line {ok, _} = start(s),
+ ?line {error, _, {no_such_info, release}} = xref:info(s, release),
+ ?line {error, _, {no_such_info, release}} = xref:info(s, release, rel),
+ ?line {error, _, {no_such_module, mod}} = xref:info(s, modules, mod),
+ ?line {error, _, {no_such_application, app}} =
+ xref:info(s, applications, app),
+ ?line {error, _, {no_such_release, rel}} = xref:info(s, releases, rel),
+ ?line ok = xref:set_default(s, [{verbose,false}, {warnings, false}]),
+ ?line {ok, rel2} = xref:add_release(s, Dir),
+ ?line 9 = length(xref:info(s)),
+ ?line [{x,_}, {y, _}] = xref:info(s, modules),
+ ?line [{app1,_}, {app2, _}] = xref:info(s, applications),
+ ?line [{rel2,_}] = xref:info(s, releases),
+ ?line [] = xref:info(s, libraries),
+ ?line [{x,_}] = xref:info(s, modules, x),
+ ?line [{rel2,_}] = xref:info(s, releases, rel2),
+ ?line {error, _, {no_such_library, foo}} = xref:info(s, libraries, [foo]),
+
+ ?line {ok, lib1} =
+ compile:file(fname(LDir,lib1),[debug_info,{outdir,LDir}]),
+ ?line {ok, lib2} =
+ compile:file(fname(LDir,lib2),[debug_info,{outdir,LDir}]),
+ ?line ok = xref:set_library_path(s, [LDir], [{verbose,false}]),
+ ?line [{lib1,_}, {lib2, _}] = xref:info(s, libraries),
+ ?line [{lib1,_}, {lib2, _}] = xref:info(s, libraries, [lib1,lib2]),
+ ?line ok = file:delete(fname(LDir, "lib1.beam")),
+ ?line ok = file:delete(fname(LDir, "lib2.beam")),
+
+ ?line check_state(s),
+
+ ?line xref:stop(s),
+
+ ?line ok = file:delete(Xbeam),
+ ?line ok = file:delete(Ybeam),
+
+ ok.
+
+lib(suite) -> [];
+lib(doc) -> ["Library modules"];
+lib(Conf) when is_list(Conf) ->
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"lib_test"),
+ UDir = fname([CopyDir,"dir","non_existent"]),
+
+ ?line {ok, lib1} = compile:file(fname(Dir,lib1),[debug_info,{outdir,Dir}]),
+ ?line {ok, lib2} = compile:file(fname(Dir,lib2),[debug_info,{outdir,Dir}]),
+ ?line {ok, lib3} = compile:file(fname(Dir,lib3),[debug_info,{outdir,Dir}]),
+ ?line {ok, t} = compile:file(fname(Dir,t),[debug_info,{outdir,Dir}]),
+
+ ?line {ok, _} = start(s),
+ ?line ok = xref:set_default(s, [{verbose,false}, {warnings, false}]),
+ ?line {ok, t} = xref:add_module(s, fname(Dir,"t.beam")),
+ ?line {error, _, {invalid_options,[not_an_option]}} =
+ xref:set_library_path(s, ["foo"], [not_an_option]),
+ ?line {error, _, {invalid_path,otp}} = xref:set_library_path(s,otp),
+ ?line {error, _, {invalid_path,[""]}} = xref:set_library_path(s,[""]),
+ ?line {error, _, {invalid_path,[[$a | $b]]}} =
+ xref:set_library_path(s,[[$a | $b]]),
+ ?line {error, _, {invalid_path,[otp]}} = xref:set_library_path(s,[otp]),
+ ?line {ok, []} = xref:get_library_path(s),
+ ?line ok = xref:set_library_path(s, [Dir], [{verbose,false}]),
+ ?line {ok, UnknownFunctions} = xref:q(s, "U"),
+ ?line [{lib1,unknown,0}, {lib2,local,0},
+ {lib2,unknown,0}, {unknown,unknown,0}]
+ = UnknownFunctions,
+ ?line {ok, [{lib2,f,0},{lib3,f,0}]} = xref:q(s, "DF"),
+ ?line {ok, []} = xref:q(s, "DF_1"),
+ ?line {ok, [{lib2,f,0}]} = xref:q(s, "DF_2"),
+ ?line {ok, [{lib2,f,0}]} = xref:q(s, "DF_3"),
+
+ ?line {ok, [unknown]} = xref:q(s, "UM"),
+ ?line {ok, UnknownDefAt} = xref:q(s, "(Lin)U"),
+ ?line [{{lib1,unknown,0},0},{{lib2,local,0},0}, {{lib2,unknown,0},0},
+ {{unknown,unknown,0},0}] = UnknownDefAt,
+ ?line {ok, LibFuns} = xref:q(s, "X * LM"),
+ ?line [{lib2,f,0},{lib3,f,0}] = LibFuns,
+ ?line {ok, LibMods} = xref:q(s, "LM"),
+ ?line [lib1,lib2,lib3] = LibMods,
+ ?line {ok, [{{lib2,f,0},0},{{lib3,f,0},0}]} = xref:q(s, "(Lin) (LM * X)"),
+ ?line {ok, [{{lib1,unknown,0},0}, {{lib2,f,0},0}, {{lib2,local,0},0},
+ {{lib2,unknown,0},0}, {{lib3,f,0},0}]} = xref:q(s,"(Lin)LM"),
+ ?line {ok,[lib1,lib2,lib3,t,unknown]} = xref:q(s,"M"),
+ ?line {ok,[{lib2,f,0},{lib3,f,0},{t,t,0}]} = xref:q(s,"X * M"),
+ ?line check_state(s),
+
+ ?line copy_file(fname(Dir, "lib1.erl"), fname(Dir,"lib1.beam")),
+ ?line ok = xref:set_library_path(s, [Dir]),
+ ?line {error, _, _} = xref:q(s, "U"),
+
+ %% OTP-3921. AM and LM not always disjoint.
+ ?line {ok, lib1} = compile:file(fname(Dir,lib1),[debug_info,{outdir,Dir}]),
+ ?line {ok, lib1} = xref:add_module(s, fname(Dir,"lib1.beam")),
+ ?line check_state(s),
+
+ ?line {error, _, {file_error, _, _}} = xref:set_library_path(s, [UDir]),
+
+ ?line xref:stop(s),
+ ?line ok = file:delete(fname(Dir, "lib1.beam")),
+ ?line ok = file:delete(fname(Dir, "lib2.beam")),
+ ?line ok = file:delete(fname(Dir, "lib3.beam")),
+ ?line ok = file:delete(fname(Dir, "t.beam")),
+
+ ?line {ok, cp} = compile:file(fname(Dir,cp),[debug_info,{outdir,Dir}]),
+ ?line {ok, _} = start(s),
+ ?line ok = xref:set_default(s, [{verbose,false}, {warnings, false}]),
+ ?line {ok, cp} = xref:add_module(s, fname(Dir,"cp.beam")),
+ ?line {ok, [{lists, sort, 1}]} = xref:q(s, "U"),
+ ?line ok = xref:set_library_path(s, code_path),
+ ?line {ok, []} = xref:q(s, "U"),
+ ?line check_state(s),
+ ?line xref:stop(s),
+ ?line ok = file:delete(fname(Dir, "cp.beam")),
+ ok.
+
+read(suite) -> [];
+read(doc) -> ["Data read from the Abstract Code"];
+read(Conf) when is_list(Conf) ->
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"read"),
+ File = fname(Dir, "read"),
+ Beam = fname(Dir, "read.beam"),
+ ?line {ok, read} = compile:file(File, [debug_info,{outdir,Dir}]),
+ ?line do_read(File, abstract_v2),
+ ?line copy_file(fname(Dir, "read.beam.v1"), Beam),
+ ?line do_read(File, abstract_v1),
+ ?line ok = file:delete(Beam),
+ ok.
+
+do_read(File, Version) ->
+ ?line {ok, _} = start(s),
+ ?line ok = xref:set_default(s, [{verbose,false}, {warnings, false}]),
+ ?line {ok, read} = xref:add_module(s, File),
+
+ ?line {U, OK, OKB} = read_expected(Version),
+
+ %% {ok, UC} = xref:q(s, "(Lin) UC"),
+ %% RR = to_external(converse(family_to_relation(family(UC)))),
+ %% lists:foreach(fun(X) -> io:format("~w~n", [X]) end, RR),
+ Unres = to_external(relation_to_family(converse(from_term(U)))),
+ ?line {ok, Unres} = xref:q(s, "(Lin) UC"),
+
+ %% {ok, EE} = xref:q(s, "(Lin) (E - UC)"),
+ %% AA = to_external(converse(family_to_relation(family(EE)))),
+ %% lists:foreach(fun(X) -> io:format("~w~n", [X]) end, AA),
+ Calls = to_external(relation_to_family(converse(from_term(OK)))),
+ ?line {ok, Calls} = xref:q(s, "(Lin) (E - UC) "),
+
+ ?line ok = check_state(s),
+ ?line {ok, UM} = xref:q(s, "UM"),
+ ?line true = member('$M_EXPR', UM),
+
+ ?line {ok, X} = xref:q(s, "X"),
+ ?line true = member({read, module_info, 0}, X),
+ ?line false = member({foo, module_info, 0}, X),
+ ?line false = member({erlang, module_info, 0}, X),
+ ?line {ok, Unknowns} = xref:q(s, "U"),
+ ?line false = member({read, module_info, 0}, Unknowns),
+ ?line true = member({foo, module_info, 0}, Unknowns),
+ ?line true = member({erlang, module_info, 0}, Unknowns),
+ ?line {ok, LC} = xref:q(s, "LC"),
+ ?line true = member({{read,bi,0},{read,bi,0}}, LC),
+
+ ?line ok = xref:set_library_path(s, add_erts_code_path(fname(code:lib_dir(kernel),ebin))),
+ ?line io:format("~p~n",[(catch xref:get_library_path(s))]),
+ ?line {ok, X2} = xref:q(s, "X"),
+ ?line ok = check_state(s),
+ ?line true = member({read, module_info, 0}, X2),
+ ?line false = member({foo, module_info, 0}, X2),
+ ?line true = member({erlang, module_info, 0}, X2),
+ ?line {ok, Unknowns2} = xref:q(s, "U"),
+ ?line false = member({read, module_info, 0}, Unknowns2),
+ ?line true = member({foo, module_info, 0}, Unknowns2),
+ ?line false = member({erlang, module_info, 0}, Unknowns2),
+
+ ?line ok = xref:remove_module(s, read),
+ ?line {ok, read} = xref:add_module(s, File, [{builtins,true}]),
+
+ UnresB = to_external(relation_to_family(converse(from_term(U)))),
+ ?line {ok, UnresB} = xref:q(s, "(Lin) UC"),
+ CallsB = to_external(relation_to_family(converse(from_term(OKB)))),
+ ?line {ok, CallsB} = xref:q(s, "(Lin) (E - UC) "),
+ ?line ok = check_state(s),
+ ?line {ok, XU} = xref:q(s, "XU"),
+ ?line Erl = set([{erlang,length,1},{erlang,integer,1},
+ {erlang,binary_to_term,1}]),
+ ?line [{erlang,binary_to_term,1},{erlang,length,1}] =
+ to_external(intersection(set(XU), Erl)),
+ ?line xref:stop(s).
+
+%% What is expected when xref_SUITE_data/read/read.erl is added:
+read_expected(Version) ->
+ %% Line positions in xref_SUITE_data/read/read.erl:
+ POS1 = 28, POS2 = POS1+10, POS3 = POS2+6, POS4 = POS3+6, POS5 = POS4+10,
+ POS6 = POS5+5, POS7 = POS6+6, POS8 = POS7+6, POS9 = POS8+8,
+ POS10 = POS9+10, POS11 = POS10+7, POS12 = POS11+8, POS13 = POS12+10,
+ POS14 = POS13+18, % POS15 = POS14+23,
+
+ FF = {read,funfuns,0},
+ U = [{POS1+5,{FF,{dist,'$F_EXPR',0}}},
+ {POS1+8,{FF,{dist,'$F_EXPR',0}}},
+ {POS2+8,{{read,funfuns,0},{expr,'$F_EXPR',1}}},
+ {POS3+4,{FF,{expr,'$F_EXPR',2}}},
+ {POS4+2,{FF,{modul,'$F_EXPR',1}}},
+ {POS4+4,{FF,{spm,'$F_EXPR',1}}},
+ {POS4+6,{FF,{spm,'$F_EXPR',1}}},
+ {POS4+8,{FF,{spm,'$F_EXPR',1}}},
+ {POS5+1,{FF,{'$M_EXPR','$F_EXPR',0}}},
+ {POS5+2,{FF,{'$M_EXPR','$F_EXPR',0}}},
+ {POS5+3,{FF,{'$M_EXPR','$F_EXPR',0}}},
+ {POS6+1,{FF,{'$M_EXPR','$F_EXPR',0}}},
+ {POS6+2,{FF,{'$M_EXPR','$F_EXPR',0}}},
+ {POS6+4,{FF,{n,'$F_EXPR',-1}}},
+ {POS7+1,{FF,{'$M_EXPR',f,1}}},
+ {POS7+2,{FF,{'$M_EXPR',f,1}}},
+ {POS8+2,{FF,{hej,'$F_EXPR',1}}},
+ {POS8+3,{FF,{t,'$F_EXPR',1}}},
+ {POS8+5,{FF,{a,'$F_EXPR',1}}},
+ {POS8+7,{FF,{m,'$F_EXPR',1}}},
+ {POS9+1,{FF,{'$M_EXPR',f,1}}},
+ {POS9+3,{FF,{a,'$F_EXPR',1}}},
+ {POS10+1,{FF,{'$M_EXPR',foo,1}}},
+ {POS10+2,{FF,{'$M_EXPR','$F_EXPR',1}}},
+ {POS10+3,{FF,{'$M_EXPR','$F_EXPR',2}}},
+ {POS10+4,{FF,{'$M_EXPR','$F_EXPR',1}}},
+ {POS10+5,{FF,{'$M_EXPR',san,1}}},
+ {POS10+6,{FF,{'$M_EXPR','$F_EXPR',1}}},
+ {POS11+1,{FF,{'$M_EXPR','$F_EXPR',1}}},
+ {POS11+2,{FF,{'$M_EXPR','$F_EXPR',-1}}},
+ {POS11+3,{FF,{m,f,-1}}},
+ {POS11+4,{FF,{m,f,-1}}},
+ {POS11+5,{FF,{'$M_EXPR','$F_EXPR',1}}},
+ {POS11+6,{FF,{'$M_EXPR','$F_EXPR',1}}},
+ {POS12+1,{FF,{'$M_EXPR','$F_EXPR',-1}}},
+ {POS12+4,{FF,{'$M_EXPR','$F_EXPR',2}}},
+ {POS12+7,{FF,{'$M_EXPR','$F_EXPR',-1}}},
+ {POS12+8,{FF,{m4,f4,-1}}},
+ {POS13+2,{FF,{debug,'$F_EXPR',0}}},
+ {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}}},
+ {21,{{read,lc,0},{ets,tab2list,1}}},
+ {POS1+1,{FF,{erlang,spawn,1}}},
+ {POS1+1,{FF,{mod17,fun17,0}}},
+ {POS1+2,{FF,{erlang,spawn,1}}},
+ {POS1+2,{FF,{read,local,0}}},
+ {POS1+3,{FF,{erlang,spawn,1}}},
+ {POS1+4,{FF,{dist,func,0}}},
+ {POS1+4,{FF,{erlang,spawn,1}}},
+ {POS1+5,{FF,{erlang,spawn,1}}},
+ {POS1+6,{FF,{erlang,spawn_link,1}}},
+ {POS1+6,{FF,{mod17,fun17,0}}},
+ {POS1+7,{FF,{dist,func,0}}},
+ {POS1+7,{FF,{erlang,spawn_link,1}}},
+ {POS1+8,{FF,{erlang,spawn_link,1}}},
+ {POS2+1,{FF,{d,f,0}}},
+ {POS2+1,{FF,{dist,func,2}}},
+ {POS2+1,{FF,{erlang,spawn,2}}},
+ {POS2+2,{FF,{dist,func,2}}},
+ {POS2+2,{FF,{erlang,spawn,2}}},
+ {POS2+2,{FF,{mod42,func,0}}},
+ {POS2+3,{FF,{d,f,0}}},
+ {POS2+3,{FF,{dist,func,2}}},
+ {POS2+3,{FF,{erlang,spawn_link,2}}},
+ {POS2+4,{FF,{dist,func,2}}},
+ {POS2+4,{FF,{erlang,spawn_link,2}}},
+ {POS2+4,{FF,{mod42,func,0}}},
+ {POS3+1,{FF,{dist,func,2}}},
+ {POS3+3,{FF,{dist,func,2}}},
+ {POS4+1,{FF,{erlang,spawn,4}}},
+ {POS4+1,{FF,{modul,function,0}}},
+ {POS4+2,{FF,{erlang,spawn,4}}},
+ {POS4+3,{FF,{dist,func,2}}},
+ {POS4+3,{FF,{erlang,spawn,4}}},
+ {POS4+3,{FF,{spm,spf,2}}},
+ {POS4+4,{FF,{dist,func,2}}},
+ {POS4+4,{FF,{erlang,spawn,4}}},
+ {POS4+5,{FF,{dist,func,2}}},
+ {POS4+5,{FF,{erlang,spawn_link,4}}},
+ {POS4+5,{FF,{spm,spf,2}}},
+ {POS4+6,{FF,{dist,func,2}}},
+ {POS4+6,{FF,{erlang,spawn_link,4}}},
+ {POS4+7,{FF,{erlang,spawn_opt,4}}},
+ {POS4+7,{FF,{read,bi,0}}},
+ {POS4+7,{FF,{spm,spf,2}}},
+ {POS4+8,{FF,{erlang,spawn_opt,4}}},
+ {POS4+8,{FF,{read,bi,0}}},
+ {POS5+1,{FF,{erlang,spawn,1}}},
+ {POS5+2,{FF,{erlang,spawn,1}}},
+ {POS5+3,{FF,{erlang,spawn_link,1}}},
+ {POS6+1,{FF,{erlang,spawn,2}}},
+ {POS6+2,{FF,{erlang,spawn_link,2}}},
+ {POS7+1,{FF,{erlang,spawn,4}}},
+ {POS7+2,{FF,{erlang,spawn_opt,4}}},
+ {POS8+1,{FF,{hej,san,1}}},
+ {POS8+4,{FF,{a,b,1}}},
+ {POS8+4,{FF,{erlang,apply,2}}},
+ {POS8+5,{FF,{erlang,apply,2}}},
+ {POS8+6,{FF,{erlang,apply,3}}},
+ {POS8+6,{FF,{m,f,1}}},
+ {POS8+7,{FF,{erlang,apply,3}}},
+ {POS9+1,{FF,{erlang,apply,3}}},
+ {POS9+1,{FF,{read,bi,0}}},
+ {POS9+2,{FF,{a,b,1}}},
+ {POS9+2,{FF,{erlang,apply,2}}},
+ {POS9+3,{FF,{erlang,apply,2}}},
+ {POS9+4,{FF,{erlang,apply,2}}},
+ {POS9+4,{FF,{erlang,not_a_function,1}}},
+ {POS9+5,{FF,{erlang,apply,3}}},
+ {POS9+5,{FF,{mod,func,2}}},
+ {POS9+6,{FF,{erlang,apply,1}}},
+ {POS9+7,{FF,{erlang,apply,2}}},
+ {POS9+7,{FF,{math,add3,1}}},
+ {POS9+8,{FF,{q,f,1}}},
+ {POS10+4,{FF,{erlang,apply,2}}},
+ {POS10+5,{FF,{mod1,fun1,1}}},
+ {POS11+1,{FF,{erlang,apply,3}}},
+ {POS11+2,{FF,{erlang,apply,3}}},
+ {POS11+3,{FF,{erlang,apply,3}}},
+ {POS11+4,{FF,{erlang,apply,3}}},
+ {POS11+6,{FF,{erlang,apply,2}}},
+ {POS12+1,{FF,{erlang,apply,2}}},
+ {POS12+4,{FF,{erlang,apply,2}}},
+ {POS12+5,{FF,{erlang,apply,3}}},
+ {POS12+5,{FF,{m3,f3,2}}},
+ {POS12+7,{FF,{erlang,apply,2}}},
+ {POS12+8,{FF,{erlang,apply,3}}},
+ {POS13+1,{FF,{dm,df,1}}},
+ {POS13+6,{{read,bi,0},{foo,module_info,0}}},
+ {POS13+7,{{read,bi,0},{read,module_info,0}}},
+ {POS13+9,{{read,bi,0},{t,foo,1}}},
+ {POS14+11,{{read,bi,0},{erlang,module_info,0}}},
+ {POS14+17,{{read,bi,0},{read,bi,0}}}],
+
+ OK = case Version of
+ abstract_v1 ->
+ [{POS8+3, {FF,{erlang,apply,3}}},
+ {POS10+1, {FF,{erlang,apply,3}}},
+ {POS10+6, {FF,{erlang,apply,3}}}]
+ ++ 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}}}] ++
+ O1
+ end,
+
+ %% When builtins =:= true:
+ OKB = [{POS13+1,{FF,{erts_debug,apply,4}}},
+ {POS13+2,{FF,{erts_debug,apply,4}}},
+ {POS13+3,{FF,{erts_debug,apply,4}}},
+ {POS1+3, {FF,{erlang,binary_to_term,1}}},
+ {POS3+1, {FF,{erlang,spawn,3}}},
+ {POS3+2, {FF,{erlang,spawn,3}}},
+ {POS3+3, {FF,{erlang,spawn_link,3}}},
+ {POS3+4, {FF,{erlang,spawn_link,3}}},
+ {POS6+4, {FF,{erlang,spawn,3}}},
+ {POS13+5, {{read,bi,0},{erlang,length,1}}},
+ {POS14+3, {{read,bi,0},{erlang,length,1}}}]
+ ++ OK,
+
+ {U, OK, OKB}.
+
+read2(suite) -> [];
+read2(doc) -> ["Data read from the Abstract Code (cont)"];
+read2(Conf) when is_list(Conf) ->
+ %% Handles the spawn_opt versions added in R9 (OTP-4180).
+ %% Expected augmentations: try/catch, cond.
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"read"),
+ File = fname(Dir, "read2.erl"),
+ MFile = fname(Dir, "read2"),
+ Beam = fname(Dir, "read2.beam"),
+ Test = <<"-module(read2).
+ -compile(export_all).
+
+ f() ->
+ spawn_opt({read2,f}, % POS2
+ [f()]),
+ spawn_opt(fun() -> foo end, [link]),
+ spawn_opt(f(),
+ {read2,f}, [{min_heap_size,1000}]),
+ spawn_opt(f(),
+ fun() -> f() end, [flopp]),
+ spawn_opt(f(),
+ read2, f, [], []);
+ f() ->
+ %% Duplicated unresolved calls are ignored:
+ (f())(foo,bar),(f())(foo,bar). % POS1
+ ">>,
+ ?line ok = file:write_file(File, Test),
+ ?line {ok, read2} = compile:file(File, [debug_info,{outdir,Dir}]),
+
+ ?line {ok, _} = xref:start(s),
+ ?line {ok, read2} = xref:add_module(s, MFile),
+ ?line {U0, OK0} = read2_expected(),
+
+ U = to_external(relation_to_family(converse(from_term(U0)))),
+ OK = to_external(relation_to_family(converse(from_term(OK0)))),
+ ?line {ok, U2} = xref:q(s, "(Lin) UC"),
+ ?line {ok, OK2} = xref:q(s, "(Lin) (E - UC)"),
+ ?line true = U =:= U2,
+ ?line true = OK =:= OK2,
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ ?line ok = file:delete(File),
+ ?line ok = file:delete(Beam),
+ ok.
+
+
+read2_expected() ->
+ POS1 = 16,
+ POS2 = 5,
+ FF = {read2,f,0},
+ U = [{POS1,{FF,{'$M_EXPR','$F_EXPR',2}}}],
+ OK = [{POS2,{FF,{erlang,spawn_opt,2}}},
+ {POS2,{FF,FF}},
+ {POS2+1,{FF,FF}},
+ {POS2+2,{FF,{erlang,spawn_opt,2}}},
+ {POS2+3,{FF,{erlang,spawn_opt,3}}},
+ {POS2+3,{FF,FF}},
+ {POS2+3,{FF,FF}},
+ {POS2+5,{FF,{erlang,spawn_opt,3}}},
+ {POS2+5,{FF,FF}},
+ {POS2+6,{FF,FF}},
+ {POS2+7,{FF,{erlang,spawn_opt,5}}},
+ {POS2+7,{FF,FF}},
+ {POS2+7,{FF,FF}},
+ {POS1,{FF,FF}}],
+ {U, OK}.
+
+remove(suite) -> [];
+remove(doc) -> ["Remove modules, applications, releases"];
+remove(Conf) when is_list(Conf) ->
+ S = new(),
+ ?line {error, _, {no_such_module, mod}} =
+ xref_base:remove_module(S, mod),
+ ?line {error, _, {no_such_application, app}} =
+ xref_base:remove_application(S, app),
+ ?line {error, _, {no_such_release, rel}} =
+ xref_base:remove_release(S, rel),
+ ?line ok = xref_base:delete(S),
+ ok.
+
+replace(suite) -> [];
+replace(doc) -> ["Replace modules, applications, releases"];
+replace(Conf) when is_list(Conf) ->
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"rel2"),
+ X = fname(Dir, "x.erl"),
+ Y = fname(Dir, "y.erl"),
+ A1_0 = fname(Dir, fname("lib","app1-1.0")),
+ A1_1 = fname(Dir, fname("lib","app1-1.1")),
+ A2 = fname(Dir, fname("lib","app2-1.1")),
+ EB1_0 = fname(A1_0, "ebin"),
+ EB1_1 = fname(A1_1, "ebin"),
+ Xbeam = fname(EB1_1, "x.beam"),
+ Ybeam = fname(EB1_1, "y.beam"),
+
+ ?line {ok, x} = compile:file(X, [debug_info, {outdir,EB1_0}]),
+ ?line {ok, x} = compile:file(X, [debug_info, {outdir,EB1_1}]),
+ ?line {ok, y} = compile:file(Y, [debug_info, {outdir,EB1_1}]),
+
+ ?line {ok, _} = start(s),
+ ?line {ok, false} = xref:set_default(s, verbose, false),
+ ?line {ok, true} = xref:set_default(s, warnings, false),
+ ?line {ok, rel2} = xref:add_release(s, Dir, []),
+ ?line {error, _, _} = xref:replace_application(s, app1, "no_data"),
+ ?line {error, _, {no_such_application, app12}} =
+ xref:replace_application(s, app12, A1_0, []),
+ ?line {error, _, {invalid_filename,{foo,bar}}} =
+ xref:replace_application(s, app1, {foo,bar}, []),
+ ?line {error, _, {invalid_options,[not_an_option]}} =
+ xref:replace_application(s, foo, bar, [not_an_option]),
+ ?line {error, _, {invalid_options,[{builtins,not_a_value}]}} =
+ xref:replace_application(s, foo, bar, [{builtins,not_a_value}]),
+ ?line {ok, app1} =
+ xref:replace_application(s, app1, A1_0),
+ ?line [{_, AppInfo}] = xref:info(s, applications, app1),
+ ?line {value, {release, [rel2]}} = keysearch(release, 1, AppInfo),
+
+ ?line {error, _, {no_such_module, xx}} =
+ xref:replace_module(s, xx, Xbeam, []),
+ ?line {error, _, {invalid_options,[{builtins,true},not_an_option]}} =
+ xref:replace_module(s, foo, bar,[{builtins,true},not_an_option]),
+ ?line {error, _, {invalid_options,[{builtins,not_a_value}]}} =
+ xref:replace_module(s, foo, bar, [{builtins,not_a_value}]),
+ ?line {error, _, {invalid_filename,{foo,bar}}} =
+ xref:replace_module(s, x, {foo,bar}),
+ ?line {ok, x} = xref:replace_module(s, x, Xbeam),
+ ?line [{x, ModInfo}] = xref:info(s, modules, x),
+ ?line {value, {application, [app1]}} =
+ keysearch(application, 1, ModInfo),
+
+ ?line {ok, x} = compile:file(X, [no_debug_info, {outdir,EB1_1}]),
+ ?line {error, _, {no_debug_info, _}} = xref:replace_module(s, x, Xbeam),
+ ?line {error, _, {module_mismatch, x,y}} =
+ xref:replace_module(s, x, Ybeam),
+ ?line case os:type() of
+ {unix, _} ->
+ ?line hide_file(Ybeam),
+ ?line {error, _, {file_error, _, _}} =
+ xref:replace_module(s, x, Ybeam);
+ _ ->
+ true
+ end,
+ ?line ok = xref:remove_module(s, x),
+ ?line {error, _, {no_debug_info, _}} = xref:add_module(s, Xbeam),
+
+ %% "app2" is ignored, the old application name is kept
+ ?line {ok, app1} = xref:replace_application(s, app1, A2),
+
+ ?line xref:stop(s),
+ ?line ok = file:delete(fname(EB1_0, "x.beam")),
+ ?line ok = file:delete(Xbeam),
+ ?line ok = file:delete(Ybeam),
+ ok.
+
+update(suite) -> [];
+update(doc) -> ["The update() function"];
+update(Conf) when is_list(Conf) ->
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"update"),
+ Source = fname(Dir, "x.erl"),
+ Beam = fname(Dir, "x.beam"),
+ ?line copy_file(fname(Dir, "x.erl.1"), Source),
+ ?line {ok, x} = compile:file(Source, [debug_info, {outdir,Dir}]),
+
+ ?line {ok, _} = start(s),
+ ?line ok = xref:set_default(s, [{verbose,false}, {warnings, false}]),
+ ?line {ok, [x]} = xref:add_directory(s, Dir, [{builtins,true}]),
+ ?line {error, _, {invalid_options,[not_an_option]}} =
+ xref:update(s, [not_an_option]),
+ ?line {ok, []} = xref:update(s),
+ ?line {ok, [{erlang,atom_to_list,1}]} = xref:q(s, "XU"),
+
+ ?line [{x, ModInfo}] = xref:info(s, modules, x),
+ ?line case keysearch(directory, 1, ModInfo) of
+ {value, {directory, Dir}} -> ok
+ end,
+
+ timer:sleep(2000), % make sure modification time has changed
+ ?line copy_file(fname(Dir, "x.erl.2"), Source),
+ ?line {ok, x} = compile:file(Source, [debug_info, {outdir,Dir}]),
+ ?line {ok, [x]} = xref:update(s, []),
+ ?line {ok, [{erlang,list_to_atom,1}]} = xref:q(s, "XU"),
+
+ timer:sleep(2000),
+ ?line {ok, x} = compile:file(Source, [no_debug_info,{outdir,Dir}]),
+ ?line {error, _, {no_debug_info, _}} = xref:update(s),
+
+ ?line xref:stop(s),
+ ?line ok = file:delete(Beam),
+ ?line ok = file:delete(Source),
+ ok.
+
+deprecated(suite) -> [];
+deprecated(doc) -> ["OTP-4695: Deprecated functions."];
+deprecated(Conf) when is_list(Conf) ->
+ Dir = ?copydir,
+ File = fname(Dir, "depr.erl"),
+ MFile_r9c = fname(Dir, "depr_r9c"),
+ MFile = fname(Dir, "depr"),
+ Beam = fname(Dir, "depr.beam"),
+ %% This file has been compiled to ?datadir/depr_r9c.beam
+ %% using the R9C compiler. From R10B and onwards the linter
+ %% checks the 'deprecated' attribute as well.
+% Test = <<"-module(depr).
+
+% -export([t/0,f/1,bar/2,f/2,g/3]).
+
+% -deprecated([{f,1}, % DF
+% {bar,2,eventually}]). % DF_3
+% -deprecated([{f,1,next_major_release}]). % DF_2 (again)
+% -deprecated([{frutt,0,next_version}]). % message...
+% -deprecated([{f,2,next_major_release}, % DF_2
+% {g,3,next_version}, % DF_1
+% {ignored,10,100}]). % message...
+% -deprecated([{does_not_exist,1}]). % message...
+
+% -deprecated(foo). % message...
+
+% t() ->
+% frutt(1),
+% g(1,2, 3),
+% ?MODULE:f(10).
+
+% f(A) ->
+% ?MODULE:f(A,A).
+
+% f(X, Y) ->
+% ?MODULE:g(X, Y, X).
+
+% g(F, G, H) ->
+% ?MODULE:bar(F, {G,H}).
+
+% bar(_, _) ->
+% true.
+
+% frutt(_) ->
+% frutt().
+
+% frutt() ->
+% true.
+% ">>,
+
+% ?line ok = file:write_file(File, Test),
+% ?line {ok, depr_r9c} = compile:file(File, [debug_info,{outdir,Dir}]),
+
+ ?line {ok, _} = xref:start(s),
+ ?line {ok, depr_r9c} = xref:add_module(s, MFile_r9c),
+ M9 = depr_r9c,
+ DF_1 = usort([{{M9,f,2},{M9,g,3}}]),
+ DF_2 = usort(DF_1++[{{M9,f,1},{M9,f,2}},{{M9,t,0},{M9,f,1}}]),
+ DF_3 = usort(DF_2++[{{M9,g,3},{M9,bar,2}}]),
+ DF = usort(DF_3++[{{M9,t,0},{M9,f,1}}]),
+
+ ?line {ok,DF} = xref:analyze(s, deprecated_function_calls),
+ ?line {ok,DF_1} =
+ xref:analyze(s, {deprecated_function_calls,next_version}),
+ ?line {ok,DF_2} =
+ xref:analyze(s, {deprecated_function_calls,next_major_release}),
+ ?line {ok,DF_3} =
+ xref:analyze(s, {deprecated_function_calls,eventually}),
+
+ D = to_external(range(from_term(DF))),
+ D_1 = to_external(range(from_term(DF_1))),
+ D_2 = to_external(range(from_term(DF_2))),
+ D_3 = to_external(range(from_term(DF_3))),
+
+ ?line {ok,D} = xref:analyze(s, deprecated_functions),
+ ?line {ok,D_1} =
+ xref:analyze(s, {deprecated_functions,next_version}),
+ ?line {ok,D_2} =
+ xref:analyze(s, {deprecated_functions,next_major_release}),
+ ?line {ok,D_3} =
+ xref:analyze(s, {deprecated_functions,eventually}),
+
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ Test2= <<"-module(depr).
+
+ -export([t/0,f/1,bar/2,f/2,g/3]).
+
+ -deprecated([{'_','_',eventually}]). % DF_3
+ -deprecated([{f,'_',next_major_release}]). % DF_2
+ -deprecated([{g,'_',next_version}]). % DF_1
+ -deprecated([{bar,2}]). % DF
+
+ t() ->
+ g(1,2, 3),
+ ?MODULE:f(10).
+
+ f(A) ->
+ ?MODULE:f(A,A).
+
+ f(X, Y) ->
+ ?MODULE:g(X, Y, X).
+
+ g(F, G, H) ->
+ ?MODULE:bar(F, {G,H}).
+
+ bar(_, _) ->
+ ?MODULE:t().
+ ">>,
+
+ ?line ok = file:write_file(File, Test2),
+ ?line {ok, depr} = compile:file(File, [debug_info,{outdir,Dir}]),
+
+ ?line {ok, _} = xref:start(s),
+ ?line {ok, depr} = xref:add_module(s, MFile),
+
+ M = depr,
+ DFa_1 = usort([{{M,f,2},{M,g,3}}]),
+ DFa_2 = usort(DFa_1++[{{M,f,1},{M,f,2}},{{M,t,0},{M,f,1}}]),
+ DFa_3 = usort(DFa_2++[{{M,bar,2},{M,t,0}},{{M,g,3},{M,bar,2}}]),
+ DFa = DFa_3,
+
+ ?line {ok,DFa} = xref:analyze(s, deprecated_function_calls),
+ ?line {ok,DFa_1} =
+ xref:analyze(s, {deprecated_function_calls,next_version}),
+ ?line {ok,DFa_2} =
+ xref:analyze(s, {deprecated_function_calls,next_major_release}),
+ ?line {ok,DFa_3} =
+ xref:analyze(s, {deprecated_function_calls,eventually}),
+
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ %% All of the module is deprecated.
+ Test3= <<"-module(depr).
+
+ -export([t/0,f/1,bar/2,f/2,g/3]).
+
+ -deprecated([{f,'_',next_major_release}]). % DF_2
+ -deprecated([{g,'_',next_version}]). % DF_1
+ -deprecated(module). % DF
+
+ t() ->
+ g(1,2, 3),
+ ?MODULE:f(10).
+
+ f(A) ->
+ ?MODULE:f(A,A).
+
+ f(X, Y) ->
+ ?MODULE:g(X, Y, X).
+
+ g(F, G, H) ->
+ ?MODULE:bar(F, {G,H}).
+
+ bar(_, _) ->
+ ?MODULE:t().
+ ">>,
+
+ ?line ok = file:write_file(File, Test3),
+ ?line {ok, depr} = compile:file(File, [debug_info,{outdir,Dir}]),
+
+ ?line {ok, _} = xref:start(s),
+ ?line {ok, depr} = xref:add_module(s, MFile),
+
+ DFb_1 = usort([{{M,f,2},{M,g,3}}]),
+ DFb_2 = usort(DFb_1++[{{M,f,1},{M,f,2}},{{M,t,0},{M,f,1}}]),
+ DFb_3 = DFb_2,
+ DFb = usort(DFb_2++[{{M,bar,2},{M,t,0}},{{M,g,3},{M,bar,2}}]),
+
+ ?line {ok,DFb} = xref:analyze(s, deprecated_function_calls),
+ ?line {ok,DFb_1} =
+ xref:analyze(s, {deprecated_function_calls,next_version}),
+ ?line {ok,DFb_2} =
+ xref:analyze(s, {deprecated_function_calls,next_major_release}),
+ ?line {ok,DFb_3} =
+ xref:analyze(s, {deprecated_function_calls,eventually}),
+
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ ?line ok = file:delete(File),
+ ?line ok = file:delete(Beam),
+ ok.
+
+
+trycatch(suite) -> [];
+trycatch(doc) -> ["OTP-5152: try/catch, final (?) version."];
+trycatch(Conf) when is_list(Conf) ->
+ Dir = ?copydir,
+ File = fname(Dir, "trycatch.erl"),
+ MFile = fname(Dir, "trycatch"),
+ Beam = fname(Dir, "trycatch.beam"),
+ Test = <<"-module(trycatch).
+
+ -export([trycatch/0]).
+
+ trycatch() ->
+ try
+ foo:bar(),
+ bar:foo() of
+ 1 -> foo:foo();
+ 2 -> bar:bar()
+ catch
+ error:a -> err:e1();
+ error:b -> err:e2()
+ after
+ fini:shed()
+ end.
+ ">>,
+
+ ?line ok = file:write_file(File, Test),
+ ?line {ok, trycatch} = compile:file(File, [debug_info,{outdir,Dir}]),
+
+ ?line {ok, _} = xref:start(s),
+ ?line {ok, trycatch} = xref:add_module(s, MFile),
+ A = trycatch,
+ {ok,[{{{A,A,0},{bar,bar,0}},[10]},
+ {{{A,A,0},{bar,foo,0}},[8]},
+ {{{A,A,0},{err,e1,0}},[12]},
+ {{{A,A,0},{err,e2,0}},[13]},
+ {{{A,A,0},{fini,shed,0}},[15]},
+ {{{A,A,0},{foo,bar,0}},[7]},
+ {{{A,A,0},{foo,foo,0}},[9]}]} =
+ xref:q(s, "(Lin) (E | trycatch:trycatch/0)"),
+
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ ?line ok = file:delete(File),
+ ?line ok = file:delete(Beam),
+ ok.
+
+
+abstract_modules(suite) -> [];
+abstract_modules(doc) -> ["OTP-5520: Abstract (parameterized) modules."];
+abstract_modules(Conf) when is_list(Conf) ->
+ Dir = ?copydir,
+ File = fname(Dir, "absmod.erl"),
+ MFile = fname(Dir, "absmod"),
+ Beam = fname(Dir, "absmod.beam"),
+ Test = <<"-module(param, [A, B]).
+
+ -export([args/1]).
+
+ args(C) ->
+ X = local(C),
+ Y = THIS:new(), % undef
+ Z = new(A, B),
+ {X, Y, Z}.
+
+ local(C) ->
+ module_info(C).
+ ">>,
+
+ ?line ok = file:write_file(File, Test),
+
+ %% 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, _} = xref:start(s),
+ ?line {ok, param} = xref:add_module(s, MFile, {warnings,false}),
+ A = param,
+ ?line {ok, [{{{A,args,1},{'$M_EXPR',new,0}},[7]},
+ {{{A,args,1},{A,local,1}},[6]},
+ {{{A,args,1},{A,new,2}},[8]},
+ {{{A,local,1},{A,module_info,1}},[12]},
+ {{{param,new,2},{param,instance,2}},[0]}]} =
+ xref:q(s, "(Lin) E"),
+ ?line {ok,[{param,args,1},
+ {param,instance,2},
+ {param,local,1},
+ {param,module_info,1},
+ {param,new,2}]} = xref:q(s, "F"),
+
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ ?line {ok, _} = xref:start(s, {xref_mode, modules}),
+ ?line {ok, param} = xref:add_module(s, MFile),
+ ?line {ok,[{param,args,1},
+ {param,instance,2},
+ {param,new,2}]} = xref:q(s, "X"),
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ ?line ok = file:delete(File),
+ ?line ok = file:delete(Beam),
+ ok.
+
+fun_mfa(suite) -> [];
+fun_mfa(doc) -> ["OTP-5653: fun M:F/A."];
+fun_mfa(Conf) when is_list(Conf) ->
+ Dir = ?copydir,
+ File = fname(Dir, "fun_mfa.erl"),
+ MFile = fname(Dir, "fun_mfa"),
+ Beam = fname(Dir, "fun_mfa.beam"),
+ Test = <<"-module(fun_mfa).
+
+ -export([t/0, t1/0, t2/0, t3/0]).
+
+ t() ->
+ F = fun ?MODULE:t/0,
+ (F)().
+
+ t1() ->
+ F = fun t/0,
+ (F)().
+
+ t2() ->
+ fun ?MODULE:t/0().
+
+ t3() ->
+ fun t3/0().
+ ">>,
+
+ ?line ok = file:write_file(File, Test),
+ A = fun_mfa,
+ ?line {ok, A} = compile:file(File, [debug_info,{outdir,Dir}]),
+ ?line {ok, _} = xref:start(s),
+ ?line {ok, A} = xref:add_module(s, MFile, {warnings,false}),
+ ?line {ok, [{{{A,t,0},{'$M_EXPR','$F_EXPR',0}},[7]},
+ {{{A,t,0},{A,t,0}},[6]},
+ {{{A,t1,0},{'$M_EXPR','$F_EXPR',0}},[11]},
+ {{{A,t1,0},{A,t,0}},[10]},
+ {{{A,t2,0},{A,t,0}},[14]},
+ {{{A,t3,0},{fun_mfa,t3,0}},[17]}]} =
+ xref:q(s, "(Lin) E"),
+
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ ?line ok = file:delete(File),
+ ?line ok = file:delete(Beam),
+ ok.
+
+qlc(suite) -> [];
+qlc(doc) -> ["OTP-5195: A bug fix when using qlc:q/1,2."];
+qlc(Conf) when is_list(Conf) ->
+ Dir = ?copydir,
+ File = fname(Dir, "qlc.erl"),
+ MFile = fname(Dir, "qlc"),
+ Beam = fname(Dir, "qlc.beam"),
+ Test = <<"-module(qlc).
+
+ -include_lib(\"stdlib/include/qlc.hrl\").
+
+ -export([t/0]).
+
+ t() ->
+ dets:open_file(t, []),
+ dets:insert(t, [{1,a},{2,b},{3,c},{4,d}]),
+ MS = ets:fun2ms(fun({X,Y}) when (X > 1) or (X < 5) -> {Y}
+ end),
+ QH1 = dets:table(t, [{traverse, {select, MS}}]),
+ QH2 = qlc:q([{Y} || {X,Y} <- dets:table(t),
+ (X > 1) or (X < 5)]),
+ true = qlc:info(QH1) =:= qlc:info(QH2),
+ dets:close(t),
+ ok.
+ ">>,
+
+ ?line ok = file:write_file(File, Test),
+ A = qlc,
+ ?line {ok, A} = compile:file(File, [debug_info,{outdir,Dir}]),
+ ?line {ok, _} = xref:start(s),
+ ?line {ok, A} = xref:add_module(s, MFile, {warnings,false}),
+ ?line {ok, _} = xref:q(s, "(Lin) E"), % is can be loaded
+
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ ?line ok = file:delete(File),
+ ?line ok = file:delete(Beam),
+ ok.
+
+
+analyses(suite) ->
+ [analyze, basic, md, q, variables, unused_locals].
+
+analyze(suite) -> [];
+analyze(doc) -> ["Simple analyses"];
+analyze(Conf) when is_list(Conf) ->
+ S0 = new(),
+ ?line {{error, _, {invalid_options,[not_an_option]}}, _} =
+ xref_base:analyze(S0, undefined_function_calls, [not_an_option]),
+ ?line {{error, _, {invalid_query,{q}}}, _} = xref_base:q(S0,{q}),
+ ?line {{error, _, {unknown_analysis,foo}}, _} = xref_base:analyze(S0, foo),
+ ?line {{error, _, {unknown_constant,"foo:bar/-1"}}, _} =
+ xref_base:analyze(S0, {use,{foo,bar,-1}}),
+
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"rel2"),
+ X = fname(Dir, "x.erl"),
+ Y = fname(Dir, "y.erl"),
+ A1_1 = fname([Dir,"lib","app1-1.1"]),
+ A2 = fname([Dir,"lib","app2-1.1"]),
+ EB1_1 = fname(A1_1, "ebin"),
+ EB2 = fname(A2, "ebin"),
+ Xbeam = fname(EB2, "x.beam"),
+ Ybeam = fname(EB1_1, "y.beam"),
+
+ ?line {ok, x} = compile:file(X, [debug_info, {outdir,EB2}]),
+ ?line {ok, y} = compile:file(Y, [debug_info, {outdir,EB1_1}]),
+
+ ?line {ok, rel2, S1} = xref_base:add_release(S0, Dir, [{verbose,false}]),
+ ?line S = set_up(S1),
+
+ ?line {ok, _} =
+ analyze(undefined_function_calls, [{{x,xx,0},{x,undef,0}}], S),
+ ?line {ok, _} = analyze(undefined_functions, [{x,undef,0}], S),
+ ?line {ok, _} = analyze(locals_not_used, [{x,l,0},{x,l1,0}], S),
+ ?line {ok, _} = analyze(exports_not_used, [{x,xx,0},{y,t,0}], S),
+
+ ?line {ok, _} =
+ analyze(deprecated_function_calls, [{{y,t,0},{x,t,0}}], S),
+ ?line {ok, _} = analyze({deprecated_function_calls,next_version}, [], S),
+ ?line {ok, _} =
+ analyze({deprecated_function_calls,next_major_release}, [], S),
+ ?line {ok, _} = analyze({deprecated_function_calls,eventually},
+ [{{y,t,0},{x,t,0}}], S),
+ ?line {ok, _} = analyze(deprecated_functions, [{x,t,0}], S),
+ ?line {ok, _} = analyze({deprecated_functions,next_version}, [], S),
+ ?line {ok, _} =
+ analyze({deprecated_functions,next_major_release}, [], S),
+ ?line {ok, _} = analyze({deprecated_functions,eventually}, [{x,t,0}], S),
+
+ ?line {ok, _} = analyze({call, {x,xx,0}}, [{x,undef,0}], S),
+ ?line {ok, _} =
+ analyze({call, [{x,xx,0},{x,l,0}]}, [{x,l1,0},{x,undef,0}], S),
+ ?line {ok, _} = analyze({use, {x,l,0}}, [{x,l1,0}], S),
+ ?line {ok, _} =
+ analyze({use, [{x,l,0},{x,l1,0}]}, [{x,l,0},{x,l1,0}], S),
+
+ ?line {ok, _} = analyze({module_call, x}, [x], S),
+ ?line {ok, _} = analyze({module_call, [x,y]}, [x], S),
+ ?line {ok, _} = analyze({module_use, x}, [x,y], S),
+ ?line {ok, _} = analyze({module_use, [x,y]}, [x,y], S),
+
+ ?line {ok, _} = analyze({application_call, app1}, [app2], S),
+ ?line {ok, _} = analyze({application_call, [app1,app2]}, [app2], S),
+ ?line {ok, _} = analyze({application_use, app2}, [app1,app2], S),
+ ?line {ok, _} = analyze({application_use, [app1,app2]}, [app1,app2], S),
+
+ ?line ok = xref_base:delete(S),
+ ?line ok = file:delete(Xbeam),
+ ?line ok = file:delete(Ybeam),
+ ok.
+
+basic(suite) -> [];
+basic(doc) -> ["Use of operators"];
+basic(Conf) when is_list(Conf) ->
+ ?line S0 = new(),
+
+ F1 = {m1,f1,1},
+ F6 = {m1,f2,6}, % X
+ F2 = {m2,f1,2},
+ F3 = {m2,f2,3}, % X
+ F7 = {m2,f3,7}, % X
+ F4 = {m3,f1,4}, % X
+ F5 = {m3,f2,5},
+
+ UF1 = {m1,f12,17},
+ UF2 = {m17,f17,177},
+
+ E1 = {F1,F3}, % X
+ E2 = {F6,F7}, % X
+ E3 = {F2,F6}, % X
+ E4 = {F1,F4}, % X
+ E5 = {F4,F5},
+ E6 = {F7,F4}, % X
+ E7 = {F1,F6},
+
+ UE1 = {F2,UF2}, % X
+ UE2 = {F5,UF1}, % X
+
+ D1 = {F1,12},
+ D6 = {F6,3},
+ DefAt_m1 = [D1,D6],
+ X_m1 = [F6],
+ % L_m1 = [F1],
+ XC_m1 = [E1,E2,E4],
+ LC_m1 = [E7],
+ LCallAt_m1 = [{E7,12}],
+ XCallAt_m1 = [{E1,13},{E2,17},{E4,7}],
+ Info1 = #xref_mod{name = m1, app_name = [a1]},
+ ?line S1 = add_module(S0, Info1, DefAt_m1, X_m1, LCallAt_m1, XCallAt_m1,
+ XC_m1, LC_m1),
+
+ D2 = {F2,7},
+ D3 = {F3,9},
+ D7 = {F7,19},
+ DefAt_m2 = [D2,D3,D7],
+ X_m2 = [F3,F7],
+ % L_m2 = [F2],
+ XC_m2 = [E3,E6,UE1],
+ LC_m2 = [],
+ LCallAt_m2 = [],
+ XCallAt_m2 = [{E3,96},{E6,12},{UE1,77}],
+ Info2 = #xref_mod{name = m2, app_name = [a2]},
+ ?line S2 = add_module(S1, Info2, DefAt_m2, X_m2, LCallAt_m2, XCallAt_m2,
+ XC_m2, LC_m2),
+
+ D4 = {F4,6},
+ D5 = {F5,97},
+ DefAt_m3 = [D4,D5],
+ X_m3 = [F4],
+ % L_m3 = [F5],
+ XC_m3 = [UE2],
+ LC_m3 = [E5],
+ LCallAt_m3 = [{E5,19}],
+ XCallAt_m3 = [{UE2,22}],
+ Info3 = #xref_mod{name = m3, app_name = [a3]},
+ ?line S3 = add_module(S2, Info3, DefAt_m3, X_m3, LCallAt_m3, XCallAt_m3,
+ XC_m3, LC_m3),
+
+ Info4 = #xref_mod{name = m4, app_name = [a2]},
+ ?line S4 = add_module(S3, Info4, [], [], [], [], [], []),
+
+ AppInfo1 = #xref_app{name = a1, rel_name = [r1]},
+ ?line S9 = add_application(S4, AppInfo1),
+ AppInfo2 = #xref_app{name = a2, rel_name = [r1]},
+ ?line S10 = add_application(S9, AppInfo2),
+ AppInfo3 = #xref_app{name = a3, rel_name = [r2]},
+ ?line S11 = add_application(S10, AppInfo3),
+
+ RelInfo1 = #xref_rel{name = r1},
+ ?line S12 = add_release(S11, RelInfo1),
+ RelInfo2 = #xref_rel{name = r2},
+ ?line S13 = add_release(S12, RelInfo2),
+
+ ?line S = set_up(S13),
+
+ ?line {ok, _} = eval("[m1,m2] + m:f/1", unknown_constant, S),
+ ?line {ok, _} = eval("[m1, m2, m:f/1]", type_mismatch, S),
+
+ ?line {ok, _} = eval("[m1, m1->m2]", type_mismatch, S),
+ ?line {ok, _} = eval("components:f/1", unknown_constant, S),
+ ?line {ok, _} = eval("'of':f/1", unknown_constant, S),
+ ?line {ok, _} = eval("of:f/1", parse_error, S),
+ ?line {ok, _} = eval("components", unknown_constant, S),
+ ?line {ok, _} = eval("[components, of, closure]", parse_error, S),
+ ?line {ok, _} = eval("[components, 'of', closure]", unknown_constant, S),
+
+ ?line {ok, _} = eval("[a1->a2,m1->m2]", type_mismatch, S),
+ ?line {ok, _} = eval("a1->a2,m1->m2", parse_error, S),
+
+ ?line {ok, _} = eval("m1->a1", type_mismatch, S),
+ ?line {ok, _} = eval("[{m1,f1,1}] : App", parse_error, S),
+ ?line {ok, _} = eval("[{m1,f1,1}] : Fun", [F1], S),
+ ?line {ok, _} = eval("range X", type_error, S),
+ ?line {ok, _} = eval("domain X", type_error, S),
+ ?line {ok, _} = eval("range M", type_error, S),
+ ?line {ok, _} = eval("domain M", type_error, S),
+
+ % Misc.
+ ?line {ok, _} = eval("not_a_prefix_operator m1", parse_error, S),
+ ?line {ok, _} = eval(f("(Mod) ~p", [[F1,F6,F5]]), [m1,m3], S),
+ ?line {ok, _} = eval("(Lin) M - (Lin) m1",
+ [{F2,7},{F3,9},{F7,19},{F4,6},{F5,97},{UF2,0}], S),
+ ?line {ok, _} = eval(f("(Lin) M * (Lin) ~p", [[F1,F6]]),
+ [{F1,12},{F6,3}], S),
+
+ ?line {ok, _} = eval(f("X * ~p", [[F1, F2, F3, F4, F5]]), [F3, F4], S),
+ ?line {ok, _} = eval("X", [F6,F3,F7,F4], S),
+ ?line {ok, _} = eval("X * AM", [F6,F3,F7,F4], S),
+ ?line {ok, _} = eval("X * a2", [F3,F7], S),
+
+ ?line {ok, _} = eval("L * r1", [F1,F2], S),
+ ?line {ok, _} = eval("U", [UF1, UF2], S),
+ ?line {ok, _} = eval("U * AM", [UF1], S),
+ ?line {ok, _} = eval("U * UM", [UF2], S),
+ ?line {ok, _} = eval("XU * [m1, m2]", [F6,F3,F7,UF1], S),
+ ?line {ok, _} = eval("LU * [m3, m4]", [F5], S),
+ ?line {ok, _} = eval("UU", [F1,F2], S),
+
+ ?line {ok, _} = eval("XC | m1", [E1,E2,E4], S),
+ ?line {ok, _} = eval(f("XC | ~p", [F1]), [E1,E4], S),
+ ?line {ok, _} = eval(f("(XXL) (Lin) (XC | ~p)", [F1]),
+ [{{D1,D3},[13]},{{D1,D4},[7]}],S),
+ ?line {ok, _} = eval(f("XC | (~p + ~p)", [F1, F2]), [E1,E4,E3,UE1], S),
+ ?line {ok, _} = eval(f("(XXL) (Lin) (XC | ~p)", [F1]),
+ [{{D1,D3},[13]},{{D1,D4},[7]}], S),
+ ?line {ok, _} = eval("LC | m3", [E5], S),
+ ?line {ok, _} = eval(f("LC | ~p", [F1]), [E7], S),
+ ?line {ok, _} = eval(f("LC | (~p + ~p)", [F1, F4]), [E7, E5], S),
+ ?line {ok, _} = eval("E | m1", [E1,E2,E4,E7], S),
+ ?line {ok, _} = eval(f("E | ~p", [F1]), [E1,E7,E4], S),
+ ?line {ok, _} = eval(f("E | (~p + ~p)", [F1, F2]), [E1,E7,E4,E3,UE1], S),
+
+ ?line {ok, _} = eval("XC || m1", [E3,UE2], S),
+ ?line {ok, _} = eval(f("XC || ~p", [F6]), [E3], S),
+ ?line {ok, _} = eval(f("XC || (~p + ~p)", [F4, UF2]), [UE1,E4,E6], S),
+ ?line {ok, _} = eval("LC || m3", [E5], S),
+ ?line {ok, _} = eval(f("LC || ~p", [F1]), [], S),
+ ?line {ok, _} = eval(f("LC || ~p", [F6]), [E7], S),
+ ?line {ok, _} = eval(f("LC || (~p + ~p)", [F5, F6]), [E7,E5], S),
+ ?line {ok, _} = eval("E || m1", [E3,UE2,E7], S),
+ ?line {ok, _} = eval(f("E || ~p", [F6]), [E3,E7], S),
+ ?line {ok, _} = eval(f("E || (~p + ~p)", [F3,F4]), [E1,E4,E6], S),
+
+ ?line {ok, _} = eval(f("~p + ~p", [F1,F2]), [F1,F2], S),
+ ?line {ok, _} = eval(f("~p * ~p", [m1,[F1,F6,F2]]), [F1,F6], S),
+ ?line {ok, _} = eval(f("~p * ~p", [F1,F2]), [], S),
+
+ %% range, domain
+ ?line {ok, _} = eval("range (E || m1)", [F6,UF1], S),
+ ?line {ok, _} = eval("domain (E || m1)", [F1,F2,F5], S),
+ ?line {ok, _} = eval(f("E | domain ~p", [[E1, {F2,F4}]]),
+ [E1,E7,E4,E3,UE1], S),
+
+ %% components, condensation, use, call
+ ?line {ok, _} = eval("(Lin) components E", type_error, S),
+ ?line {ok, _} = eval("components (Lin) E", type_error, S),
+ ?line {ok, _} = eval("components V", type_error, S),
+ ?line {ok, _} = eval("components E + components E", type_error, S),
+
+ ?line {ok, _} = eval(f("range (closure E | ~p)", [[F1,F2]]),
+ [F6,F3,F7,F4,F5,UF1,UF2], S),
+ ?line {ok, _} =
+ eval(f("domain (closure E || ~p)", [[UF2,F7]]), [F1,F2,F6], S),
+ ?line {ok, _} = eval("components E", [], S),
+ ?line {ok, _} = eval("components (Mod) E", [[m1,m2,m3]], S),
+ ?line {ok, _} = eval("components closure (Mod) E", [[m1,m2,m3]], S),
+ ?line {ok, _} = eval("condensation (Mod) E",
+ [{[m1,m2,m3],[m1,m2,m3]},{[m1,m2,m3],[m17]}], S),
+ ?line {ok, _} = eval("condensation closure (Mod) E",
+ [{[m1,m2,m3],[m1,m2,m3]},{[m1,m2,m3],[m17]}], S),
+ ?line {ok, _} = eval("condensation closure closure closure (Mod) E",
+ [{[m1,m2,m3],[m1,m2,m3]},{[m1,m2,m3],[m17]}], S),
+ ?line {ok, _} = eval("weak condensation (Mod) E",
+ [{[m1,m2,m3],[m1,m2,m3]},{[m1,m2,m3],[m17]},{[m17],[m17]}], S),
+ ?line {ok, _} = eval("strict condensation (Mod) E",
+ [{[m1,m2,m3],[m17]}], S),
+ ?line {ok, _} = eval("range condensation (Mod) E",
+ [[m1,m2,m3],[m17]], S),
+ ?line {ok, _} = eval("domain condensation (Mod) E",
+ [[m1,m2,m3]], S),
+
+ %% |, ||, |||
+ ?line {ok, _} = eval("(Lin) E || V", type_error, S),
+ ?line {ok, _} = eval("E ||| (Lin) V", type_error, S),
+ ?line {ok, _} = eval("E ||| m1", [E7], S),
+ ?line {ok, _} = eval("closure E ||| m1", [E7,{F1,UF1},{F6,UF1}], S),
+ ?line {ok, _} = eval("closure E ||| [m1,m2]",
+ [{F1,UF1},{F2,F7},{F1,F7},{F6,UF1},{F2,UF1},{F7,UF1},E7,E1,E2,E3], S),
+ ?line {ok, _} = eval("AE | a1", [{a1,a1},{a1,a2},{a1,a3}], S),
+
+ %% path ('of')
+ ?line {ok, _} = eval("(Lin) {m1,m2} of E", type_error, S),
+ ?line {ok, _} = eval("{m1,m2} of (Lin) E", type_error, S),
+ ?line [m1,m2] = eval("{m1,m2} of {m1,m2}", S),
+ ?line {ok, _} = eval("{m1,m2} of m1", type_error, S),
+ ?line {ok, _} = eval("{a3,m1} of ME", type_mismatch, S),
+ ?line [m1,m1] = eval("{m1} of ME", S),
+ ?line [m1,m1] = eval("{m1} of closure closure ME", S),
+ ?line false = eval("{m17} of ME", S),
+ ?line [m2,m1,m2] = eval("{m2} : Mod of ME", S),
+ ?line [m1,m2,m17] = eval("{m1, m17} of ME", S),
+ ?line [m1,m2,m17] = eval("m1 -> m17 of ME", S),
+ ?line {ok, _} = eval("[m1->m17,m17->m1] of ME", type_error, S),
+ ?line case eval(f("~p of E", [{F1,F7,UF1}]), S) of
+ [F1,F6,F7,F4,F5,UF1] -> ok
+ end,
+ ?line [a2,a1,a2] = eval("{a2} of AE", S),
+
+ %% weak/strict
+ ?line {ok, _} = eval("weak {m1,m2}", [{m1,m1},{m1,m2},{m2,m2}], S),
+ ?line {ok, _} = eval("strict [{m1,m1},{m1,m2},{m2,m2}]", [{m1,m2}], S),
+ ?line {ok, _} = eval("range weak [{m1,m2}] : Mod", [m1,m2], S),
+ ?line {ok, _} = eval("domain strict [{m1,m1},{m1,m2},{m2,m2}]", [m1], S),
+
+ %% #, number of
+ ?line {ok, _} = eval("# [{r1,r2}] : Rel", 1, S),
+ ?line {ok, _} = eval("# [{a3,a1}] : App", 1, S),
+ ?line {ok, _} = eval("# AE", 7, S),
+ ?line {ok, _} = eval("# ME", 8, S),
+ ?line {ok, _} = eval("# AE + # ME", 15, S),
+ ?line {ok, _} = eval("# AE * # ME", 56, S),
+ ?line {ok, _} = eval("# AE - # ME", -1, S),
+ ?line {ok, _} = eval("# E", 9, S),
+ ?line {ok, _} = eval("# V", 9, S),
+ ?line {ok, _} = eval("# (Lin) E", 9, S),
+ ?line {ok, _} = eval("# (ELin) E", 7, S),
+ ?line {ok, _} = eval("# closure E", type_error, S),
+ ?line {ok, _} = eval("# weak {m1,m2}", 3, S),
+ ?line {ok, _} = eval("#strict condensation (Mod) E", 1, S),
+ ?line {ok, _} = eval("#components closure (Mod) E", 1, S),
+ ?line {ok, _} = eval("# range strict condensation (Mod) E", 1, S),
+ ok.
+
+md(suite) -> [];
+md(doc) -> ["The xref:m() and xref:d() functions"];
+md(Conf) when is_list(Conf) ->
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"md"),
+ X = fname(Dir, "x__x.erl"),
+ Y = fname(Dir, "y__y.erl"),
+ Xbeam = fname(Dir, "x__x.beam"),
+ Ybeam = fname(Dir, "y__y.beam"),
+
+ ?line {error, _, {invalid_filename,{foo,bar}}} = xref:m({foo,bar}),
+ ?line {error, _, {invalid_filename,{foo,bar}}} = xref:d({foo,bar}),
+
+ ?line {ok, x__x} = compile:file(X, [debug_info, {outdir,Dir}]),
+ ?line {ok, y__y} = compile:file(Y, [debug_info, {outdir,Dir}]),
+
+ ?line {error, _, {no_such_module, foo_bar}} = xref:m(foo_bar),
+ ?line OldPath = code:get_path(),
+ ?line true = code:set_path([Dir | OldPath]),
+ ?line MInfo = xref:m(x__x),
+ ?line [{{x__x,t,1},{y__y,t,2}}] = info_tag(MInfo, undefined),
+ ?line [] = info_tag(MInfo, unused),
+ ?line [] = info_tag(MInfo, deprecated),
+ ?line DInfo = xref:d(Dir),
+ ?line [{{x__x,t,1},{y__y,t,2}}] = info_tag(DInfo, undefined),
+ ?line [{y__y,l,0},{y__y,l1,0}] = info_tag(DInfo, unused),
+ ?line [] = info_tag(MInfo, deprecated),
+
+ %% Switch from 'functions' mode to 'modules' mode.
+ ?line {ok, x__x} = compile:file(X, [no_debug_info, {outdir,Dir}]),
+ ?line {ok, y__y} = compile:file(Y, [no_debug_info, {outdir,Dir}]),
+ ?line MInfoMod = xref:m(x__x),
+ ?line [{y__y,t,2}] = info_tag(MInfoMod, undefined),
+ ?line [] = info_tag(MInfo, deprecated),
+ ?line DInfoMod = xref:d(Dir),
+ ?line [{y__y,t,2}] = info_tag(DInfoMod, undefined),
+ ?line [] = info_tag(MInfo, deprecated),
+
+ ?line true = code:set_path(OldPath),
+ ?line ok = file:delete(Xbeam),
+ ?line ok = file:delete(Ybeam),
+ ok.
+
+q(suite) -> [];
+q(doc) -> ["User queries"];
+q(Conf) when is_list(Conf) ->
+ ?line S0 = new(),
+ ?line {ok, _} = eval("'foo", parse_error, S0),
+ ?line {ok, _} = eval("TT = E, TT = V", variable_reassigned, S0),
+ ?line {ok, _} = eval("TT = E, TTT", unknown_variable, S0),
+ ?line {ok, S} = eval("TT := E", [], S0),
+ ?line {ok, S1} = eval("TT * TT * TT", [], S),
+ ?line {ok, _S2} = xref_base:forget(S1, 'TT'),
+ ok.
+
+variables(suite) -> [];
+variables(doc) -> ["Setting and getting values of query variables"];
+variables(Conf) when is_list(Conf) ->
+ ?line Sa = new(),
+ ?line {{error, _, {invalid_options,[not_an_option]}}, _} =
+ xref_base:variables(Sa, [not_an_option]),
+ ?line {error, _, {not_user_variable,foo}} = xref_base:forget(Sa, foo),
+ ?line Sa1 = set_up(Sa),
+ ?line {error, _, {not_user_variable,foo}} = xref_base:forget(Sa1, foo),
+ ?line ok = xref_base:delete(Sa1),
+
+ ?line S0 = new(),
+
+ F1 = {m1,f1,1},
+ F2 = {m2,f1,2},
+ Lib = {lib1,f1,1}, % undefined
+
+ E1 = {F1,F2},
+ E2 = {F2,F1},
+ E3 = {F1,Lib},
+
+ D1 = {F1,12},
+ DefAt_m1 = [D1],
+ X_m1 = [F1],
+ % L_m1 = [],
+ XC_m1 = [E1,E3],
+ LC_m1 = [],
+ LCallAt_m1 = [],
+ XCallAt_m1 = [{E1,13},{E3,17}],
+ Info1 = #xref_mod{name = m1, app_name = [a1]},
+ ?line S1 = add_module(S0, Info1, DefAt_m1, X_m1, LCallAt_m1, XCallAt_m1,
+ XC_m1, LC_m1),
+
+ D2 = {F2,7},
+ DefAt_m2 = [D2],
+ X_m2 = [F2],
+ % L_m2 = [],
+ XC_m2 = [E2],
+ LC_m2 = [],
+ LCallAt_m2 = [],
+ XCallAt_m2 = [{E2,96}],
+ Info2 = #xref_mod{name = m2, app_name = [a2]},
+ ?line S2 = add_module(S1, Info2, DefAt_m2, X_m2, LCallAt_m2, XCallAt_m2,
+ XC_m2, LC_m2),
+
+ ?line S = set_up(S2),
+
+ ?line eval("T1=E, T2=E*T1, T3 = T2*T2, T4=range T3, T5=T3|T4, T5",
+ [E1,E2,E3], S),
+ ?line eval("((E*E)*(E*E)) | (range ((E*E)*(E*E)))",
+ [E1,E2,E3], S),
+ ?line eval("T1=V*V,T2=T1*V,T3=V*V*V,T3",
+ [F1,F2,Lib], S),
+ ?line eval("T1=V*V, T2=V*V, T1*T2",
+ [F1,F2,Lib], S),
+
+ ?line {ok, S100} = eval("T0 := E", [E1, E2, E3], S),
+ ?line {ok, S101} = eval("T1 := E | m1", [E1, E3], S100),
+ ?line {ok, S102} = eval("T2 := E | m2", [E2], S101),
+ ?line {{ok, [{user, ['T0', 'T1', 'T2']}]}, _} = xref_base:variables(S102),
+ ?line {ok, S103} = xref_base:forget(S102, 'T0'),
+ ?line {{ok, [{user, ['T1', 'T2']}]}, S104} =
+ xref_base:variables(S103, [user]),
+ ?line {ok, S105} = xref_base:forget(S104),
+ ?line {{ok, [{user, []}]}, S106} = xref_base:variables(S105),
+ ?line {{ok, [{predefined,_}]}, S107_0} =
+ xref_base:variables(S106, [predefined]),
+
+ ?line {ok, S107_1} =
+ eval("TT := E, TT2 := V, TT1 := TT * TT", [E1,E2,E3], S107_0),
+ ?line {{ok, [{user, ['TT', 'TT1', 'TT2']}]}, _} =
+ xref_base:variables(S107_1),
+ ?line {ok, S107} = xref_base:forget(S107_1),
+
+ CopyDir = ?copydir,
+ ?line Dir = fname(CopyDir,"lib_test"),
+ Beam = fname(Dir, "lib1.beam"),
+
+ ?line copy_file(fname(Dir, "lib1.erl"), Beam),
+ ?line {ok, S108} =
+ xref_base:set_library_path(S107, [Dir], [{verbose,false}]),
+ ?line {{error, _, _}, _} = xref_base:variables(S108, [{verbose,false}]),
+ ?line {ok, S109} = xref_base:set_library_path(S108, [], [{verbose,false}]),
+
+ ?line Tabs = length(ets:all()),
+
+ ?line {ok, S110} = eval("Eplus := closure E, TT := Eplus",
+ 'closure()', S109),
+ ?line {{ok, [{user, ['Eplus','TT']}]}, S111} = xref_base:variables(S110),
+ ?line {ok, S112} = xref_base:forget(S111, ['TT','Eplus']),
+ ?line true = Tabs =:= length(ets:all()),
+
+ ?line {ok, NS0} = eval("Eplus := closure E", 'closure()', S112),
+ ?line {{ok, [{user, ['Eplus']}]}, NS} = xref_base:variables(NS0),
+ ?line ok = xref_base:delete(NS),
+ ?line true = Tabs =:= length(ets:all()),
+
+ ?line ok = file:delete(Beam),
+ ok.
+
+unused_locals(suite) -> [];
+unused_locals(doc) -> ["OTP-5071. Too many unused functions."];
+unused_locals(Conf) when is_list(Conf) ->
+ Dir = ?copydir,
+
+ File1 = fname(Dir, "a.erl"),
+ MFile1 = fname(Dir, "a"),
+ Beam1 = fname(Dir, "a.beam"),
+ Test1 = <<"-module(a).
+ -export([f/1, g/2]).
+
+ f(X) ->
+ Y = b:f(X),
+ Z = b:g(Y),
+ start(b, h, [Z]).
+
+ g(X, Y) ->
+ ok.
+
+ start(M, F, A) ->
+ spawn(M, F, A).
+ ">>,
+ ?line ok = file:write_file(File1, Test1),
+ ?line {ok, a} = compile:file(File1, [debug_info,{outdir,Dir}]),
+
+ File2 = fname(Dir, "b.erl"),
+ MFile2 = fname(Dir, "b"),
+ Beam2 = fname(Dir, "b.beam"),
+ Test2 = <<"-module(b).
+ -export([f/1, g/2]).
+
+ f(X) ->
+ io:write(\"~w\", [X]),
+ a:start(timer, sleep, [1000]).
+
+ g(X, Y) ->
+ apply(a, g, [X, Y]).
+ ">>,
+
+ ?line ok = file:write_file(File2, Test2),
+ ?line {ok, b} = compile:file(File2, [debug_info,{outdir,Dir}]),
+
+ ?line {ok, _} = xref:start(s),
+ ?line {ok, a} = xref:add_module(s, MFile1),
+ ?line {ok, b} = xref:add_module(s, MFile2),
+ ?line {ok, []} = xref:analyse(s, locals_not_used),
+ ?line ok = check_state(s),
+ ?line xref:stop(s),
+
+ ?line ok = file:delete(File1),
+ ?line ok = file:delete(Beam1),
+ ?line ok = file:delete(File2),
+ ?line ok = file:delete(Beam2),
+ ok.
+
+misc(suite) ->
+ [format_error, otp_7423, otp_7831].
+
+format_error(suite) -> [];
+format_error(doc) -> ["Format error messages"];
+format_error(Conf) when is_list(Conf) ->
+ ?line {ok, _Pid} = start(s),
+ ?line ok = xref:set_default(s, [{verbose,false}, {warnings, false}]),
+
+ %% Parse error messages.
+ ?line 'Invalid regular expression "add(": unterminated \`(\'\n'
+ = fatom(xref:q(s,'"add("')),
+ ?line 'Invalid operator foo\n' =
+ fatom(xref:q(s,'foo E')),
+ ?line 'Invalid wildcard variable \'_Var\' (only \'_\' is allowed)\n'
+ = fatom(xref:q(s,"module:function/_Var")),
+ ?line 'Missing type of regular expression ".*"\n'
+ = fatom(xref:q(s,'".*"')),
+ ?line 'Type does not match structure of constant: \'M\' : Fun\n'
+ = fatom(xref:q(s,"'M' : Fun")),
+ ?line 'Type does not match structure of constant: ".*" : Fun\n'
+ = fatom(xref:q(s,'".*" : Fun')),
+ ?line 'Type does not match structure of constant: [m:f/1, m1:f2/3] : App\n'
+ = fatom(xref:q(s,"[m:f/1,m1:f2/3] : App")),
+ ?line 'Parse error on line 1: syntax error before: \'-\'\n' =
+ fatom(xref:q(s,"E + -")),
+ ?line "Parse error on line 1: unterminated atom starting with 'foo'\n"
+ = flatten(xref:format_error(xref:q(s,"'foo"))),
+ ?line 'Parse error at end of string: syntax error before: \n' =
+ fatom(xref:q(s,"E +")),
+ ?line 'Parse error on line 1: syntax error before: \'Lin\'\n' =
+ fatom(xref:q(s,"Lin")),
+
+ %% Other messages
+ ?line 'Variable \'QQ\' used before set\n' =
+ fatom(xref:q(s,"QQ")),
+ ?line 'Unknown constant a\n' =
+ fatom(xref:q(s,"{a} of E")),
+
+ %% Testing xref_parser:t2s/1.
+ ?line 'Variable assigned more than once: E := E + E\n' =
+ fatom(xref:q(s,"E:=E + E")),
+ ?line 'Variable assigned more than once: E = E + E\n' =
+ fatom(xref:q(s,"E=E + E")),
+ ?line "Operator applied to argument(s) of different or invalid type(s): "
+ "E + V * V\n" =
+ flatten(xref:format_error(xref:q(s,"E + (V * V)"))),
+ ?line {error,xref_compiler,{type_error,"(V + V) * E"}} =
+ xref:q(s,"(V + V) * E"),
+ ?line "Type does not match structure of constant: [m:f/3 -> g:h/17] : "
+ "App\n" =
+ flatten(xref:format_error(xref:q(s,"[{{m,f,3},{g,h,17}}] : App"))),
+ ?line 'Type does not match structure of constant: [m -> f, g -> h] : Fun\n'
+ = fatom(xref:q(s,"[{m,f},g->h] : Fun")),
+ ?line 'Type does not match structure of constant: {m, n, o} : Fun\n' =
+ fatom(xref:q(s,"{m,n,o} : Fun")),
+ ?line {error,xref_compiler,{type_error,"range (Lin) V"}} =
+ xref:q(s,"range ((Lin) V)"),
+ ?line {error,xref_compiler,{type_error,"condensation range E"}} =
+ xref:q(s,"condensation (range E)"),
+ ?line {error,xref_compiler,{type_error,"condensation (# E + # V)"}} =
+ xref:q(s,"condensation (# E + # V)"),
+ ?line {error,xref_compiler,{type_error,"range (# E + # E)"}} =
+ xref:q(s,"range (#E + #E)"),
+ ?line {error,xref_compiler,{type_error,"range (# E)"}} =
+ xref:q(s,"range #E"), % Hm...
+ ?line {error,xref_compiler,{type_error,"E + # E"}} =
+ xref:q(s,"E + #E + #E"), % Hm...
+ ?line {error,xref_compiler,{type_error,"V * E || V | V"}} =
+ xref:q(s,"V * (E || V) | V"),
+ ?line {error,xref_compiler,{type_error,"E || (E | V)"}} =
+ xref:q(s,"V * E || (E | V)"),
+ ?line {error,xref_compiler,{type_error,"E * \"m\" : Mod"}} =
+ xref:q(s,'E * "m" : Mod'),
+ ?line {error,xref_compiler,{type_error,"E * (\"m\":f/_ + m:\"f\"/3)"}} =
+ xref:q(s,'E * ("m":f/_ + m:"f"/3)'),
+
+ ?line xref:stop(s),
+ ok.
+
+otp_7423(suite) -> [];
+otp_7423(doc) -> ["OTP-7423. Xref scanner bug."];
+otp_7423(Conf) when is_list(Conf) ->
+ ?line {ok, _Pid} = start(s),
+ S = "E | [compiler] : App || [{erlang,
+ size,
+ 1}] : Fun",
+ ?line {error,xref_compiler,{unknown_constant,"compiler"}} = xref:q(s,S),
+ ?line xref:stop(s),
+ ok.
+
+otp_7831(suite) -> [];
+otp_7831(doc) -> ["OTP-7831. Allow anonymous Xref processes."];
+otp_7831(Conf) when is_list(Conf) ->
+ ?line {ok, Pid1} = xref:start([]),
+ ?line xref:stop(Pid1),
+ ?line {ok, Pid2} = xref:start([{xref_mode, modules}]),
+ ?line xref:stop(Pid2),
+ ok.
+
+%%%
+%%% Utilities
+%%%
+
+copy_file(Src, Dest) ->
+ file:copy(Src, Dest).
+
+fname(N) ->
+ filename:join(N).
+
+fname(Dir, Basename) ->
+ filename:join(Dir, Basename).
+
+new() ->
+ ?line {ok, S} = xref_base:new(),
+ S.
+
+set_up(S) ->
+ ?line {ok, S1} = xref_base:set_up(S, [{verbose, false}]),
+ S1.
+
+eval(Query, E, S) ->
+ ?format("------------------------------~n", []),
+ ?format("Evaluating ~p~n", [Query]),
+ ?line {Answer, NewState} = xref_base:q(S, Query, [{verbose, false}]),
+ {Reply, Expected} =
+ case Answer of
+ {ok, R} when is_list(E) ->
+ {unsetify(R), sort(E)};
+ {ok, R} ->
+ {unsetify(R), E};
+ {error, _Module, Reason} ->
+ {element(1, Reason), E}
+ end,
+ if
+ Reply =:= Expected ->
+ ?format("As expected, got ~n~p~n", [Expected]),
+ {ok, NewState};
+ true ->
+ ?format("Expected ~n~p~nbut got ~n~p~n", [Expected, Reply]),
+ not_ok
+ end.
+
+analyze(Query, E, S) ->
+ ?format("------------------------------~n", []),
+ ?format("Evaluating ~p~n", [Query]),
+ ?line {{ok, L}, NewState} =
+ xref_base:analyze(S, Query, [{verbose, false}]),
+ case {unsetify(L), sort(E)} of
+ {X,X} ->
+ ?format("As was expected, got ~n~p~n", [X]),
+ {ok, NewState};
+ {_R,_X} ->
+ ?format("Expected ~n~p~nbut got ~n~p~n", [_X, _R]),
+ not_ok
+ end.
+
+unsetify(S) ->
+ case is_sofs_set(S) of
+ true -> to_external(S);
+ false -> S
+ end.
+
+%% Note: assumes S has been set up; the new state is not returned
+eval(Query, S) ->
+ ?line {{ok, Answer}, _NewState} =
+ xref_base:q(S, Query, [{verbose, false}]),
+ unsetify(Answer).
+
+add_module(S, XMod, DefAt, X, LCallAt, XCallAt, XC, LC) ->
+ Attr = {[], [], []},
+ Depr0 = {[], [], [], []},
+ DBad = [],
+ Depr = {Depr0,DBad},
+ Data = {DefAt, LCallAt, XCallAt, LC, XC, X, Attr, Depr},
+ Unres = [],
+ ?line {ok, _Module, _Bad, State} =
+ xref_base:do_add_module(S, XMod, Unres, Data),
+ State.
+
+add_application(S, XApp) ->
+ ?line xref_base:do_add_application(S, XApp).
+
+add_release(S, XRel) ->
+ ?line xref_base:do_add_release(S, XRel).
+
+remove_module(S, M) ->
+ ?line xref_base:do_remove_module(S, M).
+
+info_tag(Info, Tag) ->
+ {value, {_Tag, Value}} = lists:keysearch(Tag, 1, Info),
+ Value.
+
+make_ufile(FileName) ->
+ ?line ok = file:write_file(FileName, term_to_binary(foo)),
+ ?line hide_file(FileName).
+
+make_udir(Dir) ->
+ ?line ok = file:make_dir(Dir),
+ ?line hide_file(Dir).
+
+hide_file(FileName) ->
+ ?line {ok, FileInfo} = file:read_file_info(FileName),
+ ?line NewFileInfo = FileInfo#file_info{mode = 0},
+ ?line ok = file:write_file_info(FileName, NewFileInfo).
+
+%% Note that S has to be set up before calling this checking function.
+check_state(S) ->
+ ?line Info = xref:info(S),
+
+ ?line modules_mode_check(S, Info),
+ case info(Info, mode) of
+ modules ->
+ ok;
+ functions ->
+ functions_mode_check(S, Info)
+ end.
+
+%% The manual mentions some facts that should always hold.
+%% Here they are again.
+functions_mode_check(S, Info) ->
+ %% F = L + X,
+ ?line {ok, F} = xref:q(S, "F"),
+ ?line {ok, F} = xref:q(S, "L + X"),
+
+ %% V = X + L + B + U,
+ ?line {ok, V} = xref:q(S, "V"),
+ ?line {ok, V} = xref:q(S, "X + L + B + U"),
+
+ %% X, L, B and U are disjoint.
+ ?line {ok, []} =
+ xref:q(S, "X * L + X * B + X * U + L * B + L * U + B * U"),
+
+ %% V = UU + XU + LU,
+ ?line {ok, V} = xref:q(S, "UU + XU + LU"),
+
+ %% E = LC + XC
+ ?line {ok, E} = xref:q(S, "E"),
+ ?line {ok, E} = xref:q(S, "LC + XC"),
+
+ %% U subset of XU,
+ ?line {ok, []} = xref:q(S, "U - XU"),
+
+ %% LU = range LC
+ ?line {ok, []} = xref:q(S, "(LU - range LC) + (range LC - LU)"),
+
+ %% XU = range XC
+ ?line {ok, []} = xref:q(S, "(XU - range XC) + (range XC - XU)"),
+
+ %% LU subset F
+ ?line {ok, []} = xref:q(S, "LU - F"),
+
+ %% UU subset F
+ ?line {ok, []} = xref:q(S, "UU - F"),
+
+ %% ME = (Mod) E
+ ?line {ok, ME} = xref:q(S, "ME"),
+ ?line {ok, ME} = xref:q(S, "(Mod) E"),
+
+ %% AE = (App) E
+ ?line {ok, AE} = xref:q(S, "AE"),
+ ?line {ok, AE} = xref:q(S, "(App) E"),
+
+ %% RE = (Rel) E
+ ?line {ok, RE} = xref:q(S, "RE"),
+ ?line {ok, RE} = xref:q(S, "(Rel) E"),
+
+ %% (Mod) V subset of M
+ ?line {ok, []} = xref:q(S, "(Mod) V - M"),
+
+ %% range UC subset of U
+ ?line {ok, []} = xref:q(S, "range UC - U"),
+
+ %% Some checks on the numbers returned by the info functions.
+
+ ?line {Resolved, Unresolved} = info(Info, no_calls),
+ ?line AllCalls = Resolved + Unresolved,
+ ?line {ok, AllCalls} = xref:q(S, "# (XLin) E + # (LLin) E"),
+
+ ?line {Local, Exported} = info(Info, no_functions),
+ ?line LX = Local+Exported,
+ ?line {ok, LXs} = xref:q(S, 'Extra = _:module_info/"(0|1)" + LM,
+ # (F - Extra)'),
+ ?line true = LX =:= LXs,
+
+ ?line {LocalCalls, ExternalCalls, UnresCalls} =
+ info(Info, no_function_calls),
+ ?line LEU = LocalCalls + ExternalCalls + UnresCalls,
+ ?line {ok, LEU} = xref:q(S, "# LC + # XC"),
+
+ ?line InterFunctionCalls = info(Info, no_inter_function_calls),
+ ?line {ok, InterFunctionCalls} = xref:q(S, "# EE"),
+
+ %% And some more checks on counters...
+ ?line check_count(S),
+
+ %% ... and more
+ ?line {ok, []} = xref:q(S, "LM - X - U - B"),
+
+ ok.
+
+modules_mode_check(S, Info) ->
+ %% B subset of XU,
+ ?line {ok, []} = xref:q(S, "B - XU"),
+
+ %% M = AM + LM + UM
+ ?line {ok, M} = xref:q(S, "M"),
+ ?line {ok, M} = xref:q(S, "AM + LM + UM"),
+
+ %% DF is a subset of X U B, etc.
+ ?line {ok, []} = xref:q(S, "DF - X - B"),
+ ?line {ok, []} = xref:q(S, "DF_3 - DF"),
+ ?line {ok, []} = xref:q(S, "DF_2 - DF_3"),
+ ?line {ok, []} = xref:q(S, "DF_1 - DF_2"),
+
+ %% AM, LM and UM are disjoint.
+ ?line {ok, []} = xref:q(S, "AM * LM + AM * UM + LM * UM"),
+
+ %% (App) M subset of A
+ ?line {ok, []} = xref:q(S, "(App) M - A"),
+
+ ?line AM = info(Info, no_analyzed_modules),
+ ?line {ok, AM} = xref:q(S, "# AM"),
+
+ ?line A = info(Info, no_applications),
+ ?line {ok, A} = xref:q(S, "# A"),
+
+ ?line NoR = info(Info, no_releases),
+ ?line {ok, NoR} = xref:q(S, "# R"),
+
+ ok.
+
+%% Checks the counters of some of the overall and modules info functions.
+%% (Applications and releases are not checked.)
+check_count(S) ->
+ %%{ok, R} = xref:q(S, 'R'),
+ %% {ok, A} = xref:q(S, 'A'),
+ {ok, M} = xref:q(S, 'AM'),
+
+ {ok, _} = xref:q(S,
+ "Extra := _:module_info/\"(0|1)\" + LM"),
+
+ %% info/1:
+ {ok, NoR} = xref:q(S, '# R'),
+ {ok, NoA} = xref:q(S, '# A'),
+ {ok, NoM} = xref:q(S, '# AM'),
+ {ok, NoCalls} = xref:q(S, '# (XLin) E + # (LLin) E'),
+ {ok, NoFunCalls} = xref:q(S, '# E'),
+ {ok, NoXCalls} = xref:q(S, '# XC'),
+ {ok, NoLCalls} = xref:q(S, '# LC'),
+ {ok, NoLXCalls} = xref:q(S, '# (XC * LC)'),
+ NoAllCalls = NoXCalls + NoLCalls,
+ {ok, NoFun} = xref:q(S, '# (F - Extra)'),
+ {ok, NoICalls} = xref:q(S, '# EE'),
+
+ Info = xref:info(S),
+ NoR = info(Info, no_releases),
+ NoA = info(Info, no_applications),
+ NoM = info(Info, no_analyzed_modules),
+ {NoResolved, NoUC} = info(Info, no_calls),
+ NoCalls = NoResolved + NoUC,
+ {NoLocal, NoExternal, NoUnres} = info(Info, no_function_calls),
+ NoAllCalls = NoLocal + NoExternal + NoUnres,
+ NoAllCalls = NoFunCalls + NoLXCalls,
+ {NoLocalFuns, NoExportedFuns} = info(Info, no_functions),
+ NoFun = NoLocalFuns + NoExportedFuns,
+ NoICalls = info(Info, no_inter_function_calls),
+
+ %% per module
+ info_module(M, S),
+
+ ok.
+
+info_module([M | Ms], S) ->
+ {ok, NoCalls} = per_module("T = (E | ~p : Mod), # (XLin) T + # (LLin) T",
+ M, S),
+ {ok, NoFunCalls} = per_module("# (E | ~p : Mod)", M, S),
+ {ok, NoXCalls} = per_module("# (XC | ~p : Mod)", M, S),
+ {ok, NoLCalls} = per_module("# (LC | ~p : Mod)", M, S),
+ {ok, NoLXCalls} = per_module("# ((XC * LC) | ~p : Mod)", M, S),
+ NoAllCalls = NoXCalls + NoLCalls,
+ {ok, NoFun} = per_module("# (F * ~p : Mod - Extra)", M, S),
+ {ok, NoICalls} = per_module("# (EE | ~p : Mod)", M, S),
+
+ [{_M,Info}] = xref:info(S, modules, M),
+ {NoResolved, NoUC} = info(Info, no_calls),
+ NoCalls = NoResolved + NoUC,
+ {NoLocal, NoExternal, NoUnres} = info(Info, no_function_calls),
+ NoAllCalls = NoLocal + NoExternal + NoUnres,
+ NoAllCalls = NoFunCalls + NoLXCalls,
+ {NoLocalFuns, NoExportedFuns} = info(Info, no_functions),
+ NoFun = NoLocalFuns + NoExportedFuns,
+ NoICalls = info(Info, no_inter_function_calls),
+
+ info_module(Ms, S);
+info_module([], _S) ->
+ ok.
+
+per_module(Q, M, S) ->
+ xref:q(S, f(Q, [M])).
+
+info(Info, What) ->
+ {value, {What, Value}} = lists:keysearch(What, 1, Info),
+ Value.
+
+f(S, A) ->
+ flatten(io_lib:format(S, A)).
+
+fatom(R) ->
+ list_to_atom(flatten(xref:format_error(R))).
+
+start(Server) ->
+ ?line case xref:start(Server) of
+ {error, {already_started, _Pid}} ->
+ ?line xref:stop(Server),
+ ?line xref:start(Server);
+ R -> R
+ end.
+
+add_erts_code_path(KernelPath) ->
+ VersionDirs =
+ filelib:is_dir(
+ filename:join(
+ [code:lib_dir(),
+ lists:flatten(
+ ["kernel-",
+ [X ||
+ {kernel,_,X} <-
+ application_controller:which_applications()]])])),
+ case VersionDirs of
+ true ->
+ case code:lib_dir(erts) of
+ String when is_list(String) ->
+ [KernelPath, fname(String,"ebin")];
+ _Other1 ->
+ [KernelPath]
+ end;
+ false ->
+ % Clearcase?
+ PrelPath = filename:join([code:lib_dir(),"..","erts","preloaded"]),
+ case filelib:is_dir(PrelPath) of
+ true ->
+ [KernelPath, fname(PrelPath,"ebin")];
+ false ->
+ [KernelPath]
+ end
+ end.
+
+
diff --git a/lib/tools/test/xref_SUITE_data/depr_r9c.beam b/lib/tools/test/xref_SUITE_data/depr_r9c.beam
new file mode 100644
index 0000000000..82f0eef5a1
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/depr_r9c.beam
Binary files differ
diff --git a/lib/tools/test/xref_SUITE_data/dir/dir/dummy b/lib/tools/test/xref_SUITE_data/dir/dir/dummy
new file mode 100644
index 0000000000..7f62a93220
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/dir/dir/dummy
@@ -0,0 +1,2 @@
+This directory is not empty.
+Prevents winzip from removing the directory.
diff --git a/system/doc/images/.gitignore b/lib/tools/test/xref_SUITE_data/dir/jam/x.jam
index e69de29bb2..e69de29bb2 100644
--- a/system/doc/images/.gitignore
+++ b/lib/tools/test/xref_SUITE_data/dir/jam/x.jam
diff --git a/lib/tools/test/xref_SUITE_data/lib_test/cp.erl b/lib/tools/test/xref_SUITE_data/lib_test/cp.erl
new file mode 100644
index 0000000000..efe5d77854
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/lib_test/cp.erl
@@ -0,0 +1,6 @@
+-module(cp).
+
+-export([t/0]).
+
+t() ->
+ lists:sort(a).
diff --git a/lib/tools/test/xref_SUITE_data/lib_test/lib1.erl b/lib/tools/test/xref_SUITE_data/lib_test/lib1.erl
new file mode 100644
index 0000000000..7d50fcb1af
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/lib_test/lib1.erl
@@ -0,0 +1,6 @@
+-module(lib1).
+
+-export([f/0]).
+
+f() ->
+ true.
diff --git a/lib/tools/test/xref_SUITE_data/lib_test/lib2.erl b/lib/tools/test/xref_SUITE_data/lib_test/lib2.erl
new file mode 100644
index 0000000000..ca505dfd4f
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/lib_test/lib2.erl
@@ -0,0 +1,14 @@
+-module(lib2).
+
+-export([f/0, g/0]).
+
+-deprecated({f,0,next_major_release}).
+
+f() ->
+ local().
+
+g() ->
+ true.
+
+local() ->
+ true.
diff --git a/lib/tools/test/xref_SUITE_data/lib_test/lib3.erl b/lib/tools/test/xref_SUITE_data/lib_test/lib3.erl
new file mode 100644
index 0000000000..8a900f8040
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/lib_test/lib3.erl
@@ -0,0 +1,11 @@
+-module(lib3).
+
+-export([f/0, g/0]).
+
+-deprecated(module).
+
+f() ->
+ true.
+
+g() ->
+ true.
diff --git a/lib/tools/test/xref_SUITE_data/lib_test/t.erl b/lib/tools/test/xref_SUITE_data/lib_test/t.erl
new file mode 100644
index 0000000000..d2bd81110e
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/lib_test/t.erl
@@ -0,0 +1,14 @@
+-module(t).
+
+-export([t/0]).
+
+t() ->
+ %% lib1: only unknown functions used
+ %% lib2: one known used, one unknown function used, one local used
+ %% lib3: one known function used
+ lib1:unknown(),
+ lib2:f(), %% known, g/0 not used
+ lib2:unknown(),
+ lib2:local(),
+ lib3:f(),
+ unknown:unknown().
diff --git a/lib/tools/test/xref_SUITE_data/md/x__x.erl b/lib/tools/test/xref_SUITE_data/md/x__x.erl
new file mode 100644
index 0000000000..83234e1d3f
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/md/x__x.erl
@@ -0,0 +1,7 @@
+-module(x__x).
+
+-export([t/1]).
+
+t(A) ->
+ y__y:t(A),
+ y__y:t(A,A).
diff --git a/lib/tools/test/xref_SUITE_data/md/y__y.erl b/lib/tools/test/xref_SUITE_data/md/y__y.erl
new file mode 100644
index 0000000000..b2bb783fd8
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/md/y__y.erl
@@ -0,0 +1,12 @@
+-module(y__y).
+
+-export([t/1]).
+
+t(A) ->
+ x__x:t(A).
+
+l() ->
+ l1().
+
+l1() ->
+ l().
diff --git a/lib/tools/test/xref_SUITE_data/read/read.beam.v1 b/lib/tools/test/xref_SUITE_data/read/read.beam.v1
new file mode 100644
index 0000000000..3b8e9c4c38
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/read/read.beam.v1
Binary files differ
diff --git a/lib/tools/test/xref_SUITE_data/read/read.erl b/lib/tools/test/xref_SUITE_data/read/read.erl
new file mode 100644
index 0000000000..4a0cc280c3
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/read/read.erl
@@ -0,0 +1,175 @@
+-module(read).
+
+-export([lc/0, funfuns/0, bi/0]).
+
+-xref({xx,ff,22}).
+-xref({{all,0},{no,0}}).
+-xref([{{all,0},{i,0}},{{all,0},{x2,5}}]).
+-xref([apa]).
+-xref({all,0}).
+-xref([{{{all},0},{no,0}},{{all,0},{m,x2,5}}]).
+-xref([{{a,14},{q,f,17}}]).
+-xref({{i,f,17},{g,18}}).
+-xref({{j,f,17},{i,g,18}}).
+
+-xref({{funfuns,0},{'$F_EXPR',177}}).
+-xref({{funfuns,0},{?MODULE,'$F_EXPR',178}}).
+-xref({{funfuns,0},{modul,'$F_EXPR',179}}).
+
+lc() ->
+ Tab = ets:new(),
+ [Mt||{_M,Mt} <- ets:tab2list(Tab)].
+
+funfuns() ->
+ A = variable,
+
+ %% Spawn...
+
+ %% Recognized. POS1=28.
+ spawn(fun() -> mod17:fun17() end),
+ spawn(fun local/0),
+ spawn(fun binary_to_term/1), % builtin, not collected
+ spawn({dist,func}),
+ spawn({dist,A}), % {dist,'$F_EXPR',0}
+ spawn_link(fun() -> mod17:fun17() end),
+ spawn_link({dist,func}),
+ spawn_link({dist,A}), % {dist,'$F_EXPR',0}
+
+ %% POS2=POS1+10
+ spawn({dist,func}(arg1,arg2), {d,f}),
+ spawn({dist,func}(arg1,arg2), fun() -> mod42:func() end),
+ spawn_link({dist,func}(arg1,arg2), {d,f}),
+ spawn_link({dist,func}(arg1,arg2), fun() -> mod42:func() end),
+
+ %% POS3=POS2+6
+ spawn(dist, func, [arg1,arg2]), % spawn/3 is builtin
+ spawn(expr, A, [arg1]), % {expr,'$F_EXPR',1}
+ spawn_link(dist, func, [arg1,arg2]), % spawn_link/3 is builtin
+ spawn_link(expr, A, [arg1,arg2]), % {expr,'$F_EXPR',2}
+
+ %% POS4=POS3+6
+ spawn(node, modul, function, []),
+ spawn(node, modul, A, [a]), % {modul,'$F_EXPR',1}
+ spawn({dist,func}(arg1,arg2), spm, spf, [a,b]),
+ spawn({dist,func}(arg1,arg2), spm, A, [a]), % {spm,'$F_EXPR',1}
+ spawn_link({dist,func}(arg1,arg2), spm, spf, [a,b]),
+ spawn_link({dist,func}(arg1,arg2), spm, A, [a]), % {spm,'$F_EXPR',1}
+ spawn_opt(spm, spf, [arg3, arg4], [opt1, bi()]),
+ spawn_opt(spm, A, [a], [opt1, bi()]), % {spm,'$F_EXPR',1}
+
+ %% Not recognized or invalid. POS5=POS4+10
+ spawn(A), % {'$M_EXPR','$F_EXPR',0}
+ spawn(17), % {'$M_EXPR','$F_EXPR',0}
+ spawn_link(A), % {'$M_EXPR','$F_EXPR',0}
+
+ %% POS6=POS5+5
+ spawn({a,b},[1008]), % {'$M_EXPR','$F_EXPR',0}
+ spawn_link({a,b},[1008]), % {'$M_EXPR','$F_EXPR',0}
+
+ spawn(n, A, A), % {n,'$F_EXPR',-1}
+
+ %% POS7=POS6+6
+ spawn(n, A,f,[1007]), % {'$M_EXPR',f,1}, spawn/3 is builtin
+ spawn_opt(A,f,[1007],[]), % {'$M_EXPR',f,1}
+
+ %% Apply...
+
+ %% Recognized. POS8=POS7+6
+ {hej,san}(1002),
+ {hej,A}(1002), % {hej,'$F_EXPR',1}
+ t:A(1003), % {t,'$F_EXPR',1}
+ apply({a,b},[1005]),
+ apply({a,A},[1005]), % {a,'$F_EXPR',1}
+ apply(m,f,[100011]),
+ apply(m,A,[100011]), % {m,'$F_EXPR',1}
+ %% POS9=POS8+8
+ apply(A, f, [bi()]), % {'$M_EXPR',f,1}
+ {erlang,apply}({a,b},[8888]),
+ {erlang,apply}({a,A},[8888]), % {a,'$F_EXPR',1}
+ {erlang,apply}({erlang,apply},[{erlang,not_a_function},[7777]]),
+ apply(erlang, apply, [erlang, apply, [mod, func, [atom77,tjohej]]]),
+ erlang:apply(foo), % not an apply, but an unknown function
+ apply(fun(X) -> math:add3(X) end, [7]),
+ (fun(X) -> q:f(X) end)(3008),
+
+ %% Not recognized or invalid. POS10=POS9+10
+ A:foo(1000), % {'$M_EXPR',foo,1}
+ A(17), % {'$M_EXPR','$F_EXPR',1}
+ A(17,[one,two]), % {'$M_EXPR','$F_EXPR',2}
+ apply(apa,[1001]), % {'$M_EXPR','$F_EXPR',1}
+ {mod1:fun1(hej),san}(1017), % {'$M_EXPR',san,1}
+ A:A(1004), % {'$M_EXPR','$F_EXPR',1}
+ %% POS11=POS10+7
+ apply(A,A,[1006]), % {'$M_EXPR','$F_EXPR',1}
+ apply(A,A,[1009 | 10010]), % {'$M_EXPR','$F_EXPR',-1}
+ apply(m,f,[10000 | 9999]), % {m,f,-1}
+ apply(m,f,a), % {m,f,-1}
+ 3(a), % {'$M_EXPR','$F_EXPR',1}
+ apply(3,[a]), % {'$M_EXPR','$F_EXPR',1}
+
+ %% POS12=POS11+8
+ apply(A, A), % number of arguments is not known, {'$M_EXPR','$F_EXPR',-1}
+ Args0 = [list],
+ Args = [a | Args0], % number of arguments is known
+ apply(A, Args), % {'$M_EXPR','$F_EXPR',2}
+ apply(m3, f3, Args), %
+ NotArgs = [is_not, a | list], % number of arguments is not known
+ apply(A, NotArgs), % {'$M_EXPR','$F_EXPR',-1}
+ apply(m4, f4, NotArgs), % {m4,f4,-1}
+
+ %% OTP Internal. POS13=POS12+10
+ erts_debug:apply(dm, df, [17], foobar),
+ erts_debug:apply(debug, A, [], A), % {debug,'$F_EXPR',0}
+ erts_debug:apply(A, A, A, A). % {'$M_EXPR','$F_EXPR',-1}
+
+bi() when length([]) > 17 ->
+ foo:module_info(),
+ module_info(),
+ A = tjo,
+ t:foo(A),
+ case true of
+ true when integer(1) ->
+ X = foo;
+ false ->
+ X = flopp
+ end,
+ X == A;
+bi() ->
+ %% POS14=POS13+18
+ Z = fun(Y) -> Y end,
+ case true of
+ true when length([a,b]) > 4 ->
+ F = fun(X) -> X end,
+ F(3);
+ false ->
+ F = 17,
+ F(3) % {'$M_EXPR','$F_EXPR',1}
+ end,
+ Z(apa),
+ erlang:module_info();
+bi() ->
+ Bin11 = <<1, 17, 42>>,
+ Bin12 = <<"abc">>,
+ false = (Bin11 == Bin12),
+ A = 1, B = 17,
+ Bin3 = <<A, B, (bi()):16>>,
+ <<D:16, E, F/binary>> = Bin3,
+ X = 9, <<(X+1):8>>,
+ _Fyy = <<X:4/little-signed-integer-unit:8>>,
+ D + E + F.
+%bi() ->
+% %% POS15=POS14+13
+% try
+% foo:t(),
+% bar:t()
+% of
+% {v,1} ->
+% local();
+% {v,2} ->
+% foo:t()
+% catch
+% {'EXIT',_} -> bar:t()
+% end.
+
+local() ->
+ true.
diff --git a/lib/tools/test/xref_SUITE_data/rel2/lib/app1-1.0/ebin/dummy b/lib/tools/test/xref_SUITE_data/rel2/lib/app1-1.0/ebin/dummy
new file mode 100644
index 0000000000..7f62a93220
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/rel2/lib/app1-1.0/ebin/dummy
@@ -0,0 +1,2 @@
+This directory is not empty.
+Prevents winzip from removing the directory.
diff --git a/lib/tools/test/xref_SUITE_data/rel2/lib/app1-1.1/ebin/dummy b/lib/tools/test/xref_SUITE_data/rel2/lib/app1-1.1/ebin/dummy
new file mode 100644
index 0000000000..7f62a93220
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/rel2/lib/app1-1.1/ebin/dummy
@@ -0,0 +1,2 @@
+This directory is not empty.
+Prevents winzip from removing the directory.
diff --git a/lib/tools/test/xref_SUITE_data/rel2/lib/app2-1.1/ebin/dummy b/lib/tools/test/xref_SUITE_data/rel2/lib/app2-1.1/ebin/dummy
new file mode 100644
index 0000000000..7f62a93220
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/rel2/lib/app2-1.1/ebin/dummy
@@ -0,0 +1,2 @@
+This directory is not empty.
+Prevents winzip from removing the directory.
diff --git a/lib/tools/test/xref_SUITE_data/rel2/x.erl b/lib/tools/test/xref_SUITE_data/rel2/x.erl
new file mode 100644
index 0000000000..2125760776
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/rel2/x.erl
@@ -0,0 +1,16 @@
+-module(x).
+
+-export([t/0, xx/0]).
+-deprecated({t,0,eventually}).
+
+t() ->
+ true.
+
+xx() ->
+ x:undef().
+
+l() ->
+ l1().
+
+l1() ->
+ l().
diff --git a/lib/tools/test/xref_SUITE_data/rel2/y.erl b/lib/tools/test/xref_SUITE_data/rel2/y.erl
new file mode 100644
index 0000000000..2a6e65e78f
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/rel2/y.erl
@@ -0,0 +1,6 @@
+-module(y).
+
+-export([t/0]).
+
+t() ->
+ x:t().
diff --git a/lib/tools/test/xref_SUITE_data/update/x.erl.1 b/lib/tools/test/xref_SUITE_data/update/x.erl.1
new file mode 100644
index 0000000000..6af13329a2
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/update/x.erl.1
@@ -0,0 +1,6 @@
+-module(x).
+
+-export([t/0]).
+
+t() ->
+ erlang:atom_to_list(tjohoo).
diff --git a/lib/tools/test/xref_SUITE_data/update/x.erl.2 b/lib/tools/test/xref_SUITE_data/update/x.erl.2
new file mode 100644
index 0000000000..e303a758d2
--- /dev/null
+++ b/lib/tools/test/xref_SUITE_data/update/x.erl.2
@@ -0,0 +1,6 @@
+-module(x).
+
+-export([t/0]).
+
+t() ->
+ erlang:list_to_atom("tjohoo").
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index 50dd2d6f51..780bb2e741 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.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%
%%
%% Api wrapper generator
@@ -699,10 +699,12 @@ parse_type2([N="wxArrayInt"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name=N,base=int,single=array});
parse_type2([N="wxArrayDouble"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name=N,base=double,single=array});
-parse_type2([N="wxTreeItemId"|R],Info,Opts,T) ->
- parse_type2(R,Info,Opts,T#type{name=N,base={ref,N}});
+parse_type2([N="wxTreeItemId"|R],Info,Opts,T) -> %% Use Pointer as Ids
+ parse_type2(R,Info,Opts,T#type{name=N,base=int64});
+parse_type2([N="wxTreeItemIdValue"|R],Info,Opts,T) -> %% Use Pointer as Ids
+ parse_type2(R,Info,Opts,T#type{name=N,base=int64});
parse_type2([N="wxArrayTreeItemIds"|R],Info,Opts,T) ->
- parse_type2(R,Info,Opts,T#type{name=N,base={ref,"wxTreeItemId"},single=array});
+ parse_type2(R,Info,Opts,T#type{name=N,base=int64,single=array});
parse_type2([N="wxTreeItemData"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name="wxETreeItemData",base={term,N}});
parse_type2([N="wxClientData"|R],Info,Opts,T) ->
@@ -1082,6 +1084,7 @@ type_foot_print(#type{base=long}) -> int;
type_foot_print(#type{base=binary}) -> binary;
type_foot_print(#type{base={binary,_}}) -> binary;
type_foot_print(#type{base=int}) -> int;
+type_foot_print(#type{base=int64}) -> int;
type_foot_print(#type{base=bool}) -> bool;
%%type_foot_print(#type{base=datetime}) -> datetime;
type_foot_print(#type{base=float}) -> float;
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index fd0bea04ae..423dcd0179 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.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%
%%
%%%-------------------------------------------------------------------
@@ -309,6 +309,8 @@ declare_type(N,false,_,#type{name="wxArrayTreeItemIds",ref=reference}) ->
w(" wxArrayTreeItemIds ~s;~n", [N]);
declare_type(N,false,_,#type{name="wxDateTime"}) ->
w(" wxDateTime ~s;~n", [N]);
+declare_type(N,false,_,#type{name=Type, base=int64, ref=reference}) ->
+ w(" ~s ~s;~n", [Type,N]);
declare_type(N,true,Def,#type{base=Base,single=true,name=Type,by_val=true})
when Base =:= int; Base =:= long; Base =:= float; Base =:= double; Base =:= bool ->
w(" ~s ~s=~s;~n", [Type,N,Def]);
@@ -478,9 +480,13 @@ decode_arg(N,#type{base={comp,_,List},single=true,name=Type,ref=Ref},Arg,A0) ->
{double, _} -> 0
end;
-decode_arg(N,#type{name=Class,base={ref,"wxTreeItemId"},single=true},Arg,A0) ->
- A = align(A0,32),
- wa(" ~s ",[Class],"~s = wxTreeItemId(getPtr(bp,memenv)); bp += 4;~n",[N],Arg),
+decode_arg(N,#type{name=Class="wxTreeItemId",single=true},Arg,A0) ->
+ A = align(A0,64),
+ wa(" ~s ",[Class],"~s = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;~n",[N],Arg),
+ A;
+decode_arg(N,#type{name=Class="wxTreeItemIdValue",single=true},Arg,A0) ->
+ A = align(A0,64),
+ wa(" ~s ",[Class],"~s = (~s) * (wxUint64 *) bp; bp += 8;~n",[N,Class],Arg),
A;
decode_arg(N,#type{name="wxChar", single=S},Arg,A0)
when S =/= true ->
@@ -851,8 +857,10 @@ build_ret_types(Type,Ps) ->
build_ret(Name,_,#type{base={class,Class},single=true}) ->
w(" rt.addRef(getRef((void *)~s,memenv), \"~s\");~n",[Name,Class]);
-build_ret(Name,_,#type{base={ref,"wxTreeItemId"=Class},single=true}) ->
- w(" rt.addRef(getRef((void *)~s.m_pItem,memenv), \"~s\");~n",[Name,Class]);
+build_ret(Name,_,#type{name="wxTreeItemId",single=true}) ->
+ w(" rt.add((wxUIntPtr *) ~s.m_pItem);~n",[Name]);
+build_ret(Name,_,#type{name="wxTreeItemIdValue",single=true}) ->
+ w(" rt.add((wxUIntPtr *) ~s);~n",[Name]);
build_ret(Name,_,#type{base={term,_},single=true}) ->
w(" rt.addExt2Term(~s);~n", [Name]);
build_ret(Name,_,#type{base={binary,Size},single=true}) ->
@@ -897,7 +905,7 @@ build_ret(Name,_,#type{name=List,single=list,base={class,Class}}) ->
build_ret(Name,_,#type{name="wxArrayTreeItemIds"}) ->
w(" for(unsigned int i=0; i < ~s.GetCount(); i++) {~n", [Name]),
- w(" rt.addRef(getRef((void *)~s[i].m_pItem,memenv), \"wxTreeItemId\");}~n",[Name]),
+ w(" rt.add((wxUIntPtr *)~s[i].m_pItem);}~n",[Name]),
w(" rt.endList(~s.GetCount());~n",[Name]);
build_ret(Name,_,#type{base=float,single=true}) ->
diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl
index 64c11baec1..c31d7d2a92 100644
--- a/lib/wx/api_gen/wx_gen_erl.erl
+++ b/lib/wx/api_gen/wx_gen_erl.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%
%%
%%%-------------------------------------------------------------------
@@ -575,6 +575,8 @@ guard_test(#param{name=Name,type=#type{single=Single}})
"is_list(" ++ erl_arg_name(Name) ++ ")";
guard_test(#param{name=N,type=#type{base=int}}) ->
"is_integer(" ++ erl_arg_name(N) ++ ")";
+guard_test(#param{name=N,type=#type{base=int64}}) ->
+ "is_integer(" ++ erl_arg_name(N) ++ ")";
guard_test(#param{name=N,type=#type{base=long}}) ->
"is_integer(" ++ erl_arg_name(N) ++ ")";
guard_test(#param{name=N,type=#type{base=float}}) ->
@@ -603,6 +605,7 @@ guard_test(#param{name=N,type=#type{base={comp,"wxColour",_Tup}}}) ->
"tuple_size(" ++ erl_arg_name(N) ++ ") =:= 3; tuple_size(" ++ erl_arg_name(N) ++ ") =:= 4";
guard_test(#param{name=N,type=#type{base={comp,_,Tup}}}) ->
Doc = fun({int,V}) -> "is_integer("++erl_arg_name(N)++V ++")";
+ ({int64,V}) -> "is_integer("++erl_arg_name(N)++V ++")";
({double,V}) -> "is_number("++erl_arg_name(N)++V ++")"
end,
args(Doc, ",", Tup);
@@ -768,7 +771,9 @@ doc_arg_type3(#type{name="wxArrayString"}) -> "[string()]";
doc_arg_type3(#type{name="wxDateTime"}) -> "wx:datetime()";
doc_arg_type3(#type{name="wxArtClient"}) -> "string()";
doc_arg_type3(#type{base=int}) -> "integer()";
+doc_arg_type3(#type{base=int64}) -> "integer()";
doc_arg_type3(#type{base=long}) -> "integer()";
+doc_arg_type3(#type{name="wxTreeItemId"}) -> "wxTreeCtrl:treeItemId()";
doc_arg_type3(#type{base=bool}) -> "bool()";
doc_arg_type3(#type{base=float}) -> "float()";
doc_arg_type3(#type{base=double}) -> "float()";
@@ -851,7 +856,7 @@ doc_enum_desc([{Enum,Vs}|R]) ->
doc_enum_desc(R).
%% Misc functions prefixed with wx
-erl_func_name("wx" ++ Name, undefined) -> check_name(lowercase(Name));
+erl_func_name("wx" ++ Name, undefined) -> check_name(lowercase(Name));
erl_func_name(Name, undefined) -> check_name(lowercase(Name));
erl_func_name(_, Alias) -> check_name(lowercase(Alias)).
@@ -926,6 +931,8 @@ marshal_arg(#type{single=true,base=float}, Name, Align) ->
align(32, Align, Name ++ ":32/?F");
marshal_arg(#type{single=true,base=double}, Name, Align) ->
align(64, Align, Name ++ ":64/?F");
+marshal_arg(#type{single=true,base=int64}, Name, Align) ->
+ align(64, Align, Name ++ ":64/?UI");
marshal_arg(#type{single=true,base=int}, Name, Align) ->
align(32, Align, Name ++ ":32/?UI");
marshal_arg(#type{single=true,base={enum,_Enum}}, Name, Align) ->
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf
index 4a646650ea..4bb358ebc9 100644
--- a/lib/wx/api_gen/wxapi.conf
+++ b/lib/wx/api_gen/wxapi.conf
@@ -1,20 +1,20 @@
%% -*- erlang -*-
%%
%% %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%
%
%% Api defs file, defines the classes and members we want.
@@ -889,7 +889,12 @@
{enum, wxTreeItemIcon, "wxTreeItemIcon_"}.
-{class, wxTreeCtrl, wxControl, [],
+{class, wxTreeCtrl, wxControl,
+ [{doc,
+ "Note: The representation of treeItemId() have changed "
+ "from the original class implementation to be an semi-opaque type,"
+ "Equality between TreeItemId's can be tested and zero means that the TreeItem is invalid."
+ }],
['wxTreeCtrl','~wxTreeCtrl','AddRoot','AppendItem',
%% Not on Windows 'AssignButtonsImageList','GetButtonsImageList','SetButtonsImageList'
'AssignImageList','AssignStateImageList','Collapse','CollapseAndReset',
@@ -897,10 +902,10 @@
%'EndEditLabel',
'EnsureVisible','Expand','GetBoundingRect',
'GetChildrenCount','GetCount','GetEditControl',
- %'GetFirstChild',
+ {'GetFirstChild',[{"cookie", out}]}, {'GetNextChild',[{"cookie", [both]}]},
'GetFirstVisibleItem',{'GetImageList',0},'GetIndent',
'GetItemBackgroundColour','GetItemData','GetItemFont','GetItemImage',
- 'GetItemText','GetItemTextColour','GetLastChild', % 'GetNextChild',
+ 'GetItemText','GetItemTextColour','GetLastChild',
'GetNextSibling','GetNextVisible','GetItemParent',%'GetParent',
'GetPrevSibling','GetPrevVisible','GetRootItem',
'GetSelection',{'GetSelections', [{return, nowhere},{"val",out}]},
diff --git a/lib/wx/c_src/gen/wxe_events.cpp b/lib/wx/c_src/gen/wxe_events.cpp
index f15754a072..de55f9d8da 100644
--- a/lib/wx/c_src/gen/wxe_events.cpp
+++ b/lib/wx/c_src/gen/wxe_events.cpp
@@ -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%
*/
@@ -740,8 +740,8 @@ case 208: {// wxTreeEvent
evClass = (char*)"wxTreeEvent";
rt.addAtom((char*)"wxTree");
rt.addAtom(Etype->eName);
- rt.addRef(getRef((void *)ev->GetItem().m_pItem,memenv), "wxTreeItemId");
- rt.addRef(getRef((void *)ev->GetOldItem().m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) ev->GetItem().m_pItem);
+ rt.add((wxUIntPtr *) ev->GetOldItem().m_pItem);
rt.add(ev->GetPoint());
rt.addTupleCount(5);
break;
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp
index ccbacce9b9..532fee24b2 100644
--- a/lib/wx/c_src/gen/wxe_funcs.cpp
+++ b/lib/wx/c_src/gen/wxe_funcs.cpp
@@ -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%
*/
@@ -14763,7 +14763,7 @@ case wxGenericDirCtrl_GetRootId: { // wxGenericDirCtrl::GetRootId
wxGenericDirCtrl *This = (wxGenericDirCtrl *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetRootId();
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxGenericDirCtrl_GetTreeCtrl: { // wxGenericDirCtrl::GetTreeCtrl
@@ -18376,7 +18376,7 @@ case wxTreeCtrl_AddRoot: { // wxTreeCtrl::AddRoot
}};
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->AddRoot(text,image,selectedImage,data);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_AppendItem: { // wxTreeCtrl::AppendItem
@@ -18384,7 +18384,8 @@ case wxTreeCtrl_AppendItem: { // wxTreeCtrl::AppendItem
int selectedImage=-1;
wxETreeItemData * data= NULL;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId parent = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId parent = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * textLen = (int *) bp; bp += 4;
wxString text = wxString(bp, wxConvUTF8);
bp += *textLen+((8-((4+ *textLen) & 7)) & 7);
@@ -18402,7 +18403,7 @@ case wxTreeCtrl_AppendItem: { // wxTreeCtrl::AppendItem
}};
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->AppendItem(parent,text,image,selectedImage,data);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_AssignImageList: { // wxTreeCtrl::AssignImageList
@@ -18421,14 +18422,16 @@ case wxTreeCtrl_AssignStateImageList: { // wxTreeCtrl::AssignStateImageList
}
case wxTreeCtrl_Collapse: { // wxTreeCtrl::Collapse
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->Collapse(item);
break;
}
case wxTreeCtrl_CollapseAndReset: { // wxTreeCtrl::CollapseAndReset
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->CollapseAndReset(item);
break;
@@ -18471,7 +18474,8 @@ validator = (wxValidator *) getPtr(bp,memenv); bp += 4;
}
case wxTreeCtrl_Delete: { // wxTreeCtrl::Delete
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->Delete(item);
break;
@@ -18484,21 +18488,24 @@ case wxTreeCtrl_DeleteAllItems: { // wxTreeCtrl::DeleteAllItems
}
case wxTreeCtrl_DeleteChildren: { // wxTreeCtrl::DeleteChildren
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->DeleteChildren(item);
break;
}
case wxTreeCtrl_EnsureVisible: { // wxTreeCtrl::EnsureVisible
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->EnsureVisible(item);
break;
}
case wxTreeCtrl_Expand: { // wxTreeCtrl::Expand
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->Expand(item);
break;
@@ -18506,7 +18513,8 @@ case wxTreeCtrl_Expand: { // wxTreeCtrl::Expand
case wxTreeCtrl_GetBoundingRect: { // wxTreeCtrl::GetBoundingRect
bool textOnly=false;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * rectX = (int *) bp; bp += 4;
int * rectY = (int *) bp; bp += 4;
int * rectW = (int *) bp; bp += 4;
@@ -18525,7 +18533,8 @@ case wxTreeCtrl_GetBoundingRect: { // wxTreeCtrl::GetBoundingRect
case wxTreeCtrl_GetChildrenCount: { // wxTreeCtrl::GetChildrenCount
bool recursively=true;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
while( * (int*) bp) { switch (* (int*) bp) {
case 1: {bp += 4;
recursively = *(bool *) bp; bp += 4;
@@ -18550,11 +18559,35 @@ case wxTreeCtrl_GetEditControl: { // wxTreeCtrl::GetEditControl
rt.addRef(getRef((void *)Result,memenv), "wxTextCtrl");
break;
}
+case wxTreeCtrl_GetFirstChild: { // wxTreeCtrl::GetFirstChild
+ wxTreeItemIdValue cookie;
+ wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
+ if(!This) throw wxe_badarg(0);
+ wxTreeItemId Result = This->GetFirstChild(item,cookie);
+ rt.add((wxUIntPtr *) Result.m_pItem);
+ rt.add((wxUIntPtr *) cookie);
+ rt.addTupleCount(2);
+ break;
+}
+case wxTreeCtrl_GetNextChild: { // wxTreeCtrl::GetNextChild
+ wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
+ wxTreeItemIdValue cookie = (wxTreeItemIdValue) * (wxUint64 *) bp; bp += 8;
+ if(!This) throw wxe_badarg(0);
+ wxTreeItemId Result = This->GetNextChild(item,cookie);
+ rt.add((wxUIntPtr *) Result.m_pItem);
+ rt.add((wxUIntPtr *) cookie);
+ rt.addTupleCount(2);
+ break;
+}
case wxTreeCtrl_GetFirstVisibleItem: { // wxTreeCtrl::GetFirstVisibleItem
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetFirstVisibleItem();
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetImageList: { // wxTreeCtrl::GetImageList
@@ -18573,7 +18606,8 @@ case wxTreeCtrl_GetIndent: { // wxTreeCtrl::GetIndent
}
case wxTreeCtrl_GetItemBackgroundColour: { // wxTreeCtrl::GetItemBackgroundColour
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxColour Result = This->GetItemBackgroundColour(item);
rt.add(Result);
@@ -18581,7 +18615,8 @@ case wxTreeCtrl_GetItemBackgroundColour: { // wxTreeCtrl::GetItemBackgroundColou
}
case wxTreeCtrl_GetItemData: { // wxTreeCtrl::GetItemData
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxETreeItemData * Result = (wxETreeItemData*)This->GetItemData(item);
rt.addExt2Term(Result);
@@ -18589,7 +18624,8 @@ case wxTreeCtrl_GetItemData: { // wxTreeCtrl::GetItemData
}
case wxTreeCtrl_GetItemFont: { // wxTreeCtrl::GetItemFont
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxFont * Result = new wxFont(This->GetItemFont(item)); newPtr((void *) Result,3, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxFont");
@@ -18597,7 +18633,8 @@ case wxTreeCtrl_GetItemFont: { // wxTreeCtrl::GetItemFont
}
case wxTreeCtrl_GetItemImage_1: { // wxTreeCtrl::GetItemImage
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
int Result = This->GetItemImage(item);
rt.addInt(Result);
@@ -18606,7 +18643,8 @@ case wxTreeCtrl_GetItemImage_1: { // wxTreeCtrl::GetItemImage
case wxTreeCtrl_GetItemImage_2: { // wxTreeCtrl::GetItemImage
wxTreeItemIcon which=wxTreeItemIcon_Normal;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
while( * (int*) bp) { switch (* (int*) bp) {
case 1: {bp += 4;
which = *(wxTreeItemIcon *) bp; bp += 4;;
@@ -18619,7 +18657,8 @@ which = *(wxTreeItemIcon *) bp; bp += 4;;
}
case wxTreeCtrl_GetItemText: { // wxTreeCtrl::GetItemText
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxString Result = This->GetItemText(item);
rt.add(Result);
@@ -18627,7 +18666,8 @@ case wxTreeCtrl_GetItemText: { // wxTreeCtrl::GetItemText
}
case wxTreeCtrl_GetItemTextColour: { // wxTreeCtrl::GetItemTextColour
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxColour Result = This->GetItemTextColour(item);
rt.add(Result);
@@ -18635,64 +18675,70 @@ case wxTreeCtrl_GetItemTextColour: { // wxTreeCtrl::GetItemTextColour
}
case wxTreeCtrl_GetLastChild: { // wxTreeCtrl::GetLastChild
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetLastChild(item);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetNextSibling: { // wxTreeCtrl::GetNextSibling
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetNextSibling(item);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetNextVisible: { // wxTreeCtrl::GetNextVisible
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetNextVisible(item);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetItemParent: { // wxTreeCtrl::GetItemParent
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetItemParent(item);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetPrevSibling: { // wxTreeCtrl::GetPrevSibling
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetPrevSibling(item);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetPrevVisible: { // wxTreeCtrl::GetPrevVisible
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetPrevVisible(item);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetRootItem: { // wxTreeCtrl::GetRootItem
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetRootItem();
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetSelection: { // wxTreeCtrl::GetSelection
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetSelection();
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_GetSelections: { // wxTreeCtrl::GetSelections
@@ -18702,7 +18748,7 @@ case wxTreeCtrl_GetSelections: { // wxTreeCtrl::GetSelections
size_t Result = This->GetSelections(val);
rt.addInt(Result);
for(unsigned int i=0; i < val.GetCount(); i++) {
- rt.addRef(getRef((void *)val[i].m_pItem,memenv), "wxTreeItemId");}
+ rt.add((wxUIntPtr *)val[i].m_pItem);}
rt.endList(val.GetCount());
rt.addTupleCount(2);
break;
@@ -18721,42 +18767,16 @@ case wxTreeCtrl_HitTest: { // wxTreeCtrl::HitTest
wxPoint point = wxPoint(*pointX,*pointY);
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->HitTest(point);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
- break;
-}
-case wxTreeCtrl_InsertItem_4_1: { // wxTreeCtrl::InsertItem
- int image=-1;
- int selectedImage=-1;
- wxETreeItemData * data= NULL;
- wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId parent = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
- wxTreeItemId idPrevious = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
- int * textLen = (int *) bp; bp += 4;
- wxString text = wxString(bp, wxConvUTF8);
- bp += *textLen+((8-((0+ *textLen) & 7)) & 7);
- while( * (int*) bp) { switch (* (int*) bp) {
- case 1: {bp += 4;
- image = (int)*(int *) bp; bp += 4;
- } break;
- case 2: {bp += 4;
- selectedImage = (int)*(int *) bp; bp += 4;
- } break;
- case 3: {bp += 4;
- data = new wxETreeItemData(Ecmd.bin[0]->size, Ecmd.bin[0]->base);
- bp += 4; /* Align */
- } break;
- }};
- if(!This) throw wxe_badarg(0);
- wxTreeItemId Result = This->InsertItem(parent,idPrevious,text,image,selectedImage,data);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
-case wxTreeCtrl_InsertItem_4_0: { // wxTreeCtrl::InsertItem
+case wxTreeCtrl_InsertItem: { // wxTreeCtrl::InsertItem
int image=-1;
int selImage=-1;
wxETreeItemData * data= NULL;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId parent = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId parent = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * pos = (int *) bp; bp += 4;
int * textLen = (int *) bp; bp += 4;
wxString text = wxString(bp, wxConvUTF8);
@@ -18775,12 +18795,13 @@ case wxTreeCtrl_InsertItem_4_0: { // wxTreeCtrl::InsertItem
}};
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->InsertItem(parent,(size_t) *pos,text,image,selImage,data);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_IsBold: { // wxTreeCtrl::IsBold
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
bool Result = This->IsBold(item);
rt.addBool(Result);
@@ -18788,7 +18809,8 @@ case wxTreeCtrl_IsBold: { // wxTreeCtrl::IsBold
}
case wxTreeCtrl_IsExpanded: { // wxTreeCtrl::IsExpanded
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
bool Result = This->IsExpanded(item);
rt.addBool(Result);
@@ -18796,7 +18818,8 @@ case wxTreeCtrl_IsExpanded: { // wxTreeCtrl::IsExpanded
}
case wxTreeCtrl_IsSelected: { // wxTreeCtrl::IsSelected
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
bool Result = This->IsSelected(item);
rt.addBool(Result);
@@ -18804,7 +18827,8 @@ case wxTreeCtrl_IsSelected: { // wxTreeCtrl::IsSelected
}
case wxTreeCtrl_IsVisible: { // wxTreeCtrl::IsVisible
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
bool Result = This->IsVisible(item);
rt.addBool(Result);
@@ -18812,7 +18836,8 @@ case wxTreeCtrl_IsVisible: { // wxTreeCtrl::IsVisible
}
case wxTreeCtrl_ItemHasChildren: { // wxTreeCtrl::ItemHasChildren
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
bool Result = This->ItemHasChildren(item);
rt.addBool(Result);
@@ -18823,7 +18848,8 @@ case wxTreeCtrl_PrependItem: { // wxTreeCtrl::PrependItem
int selectedImage=-1;
wxETreeItemData * data= NULL;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId parent = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId parent = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * textLen = (int *) bp; bp += 4;
wxString text = wxString(bp, wxConvUTF8);
bp += *textLen+((8-((4+ *textLen) & 7)) & 7);
@@ -18841,19 +18867,21 @@ case wxTreeCtrl_PrependItem: { // wxTreeCtrl::PrependItem
}};
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->PrependItem(parent,text,image,selectedImage,data);
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeCtrl_ScrollTo: { // wxTreeCtrl::ScrollTo
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->ScrollTo(item);
break;
}
case wxTreeCtrl_SelectItem_1: { // wxTreeCtrl::SelectItem
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->SelectItem(item);
break;
@@ -18861,7 +18889,8 @@ case wxTreeCtrl_SelectItem_1: { // wxTreeCtrl::SelectItem
case wxTreeCtrl_SelectItem_2: { // wxTreeCtrl::SelectItem
bool select=true;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
while( * (int*) bp) { switch (* (int*) bp) {
case 1: {bp += 4;
select = *(bool *) bp; bp += 4;
@@ -18887,7 +18916,8 @@ case wxTreeCtrl_SetImageList: { // wxTreeCtrl::SetImageList
}
case wxTreeCtrl_SetItemBackgroundColour: { // wxTreeCtrl::SetItemBackgroundColour
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * colR = (int *) bp; bp += 4;
int * colG = (int *) bp; bp += 4;
int * colB = (int *) bp; bp += 4;
@@ -18900,7 +18930,8 @@ case wxTreeCtrl_SetItemBackgroundColour: { // wxTreeCtrl::SetItemBackgroundColou
case wxTreeCtrl_SetItemBold: { // wxTreeCtrl::SetItemBold
bool bold=true;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
while( * (int*) bp) { switch (* (int*) bp) {
case 1: {bp += 4;
bold = *(bool *) bp; bp += 4;
@@ -18912,7 +18943,8 @@ case wxTreeCtrl_SetItemBold: { // wxTreeCtrl::SetItemBold
}
case wxTreeCtrl_SetItemData: { // wxTreeCtrl::SetItemData
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
wxETreeItemData * data = new wxETreeItemData(Ecmd.bin[0]->size, Ecmd.bin[0]->base);
if(!This) throw wxe_badarg(0);
This->SetItemData(item,data);
@@ -18921,7 +18953,8 @@ case wxTreeCtrl_SetItemData: { // wxTreeCtrl::SetItemData
case wxTreeCtrl_SetItemDropHighlight: { // wxTreeCtrl::SetItemDropHighlight
bool highlight=true;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
while( * (int*) bp) { switch (* (int*) bp) {
case 1: {bp += 4;
highlight = *(bool *) bp; bp += 4;
@@ -18933,7 +18966,8 @@ case wxTreeCtrl_SetItemDropHighlight: { // wxTreeCtrl::SetItemDropHighlight
}
case wxTreeCtrl_SetItemFont: { // wxTreeCtrl::SetItemFont
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
wxFont *font = (wxFont *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
This->SetItemFont(item,*font);
@@ -18942,7 +18976,8 @@ case wxTreeCtrl_SetItemFont: { // wxTreeCtrl::SetItemFont
case wxTreeCtrl_SetItemHasChildren: { // wxTreeCtrl::SetItemHasChildren
bool has=true;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
while( * (int*) bp) { switch (* (int*) bp) {
case 1: {bp += 4;
has = *(bool *) bp; bp += 4;
@@ -18954,7 +18989,8 @@ case wxTreeCtrl_SetItemHasChildren: { // wxTreeCtrl::SetItemHasChildren
}
case wxTreeCtrl_SetItemImage_2: { // wxTreeCtrl::SetItemImage
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * image = (int *) bp; bp += 4;
if(!This) throw wxe_badarg(0);
This->SetItemImage(item,(int) *image);
@@ -18963,7 +18999,8 @@ case wxTreeCtrl_SetItemImage_2: { // wxTreeCtrl::SetItemImage
case wxTreeCtrl_SetItemImage_3: { // wxTreeCtrl::SetItemImage
wxTreeItemIcon which=wxTreeItemIcon_Normal;
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * image = (int *) bp; bp += 4;
bp += 4; /* Align */
while( * (int*) bp) { switch (* (int*) bp) {
@@ -18977,7 +19014,8 @@ which = *(wxTreeItemIcon *) bp; bp += 4;;
}
case wxTreeCtrl_SetItemText: { // wxTreeCtrl::SetItemText
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * textLen = (int *) bp; bp += 4;
wxString text = wxString(bp, wxConvUTF8);
bp += *textLen+((8-((4+ *textLen) & 7)) & 7);
@@ -18987,7 +19025,8 @@ case wxTreeCtrl_SetItemText: { // wxTreeCtrl::SetItemText
}
case wxTreeCtrl_SetItemTextColour: { // wxTreeCtrl::SetItemTextColour
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
int * colR = (int *) bp; bp += 4;
int * colG = (int *) bp; bp += 4;
int * colB = (int *) bp; bp += 4;
@@ -19013,21 +19052,24 @@ case wxTreeCtrl_SetWindowStyle: { // wxTreeCtrl::SetWindowStyle
}
case wxTreeCtrl_SortChildren: { // wxTreeCtrl::SortChildren
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->SortChildren(item);
break;
}
case wxTreeCtrl_Toggle: { // wxTreeCtrl::Toggle
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->Toggle(item);
break;
}
case wxTreeCtrl_ToggleItemSelection: { // wxTreeCtrl::ToggleItemSelection
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->ToggleItemSelection(item);
break;
@@ -19046,7 +19088,8 @@ case wxTreeCtrl_UnselectAll: { // wxTreeCtrl::UnselectAll
}
case wxTreeCtrl_UnselectItem: { // wxTreeCtrl::UnselectItem
wxTreeCtrl *This = (wxTreeCtrl *) getPtr(bp,memenv); bp += 4;
- wxTreeItemId item = wxTreeItemId(getPtr(bp,memenv)); bp += 4;
+ bp += 4; /* Align */
+ wxTreeItemId item = wxTreeItemId((void *) *(wxUint64 *) bp); bp += 8;
if(!This) throw wxe_badarg(0);
This->UnselectItem(item);
break;
@@ -30146,7 +30189,7 @@ case wxTreeEvent_GetItem: { // wxTreeEvent::GetItem
wxTreeEvent *This = (wxTreeEvent *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetItem();
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeEvent_GetKeyEvent: { // wxTreeEvent::GetKeyEvent
@@ -30167,7 +30210,7 @@ case wxTreeEvent_GetOldItem: { // wxTreeEvent::GetOldItem
wxTreeEvent *This = (wxTreeEvent *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
wxTreeItemId Result = This->GetOldItem();
- rt.addRef(getRef((void *)Result.m_pItem,memenv), "wxTreeItemId");
+ rt.add((wxUIntPtr *) Result.m_pItem);
break;
}
case wxTreeEvent_GetPoint: { // wxTreeEvent::GetPoint
diff --git a/lib/wx/c_src/gen/wxe_macros.h b/lib/wx/c_src/gen/wxe_macros.h
index 5e4b4deb9c..74d82a54f3 100644
--- a/lib/wx/c_src/gen/wxe_macros.h
+++ b/lib/wx/c_src/gen/wxe_macros.h
@@ -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%
*/
#include <wx/caret.h>
@@ -1882,1437 +1882,1438 @@
#define wxTreeCtrl_GetChildrenCount 2015
#define wxTreeCtrl_GetCount 2016
#define wxTreeCtrl_GetEditControl 2017
-#define wxTreeCtrl_GetFirstVisibleItem 2018
-#define wxTreeCtrl_GetImageList 2019
-#define wxTreeCtrl_GetIndent 2020
-#define wxTreeCtrl_GetItemBackgroundColour 2021
-#define wxTreeCtrl_GetItemData 2022
-#define wxTreeCtrl_GetItemFont 2023
-#define wxTreeCtrl_GetItemImage_1 2024
-#define wxTreeCtrl_GetItemImage_2 2025
-#define wxTreeCtrl_GetItemText 2026
-#define wxTreeCtrl_GetItemTextColour 2027
-#define wxTreeCtrl_GetLastChild 2028
-#define wxTreeCtrl_GetNextSibling 2029
-#define wxTreeCtrl_GetNextVisible 2030
-#define wxTreeCtrl_GetItemParent 2031
-#define wxTreeCtrl_GetPrevSibling 2032
-#define wxTreeCtrl_GetPrevVisible 2033
-#define wxTreeCtrl_GetRootItem 2034
-#define wxTreeCtrl_GetSelection 2035
-#define wxTreeCtrl_GetSelections 2036
-#define wxTreeCtrl_GetStateImageList 2037
-#define wxTreeCtrl_HitTest 2038
-#define wxTreeCtrl_InsertItem_4_1 2039
-#define wxTreeCtrl_InsertItem_4_0 2040
-#define wxTreeCtrl_IsBold 2041
-#define wxTreeCtrl_IsExpanded 2042
-#define wxTreeCtrl_IsSelected 2043
-#define wxTreeCtrl_IsVisible 2044
-#define wxTreeCtrl_ItemHasChildren 2045
-#define wxTreeCtrl_PrependItem 2046
-#define wxTreeCtrl_ScrollTo 2047
-#define wxTreeCtrl_SelectItem_1 2048
-#define wxTreeCtrl_SelectItem_2 2049
-#define wxTreeCtrl_SetIndent 2050
-#define wxTreeCtrl_SetImageList 2051
-#define wxTreeCtrl_SetItemBackgroundColour 2052
-#define wxTreeCtrl_SetItemBold 2053
-#define wxTreeCtrl_SetItemData 2054
-#define wxTreeCtrl_SetItemDropHighlight 2055
-#define wxTreeCtrl_SetItemFont 2056
-#define wxTreeCtrl_SetItemHasChildren 2057
-#define wxTreeCtrl_SetItemImage_2 2058
-#define wxTreeCtrl_SetItemImage_3 2059
-#define wxTreeCtrl_SetItemText 2060
-#define wxTreeCtrl_SetItemTextColour 2061
-#define wxTreeCtrl_SetStateImageList 2062
-#define wxTreeCtrl_SetWindowStyle 2063
-#define wxTreeCtrl_SortChildren 2064
-#define wxTreeCtrl_Toggle 2065
-#define wxTreeCtrl_ToggleItemSelection 2066
-#define wxTreeCtrl_Unselect 2067
-#define wxTreeCtrl_UnselectAll 2068
-#define wxTreeCtrl_UnselectItem 2069
-#define wxScrollBar_new_0 2070
-#define wxScrollBar_new_3 2071
-#define wxScrollBar_destruct 2072
-#define wxScrollBar_Create 2073
-#define wxScrollBar_GetRange 2074
-#define wxScrollBar_GetPageSize 2075
-#define wxScrollBar_GetThumbPosition 2076
-#define wxScrollBar_GetThumbSize 2077
-#define wxScrollBar_SetThumbPosition 2078
-#define wxScrollBar_SetScrollbar 2079
-#define wxSpinButton_new_2 2081
-#define wxSpinButton_new_0 2082
-#define wxSpinButton_Create 2083
-#define wxSpinButton_GetMax 2084
-#define wxSpinButton_GetMin 2085
-#define wxSpinButton_GetValue 2086
-#define wxSpinButton_SetRange 2087
-#define wxSpinButton_SetValue 2088
-#define wxSpinButton_destroy 2089
-#define wxSpinCtrl_new_0 2090
-#define wxSpinCtrl_new_2 2091
-#define wxSpinCtrl_Create 2093
-#define wxSpinCtrl_SetValue_1_1 2096
-#define wxSpinCtrl_SetValue_1_0 2097
-#define wxSpinCtrl_GetValue 2099
-#define wxSpinCtrl_SetRange 2101
-#define wxSpinCtrl_SetSelection 2102
-#define wxSpinCtrl_GetMin 2104
-#define wxSpinCtrl_GetMax 2106
-#define wxSpinCtrl_destroy 2107
-#define wxStaticText_new_0 2108
-#define wxStaticText_new_4 2109
-#define wxStaticText_Create 2110
-#define wxStaticText_GetLabel 2111
-#define wxStaticText_SetLabel 2112
-#define wxStaticText_Wrap 2113
-#define wxStaticText_destroy 2114
-#define wxStaticBitmap_new_0 2115
-#define wxStaticBitmap_new_4 2116
-#define wxStaticBitmap_Create 2117
-#define wxStaticBitmap_GetBitmap 2118
-#define wxStaticBitmap_SetBitmap 2119
-#define wxStaticBitmap_destroy 2120
-#define wxRadioBox_new 2121
-#define wxRadioBox_destruct 2123
-#define wxRadioBox_Create 2124
-#define wxRadioBox_Enable_2 2125
-#define wxRadioBox_Enable_1 2126
-#define wxRadioBox_GetSelection 2127
-#define wxRadioBox_GetString 2128
-#define wxRadioBox_SetSelection 2129
-#define wxRadioBox_Show_2 2130
-#define wxRadioBox_Show_1 2131
-#define wxRadioBox_GetColumnCount 2132
-#define wxRadioBox_GetItemHelpText 2133
-#define wxRadioBox_GetItemToolTip 2134
-#define wxRadioBox_GetItemFromPoint 2136
-#define wxRadioBox_GetRowCount 2137
-#define wxRadioBox_IsItemEnabled 2138
-#define wxRadioBox_IsItemShown 2139
-#define wxRadioBox_SetItemHelpText 2140
-#define wxRadioBox_SetItemToolTip 2141
-#define wxRadioButton_new_0 2142
-#define wxRadioButton_new_4 2143
-#define wxRadioButton_Create 2144
-#define wxRadioButton_GetValue 2145
-#define wxRadioButton_SetValue 2146
-#define wxRadioButton_destroy 2147
-#define wxSlider_new_6 2149
-#define wxSlider_new_0 2150
-#define wxSlider_Create 2151
-#define wxSlider_GetLineSize 2152
-#define wxSlider_GetMax 2153
-#define wxSlider_GetMin 2154
-#define wxSlider_GetPageSize 2155
-#define wxSlider_GetThumbLength 2156
-#define wxSlider_GetValue 2157
-#define wxSlider_SetLineSize 2158
-#define wxSlider_SetPageSize 2159
-#define wxSlider_SetRange 2160
-#define wxSlider_SetThumbLength 2161
-#define wxSlider_SetValue 2162
-#define wxSlider_destroy 2163
-#define wxDialog_new_4 2165
-#define wxDialog_new_0 2166
-#define wxDialog_destruct 2168
-#define wxDialog_Create 2169
-#define wxDialog_CreateButtonSizer 2170
-#define wxDialog_CreateStdDialogButtonSizer 2171
-#define wxDialog_EndModal 2172
-#define wxDialog_GetAffirmativeId 2173
-#define wxDialog_GetReturnCode 2174
-#define wxDialog_IsModal 2175
-#define wxDialog_SetAffirmativeId 2176
-#define wxDialog_SetReturnCode 2177
-#define wxDialog_Show 2178
-#define wxDialog_ShowModal 2179
-#define wxColourDialog_new_0 2180
-#define wxColourDialog_new_2 2181
-#define wxColourDialog_destruct 2182
-#define wxColourDialog_Create 2183
-#define wxColourDialog_GetColourData 2184
-#define wxColourData_new_0 2185
-#define wxColourData_new_1 2186
-#define wxColourData_destruct 2187
-#define wxColourData_GetChooseFull 2188
-#define wxColourData_GetColour 2189
-#define wxColourData_GetCustomColour 2191
-#define wxColourData_SetChooseFull 2192
-#define wxColourData_SetColour 2193
-#define wxColourData_SetCustomColour 2194
-#define wxPalette_new_0 2195
-#define wxPalette_new_4 2196
-#define wxPalette_destruct 2198
-#define wxPalette_Create 2199
-#define wxPalette_GetColoursCount 2200
-#define wxPalette_GetPixel 2201
-#define wxPalette_GetRGB 2202
-#define wxPalette_IsOk 2203
-#define wxDirDialog_new 2207
-#define wxDirDialog_destruct 2208
-#define wxDirDialog_GetPath 2209
-#define wxDirDialog_GetMessage 2210
-#define wxDirDialog_SetMessage 2211
-#define wxDirDialog_SetPath 2212
-#define wxFileDialog_new 2216
-#define wxFileDialog_destruct 2217
-#define wxFileDialog_GetDirectory 2218
-#define wxFileDialog_GetFilename 2219
-#define wxFileDialog_GetFilenames 2220
-#define wxFileDialog_GetFilterIndex 2221
-#define wxFileDialog_GetMessage 2222
-#define wxFileDialog_GetPath 2223
-#define wxFileDialog_GetPaths 2224
-#define wxFileDialog_GetWildcard 2225
-#define wxFileDialog_SetDirectory 2226
-#define wxFileDialog_SetFilename 2227
-#define wxFileDialog_SetFilterIndex 2228
-#define wxFileDialog_SetMessage 2229
-#define wxFileDialog_SetPath 2230
-#define wxFileDialog_SetWildcard 2231
-#define wxPickerBase_SetInternalMargin 2232
-#define wxPickerBase_GetInternalMargin 2233
-#define wxPickerBase_SetTextCtrlProportion 2234
-#define wxPickerBase_SetPickerCtrlProportion 2235
-#define wxPickerBase_GetTextCtrlProportion 2236
-#define wxPickerBase_GetPickerCtrlProportion 2237
-#define wxPickerBase_HasTextCtrl 2238
-#define wxPickerBase_GetTextCtrl 2239
-#define wxPickerBase_IsTextCtrlGrowable 2240
-#define wxPickerBase_SetPickerCtrlGrowable 2241
-#define wxPickerBase_SetTextCtrlGrowable 2242
-#define wxPickerBase_IsPickerCtrlGrowable 2243
-#define wxFilePickerCtrl_new_0 2244
-#define wxFilePickerCtrl_new_3 2245
-#define wxFilePickerCtrl_Create 2246
-#define wxFilePickerCtrl_GetPath 2247
-#define wxFilePickerCtrl_SetPath 2248
-#define wxFilePickerCtrl_destroy 2249
-#define wxDirPickerCtrl_new_0 2250
-#define wxDirPickerCtrl_new_3 2251
-#define wxDirPickerCtrl_Create 2252
-#define wxDirPickerCtrl_GetPath 2253
-#define wxDirPickerCtrl_SetPath 2254
-#define wxDirPickerCtrl_destroy 2255
-#define wxColourPickerCtrl_new_0 2256
-#define wxColourPickerCtrl_new_3 2257
-#define wxColourPickerCtrl_Create 2258
-#define wxColourPickerCtrl_GetColour 2259
-#define wxColourPickerCtrl_SetColour_1_1 2260
-#define wxColourPickerCtrl_SetColour_1_0 2261
-#define wxColourPickerCtrl_destroy 2262
-#define wxDatePickerCtrl_new_0 2263
-#define wxDatePickerCtrl_new_3 2264
-#define wxDatePickerCtrl_GetRange 2265
-#define wxDatePickerCtrl_GetValue 2266
-#define wxDatePickerCtrl_SetRange 2267
-#define wxDatePickerCtrl_SetValue 2268
-#define wxDatePickerCtrl_destroy 2269
-#define wxFontPickerCtrl_new_0 2270
-#define wxFontPickerCtrl_new_3 2271
-#define wxFontPickerCtrl_Create 2272
-#define wxFontPickerCtrl_GetSelectedFont 2273
-#define wxFontPickerCtrl_SetSelectedFont 2274
-#define wxFontPickerCtrl_GetMaxPointSize 2275
-#define wxFontPickerCtrl_SetMaxPointSize 2276
-#define wxFontPickerCtrl_destroy 2277
-#define wxFindReplaceDialog_new_0 2280
-#define wxFindReplaceDialog_new_4 2281
-#define wxFindReplaceDialog_destruct 2282
-#define wxFindReplaceDialog_Create 2283
-#define wxFindReplaceDialog_GetData 2284
-#define wxFindReplaceData_new_0 2285
-#define wxFindReplaceData_new_1 2286
-#define wxFindReplaceData_GetFindString 2287
-#define wxFindReplaceData_GetReplaceString 2288
-#define wxFindReplaceData_GetFlags 2289
-#define wxFindReplaceData_SetFlags 2290
-#define wxFindReplaceData_SetFindString 2291
-#define wxFindReplaceData_SetReplaceString 2292
-#define wxFindReplaceData_destroy 2293
-#define wxMultiChoiceDialog_new_0 2294
-#define wxMultiChoiceDialog_new_5 2296
-#define wxMultiChoiceDialog_GetSelections 2297
-#define wxMultiChoiceDialog_SetSelections 2298
-#define wxMultiChoiceDialog_destroy 2299
-#define wxSingleChoiceDialog_new_0 2300
-#define wxSingleChoiceDialog_new_5 2302
-#define wxSingleChoiceDialog_GetSelection 2303
-#define wxSingleChoiceDialog_GetStringSelection 2304
-#define wxSingleChoiceDialog_SetSelection 2305
-#define wxSingleChoiceDialog_destroy 2306
-#define wxTextEntryDialog_new 2307
-#define wxTextEntryDialog_GetValue 2308
-#define wxTextEntryDialog_SetValue 2309
-#define wxTextEntryDialog_destroy 2310
-#define wxPasswordEntryDialog_new 2311
-#define wxPasswordEntryDialog_destroy 2312
-#define wxFontData_new_0 2313
-#define wxFontData_new_1 2314
-#define wxFontData_destruct 2315
-#define wxFontData_EnableEffects 2316
-#define wxFontData_GetAllowSymbols 2317
-#define wxFontData_GetColour 2318
-#define wxFontData_GetChosenFont 2319
-#define wxFontData_GetEnableEffects 2320
-#define wxFontData_GetInitialFont 2321
-#define wxFontData_GetShowHelp 2322
-#define wxFontData_SetAllowSymbols 2323
-#define wxFontData_SetChosenFont 2324
-#define wxFontData_SetColour 2325
-#define wxFontData_SetInitialFont 2326
-#define wxFontData_SetRange 2327
-#define wxFontData_SetShowHelp 2328
-#define wxFontDialog_new_0 2332
-#define wxFontDialog_new_2 2334
-#define wxFontDialog_Create 2336
-#define wxFontDialog_GetFontData 2337
-#define wxFontDialog_destroy 2339
-#define wxProgressDialog_new 2340
-#define wxProgressDialog_destruct 2341
-#define wxProgressDialog_Resume 2342
-#define wxProgressDialog_Update_2 2343
-#define wxProgressDialog_Update_0 2344
-#define wxMessageDialog_new 2345
-#define wxMessageDialog_destruct 2346
-#define wxPageSetupDialog_new 2347
-#define wxPageSetupDialog_destruct 2348
-#define wxPageSetupDialog_GetPageSetupData 2349
-#define wxPageSetupDialog_ShowModal 2350
-#define wxPageSetupDialogData_new_0 2351
-#define wxPageSetupDialogData_new_1_0 2352
-#define wxPageSetupDialogData_new_1_1 2353
-#define wxPageSetupDialogData_destruct 2354
-#define wxPageSetupDialogData_EnableHelp 2355
-#define wxPageSetupDialogData_EnableMargins 2356
-#define wxPageSetupDialogData_EnableOrientation 2357
-#define wxPageSetupDialogData_EnablePaper 2358
-#define wxPageSetupDialogData_EnablePrinter 2359
-#define wxPageSetupDialogData_GetDefaultMinMargins 2360
-#define wxPageSetupDialogData_GetEnableMargins 2361
-#define wxPageSetupDialogData_GetEnableOrientation 2362
-#define wxPageSetupDialogData_GetEnablePaper 2363
-#define wxPageSetupDialogData_GetEnablePrinter 2364
-#define wxPageSetupDialogData_GetEnableHelp 2365
-#define wxPageSetupDialogData_GetDefaultInfo 2366
-#define wxPageSetupDialogData_GetMarginTopLeft 2367
-#define wxPageSetupDialogData_GetMarginBottomRight 2368
-#define wxPageSetupDialogData_GetMinMarginTopLeft 2369
-#define wxPageSetupDialogData_GetMinMarginBottomRight 2370
-#define wxPageSetupDialogData_GetPaperId 2371
-#define wxPageSetupDialogData_GetPaperSize 2372
-#define wxPageSetupDialogData_GetPrintData 2374
-#define wxPageSetupDialogData_IsOk 2375
-#define wxPageSetupDialogData_SetDefaultInfo 2376
-#define wxPageSetupDialogData_SetDefaultMinMargins 2377
-#define wxPageSetupDialogData_SetMarginTopLeft 2378
-#define wxPageSetupDialogData_SetMarginBottomRight 2379
-#define wxPageSetupDialogData_SetMinMarginTopLeft 2380
-#define wxPageSetupDialogData_SetMinMarginBottomRight 2381
-#define wxPageSetupDialogData_SetPaperId 2382
-#define wxPageSetupDialogData_SetPaperSize_1_1 2383
-#define wxPageSetupDialogData_SetPaperSize_1_0 2384
-#define wxPageSetupDialogData_SetPrintData 2385
-#define wxPrintDialog_new_2_0 2386
-#define wxPrintDialog_new_2_1 2387
-#define wxPrintDialog_destruct 2388
-#define wxPrintDialog_GetPrintDialogData 2389
-#define wxPrintDialog_GetPrintDC 2390
-#define wxPrintDialogData_new_0 2391
-#define wxPrintDialogData_new_1_1 2392
-#define wxPrintDialogData_new_1_0 2393
-#define wxPrintDialogData_destruct 2394
-#define wxPrintDialogData_EnableHelp 2395
-#define wxPrintDialogData_EnablePageNumbers 2396
-#define wxPrintDialogData_EnablePrintToFile 2397
-#define wxPrintDialogData_EnableSelection 2398
-#define wxPrintDialogData_GetAllPages 2399
-#define wxPrintDialogData_GetCollate 2400
-#define wxPrintDialogData_GetFromPage 2401
-#define wxPrintDialogData_GetMaxPage 2402
-#define wxPrintDialogData_GetMinPage 2403
-#define wxPrintDialogData_GetNoCopies 2404
-#define wxPrintDialogData_GetPrintData 2405
-#define wxPrintDialogData_GetPrintToFile 2406
-#define wxPrintDialogData_GetSelection 2407
-#define wxPrintDialogData_GetToPage 2408
-#define wxPrintDialogData_IsOk 2409
-#define wxPrintDialogData_SetCollate 2410
-#define wxPrintDialogData_SetFromPage 2411
-#define wxPrintDialogData_SetMaxPage 2412
-#define wxPrintDialogData_SetMinPage 2413
-#define wxPrintDialogData_SetNoCopies 2414
-#define wxPrintDialogData_SetPrintData 2415
-#define wxPrintDialogData_SetPrintToFile 2416
-#define wxPrintDialogData_SetSelection 2417
-#define wxPrintDialogData_SetToPage 2418
-#define wxPrintData_new_0 2419
-#define wxPrintData_new_1 2420
-#define wxPrintData_destruct 2421
-#define wxPrintData_GetCollate 2422
-#define wxPrintData_GetBin 2423
-#define wxPrintData_GetColour 2424
-#define wxPrintData_GetDuplex 2425
-#define wxPrintData_GetNoCopies 2426
-#define wxPrintData_GetOrientation 2427
-#define wxPrintData_GetPaperId 2428
-#define wxPrintData_GetPrinterName 2429
-#define wxPrintData_GetQuality 2430
-#define wxPrintData_IsOk 2431
-#define wxPrintData_SetBin 2432
-#define wxPrintData_SetCollate 2433
-#define wxPrintData_SetColour 2434
-#define wxPrintData_SetDuplex 2435
-#define wxPrintData_SetNoCopies 2436
-#define wxPrintData_SetOrientation 2437
-#define wxPrintData_SetPaperId 2438
-#define wxPrintData_SetPrinterName 2439
-#define wxPrintData_SetQuality 2440
-#define wxPrintPreview_new_2 2443
-#define wxPrintPreview_new_3 2444
-#define wxPrintPreview_destruct 2446
-#define wxPrintPreview_GetCanvas 2447
-#define wxPrintPreview_GetCurrentPage 2448
-#define wxPrintPreview_GetFrame 2449
-#define wxPrintPreview_GetMaxPage 2450
-#define wxPrintPreview_GetMinPage 2451
-#define wxPrintPreview_GetPrintout 2452
-#define wxPrintPreview_GetPrintoutForPrinting 2453
-#define wxPrintPreview_IsOk 2454
-#define wxPrintPreview_PaintPage 2455
-#define wxPrintPreview_Print 2456
-#define wxPrintPreview_RenderPage 2457
-#define wxPrintPreview_SetCanvas 2458
-#define wxPrintPreview_SetCurrentPage 2459
-#define wxPrintPreview_SetFrame 2460
-#define wxPrintPreview_SetPrintout 2461
-#define wxPrintPreview_SetZoom 2462
-#define wxPreviewFrame_new 2463
-#define wxPreviewFrame_destruct 2464
-#define wxPreviewFrame_CreateControlBar 2465
-#define wxPreviewFrame_CreateCanvas 2466
-#define wxPreviewFrame_Initialize 2467
-#define wxPreviewFrame_OnCloseWindow 2468
-#define wxPreviewControlBar_new 2469
-#define wxPreviewControlBar_destruct 2470
-#define wxPreviewControlBar_CreateButtons 2471
-#define wxPreviewControlBar_GetPrintPreview 2472
-#define wxPreviewControlBar_GetZoomControl 2473
-#define wxPreviewControlBar_SetZoomControl 2474
-#define wxPrinter_new 2476
-#define wxPrinter_CreateAbortWindow 2477
-#define wxPrinter_GetAbort 2478
-#define wxPrinter_GetLastError 2479
-#define wxPrinter_GetPrintDialogData 2480
-#define wxPrinter_Print 2481
-#define wxPrinter_PrintDialog 2482
-#define wxPrinter_ReportError 2483
-#define wxPrinter_Setup 2484
-#define wxPrinter_destroy 2485
-#define wxXmlResource_new_1 2486
-#define wxXmlResource_new_2 2487
-#define wxXmlResource_destruct 2488
-#define wxXmlResource_AttachUnknownControl 2489
-#define wxXmlResource_ClearHandlers 2490
-#define wxXmlResource_CompareVersion 2491
-#define wxXmlResource_Get 2492
-#define wxXmlResource_GetFlags 2493
-#define wxXmlResource_GetVersion 2494
-#define wxXmlResource_GetXRCID 2495
-#define wxXmlResource_InitAllHandlers 2496
-#define wxXmlResource_Load 2497
-#define wxXmlResource_LoadBitmap 2498
-#define wxXmlResource_LoadDialog_2 2499
-#define wxXmlResource_LoadDialog_3 2500
-#define wxXmlResource_LoadFrame_2 2501
-#define wxXmlResource_LoadFrame_3 2502
-#define wxXmlResource_LoadIcon 2503
-#define wxXmlResource_LoadMenu 2504
-#define wxXmlResource_LoadMenuBar_2 2505
-#define wxXmlResource_LoadMenuBar_1 2506
-#define wxXmlResource_LoadPanel_2 2507
-#define wxXmlResource_LoadPanel_3 2508
-#define wxXmlResource_LoadToolBar 2509
-#define wxXmlResource_Set 2510
-#define wxXmlResource_SetFlags 2511
-#define wxXmlResource_Unload 2512
-#define wxXmlResource_xrcctrl 2513
-#define wxHtmlEasyPrinting_new 2514
-#define wxHtmlEasyPrinting_destruct 2515
-#define wxHtmlEasyPrinting_GetPrintData 2516
-#define wxHtmlEasyPrinting_GetPageSetupData 2517
-#define wxHtmlEasyPrinting_PreviewFile 2518
-#define wxHtmlEasyPrinting_PreviewText 2519
-#define wxHtmlEasyPrinting_PrintFile 2520
-#define wxHtmlEasyPrinting_PrintText 2521
-#define wxHtmlEasyPrinting_PageSetup 2522
-#define wxHtmlEasyPrinting_SetFonts 2523
-#define wxHtmlEasyPrinting_SetHeader 2524
-#define wxHtmlEasyPrinting_SetFooter 2525
-#define wxGLCanvas_new_2 2527
-#define wxGLCanvas_new_3_1 2528
-#define wxGLCanvas_new_3_0 2529
-#define wxGLCanvas_GetContext 2530
-#define wxGLCanvas_SetCurrent 2532
-#define wxGLCanvas_SwapBuffers 2533
-#define wxGLCanvas_destroy 2534
-#define wxAuiManager_new 2535
-#define wxAuiManager_destruct 2536
-#define wxAuiManager_AddPane_2_1 2537
-#define wxAuiManager_AddPane_3 2538
-#define wxAuiManager_AddPane_2_0 2539
-#define wxAuiManager_DetachPane 2540
-#define wxAuiManager_GetAllPanes 2541
-#define wxAuiManager_GetArtProvider 2542
-#define wxAuiManager_GetDockSizeConstraint 2543
-#define wxAuiManager_GetFlags 2544
-#define wxAuiManager_GetManagedWindow 2545
-#define wxAuiManager_GetManager 2546
-#define wxAuiManager_GetPane_1_1 2547
-#define wxAuiManager_GetPane_1_0 2548
-#define wxAuiManager_HideHint 2549
-#define wxAuiManager_InsertPane 2550
-#define wxAuiManager_LoadPaneInfo 2551
-#define wxAuiManager_LoadPerspective 2552
-#define wxAuiManager_SavePaneInfo 2553
-#define wxAuiManager_SavePerspective 2554
-#define wxAuiManager_SetArtProvider 2555
-#define wxAuiManager_SetDockSizeConstraint 2556
-#define wxAuiManager_SetFlags 2557
-#define wxAuiManager_SetManagedWindow 2558
-#define wxAuiManager_ShowHint 2559
-#define wxAuiManager_UnInit 2560
-#define wxAuiManager_Update 2561
-#define wxAuiPaneInfo_new_0 2562
-#define wxAuiPaneInfo_new_1 2563
-#define wxAuiPaneInfo_destruct 2564
-#define wxAuiPaneInfo_BestSize_1 2565
-#define wxAuiPaneInfo_BestSize_2 2566
-#define wxAuiPaneInfo_Bottom 2567
-#define wxAuiPaneInfo_BottomDockable 2568
-#define wxAuiPaneInfo_Caption 2569
-#define wxAuiPaneInfo_CaptionVisible 2570
-#define wxAuiPaneInfo_Centre 2571
-#define wxAuiPaneInfo_CentrePane 2572
-#define wxAuiPaneInfo_CloseButton 2573
-#define wxAuiPaneInfo_DefaultPane 2574
-#define wxAuiPaneInfo_DestroyOnClose 2575
-#define wxAuiPaneInfo_Direction 2576
-#define wxAuiPaneInfo_Dock 2577
-#define wxAuiPaneInfo_Dockable 2578
-#define wxAuiPaneInfo_Fixed 2579
-#define wxAuiPaneInfo_Float 2580
-#define wxAuiPaneInfo_Floatable 2581
-#define wxAuiPaneInfo_FloatingPosition_1 2582
-#define wxAuiPaneInfo_FloatingPosition_2 2583
-#define wxAuiPaneInfo_FloatingSize_1 2584
-#define wxAuiPaneInfo_FloatingSize_2 2585
-#define wxAuiPaneInfo_Gripper 2586
-#define wxAuiPaneInfo_GripperTop 2587
-#define wxAuiPaneInfo_HasBorder 2588
-#define wxAuiPaneInfo_HasCaption 2589
-#define wxAuiPaneInfo_HasCloseButton 2590
-#define wxAuiPaneInfo_HasFlag 2591
-#define wxAuiPaneInfo_HasGripper 2592
-#define wxAuiPaneInfo_HasGripperTop 2593
-#define wxAuiPaneInfo_HasMaximizeButton 2594
-#define wxAuiPaneInfo_HasMinimizeButton 2595
-#define wxAuiPaneInfo_HasPinButton 2596
-#define wxAuiPaneInfo_Hide 2597
-#define wxAuiPaneInfo_IsBottomDockable 2598
-#define wxAuiPaneInfo_IsDocked 2599
-#define wxAuiPaneInfo_IsFixed 2600
-#define wxAuiPaneInfo_IsFloatable 2601
-#define wxAuiPaneInfo_IsFloating 2602
-#define wxAuiPaneInfo_IsLeftDockable 2603
-#define wxAuiPaneInfo_IsMovable 2604
-#define wxAuiPaneInfo_IsOk 2605
-#define wxAuiPaneInfo_IsResizable 2606
-#define wxAuiPaneInfo_IsRightDockable 2607
-#define wxAuiPaneInfo_IsShown 2608
-#define wxAuiPaneInfo_IsToolbar 2609
-#define wxAuiPaneInfo_IsTopDockable 2610
-#define wxAuiPaneInfo_Layer 2611
-#define wxAuiPaneInfo_Left 2612
-#define wxAuiPaneInfo_LeftDockable 2613
-#define wxAuiPaneInfo_MaxSize_1 2614
-#define wxAuiPaneInfo_MaxSize_2 2615
-#define wxAuiPaneInfo_MaximizeButton 2616
-#define wxAuiPaneInfo_MinSize_1 2617
-#define wxAuiPaneInfo_MinSize_2 2618
-#define wxAuiPaneInfo_MinimizeButton 2619
-#define wxAuiPaneInfo_Movable 2620
-#define wxAuiPaneInfo_Name 2621
-#define wxAuiPaneInfo_PaneBorder 2622
-#define wxAuiPaneInfo_PinButton 2623
-#define wxAuiPaneInfo_Position 2624
-#define wxAuiPaneInfo_Resizable 2625
-#define wxAuiPaneInfo_Right 2626
-#define wxAuiPaneInfo_RightDockable 2627
-#define wxAuiPaneInfo_Row 2628
-#define wxAuiPaneInfo_SafeSet 2629
-#define wxAuiPaneInfo_SetFlag 2630
-#define wxAuiPaneInfo_Show 2631
-#define wxAuiPaneInfo_ToolbarPane 2632
-#define wxAuiPaneInfo_Top 2633
-#define wxAuiPaneInfo_TopDockable 2634
-#define wxAuiPaneInfo_Window 2635
-#define wxAuiNotebook_new_0 2636
-#define wxAuiNotebook_new_2 2637
-#define wxAuiNotebook_AddPage 2638
-#define wxAuiNotebook_Create 2639
-#define wxAuiNotebook_DeletePage 2640
-#define wxAuiNotebook_GetArtProvider 2641
-#define wxAuiNotebook_GetPage 2642
-#define wxAuiNotebook_GetPageBitmap 2643
-#define wxAuiNotebook_GetPageCount 2644
-#define wxAuiNotebook_GetPageIndex 2645
-#define wxAuiNotebook_GetPageText 2646
-#define wxAuiNotebook_GetSelection 2647
-#define wxAuiNotebook_InsertPage 2648
-#define wxAuiNotebook_RemovePage 2649
-#define wxAuiNotebook_SetArtProvider 2650
-#define wxAuiNotebook_SetFont 2651
-#define wxAuiNotebook_SetPageBitmap 2652
-#define wxAuiNotebook_SetPageText 2653
-#define wxAuiNotebook_SetSelection 2654
-#define wxAuiNotebook_SetTabCtrlHeight 2655
-#define wxAuiNotebook_SetUniformBitmapSize 2656
-#define wxAuiNotebook_destroy 2657
-#define wxMDIParentFrame_new_0 2658
-#define wxMDIParentFrame_new_4 2659
-#define wxMDIParentFrame_destruct 2660
-#define wxMDIParentFrame_ActivateNext 2661
-#define wxMDIParentFrame_ActivatePrevious 2662
-#define wxMDIParentFrame_ArrangeIcons 2663
-#define wxMDIParentFrame_Cascade 2664
-#define wxMDIParentFrame_Create 2665
-#define wxMDIParentFrame_GetActiveChild 2666
-#define wxMDIParentFrame_GetClientWindow 2667
-#define wxMDIParentFrame_Tile 2668
-#define wxMDIChildFrame_new_0 2669
-#define wxMDIChildFrame_new_4 2670
-#define wxMDIChildFrame_destruct 2671
-#define wxMDIChildFrame_Activate 2672
-#define wxMDIChildFrame_Create 2673
-#define wxMDIChildFrame_Maximize 2674
-#define wxMDIChildFrame_Restore 2675
-#define wxMDIClientWindow_new_0 2676
-#define wxMDIClientWindow_new_2 2677
-#define wxMDIClientWindow_destruct 2678
-#define wxMDIClientWindow_CreateClient 2679
-#define wxLayoutAlgorithm_new 2680
-#define wxLayoutAlgorithm_LayoutFrame 2681
-#define wxLayoutAlgorithm_LayoutMDIFrame 2682
-#define wxLayoutAlgorithm_LayoutWindow 2683
-#define wxLayoutAlgorithm_destroy 2684
-#define wxEvent_GetId 2685
-#define wxEvent_GetSkipped 2686
-#define wxEvent_GetTimestamp 2687
-#define wxEvent_IsCommandEvent 2688
-#define wxEvent_ResumePropagation 2689
-#define wxEvent_ShouldPropagate 2690
-#define wxEvent_Skip 2691
-#define wxEvent_StopPropagation 2692
-#define wxCommandEvent_getClientData 2693
-#define wxCommandEvent_GetExtraLong 2694
-#define wxCommandEvent_GetInt 2695
-#define wxCommandEvent_GetSelection 2696
-#define wxCommandEvent_GetString 2697
-#define wxCommandEvent_IsChecked 2698
-#define wxCommandEvent_IsSelection 2699
-#define wxCommandEvent_SetInt 2700
-#define wxCommandEvent_SetString 2701
-#define wxScrollEvent_GetOrientation 2702
-#define wxScrollEvent_GetPosition 2703
-#define wxScrollWinEvent_GetOrientation 2704
-#define wxScrollWinEvent_GetPosition 2705
-#define wxMouseEvent_AltDown 2706
-#define wxMouseEvent_Button 2707
-#define wxMouseEvent_ButtonDClick 2708
-#define wxMouseEvent_ButtonDown 2709
-#define wxMouseEvent_ButtonUp 2710
-#define wxMouseEvent_CmdDown 2711
-#define wxMouseEvent_ControlDown 2712
-#define wxMouseEvent_Dragging 2713
-#define wxMouseEvent_Entering 2714
-#define wxMouseEvent_GetButton 2715
-#define wxMouseEvent_GetPosition 2718
-#define wxMouseEvent_GetLogicalPosition 2719
-#define wxMouseEvent_GetLinesPerAction 2720
-#define wxMouseEvent_GetWheelRotation 2721
-#define wxMouseEvent_GetWheelDelta 2722
-#define wxMouseEvent_GetX 2723
-#define wxMouseEvent_GetY 2724
-#define wxMouseEvent_IsButton 2725
-#define wxMouseEvent_IsPageScroll 2726
-#define wxMouseEvent_Leaving 2727
-#define wxMouseEvent_LeftDClick 2728
-#define wxMouseEvent_LeftDown 2729
-#define wxMouseEvent_LeftIsDown 2730
-#define wxMouseEvent_LeftUp 2731
-#define wxMouseEvent_MetaDown 2732
-#define wxMouseEvent_MiddleDClick 2733
-#define wxMouseEvent_MiddleDown 2734
-#define wxMouseEvent_MiddleIsDown 2735
-#define wxMouseEvent_MiddleUp 2736
-#define wxMouseEvent_Moving 2737
-#define wxMouseEvent_RightDClick 2738
-#define wxMouseEvent_RightDown 2739
-#define wxMouseEvent_RightIsDown 2740
-#define wxMouseEvent_RightUp 2741
-#define wxMouseEvent_ShiftDown 2742
-#define wxSetCursorEvent_GetCursor 2743
-#define wxSetCursorEvent_GetX 2744
-#define wxSetCursorEvent_GetY 2745
-#define wxSetCursorEvent_HasCursor 2746
-#define wxSetCursorEvent_SetCursor 2747
-#define wxKeyEvent_AltDown 2748
-#define wxKeyEvent_CmdDown 2749
-#define wxKeyEvent_ControlDown 2750
-#define wxKeyEvent_GetKeyCode 2751
-#define wxKeyEvent_GetModifiers 2752
-#define wxKeyEvent_GetPosition 2755
-#define wxKeyEvent_GetRawKeyCode 2756
-#define wxKeyEvent_GetRawKeyFlags 2757
-#define wxKeyEvent_GetUnicodeKey 2758
-#define wxKeyEvent_GetX 2759
-#define wxKeyEvent_GetY 2760
-#define wxKeyEvent_HasModifiers 2761
-#define wxKeyEvent_MetaDown 2762
-#define wxKeyEvent_ShiftDown 2763
-#define wxSizeEvent_GetSize 2764
-#define wxMoveEvent_GetPosition 2765
-#define wxEraseEvent_GetDC 2766
-#define wxFocusEvent_GetWindow 2767
-#define wxChildFocusEvent_GetWindow 2768
-#define wxMenuEvent_GetMenu 2769
-#define wxMenuEvent_GetMenuId 2770
-#define wxMenuEvent_IsPopup 2771
-#define wxCloseEvent_CanVeto 2772
-#define wxCloseEvent_GetLoggingOff 2773
-#define wxCloseEvent_SetCanVeto 2774
-#define wxCloseEvent_SetLoggingOff 2775
-#define wxCloseEvent_Veto 2776
-#define wxShowEvent_SetShow 2777
-#define wxShowEvent_GetShow 2778
-#define wxIconizeEvent_Iconized 2779
-#define wxJoystickEvent_ButtonDown 2780
-#define wxJoystickEvent_ButtonIsDown 2781
-#define wxJoystickEvent_ButtonUp 2782
-#define wxJoystickEvent_GetButtonChange 2783
-#define wxJoystickEvent_GetButtonState 2784
-#define wxJoystickEvent_GetJoystick 2785
-#define wxJoystickEvent_GetPosition 2786
-#define wxJoystickEvent_GetZPosition 2787
-#define wxJoystickEvent_IsButton 2788
-#define wxJoystickEvent_IsMove 2789
-#define wxJoystickEvent_IsZMove 2790
-#define wxUpdateUIEvent_CanUpdate 2791
-#define wxUpdateUIEvent_Check 2792
-#define wxUpdateUIEvent_Enable 2793
-#define wxUpdateUIEvent_Show 2794
-#define wxUpdateUIEvent_GetChecked 2795
-#define wxUpdateUIEvent_GetEnabled 2796
-#define wxUpdateUIEvent_GetShown 2797
-#define wxUpdateUIEvent_GetSetChecked 2798
-#define wxUpdateUIEvent_GetSetEnabled 2799
-#define wxUpdateUIEvent_GetSetShown 2800
-#define wxUpdateUIEvent_GetSetText 2801
-#define wxUpdateUIEvent_GetText 2802
-#define wxUpdateUIEvent_GetMode 2803
-#define wxUpdateUIEvent_GetUpdateInterval 2804
-#define wxUpdateUIEvent_ResetUpdateTime 2805
-#define wxUpdateUIEvent_SetMode 2806
-#define wxUpdateUIEvent_SetText 2807
-#define wxUpdateUIEvent_SetUpdateInterval 2808
-#define wxMouseCaptureChangedEvent_GetCapturedWindow 2809
-#define wxPaletteChangedEvent_SetChangedWindow 2810
-#define wxPaletteChangedEvent_GetChangedWindow 2811
-#define wxQueryNewPaletteEvent_SetPaletteRealized 2812
-#define wxQueryNewPaletteEvent_GetPaletteRealized 2813
-#define wxNavigationKeyEvent_GetDirection 2814
-#define wxNavigationKeyEvent_SetDirection 2815
-#define wxNavigationKeyEvent_IsWindowChange 2816
-#define wxNavigationKeyEvent_SetWindowChange 2817
-#define wxNavigationKeyEvent_IsFromTab 2818
-#define wxNavigationKeyEvent_SetFromTab 2819
-#define wxNavigationKeyEvent_GetCurrentFocus 2820
-#define wxNavigationKeyEvent_SetCurrentFocus 2821
-#define wxHelpEvent_GetOrigin 2822
-#define wxHelpEvent_GetPosition 2823
-#define wxHelpEvent_SetOrigin 2824
-#define wxHelpEvent_SetPosition 2825
-#define wxContextMenuEvent_GetPosition 2826
-#define wxContextMenuEvent_SetPosition 2827
-#define wxIdleEvent_CanSend 2828
-#define wxIdleEvent_GetMode 2829
-#define wxIdleEvent_RequestMore 2830
-#define wxIdleEvent_MoreRequested 2831
-#define wxIdleEvent_SetMode 2832
-#define wxGridEvent_AltDown 2833
-#define wxGridEvent_ControlDown 2834
-#define wxGridEvent_GetCol 2835
-#define wxGridEvent_GetPosition 2836
-#define wxGridEvent_GetRow 2837
-#define wxGridEvent_MetaDown 2838
-#define wxGridEvent_Selecting 2839
-#define wxGridEvent_ShiftDown 2840
-#define wxNotifyEvent_Allow 2841
-#define wxNotifyEvent_IsAllowed 2842
-#define wxNotifyEvent_Veto 2843
-#define wxSashEvent_GetEdge 2844
-#define wxSashEvent_GetDragRect 2845
-#define wxSashEvent_GetDragStatus 2846
-#define wxListEvent_GetCacheFrom 2847
-#define wxListEvent_GetCacheTo 2848
-#define wxListEvent_GetKeyCode 2849
-#define wxListEvent_GetIndex 2850
-#define wxListEvent_GetColumn 2851
-#define wxListEvent_GetPoint 2852
-#define wxListEvent_GetLabel 2853
-#define wxListEvent_GetText 2854
-#define wxListEvent_GetImage 2855
-#define wxListEvent_GetData 2856
-#define wxListEvent_GetMask 2857
-#define wxListEvent_GetItem 2858
-#define wxListEvent_IsEditCancelled 2859
-#define wxDateEvent_GetDate 2860
-#define wxCalendarEvent_GetWeekDay 2861
-#define wxFileDirPickerEvent_GetPath 2862
-#define wxColourPickerEvent_GetColour 2863
-#define wxFontPickerEvent_GetFont 2864
-#define wxStyledTextEvent_GetPosition 2865
-#define wxStyledTextEvent_GetKey 2866
-#define wxStyledTextEvent_GetModifiers 2867
-#define wxStyledTextEvent_GetModificationType 2868
-#define wxStyledTextEvent_GetText 2869
-#define wxStyledTextEvent_GetLength 2870
-#define wxStyledTextEvent_GetLinesAdded 2871
-#define wxStyledTextEvent_GetLine 2872
-#define wxStyledTextEvent_GetFoldLevelNow 2873
-#define wxStyledTextEvent_GetFoldLevelPrev 2874
-#define wxStyledTextEvent_GetMargin 2875
-#define wxStyledTextEvent_GetMessage 2876
-#define wxStyledTextEvent_GetWParam 2877
-#define wxStyledTextEvent_GetLParam 2878
-#define wxStyledTextEvent_GetListType 2879
-#define wxStyledTextEvent_GetX 2880
-#define wxStyledTextEvent_GetY 2881
-#define wxStyledTextEvent_GetDragText 2882
-#define wxStyledTextEvent_GetDragAllowMove 2883
-#define wxStyledTextEvent_GetDragResult 2884
-#define wxStyledTextEvent_GetShift 2885
-#define wxStyledTextEvent_GetControl 2886
-#define wxStyledTextEvent_GetAlt 2887
-#define utils_wxGetKeyState 2888
-#define utils_wxGetMousePosition 2889
-#define utils_wxGetMouseState 2890
-#define utils_wxSetDetectableAutoRepeat 2891
-#define utils_wxBell 2892
-#define utils_wxFindMenuItemId 2893
-#define utils_wxGenericFindWindowAtPoint 2894
-#define utils_wxFindWindowAtPoint 2895
-#define utils_wxBeginBusyCursor 2896
-#define utils_wxEndBusyCursor 2897
-#define utils_wxIsBusy 2898
-#define utils_wxShutdown 2899
-#define utils_wxShell 2900
-#define utils_wxLaunchDefaultBrowser 2901
-#define utils_wxGetEmailAddress 2902
-#define utils_wxGetUserId 2903
-#define utils_wxGetHomeDir 2904
-#define utils_wxNewId 2905
-#define utils_wxRegisterId 2906
-#define utils_wxGetCurrentId 2907
-#define utils_wxGetOsDescription 2908
-#define utils_wxIsPlatformLittleEndian 2909
-#define utils_wxIsPlatform64Bit 2910
-#define wxPrintout_new 2911
-#define wxPrintout_destruct 2912
-#define wxPrintout_GetDC 2913
-#define wxPrintout_GetPageSizeMM 2914
-#define wxPrintout_GetPageSizePixels 2915
-#define wxPrintout_GetPaperRectPixels 2916
-#define wxPrintout_GetPPIPrinter 2917
-#define wxPrintout_GetPPIScreen 2918
-#define wxPrintout_GetTitle 2919
-#define wxPrintout_IsPreview 2920
-#define wxPrintout_FitThisSizeToPaper 2921
-#define wxPrintout_FitThisSizeToPage 2922
-#define wxPrintout_FitThisSizeToPageMargins 2923
-#define wxPrintout_MapScreenSizeToPaper 2924
-#define wxPrintout_MapScreenSizeToPage 2925
-#define wxPrintout_MapScreenSizeToPageMargins 2926
-#define wxPrintout_MapScreenSizeToDevice 2927
-#define wxPrintout_GetLogicalPaperRect 2928
-#define wxPrintout_GetLogicalPageRect 2929
-#define wxPrintout_GetLogicalPageMarginsRect 2930
-#define wxPrintout_SetLogicalOrigin 2931
-#define wxPrintout_OffsetLogicalOrigin 2932
-#define wxStyledTextCtrl_new_2 2933
-#define wxStyledTextCtrl_new_0 2934
-#define wxStyledTextCtrl_destruct 2935
-#define wxStyledTextCtrl_Create 2936
-#define wxStyledTextCtrl_AddText 2937
-#define wxStyledTextCtrl_AddStyledText 2938
-#define wxStyledTextCtrl_InsertText 2939
-#define wxStyledTextCtrl_ClearAll 2940
-#define wxStyledTextCtrl_ClearDocumentStyle 2941
-#define wxStyledTextCtrl_GetLength 2942
-#define wxStyledTextCtrl_GetCharAt 2943
-#define wxStyledTextCtrl_GetCurrentPos 2944
-#define wxStyledTextCtrl_GetAnchor 2945
-#define wxStyledTextCtrl_GetStyleAt 2946
-#define wxStyledTextCtrl_Redo 2947
-#define wxStyledTextCtrl_SetUndoCollection 2948
-#define wxStyledTextCtrl_SelectAll 2949
-#define wxStyledTextCtrl_SetSavePoint 2950
-#define wxStyledTextCtrl_GetStyledText 2951
-#define wxStyledTextCtrl_CanRedo 2952
-#define wxStyledTextCtrl_MarkerLineFromHandle 2953
-#define wxStyledTextCtrl_MarkerDeleteHandle 2954
-#define wxStyledTextCtrl_GetUndoCollection 2955
-#define wxStyledTextCtrl_GetViewWhiteSpace 2956
-#define wxStyledTextCtrl_SetViewWhiteSpace 2957
-#define wxStyledTextCtrl_PositionFromPoint 2958
-#define wxStyledTextCtrl_PositionFromPointClose 2959
-#define wxStyledTextCtrl_GotoLine 2960
-#define wxStyledTextCtrl_GotoPos 2961
-#define wxStyledTextCtrl_SetAnchor 2962
-#define wxStyledTextCtrl_GetCurLine 2963
-#define wxStyledTextCtrl_GetEndStyled 2964
-#define wxStyledTextCtrl_ConvertEOLs 2965
-#define wxStyledTextCtrl_GetEOLMode 2966
-#define wxStyledTextCtrl_SetEOLMode 2967
-#define wxStyledTextCtrl_StartStyling 2968
-#define wxStyledTextCtrl_SetStyling 2969
-#define wxStyledTextCtrl_GetBufferedDraw 2970
-#define wxStyledTextCtrl_SetBufferedDraw 2971
-#define wxStyledTextCtrl_SetTabWidth 2972
-#define wxStyledTextCtrl_GetTabWidth 2973
-#define wxStyledTextCtrl_SetCodePage 2974
-#define wxStyledTextCtrl_MarkerDefine 2975
-#define wxStyledTextCtrl_MarkerSetForeground 2976
-#define wxStyledTextCtrl_MarkerSetBackground 2977
-#define wxStyledTextCtrl_MarkerAdd 2978
-#define wxStyledTextCtrl_MarkerDelete 2979
-#define wxStyledTextCtrl_MarkerDeleteAll 2980
-#define wxStyledTextCtrl_MarkerGet 2981
-#define wxStyledTextCtrl_MarkerNext 2982
-#define wxStyledTextCtrl_MarkerPrevious 2983
-#define wxStyledTextCtrl_MarkerDefineBitmap 2984
-#define wxStyledTextCtrl_MarkerAddSet 2985
-#define wxStyledTextCtrl_MarkerSetAlpha 2986
-#define wxStyledTextCtrl_SetMarginType 2987
-#define wxStyledTextCtrl_GetMarginType 2988
-#define wxStyledTextCtrl_SetMarginWidth 2989
-#define wxStyledTextCtrl_GetMarginWidth 2990
-#define wxStyledTextCtrl_SetMarginMask 2991
-#define wxStyledTextCtrl_GetMarginMask 2992
-#define wxStyledTextCtrl_SetMarginSensitive 2993
-#define wxStyledTextCtrl_GetMarginSensitive 2994
-#define wxStyledTextCtrl_StyleClearAll 2995
-#define wxStyledTextCtrl_StyleSetForeground 2996
-#define wxStyledTextCtrl_StyleSetBackground 2997
-#define wxStyledTextCtrl_StyleSetBold 2998
-#define wxStyledTextCtrl_StyleSetItalic 2999
-#define wxStyledTextCtrl_StyleSetSize 3000
-#define wxStyledTextCtrl_StyleSetFaceName 3001
-#define wxStyledTextCtrl_StyleSetEOLFilled 3002
-#define wxStyledTextCtrl_StyleResetDefault 3003
-#define wxStyledTextCtrl_StyleSetUnderline 3004
-#define wxStyledTextCtrl_StyleSetCase 3005
-#define wxStyledTextCtrl_StyleSetHotSpot 3006
-#define wxStyledTextCtrl_SetSelForeground 3007
-#define wxStyledTextCtrl_SetSelBackground 3008
-#define wxStyledTextCtrl_GetSelAlpha 3009
-#define wxStyledTextCtrl_SetSelAlpha 3010
-#define wxStyledTextCtrl_SetCaretForeground 3011
-#define wxStyledTextCtrl_CmdKeyAssign 3012
-#define wxStyledTextCtrl_CmdKeyClear 3013
-#define wxStyledTextCtrl_CmdKeyClearAll 3014
-#define wxStyledTextCtrl_SetStyleBytes 3015
-#define wxStyledTextCtrl_StyleSetVisible 3016
-#define wxStyledTextCtrl_GetCaretPeriod 3017
-#define wxStyledTextCtrl_SetCaretPeriod 3018
-#define wxStyledTextCtrl_SetWordChars 3019
-#define wxStyledTextCtrl_BeginUndoAction 3020
-#define wxStyledTextCtrl_EndUndoAction 3021
-#define wxStyledTextCtrl_IndicatorSetStyle 3022
-#define wxStyledTextCtrl_IndicatorGetStyle 3023
-#define wxStyledTextCtrl_IndicatorSetForeground 3024
-#define wxStyledTextCtrl_IndicatorGetForeground 3025
-#define wxStyledTextCtrl_SetWhitespaceForeground 3026
-#define wxStyledTextCtrl_SetWhitespaceBackground 3027
-#define wxStyledTextCtrl_GetStyleBits 3028
-#define wxStyledTextCtrl_SetLineState 3029
-#define wxStyledTextCtrl_GetLineState 3030
-#define wxStyledTextCtrl_GetMaxLineState 3031
-#define wxStyledTextCtrl_GetCaretLineVisible 3032
-#define wxStyledTextCtrl_SetCaretLineVisible 3033
-#define wxStyledTextCtrl_GetCaretLineBackground 3034
-#define wxStyledTextCtrl_SetCaretLineBackground 3035
-#define wxStyledTextCtrl_AutoCompShow 3036
-#define wxStyledTextCtrl_AutoCompCancel 3037
-#define wxStyledTextCtrl_AutoCompActive 3038
-#define wxStyledTextCtrl_AutoCompPosStart 3039
-#define wxStyledTextCtrl_AutoCompComplete 3040
-#define wxStyledTextCtrl_AutoCompStops 3041
-#define wxStyledTextCtrl_AutoCompSetSeparator 3042
-#define wxStyledTextCtrl_AutoCompGetSeparator 3043
-#define wxStyledTextCtrl_AutoCompSelect 3044
-#define wxStyledTextCtrl_AutoCompSetCancelAtStart 3045
-#define wxStyledTextCtrl_AutoCompGetCancelAtStart 3046
-#define wxStyledTextCtrl_AutoCompSetFillUps 3047
-#define wxStyledTextCtrl_AutoCompSetChooseSingle 3048
-#define wxStyledTextCtrl_AutoCompGetChooseSingle 3049
-#define wxStyledTextCtrl_AutoCompSetIgnoreCase 3050
-#define wxStyledTextCtrl_AutoCompGetIgnoreCase 3051
-#define wxStyledTextCtrl_UserListShow 3052
-#define wxStyledTextCtrl_AutoCompSetAutoHide 3053
-#define wxStyledTextCtrl_AutoCompGetAutoHide 3054
-#define wxStyledTextCtrl_AutoCompSetDropRestOfWord 3055
-#define wxStyledTextCtrl_AutoCompGetDropRestOfWord 3056
-#define wxStyledTextCtrl_RegisterImage 3057
-#define wxStyledTextCtrl_ClearRegisteredImages 3058
-#define wxStyledTextCtrl_AutoCompGetTypeSeparator 3059
-#define wxStyledTextCtrl_AutoCompSetTypeSeparator 3060
-#define wxStyledTextCtrl_AutoCompSetMaxWidth 3061
-#define wxStyledTextCtrl_AutoCompGetMaxWidth 3062
-#define wxStyledTextCtrl_AutoCompSetMaxHeight 3063
-#define wxStyledTextCtrl_AutoCompGetMaxHeight 3064
-#define wxStyledTextCtrl_SetIndent 3065
-#define wxStyledTextCtrl_GetIndent 3066
-#define wxStyledTextCtrl_SetUseTabs 3067
-#define wxStyledTextCtrl_GetUseTabs 3068
-#define wxStyledTextCtrl_SetLineIndentation 3069
-#define wxStyledTextCtrl_GetLineIndentation 3070
-#define wxStyledTextCtrl_GetLineIndentPosition 3071
-#define wxStyledTextCtrl_GetColumn 3072
-#define wxStyledTextCtrl_SetUseHorizontalScrollBar 3073
-#define wxStyledTextCtrl_GetUseHorizontalScrollBar 3074
-#define wxStyledTextCtrl_SetIndentationGuides 3075
-#define wxStyledTextCtrl_GetIndentationGuides 3076
-#define wxStyledTextCtrl_SetHighlightGuide 3077
-#define wxStyledTextCtrl_GetHighlightGuide 3078
-#define wxStyledTextCtrl_GetLineEndPosition 3079
-#define wxStyledTextCtrl_GetCodePage 3080
-#define wxStyledTextCtrl_GetCaretForeground 3081
-#define wxStyledTextCtrl_GetReadOnly 3082
-#define wxStyledTextCtrl_SetCurrentPos 3083
-#define wxStyledTextCtrl_SetSelectionStart 3084
-#define wxStyledTextCtrl_GetSelectionStart 3085
-#define wxStyledTextCtrl_SetSelectionEnd 3086
-#define wxStyledTextCtrl_GetSelectionEnd 3087
-#define wxStyledTextCtrl_SetPrintMagnification 3088
-#define wxStyledTextCtrl_GetPrintMagnification 3089
-#define wxStyledTextCtrl_SetPrintColourMode 3090
-#define wxStyledTextCtrl_GetPrintColourMode 3091
-#define wxStyledTextCtrl_FindText 3092
-#define wxStyledTextCtrl_FormatRange 3093
-#define wxStyledTextCtrl_GetFirstVisibleLine 3094
-#define wxStyledTextCtrl_GetLine 3095
-#define wxStyledTextCtrl_GetLineCount 3096
-#define wxStyledTextCtrl_SetMarginLeft 3097
-#define wxStyledTextCtrl_GetMarginLeft 3098
-#define wxStyledTextCtrl_SetMarginRight 3099
-#define wxStyledTextCtrl_GetMarginRight 3100
-#define wxStyledTextCtrl_GetModify 3101
-#define wxStyledTextCtrl_SetSelection 3102
-#define wxStyledTextCtrl_GetSelectedText 3103
-#define wxStyledTextCtrl_GetTextRange 3104
-#define wxStyledTextCtrl_HideSelection 3105
-#define wxStyledTextCtrl_LineFromPosition 3106
-#define wxStyledTextCtrl_PositionFromLine 3107
-#define wxStyledTextCtrl_LineScroll 3108
-#define wxStyledTextCtrl_EnsureCaretVisible 3109
-#define wxStyledTextCtrl_ReplaceSelection 3110
-#define wxStyledTextCtrl_SetReadOnly 3111
-#define wxStyledTextCtrl_CanPaste 3112
-#define wxStyledTextCtrl_CanUndo 3113
-#define wxStyledTextCtrl_EmptyUndoBuffer 3114
-#define wxStyledTextCtrl_Undo 3115
-#define wxStyledTextCtrl_Cut 3116
-#define wxStyledTextCtrl_Copy 3117
-#define wxStyledTextCtrl_Paste 3118
-#define wxStyledTextCtrl_Clear 3119
-#define wxStyledTextCtrl_SetText 3120
-#define wxStyledTextCtrl_GetText 3121
-#define wxStyledTextCtrl_GetTextLength 3122
-#define wxStyledTextCtrl_GetOvertype 3123
-#define wxStyledTextCtrl_SetCaretWidth 3124
-#define wxStyledTextCtrl_GetCaretWidth 3125
-#define wxStyledTextCtrl_SetTargetStart 3126
-#define wxStyledTextCtrl_GetTargetStart 3127
-#define wxStyledTextCtrl_SetTargetEnd 3128
-#define wxStyledTextCtrl_GetTargetEnd 3129
-#define wxStyledTextCtrl_ReplaceTarget 3130
-#define wxStyledTextCtrl_SearchInTarget 3131
-#define wxStyledTextCtrl_SetSearchFlags 3132
-#define wxStyledTextCtrl_GetSearchFlags 3133
-#define wxStyledTextCtrl_CallTipShow 3134
-#define wxStyledTextCtrl_CallTipCancel 3135
-#define wxStyledTextCtrl_CallTipActive 3136
-#define wxStyledTextCtrl_CallTipPosAtStart 3137
-#define wxStyledTextCtrl_CallTipSetHighlight 3138
-#define wxStyledTextCtrl_CallTipSetBackground 3139
-#define wxStyledTextCtrl_CallTipSetForeground 3140
-#define wxStyledTextCtrl_CallTipSetForegroundHighlight 3141
-#define wxStyledTextCtrl_CallTipUseStyle 3142
-#define wxStyledTextCtrl_VisibleFromDocLine 3143
-#define wxStyledTextCtrl_DocLineFromVisible 3144
-#define wxStyledTextCtrl_WrapCount 3145
-#define wxStyledTextCtrl_SetFoldLevel 3146
-#define wxStyledTextCtrl_GetFoldLevel 3147
-#define wxStyledTextCtrl_GetLastChild 3148
-#define wxStyledTextCtrl_GetFoldParent 3149
-#define wxStyledTextCtrl_ShowLines 3150
-#define wxStyledTextCtrl_HideLines 3151
-#define wxStyledTextCtrl_GetLineVisible 3152
-#define wxStyledTextCtrl_SetFoldExpanded 3153
-#define wxStyledTextCtrl_GetFoldExpanded 3154
-#define wxStyledTextCtrl_ToggleFold 3155
-#define wxStyledTextCtrl_EnsureVisible 3156
-#define wxStyledTextCtrl_SetFoldFlags 3157
-#define wxStyledTextCtrl_EnsureVisibleEnforcePolicy 3158
-#define wxStyledTextCtrl_SetTabIndents 3159
-#define wxStyledTextCtrl_GetTabIndents 3160
-#define wxStyledTextCtrl_SetBackSpaceUnIndents 3161
-#define wxStyledTextCtrl_GetBackSpaceUnIndents 3162
-#define wxStyledTextCtrl_SetMouseDwellTime 3163
-#define wxStyledTextCtrl_GetMouseDwellTime 3164
-#define wxStyledTextCtrl_WordStartPosition 3165
-#define wxStyledTextCtrl_WordEndPosition 3166
-#define wxStyledTextCtrl_SetWrapMode 3167
-#define wxStyledTextCtrl_GetWrapMode 3168
-#define wxStyledTextCtrl_SetWrapVisualFlags 3169
-#define wxStyledTextCtrl_GetWrapVisualFlags 3170
-#define wxStyledTextCtrl_SetWrapVisualFlagsLocation 3171
-#define wxStyledTextCtrl_GetWrapVisualFlagsLocation 3172
-#define wxStyledTextCtrl_SetWrapStartIndent 3173
-#define wxStyledTextCtrl_GetWrapStartIndent 3174
-#define wxStyledTextCtrl_SetLayoutCache 3175
-#define wxStyledTextCtrl_GetLayoutCache 3176
-#define wxStyledTextCtrl_SetScrollWidth 3177
-#define wxStyledTextCtrl_GetScrollWidth 3178
-#define wxStyledTextCtrl_TextWidth 3179
-#define wxStyledTextCtrl_GetEndAtLastLine 3180
-#define wxStyledTextCtrl_TextHeight 3181
-#define wxStyledTextCtrl_SetUseVerticalScrollBar 3182
-#define wxStyledTextCtrl_GetUseVerticalScrollBar 3183
-#define wxStyledTextCtrl_AppendText 3184
-#define wxStyledTextCtrl_GetTwoPhaseDraw 3185
-#define wxStyledTextCtrl_SetTwoPhaseDraw 3186
-#define wxStyledTextCtrl_TargetFromSelection 3187
-#define wxStyledTextCtrl_LinesJoin 3188
-#define wxStyledTextCtrl_LinesSplit 3189
-#define wxStyledTextCtrl_SetFoldMarginColour 3190
-#define wxStyledTextCtrl_SetFoldMarginHiColour 3191
-#define wxStyledTextCtrl_LineDown 3192
-#define wxStyledTextCtrl_LineDownExtend 3193
-#define wxStyledTextCtrl_LineUp 3194
-#define wxStyledTextCtrl_LineUpExtend 3195
-#define wxStyledTextCtrl_CharLeft 3196
-#define wxStyledTextCtrl_CharLeftExtend 3197
-#define wxStyledTextCtrl_CharRight 3198
-#define wxStyledTextCtrl_CharRightExtend 3199
-#define wxStyledTextCtrl_WordLeft 3200
-#define wxStyledTextCtrl_WordLeftExtend 3201
-#define wxStyledTextCtrl_WordRight 3202
-#define wxStyledTextCtrl_WordRightExtend 3203
-#define wxStyledTextCtrl_Home 3204
-#define wxStyledTextCtrl_HomeExtend 3205
-#define wxStyledTextCtrl_LineEnd 3206
-#define wxStyledTextCtrl_LineEndExtend 3207
-#define wxStyledTextCtrl_DocumentStart 3208
-#define wxStyledTextCtrl_DocumentStartExtend 3209
-#define wxStyledTextCtrl_DocumentEnd 3210
-#define wxStyledTextCtrl_DocumentEndExtend 3211
-#define wxStyledTextCtrl_PageUp 3212
-#define wxStyledTextCtrl_PageUpExtend 3213
-#define wxStyledTextCtrl_PageDown 3214
-#define wxStyledTextCtrl_PageDownExtend 3215
-#define wxStyledTextCtrl_EditToggleOvertype 3216
-#define wxStyledTextCtrl_Cancel 3217
-#define wxStyledTextCtrl_DeleteBack 3218
-#define wxStyledTextCtrl_Tab 3219
-#define wxStyledTextCtrl_BackTab 3220
-#define wxStyledTextCtrl_NewLine 3221
-#define wxStyledTextCtrl_FormFeed 3222
-#define wxStyledTextCtrl_VCHome 3223
-#define wxStyledTextCtrl_VCHomeExtend 3224
-#define wxStyledTextCtrl_ZoomIn 3225
-#define wxStyledTextCtrl_ZoomOut 3226
-#define wxStyledTextCtrl_DelWordLeft 3227
-#define wxStyledTextCtrl_DelWordRight 3228
-#define wxStyledTextCtrl_LineCut 3229
-#define wxStyledTextCtrl_LineDelete 3230
-#define wxStyledTextCtrl_LineTranspose 3231
-#define wxStyledTextCtrl_LineDuplicate 3232
-#define wxStyledTextCtrl_LowerCase 3233
-#define wxStyledTextCtrl_UpperCase 3234
-#define wxStyledTextCtrl_LineScrollDown 3235
-#define wxStyledTextCtrl_LineScrollUp 3236
-#define wxStyledTextCtrl_DeleteBackNotLine 3237
-#define wxStyledTextCtrl_HomeDisplay 3238
-#define wxStyledTextCtrl_HomeDisplayExtend 3239
-#define wxStyledTextCtrl_LineEndDisplay 3240
-#define wxStyledTextCtrl_LineEndDisplayExtend 3241
-#define wxStyledTextCtrl_HomeWrapExtend 3242
-#define wxStyledTextCtrl_LineEndWrap 3243
-#define wxStyledTextCtrl_LineEndWrapExtend 3244
-#define wxStyledTextCtrl_VCHomeWrap 3245
-#define wxStyledTextCtrl_VCHomeWrapExtend 3246
-#define wxStyledTextCtrl_LineCopy 3247
-#define wxStyledTextCtrl_MoveCaretInsideView 3248
-#define wxStyledTextCtrl_LineLength 3249
-#define wxStyledTextCtrl_BraceHighlight 3250
-#define wxStyledTextCtrl_BraceBadLight 3251
-#define wxStyledTextCtrl_BraceMatch 3252
-#define wxStyledTextCtrl_GetViewEOL 3253
-#define wxStyledTextCtrl_SetViewEOL 3254
-#define wxStyledTextCtrl_SetModEventMask 3255
-#define wxStyledTextCtrl_GetEdgeColumn 3256
-#define wxStyledTextCtrl_SetEdgeColumn 3257
-#define wxStyledTextCtrl_GetEdgeMode 3258
-#define wxStyledTextCtrl_GetEdgeColour 3259
-#define wxStyledTextCtrl_SetEdgeColour 3260
-#define wxStyledTextCtrl_SearchAnchor 3261
-#define wxStyledTextCtrl_SearchNext 3262
-#define wxStyledTextCtrl_SearchPrev 3263
-#define wxStyledTextCtrl_LinesOnScreen 3264
-#define wxStyledTextCtrl_UsePopUp 3265
-#define wxStyledTextCtrl_SelectionIsRectangle 3266
-#define wxStyledTextCtrl_SetZoom 3267
-#define wxStyledTextCtrl_GetZoom 3268
-#define wxStyledTextCtrl_GetModEventMask 3269
-#define wxStyledTextCtrl_SetSTCFocus 3270
-#define wxStyledTextCtrl_GetSTCFocus 3271
-#define wxStyledTextCtrl_SetStatus 3272
-#define wxStyledTextCtrl_GetStatus 3273
-#define wxStyledTextCtrl_SetMouseDownCaptures 3274
-#define wxStyledTextCtrl_GetMouseDownCaptures 3275
-#define wxStyledTextCtrl_SetSTCCursor 3276
-#define wxStyledTextCtrl_GetSTCCursor 3277
-#define wxStyledTextCtrl_SetControlCharSymbol 3278
-#define wxStyledTextCtrl_GetControlCharSymbol 3279
-#define wxStyledTextCtrl_WordPartLeft 3280
-#define wxStyledTextCtrl_WordPartLeftExtend 3281
-#define wxStyledTextCtrl_WordPartRight 3282
-#define wxStyledTextCtrl_WordPartRightExtend 3283
-#define wxStyledTextCtrl_SetVisiblePolicy 3284
-#define wxStyledTextCtrl_DelLineLeft 3285
-#define wxStyledTextCtrl_DelLineRight 3286
-#define wxStyledTextCtrl_GetXOffset 3287
-#define wxStyledTextCtrl_ChooseCaretX 3288
-#define wxStyledTextCtrl_SetXCaretPolicy 3289
-#define wxStyledTextCtrl_SetYCaretPolicy 3290
-#define wxStyledTextCtrl_GetPrintWrapMode 3291
-#define wxStyledTextCtrl_SetHotspotActiveForeground 3292
-#define wxStyledTextCtrl_SetHotspotActiveBackground 3293
-#define wxStyledTextCtrl_SetHotspotActiveUnderline 3294
-#define wxStyledTextCtrl_SetHotspotSingleLine 3295
-#define wxStyledTextCtrl_ParaDownExtend 3296
-#define wxStyledTextCtrl_ParaUp 3297
-#define wxStyledTextCtrl_ParaUpExtend 3298
-#define wxStyledTextCtrl_PositionBefore 3299
-#define wxStyledTextCtrl_PositionAfter 3300
-#define wxStyledTextCtrl_CopyRange 3301
-#define wxStyledTextCtrl_CopyText 3302
-#define wxStyledTextCtrl_SetSelectionMode 3303
-#define wxStyledTextCtrl_GetSelectionMode 3304
-#define wxStyledTextCtrl_LineDownRectExtend 3305
-#define wxStyledTextCtrl_LineUpRectExtend 3306
-#define wxStyledTextCtrl_CharLeftRectExtend 3307
-#define wxStyledTextCtrl_CharRightRectExtend 3308
-#define wxStyledTextCtrl_HomeRectExtend 3309
-#define wxStyledTextCtrl_VCHomeRectExtend 3310
-#define wxStyledTextCtrl_LineEndRectExtend 3311
-#define wxStyledTextCtrl_PageUpRectExtend 3312
-#define wxStyledTextCtrl_PageDownRectExtend 3313
-#define wxStyledTextCtrl_StutteredPageUp 3314
-#define wxStyledTextCtrl_StutteredPageUpExtend 3315
-#define wxStyledTextCtrl_StutteredPageDown 3316
-#define wxStyledTextCtrl_StutteredPageDownExtend 3317
-#define wxStyledTextCtrl_WordLeftEnd 3318
-#define wxStyledTextCtrl_WordLeftEndExtend 3319
-#define wxStyledTextCtrl_WordRightEnd 3320
-#define wxStyledTextCtrl_WordRightEndExtend 3321
-#define wxStyledTextCtrl_SetWhitespaceChars 3322
-#define wxStyledTextCtrl_SetCharsDefault 3323
-#define wxStyledTextCtrl_AutoCompGetCurrent 3324
-#define wxStyledTextCtrl_Allocate 3325
-#define wxStyledTextCtrl_FindColumn 3326
-#define wxStyledTextCtrl_GetCaretSticky 3327
-#define wxStyledTextCtrl_SetCaretSticky 3328
-#define wxStyledTextCtrl_ToggleCaretSticky 3329
-#define wxStyledTextCtrl_SetPasteConvertEndings 3330
-#define wxStyledTextCtrl_GetPasteConvertEndings 3331
-#define wxStyledTextCtrl_SelectionDuplicate 3332
-#define wxStyledTextCtrl_SetCaretLineBackAlpha 3333
-#define wxStyledTextCtrl_GetCaretLineBackAlpha 3334
-#define wxStyledTextCtrl_StartRecord 3335
-#define wxStyledTextCtrl_StopRecord 3336
-#define wxStyledTextCtrl_SetLexer 3337
-#define wxStyledTextCtrl_GetLexer 3338
-#define wxStyledTextCtrl_Colourise 3339
-#define wxStyledTextCtrl_SetProperty 3340
-#define wxStyledTextCtrl_SetKeyWords 3341
-#define wxStyledTextCtrl_SetLexerLanguage 3342
-#define wxStyledTextCtrl_GetProperty 3343
-#define wxStyledTextCtrl_GetStyleBitsNeeded 3344
-#define wxStyledTextCtrl_GetCurrentLine 3345
-#define wxStyledTextCtrl_StyleSetSpec 3346
-#define wxStyledTextCtrl_StyleSetFont 3347
-#define wxStyledTextCtrl_StyleSetFontAttr 3348
-#define wxStyledTextCtrl_StyleSetCharacterSet 3349
-#define wxStyledTextCtrl_StyleSetFontEncoding 3350
-#define wxStyledTextCtrl_CmdKeyExecute 3351
-#define wxStyledTextCtrl_SetMargins 3352
-#define wxStyledTextCtrl_GetSelection 3353
-#define wxStyledTextCtrl_PointFromPosition 3354
-#define wxStyledTextCtrl_ScrollToLine 3355
-#define wxStyledTextCtrl_ScrollToColumn 3356
-#define wxStyledTextCtrl_SendMsg 3357
-#define wxStyledTextCtrl_SetVScrollBar 3358
-#define wxStyledTextCtrl_SetHScrollBar 3359
-#define wxStyledTextCtrl_GetLastKeydownProcessed 3360
-#define wxStyledTextCtrl_SetLastKeydownProcessed 3361
-#define wxStyledTextCtrl_SaveFile 3362
-#define wxStyledTextCtrl_LoadFile 3363
-#define wxStyledTextCtrl_DoDragOver 3364
-#define wxStyledTextCtrl_DoDropText 3365
-#define wxStyledTextCtrl_GetUseAntiAliasing 3366
-#define wxStyledTextCtrl_AddTextRaw 3367
-#define wxStyledTextCtrl_InsertTextRaw 3368
-#define wxStyledTextCtrl_GetCurLineRaw 3369
-#define wxStyledTextCtrl_GetLineRaw 3370
-#define wxStyledTextCtrl_GetSelectedTextRaw 3371
-#define wxStyledTextCtrl_GetTextRangeRaw 3372
-#define wxStyledTextCtrl_SetTextRaw 3373
-#define wxStyledTextCtrl_GetTextRaw 3374
-#define wxStyledTextCtrl_AppendTextRaw 3375
-#define wxArtProvider_GetBitmap 3376
-#define wxArtProvider_GetIcon 3377
-#define wxTreeEvent_GetKeyCode 3378
-#define wxTreeEvent_GetItem 3379
-#define wxTreeEvent_GetKeyEvent 3380
-#define wxTreeEvent_GetLabel 3381
-#define wxTreeEvent_GetOldItem 3382
-#define wxTreeEvent_GetPoint 3383
-#define wxTreeEvent_IsEditCancelled 3384
-#define wxTreeEvent_SetToolTip 3385
-#define wxNotebookEvent_GetOldSelection 3386
-#define wxNotebookEvent_GetSelection 3387
-#define wxNotebookEvent_SetOldSelection 3388
-#define wxNotebookEvent_SetSelection 3389
-#define wxFileDataObject_new 3390
-#define wxFileDataObject_AddFile 3391
-#define wxFileDataObject_GetFilenames 3392
-#define wxFileDataObject_destroy 3393
-#define wxTextDataObject_new 3394
-#define wxTextDataObject_GetTextLength 3395
-#define wxTextDataObject_GetText 3396
-#define wxTextDataObject_SetText 3397
-#define wxTextDataObject_destroy 3398
-#define wxBitmapDataObject_new_1_1 3399
-#define wxBitmapDataObject_new_1_0 3400
-#define wxBitmapDataObject_GetBitmap 3401
-#define wxBitmapDataObject_SetBitmap 3402
-#define wxBitmapDataObject_destroy 3403
-#define wxClipboard_new 3405
-#define wxClipboard_destruct 3406
-#define wxClipboard_AddData 3407
-#define wxClipboard_Clear 3408
-#define wxClipboard_Close 3409
-#define wxClipboard_Flush 3410
-#define wxClipboard_GetData 3411
-#define wxClipboard_IsOpened 3412
-#define wxClipboard_Open 3413
-#define wxClipboard_SetData 3414
-#define wxClipboard_UsePrimarySelection 3416
-#define wxClipboard_IsSupported 3417
-#define wxClipboard_Get 3418
-#define wxSpinEvent_GetPosition 3419
-#define wxSpinEvent_SetPosition 3420
-#define wxSplitterWindow_new_0 3421
-#define wxSplitterWindow_new_2 3422
-#define wxSplitterWindow_destruct 3423
-#define wxSplitterWindow_Create 3424
-#define wxSplitterWindow_GetMinimumPaneSize 3425
-#define wxSplitterWindow_GetSashGravity 3426
-#define wxSplitterWindow_GetSashPosition 3427
-#define wxSplitterWindow_GetSplitMode 3428
-#define wxSplitterWindow_GetWindow1 3429
-#define wxSplitterWindow_GetWindow2 3430
-#define wxSplitterWindow_Initialize 3431
-#define wxSplitterWindow_IsSplit 3432
-#define wxSplitterWindow_ReplaceWindow 3433
-#define wxSplitterWindow_SetSashGravity 3434
-#define wxSplitterWindow_SetSashPosition 3435
-#define wxSplitterWindow_SetSashSize 3436
-#define wxSplitterWindow_SetMinimumPaneSize 3437
-#define wxSplitterWindow_SetSplitMode 3438
-#define wxSplitterWindow_SplitHorizontally 3439
-#define wxSplitterWindow_SplitVertically 3440
-#define wxSplitterWindow_Unsplit 3441
-#define wxSplitterWindow_UpdateSize 3442
-#define wxSplitterEvent_GetSashPosition 3443
-#define wxSplitterEvent_GetX 3444
-#define wxSplitterEvent_GetY 3445
-#define wxSplitterEvent_GetWindowBeingRemoved 3446
-#define wxSplitterEvent_SetSashPosition 3447
-#define wxHtmlWindow_new_0 3448
-#define wxHtmlWindow_new_2 3449
-#define wxHtmlWindow_AppendToPage 3450
-#define wxHtmlWindow_GetOpenedAnchor 3451
-#define wxHtmlWindow_GetOpenedPage 3452
-#define wxHtmlWindow_GetOpenedPageTitle 3453
-#define wxHtmlWindow_GetRelatedFrame 3454
-#define wxHtmlWindow_HistoryBack 3455
-#define wxHtmlWindow_HistoryCanBack 3456
-#define wxHtmlWindow_HistoryCanForward 3457
-#define wxHtmlWindow_HistoryClear 3458
-#define wxHtmlWindow_HistoryForward 3459
-#define wxHtmlWindow_LoadFile 3460
-#define wxHtmlWindow_LoadPage 3461
-#define wxHtmlWindow_SelectAll 3462
-#define wxHtmlWindow_SelectionToText 3463
-#define wxHtmlWindow_SelectLine 3464
-#define wxHtmlWindow_SelectWord 3465
-#define wxHtmlWindow_SetBorders 3466
-#define wxHtmlWindow_SetFonts 3467
-#define wxHtmlWindow_SetPage 3468
-#define wxHtmlWindow_SetRelatedFrame 3469
-#define wxHtmlWindow_SetRelatedStatusBar 3470
-#define wxHtmlWindow_ToText 3471
-#define wxHtmlWindow_destroy 3472
-#define wxHtmlLinkEvent_GetLinkInfo 3473
-#define wxAuiNotebookEvent_SetSelection 3474
-#define wxAuiNotebookEvent_GetSelection 3475
-#define wxAuiNotebookEvent_SetOldSelection 3476
-#define wxAuiNotebookEvent_GetOldSelection 3477
-#define wxAuiNotebookEvent_SetDragSource 3478
-#define wxAuiNotebookEvent_GetDragSource 3479
-#define wxAuiManagerEvent_SetManager 3480
-#define wxAuiManagerEvent_GetManager 3481
-#define wxAuiManagerEvent_SetPane 3482
-#define wxAuiManagerEvent_GetPane 3483
-#define wxAuiManagerEvent_SetButton 3484
-#define wxAuiManagerEvent_GetButton 3485
-#define wxAuiManagerEvent_SetDC 3486
-#define wxAuiManagerEvent_GetDC 3487
-#define wxAuiManagerEvent_Veto 3488
-#define wxAuiManagerEvent_GetVeto 3489
-#define wxAuiManagerEvent_SetCanVeto 3490
-#define wxAuiManagerEvent_CanVeto 3491
-#define wxLogNull_new 3492
-#define wxLogNull_destroy 3493
+#define wxTreeCtrl_GetFirstChild 2018
+#define wxTreeCtrl_GetNextChild 2019
+#define wxTreeCtrl_GetFirstVisibleItem 2020
+#define wxTreeCtrl_GetImageList 2021
+#define wxTreeCtrl_GetIndent 2022
+#define wxTreeCtrl_GetItemBackgroundColour 2023
+#define wxTreeCtrl_GetItemData 2024
+#define wxTreeCtrl_GetItemFont 2025
+#define wxTreeCtrl_GetItemImage_1 2026
+#define wxTreeCtrl_GetItemImage_2 2027
+#define wxTreeCtrl_GetItemText 2028
+#define wxTreeCtrl_GetItemTextColour 2029
+#define wxTreeCtrl_GetLastChild 2030
+#define wxTreeCtrl_GetNextSibling 2031
+#define wxTreeCtrl_GetNextVisible 2032
+#define wxTreeCtrl_GetItemParent 2033
+#define wxTreeCtrl_GetPrevSibling 2034
+#define wxTreeCtrl_GetPrevVisible 2035
+#define wxTreeCtrl_GetRootItem 2036
+#define wxTreeCtrl_GetSelection 2037
+#define wxTreeCtrl_GetSelections 2038
+#define wxTreeCtrl_GetStateImageList 2039
+#define wxTreeCtrl_HitTest 2040
+#define wxTreeCtrl_InsertItem 2042
+#define wxTreeCtrl_IsBold 2043
+#define wxTreeCtrl_IsExpanded 2044
+#define wxTreeCtrl_IsSelected 2045
+#define wxTreeCtrl_IsVisible 2046
+#define wxTreeCtrl_ItemHasChildren 2047
+#define wxTreeCtrl_PrependItem 2048
+#define wxTreeCtrl_ScrollTo 2049
+#define wxTreeCtrl_SelectItem_1 2050
+#define wxTreeCtrl_SelectItem_2 2051
+#define wxTreeCtrl_SetIndent 2052
+#define wxTreeCtrl_SetImageList 2053
+#define wxTreeCtrl_SetItemBackgroundColour 2054
+#define wxTreeCtrl_SetItemBold 2055
+#define wxTreeCtrl_SetItemData 2056
+#define wxTreeCtrl_SetItemDropHighlight 2057
+#define wxTreeCtrl_SetItemFont 2058
+#define wxTreeCtrl_SetItemHasChildren 2059
+#define wxTreeCtrl_SetItemImage_2 2060
+#define wxTreeCtrl_SetItemImage_3 2061
+#define wxTreeCtrl_SetItemText 2062
+#define wxTreeCtrl_SetItemTextColour 2063
+#define wxTreeCtrl_SetStateImageList 2064
+#define wxTreeCtrl_SetWindowStyle 2065
+#define wxTreeCtrl_SortChildren 2066
+#define wxTreeCtrl_Toggle 2067
+#define wxTreeCtrl_ToggleItemSelection 2068
+#define wxTreeCtrl_Unselect 2069
+#define wxTreeCtrl_UnselectAll 2070
+#define wxTreeCtrl_UnselectItem 2071
+#define wxScrollBar_new_0 2072
+#define wxScrollBar_new_3 2073
+#define wxScrollBar_destruct 2074
+#define wxScrollBar_Create 2075
+#define wxScrollBar_GetRange 2076
+#define wxScrollBar_GetPageSize 2077
+#define wxScrollBar_GetThumbPosition 2078
+#define wxScrollBar_GetThumbSize 2079
+#define wxScrollBar_SetThumbPosition 2080
+#define wxScrollBar_SetScrollbar 2081
+#define wxSpinButton_new_2 2083
+#define wxSpinButton_new_0 2084
+#define wxSpinButton_Create 2085
+#define wxSpinButton_GetMax 2086
+#define wxSpinButton_GetMin 2087
+#define wxSpinButton_GetValue 2088
+#define wxSpinButton_SetRange 2089
+#define wxSpinButton_SetValue 2090
+#define wxSpinButton_destroy 2091
+#define wxSpinCtrl_new_0 2092
+#define wxSpinCtrl_new_2 2093
+#define wxSpinCtrl_Create 2095
+#define wxSpinCtrl_SetValue_1_1 2098
+#define wxSpinCtrl_SetValue_1_0 2099
+#define wxSpinCtrl_GetValue 2101
+#define wxSpinCtrl_SetRange 2103
+#define wxSpinCtrl_SetSelection 2104
+#define wxSpinCtrl_GetMin 2106
+#define wxSpinCtrl_GetMax 2108
+#define wxSpinCtrl_destroy 2109
+#define wxStaticText_new_0 2110
+#define wxStaticText_new_4 2111
+#define wxStaticText_Create 2112
+#define wxStaticText_GetLabel 2113
+#define wxStaticText_SetLabel 2114
+#define wxStaticText_Wrap 2115
+#define wxStaticText_destroy 2116
+#define wxStaticBitmap_new_0 2117
+#define wxStaticBitmap_new_4 2118
+#define wxStaticBitmap_Create 2119
+#define wxStaticBitmap_GetBitmap 2120
+#define wxStaticBitmap_SetBitmap 2121
+#define wxStaticBitmap_destroy 2122
+#define wxRadioBox_new 2123
+#define wxRadioBox_destruct 2125
+#define wxRadioBox_Create 2126
+#define wxRadioBox_Enable_2 2127
+#define wxRadioBox_Enable_1 2128
+#define wxRadioBox_GetSelection 2129
+#define wxRadioBox_GetString 2130
+#define wxRadioBox_SetSelection 2131
+#define wxRadioBox_Show_2 2132
+#define wxRadioBox_Show_1 2133
+#define wxRadioBox_GetColumnCount 2134
+#define wxRadioBox_GetItemHelpText 2135
+#define wxRadioBox_GetItemToolTip 2136
+#define wxRadioBox_GetItemFromPoint 2138
+#define wxRadioBox_GetRowCount 2139
+#define wxRadioBox_IsItemEnabled 2140
+#define wxRadioBox_IsItemShown 2141
+#define wxRadioBox_SetItemHelpText 2142
+#define wxRadioBox_SetItemToolTip 2143
+#define wxRadioButton_new_0 2144
+#define wxRadioButton_new_4 2145
+#define wxRadioButton_Create 2146
+#define wxRadioButton_GetValue 2147
+#define wxRadioButton_SetValue 2148
+#define wxRadioButton_destroy 2149
+#define wxSlider_new_6 2151
+#define wxSlider_new_0 2152
+#define wxSlider_Create 2153
+#define wxSlider_GetLineSize 2154
+#define wxSlider_GetMax 2155
+#define wxSlider_GetMin 2156
+#define wxSlider_GetPageSize 2157
+#define wxSlider_GetThumbLength 2158
+#define wxSlider_GetValue 2159
+#define wxSlider_SetLineSize 2160
+#define wxSlider_SetPageSize 2161
+#define wxSlider_SetRange 2162
+#define wxSlider_SetThumbLength 2163
+#define wxSlider_SetValue 2164
+#define wxSlider_destroy 2165
+#define wxDialog_new_4 2167
+#define wxDialog_new_0 2168
+#define wxDialog_destruct 2170
+#define wxDialog_Create 2171
+#define wxDialog_CreateButtonSizer 2172
+#define wxDialog_CreateStdDialogButtonSizer 2173
+#define wxDialog_EndModal 2174
+#define wxDialog_GetAffirmativeId 2175
+#define wxDialog_GetReturnCode 2176
+#define wxDialog_IsModal 2177
+#define wxDialog_SetAffirmativeId 2178
+#define wxDialog_SetReturnCode 2179
+#define wxDialog_Show 2180
+#define wxDialog_ShowModal 2181
+#define wxColourDialog_new_0 2182
+#define wxColourDialog_new_2 2183
+#define wxColourDialog_destruct 2184
+#define wxColourDialog_Create 2185
+#define wxColourDialog_GetColourData 2186
+#define wxColourData_new_0 2187
+#define wxColourData_new_1 2188
+#define wxColourData_destruct 2189
+#define wxColourData_GetChooseFull 2190
+#define wxColourData_GetColour 2191
+#define wxColourData_GetCustomColour 2193
+#define wxColourData_SetChooseFull 2194
+#define wxColourData_SetColour 2195
+#define wxColourData_SetCustomColour 2196
+#define wxPalette_new_0 2197
+#define wxPalette_new_4 2198
+#define wxPalette_destruct 2200
+#define wxPalette_Create 2201
+#define wxPalette_GetColoursCount 2202
+#define wxPalette_GetPixel 2203
+#define wxPalette_GetRGB 2204
+#define wxPalette_IsOk 2205
+#define wxDirDialog_new 2209
+#define wxDirDialog_destruct 2210
+#define wxDirDialog_GetPath 2211
+#define wxDirDialog_GetMessage 2212
+#define wxDirDialog_SetMessage 2213
+#define wxDirDialog_SetPath 2214
+#define wxFileDialog_new 2218
+#define wxFileDialog_destruct 2219
+#define wxFileDialog_GetDirectory 2220
+#define wxFileDialog_GetFilename 2221
+#define wxFileDialog_GetFilenames 2222
+#define wxFileDialog_GetFilterIndex 2223
+#define wxFileDialog_GetMessage 2224
+#define wxFileDialog_GetPath 2225
+#define wxFileDialog_GetPaths 2226
+#define wxFileDialog_GetWildcard 2227
+#define wxFileDialog_SetDirectory 2228
+#define wxFileDialog_SetFilename 2229
+#define wxFileDialog_SetFilterIndex 2230
+#define wxFileDialog_SetMessage 2231
+#define wxFileDialog_SetPath 2232
+#define wxFileDialog_SetWildcard 2233
+#define wxPickerBase_SetInternalMargin 2234
+#define wxPickerBase_GetInternalMargin 2235
+#define wxPickerBase_SetTextCtrlProportion 2236
+#define wxPickerBase_SetPickerCtrlProportion 2237
+#define wxPickerBase_GetTextCtrlProportion 2238
+#define wxPickerBase_GetPickerCtrlProportion 2239
+#define wxPickerBase_HasTextCtrl 2240
+#define wxPickerBase_GetTextCtrl 2241
+#define wxPickerBase_IsTextCtrlGrowable 2242
+#define wxPickerBase_SetPickerCtrlGrowable 2243
+#define wxPickerBase_SetTextCtrlGrowable 2244
+#define wxPickerBase_IsPickerCtrlGrowable 2245
+#define wxFilePickerCtrl_new_0 2246
+#define wxFilePickerCtrl_new_3 2247
+#define wxFilePickerCtrl_Create 2248
+#define wxFilePickerCtrl_GetPath 2249
+#define wxFilePickerCtrl_SetPath 2250
+#define wxFilePickerCtrl_destroy 2251
+#define wxDirPickerCtrl_new_0 2252
+#define wxDirPickerCtrl_new_3 2253
+#define wxDirPickerCtrl_Create 2254
+#define wxDirPickerCtrl_GetPath 2255
+#define wxDirPickerCtrl_SetPath 2256
+#define wxDirPickerCtrl_destroy 2257
+#define wxColourPickerCtrl_new_0 2258
+#define wxColourPickerCtrl_new_3 2259
+#define wxColourPickerCtrl_Create 2260
+#define wxColourPickerCtrl_GetColour 2261
+#define wxColourPickerCtrl_SetColour_1_1 2262
+#define wxColourPickerCtrl_SetColour_1_0 2263
+#define wxColourPickerCtrl_destroy 2264
+#define wxDatePickerCtrl_new_0 2265
+#define wxDatePickerCtrl_new_3 2266
+#define wxDatePickerCtrl_GetRange 2267
+#define wxDatePickerCtrl_GetValue 2268
+#define wxDatePickerCtrl_SetRange 2269
+#define wxDatePickerCtrl_SetValue 2270
+#define wxDatePickerCtrl_destroy 2271
+#define wxFontPickerCtrl_new_0 2272
+#define wxFontPickerCtrl_new_3 2273
+#define wxFontPickerCtrl_Create 2274
+#define wxFontPickerCtrl_GetSelectedFont 2275
+#define wxFontPickerCtrl_SetSelectedFont 2276
+#define wxFontPickerCtrl_GetMaxPointSize 2277
+#define wxFontPickerCtrl_SetMaxPointSize 2278
+#define wxFontPickerCtrl_destroy 2279
+#define wxFindReplaceDialog_new_0 2282
+#define wxFindReplaceDialog_new_4 2283
+#define wxFindReplaceDialog_destruct 2284
+#define wxFindReplaceDialog_Create 2285
+#define wxFindReplaceDialog_GetData 2286
+#define wxFindReplaceData_new_0 2287
+#define wxFindReplaceData_new_1 2288
+#define wxFindReplaceData_GetFindString 2289
+#define wxFindReplaceData_GetReplaceString 2290
+#define wxFindReplaceData_GetFlags 2291
+#define wxFindReplaceData_SetFlags 2292
+#define wxFindReplaceData_SetFindString 2293
+#define wxFindReplaceData_SetReplaceString 2294
+#define wxFindReplaceData_destroy 2295
+#define wxMultiChoiceDialog_new_0 2296
+#define wxMultiChoiceDialog_new_5 2298
+#define wxMultiChoiceDialog_GetSelections 2299
+#define wxMultiChoiceDialog_SetSelections 2300
+#define wxMultiChoiceDialog_destroy 2301
+#define wxSingleChoiceDialog_new_0 2302
+#define wxSingleChoiceDialog_new_5 2304
+#define wxSingleChoiceDialog_GetSelection 2305
+#define wxSingleChoiceDialog_GetStringSelection 2306
+#define wxSingleChoiceDialog_SetSelection 2307
+#define wxSingleChoiceDialog_destroy 2308
+#define wxTextEntryDialog_new 2309
+#define wxTextEntryDialog_GetValue 2310
+#define wxTextEntryDialog_SetValue 2311
+#define wxTextEntryDialog_destroy 2312
+#define wxPasswordEntryDialog_new 2313
+#define wxPasswordEntryDialog_destroy 2314
+#define wxFontData_new_0 2315
+#define wxFontData_new_1 2316
+#define wxFontData_destruct 2317
+#define wxFontData_EnableEffects 2318
+#define wxFontData_GetAllowSymbols 2319
+#define wxFontData_GetColour 2320
+#define wxFontData_GetChosenFont 2321
+#define wxFontData_GetEnableEffects 2322
+#define wxFontData_GetInitialFont 2323
+#define wxFontData_GetShowHelp 2324
+#define wxFontData_SetAllowSymbols 2325
+#define wxFontData_SetChosenFont 2326
+#define wxFontData_SetColour 2327
+#define wxFontData_SetInitialFont 2328
+#define wxFontData_SetRange 2329
+#define wxFontData_SetShowHelp 2330
+#define wxFontDialog_new_0 2334
+#define wxFontDialog_new_2 2336
+#define wxFontDialog_Create 2338
+#define wxFontDialog_GetFontData 2339
+#define wxFontDialog_destroy 2341
+#define wxProgressDialog_new 2342
+#define wxProgressDialog_destruct 2343
+#define wxProgressDialog_Resume 2344
+#define wxProgressDialog_Update_2 2345
+#define wxProgressDialog_Update_0 2346
+#define wxMessageDialog_new 2347
+#define wxMessageDialog_destruct 2348
+#define wxPageSetupDialog_new 2349
+#define wxPageSetupDialog_destruct 2350
+#define wxPageSetupDialog_GetPageSetupData 2351
+#define wxPageSetupDialog_ShowModal 2352
+#define wxPageSetupDialogData_new_0 2353
+#define wxPageSetupDialogData_new_1_0 2354
+#define wxPageSetupDialogData_new_1_1 2355
+#define wxPageSetupDialogData_destruct 2356
+#define wxPageSetupDialogData_EnableHelp 2357
+#define wxPageSetupDialogData_EnableMargins 2358
+#define wxPageSetupDialogData_EnableOrientation 2359
+#define wxPageSetupDialogData_EnablePaper 2360
+#define wxPageSetupDialogData_EnablePrinter 2361
+#define wxPageSetupDialogData_GetDefaultMinMargins 2362
+#define wxPageSetupDialogData_GetEnableMargins 2363
+#define wxPageSetupDialogData_GetEnableOrientation 2364
+#define wxPageSetupDialogData_GetEnablePaper 2365
+#define wxPageSetupDialogData_GetEnablePrinter 2366
+#define wxPageSetupDialogData_GetEnableHelp 2367
+#define wxPageSetupDialogData_GetDefaultInfo 2368
+#define wxPageSetupDialogData_GetMarginTopLeft 2369
+#define wxPageSetupDialogData_GetMarginBottomRight 2370
+#define wxPageSetupDialogData_GetMinMarginTopLeft 2371
+#define wxPageSetupDialogData_GetMinMarginBottomRight 2372
+#define wxPageSetupDialogData_GetPaperId 2373
+#define wxPageSetupDialogData_GetPaperSize 2374
+#define wxPageSetupDialogData_GetPrintData 2376
+#define wxPageSetupDialogData_IsOk 2377
+#define wxPageSetupDialogData_SetDefaultInfo 2378
+#define wxPageSetupDialogData_SetDefaultMinMargins 2379
+#define wxPageSetupDialogData_SetMarginTopLeft 2380
+#define wxPageSetupDialogData_SetMarginBottomRight 2381
+#define wxPageSetupDialogData_SetMinMarginTopLeft 2382
+#define wxPageSetupDialogData_SetMinMarginBottomRight 2383
+#define wxPageSetupDialogData_SetPaperId 2384
+#define wxPageSetupDialogData_SetPaperSize_1_1 2385
+#define wxPageSetupDialogData_SetPaperSize_1_0 2386
+#define wxPageSetupDialogData_SetPrintData 2387
+#define wxPrintDialog_new_2_0 2388
+#define wxPrintDialog_new_2_1 2389
+#define wxPrintDialog_destruct 2390
+#define wxPrintDialog_GetPrintDialogData 2391
+#define wxPrintDialog_GetPrintDC 2392
+#define wxPrintDialogData_new_0 2393
+#define wxPrintDialogData_new_1_1 2394
+#define wxPrintDialogData_new_1_0 2395
+#define wxPrintDialogData_destruct 2396
+#define wxPrintDialogData_EnableHelp 2397
+#define wxPrintDialogData_EnablePageNumbers 2398
+#define wxPrintDialogData_EnablePrintToFile 2399
+#define wxPrintDialogData_EnableSelection 2400
+#define wxPrintDialogData_GetAllPages 2401
+#define wxPrintDialogData_GetCollate 2402
+#define wxPrintDialogData_GetFromPage 2403
+#define wxPrintDialogData_GetMaxPage 2404
+#define wxPrintDialogData_GetMinPage 2405
+#define wxPrintDialogData_GetNoCopies 2406
+#define wxPrintDialogData_GetPrintData 2407
+#define wxPrintDialogData_GetPrintToFile 2408
+#define wxPrintDialogData_GetSelection 2409
+#define wxPrintDialogData_GetToPage 2410
+#define wxPrintDialogData_IsOk 2411
+#define wxPrintDialogData_SetCollate 2412
+#define wxPrintDialogData_SetFromPage 2413
+#define wxPrintDialogData_SetMaxPage 2414
+#define wxPrintDialogData_SetMinPage 2415
+#define wxPrintDialogData_SetNoCopies 2416
+#define wxPrintDialogData_SetPrintData 2417
+#define wxPrintDialogData_SetPrintToFile 2418
+#define wxPrintDialogData_SetSelection 2419
+#define wxPrintDialogData_SetToPage 2420
+#define wxPrintData_new_0 2421
+#define wxPrintData_new_1 2422
+#define wxPrintData_destruct 2423
+#define wxPrintData_GetCollate 2424
+#define wxPrintData_GetBin 2425
+#define wxPrintData_GetColour 2426
+#define wxPrintData_GetDuplex 2427
+#define wxPrintData_GetNoCopies 2428
+#define wxPrintData_GetOrientation 2429
+#define wxPrintData_GetPaperId 2430
+#define wxPrintData_GetPrinterName 2431
+#define wxPrintData_GetQuality 2432
+#define wxPrintData_IsOk 2433
+#define wxPrintData_SetBin 2434
+#define wxPrintData_SetCollate 2435
+#define wxPrintData_SetColour 2436
+#define wxPrintData_SetDuplex 2437
+#define wxPrintData_SetNoCopies 2438
+#define wxPrintData_SetOrientation 2439
+#define wxPrintData_SetPaperId 2440
+#define wxPrintData_SetPrinterName 2441
+#define wxPrintData_SetQuality 2442
+#define wxPrintPreview_new_2 2445
+#define wxPrintPreview_new_3 2446
+#define wxPrintPreview_destruct 2448
+#define wxPrintPreview_GetCanvas 2449
+#define wxPrintPreview_GetCurrentPage 2450
+#define wxPrintPreview_GetFrame 2451
+#define wxPrintPreview_GetMaxPage 2452
+#define wxPrintPreview_GetMinPage 2453
+#define wxPrintPreview_GetPrintout 2454
+#define wxPrintPreview_GetPrintoutForPrinting 2455
+#define wxPrintPreview_IsOk 2456
+#define wxPrintPreview_PaintPage 2457
+#define wxPrintPreview_Print 2458
+#define wxPrintPreview_RenderPage 2459
+#define wxPrintPreview_SetCanvas 2460
+#define wxPrintPreview_SetCurrentPage 2461
+#define wxPrintPreview_SetFrame 2462
+#define wxPrintPreview_SetPrintout 2463
+#define wxPrintPreview_SetZoom 2464
+#define wxPreviewFrame_new 2465
+#define wxPreviewFrame_destruct 2466
+#define wxPreviewFrame_CreateControlBar 2467
+#define wxPreviewFrame_CreateCanvas 2468
+#define wxPreviewFrame_Initialize 2469
+#define wxPreviewFrame_OnCloseWindow 2470
+#define wxPreviewControlBar_new 2471
+#define wxPreviewControlBar_destruct 2472
+#define wxPreviewControlBar_CreateButtons 2473
+#define wxPreviewControlBar_GetPrintPreview 2474
+#define wxPreviewControlBar_GetZoomControl 2475
+#define wxPreviewControlBar_SetZoomControl 2476
+#define wxPrinter_new 2478
+#define wxPrinter_CreateAbortWindow 2479
+#define wxPrinter_GetAbort 2480
+#define wxPrinter_GetLastError 2481
+#define wxPrinter_GetPrintDialogData 2482
+#define wxPrinter_Print 2483
+#define wxPrinter_PrintDialog 2484
+#define wxPrinter_ReportError 2485
+#define wxPrinter_Setup 2486
+#define wxPrinter_destroy 2487
+#define wxXmlResource_new_1 2488
+#define wxXmlResource_new_2 2489
+#define wxXmlResource_destruct 2490
+#define wxXmlResource_AttachUnknownControl 2491
+#define wxXmlResource_ClearHandlers 2492
+#define wxXmlResource_CompareVersion 2493
+#define wxXmlResource_Get 2494
+#define wxXmlResource_GetFlags 2495
+#define wxXmlResource_GetVersion 2496
+#define wxXmlResource_GetXRCID 2497
+#define wxXmlResource_InitAllHandlers 2498
+#define wxXmlResource_Load 2499
+#define wxXmlResource_LoadBitmap 2500
+#define wxXmlResource_LoadDialog_2 2501
+#define wxXmlResource_LoadDialog_3 2502
+#define wxXmlResource_LoadFrame_2 2503
+#define wxXmlResource_LoadFrame_3 2504
+#define wxXmlResource_LoadIcon 2505
+#define wxXmlResource_LoadMenu 2506
+#define wxXmlResource_LoadMenuBar_2 2507
+#define wxXmlResource_LoadMenuBar_1 2508
+#define wxXmlResource_LoadPanel_2 2509
+#define wxXmlResource_LoadPanel_3 2510
+#define wxXmlResource_LoadToolBar 2511
+#define wxXmlResource_Set 2512
+#define wxXmlResource_SetFlags 2513
+#define wxXmlResource_Unload 2514
+#define wxXmlResource_xrcctrl 2515
+#define wxHtmlEasyPrinting_new 2516
+#define wxHtmlEasyPrinting_destruct 2517
+#define wxHtmlEasyPrinting_GetPrintData 2518
+#define wxHtmlEasyPrinting_GetPageSetupData 2519
+#define wxHtmlEasyPrinting_PreviewFile 2520
+#define wxHtmlEasyPrinting_PreviewText 2521
+#define wxHtmlEasyPrinting_PrintFile 2522
+#define wxHtmlEasyPrinting_PrintText 2523
+#define wxHtmlEasyPrinting_PageSetup 2524
+#define wxHtmlEasyPrinting_SetFonts 2525
+#define wxHtmlEasyPrinting_SetHeader 2526
+#define wxHtmlEasyPrinting_SetFooter 2527
+#define wxGLCanvas_new_2 2529
+#define wxGLCanvas_new_3_1 2530
+#define wxGLCanvas_new_3_0 2531
+#define wxGLCanvas_GetContext 2532
+#define wxGLCanvas_SetCurrent 2534
+#define wxGLCanvas_SwapBuffers 2535
+#define wxGLCanvas_destroy 2536
+#define wxAuiManager_new 2537
+#define wxAuiManager_destruct 2538
+#define wxAuiManager_AddPane_2_1 2539
+#define wxAuiManager_AddPane_3 2540
+#define wxAuiManager_AddPane_2_0 2541
+#define wxAuiManager_DetachPane 2542
+#define wxAuiManager_GetAllPanes 2543
+#define wxAuiManager_GetArtProvider 2544
+#define wxAuiManager_GetDockSizeConstraint 2545
+#define wxAuiManager_GetFlags 2546
+#define wxAuiManager_GetManagedWindow 2547
+#define wxAuiManager_GetManager 2548
+#define wxAuiManager_GetPane_1_1 2549
+#define wxAuiManager_GetPane_1_0 2550
+#define wxAuiManager_HideHint 2551
+#define wxAuiManager_InsertPane 2552
+#define wxAuiManager_LoadPaneInfo 2553
+#define wxAuiManager_LoadPerspective 2554
+#define wxAuiManager_SavePaneInfo 2555
+#define wxAuiManager_SavePerspective 2556
+#define wxAuiManager_SetArtProvider 2557
+#define wxAuiManager_SetDockSizeConstraint 2558
+#define wxAuiManager_SetFlags 2559
+#define wxAuiManager_SetManagedWindow 2560
+#define wxAuiManager_ShowHint 2561
+#define wxAuiManager_UnInit 2562
+#define wxAuiManager_Update 2563
+#define wxAuiPaneInfo_new_0 2564
+#define wxAuiPaneInfo_new_1 2565
+#define wxAuiPaneInfo_destruct 2566
+#define wxAuiPaneInfo_BestSize_1 2567
+#define wxAuiPaneInfo_BestSize_2 2568
+#define wxAuiPaneInfo_Bottom 2569
+#define wxAuiPaneInfo_BottomDockable 2570
+#define wxAuiPaneInfo_Caption 2571
+#define wxAuiPaneInfo_CaptionVisible 2572
+#define wxAuiPaneInfo_Centre 2573
+#define wxAuiPaneInfo_CentrePane 2574
+#define wxAuiPaneInfo_CloseButton 2575
+#define wxAuiPaneInfo_DefaultPane 2576
+#define wxAuiPaneInfo_DestroyOnClose 2577
+#define wxAuiPaneInfo_Direction 2578
+#define wxAuiPaneInfo_Dock 2579
+#define wxAuiPaneInfo_Dockable 2580
+#define wxAuiPaneInfo_Fixed 2581
+#define wxAuiPaneInfo_Float 2582
+#define wxAuiPaneInfo_Floatable 2583
+#define wxAuiPaneInfo_FloatingPosition_1 2584
+#define wxAuiPaneInfo_FloatingPosition_2 2585
+#define wxAuiPaneInfo_FloatingSize_1 2586
+#define wxAuiPaneInfo_FloatingSize_2 2587
+#define wxAuiPaneInfo_Gripper 2588
+#define wxAuiPaneInfo_GripperTop 2589
+#define wxAuiPaneInfo_HasBorder 2590
+#define wxAuiPaneInfo_HasCaption 2591
+#define wxAuiPaneInfo_HasCloseButton 2592
+#define wxAuiPaneInfo_HasFlag 2593
+#define wxAuiPaneInfo_HasGripper 2594
+#define wxAuiPaneInfo_HasGripperTop 2595
+#define wxAuiPaneInfo_HasMaximizeButton 2596
+#define wxAuiPaneInfo_HasMinimizeButton 2597
+#define wxAuiPaneInfo_HasPinButton 2598
+#define wxAuiPaneInfo_Hide 2599
+#define wxAuiPaneInfo_IsBottomDockable 2600
+#define wxAuiPaneInfo_IsDocked 2601
+#define wxAuiPaneInfo_IsFixed 2602
+#define wxAuiPaneInfo_IsFloatable 2603
+#define wxAuiPaneInfo_IsFloating 2604
+#define wxAuiPaneInfo_IsLeftDockable 2605
+#define wxAuiPaneInfo_IsMovable 2606
+#define wxAuiPaneInfo_IsOk 2607
+#define wxAuiPaneInfo_IsResizable 2608
+#define wxAuiPaneInfo_IsRightDockable 2609
+#define wxAuiPaneInfo_IsShown 2610
+#define wxAuiPaneInfo_IsToolbar 2611
+#define wxAuiPaneInfo_IsTopDockable 2612
+#define wxAuiPaneInfo_Layer 2613
+#define wxAuiPaneInfo_Left 2614
+#define wxAuiPaneInfo_LeftDockable 2615
+#define wxAuiPaneInfo_MaxSize_1 2616
+#define wxAuiPaneInfo_MaxSize_2 2617
+#define wxAuiPaneInfo_MaximizeButton 2618
+#define wxAuiPaneInfo_MinSize_1 2619
+#define wxAuiPaneInfo_MinSize_2 2620
+#define wxAuiPaneInfo_MinimizeButton 2621
+#define wxAuiPaneInfo_Movable 2622
+#define wxAuiPaneInfo_Name 2623
+#define wxAuiPaneInfo_PaneBorder 2624
+#define wxAuiPaneInfo_PinButton 2625
+#define wxAuiPaneInfo_Position 2626
+#define wxAuiPaneInfo_Resizable 2627
+#define wxAuiPaneInfo_Right 2628
+#define wxAuiPaneInfo_RightDockable 2629
+#define wxAuiPaneInfo_Row 2630
+#define wxAuiPaneInfo_SafeSet 2631
+#define wxAuiPaneInfo_SetFlag 2632
+#define wxAuiPaneInfo_Show 2633
+#define wxAuiPaneInfo_ToolbarPane 2634
+#define wxAuiPaneInfo_Top 2635
+#define wxAuiPaneInfo_TopDockable 2636
+#define wxAuiPaneInfo_Window 2637
+#define wxAuiNotebook_new_0 2638
+#define wxAuiNotebook_new_2 2639
+#define wxAuiNotebook_AddPage 2640
+#define wxAuiNotebook_Create 2641
+#define wxAuiNotebook_DeletePage 2642
+#define wxAuiNotebook_GetArtProvider 2643
+#define wxAuiNotebook_GetPage 2644
+#define wxAuiNotebook_GetPageBitmap 2645
+#define wxAuiNotebook_GetPageCount 2646
+#define wxAuiNotebook_GetPageIndex 2647
+#define wxAuiNotebook_GetPageText 2648
+#define wxAuiNotebook_GetSelection 2649
+#define wxAuiNotebook_InsertPage 2650
+#define wxAuiNotebook_RemovePage 2651
+#define wxAuiNotebook_SetArtProvider 2652
+#define wxAuiNotebook_SetFont 2653
+#define wxAuiNotebook_SetPageBitmap 2654
+#define wxAuiNotebook_SetPageText 2655
+#define wxAuiNotebook_SetSelection 2656
+#define wxAuiNotebook_SetTabCtrlHeight 2657
+#define wxAuiNotebook_SetUniformBitmapSize 2658
+#define wxAuiNotebook_destroy 2659
+#define wxMDIParentFrame_new_0 2660
+#define wxMDIParentFrame_new_4 2661
+#define wxMDIParentFrame_destruct 2662
+#define wxMDIParentFrame_ActivateNext 2663
+#define wxMDIParentFrame_ActivatePrevious 2664
+#define wxMDIParentFrame_ArrangeIcons 2665
+#define wxMDIParentFrame_Cascade 2666
+#define wxMDIParentFrame_Create 2667
+#define wxMDIParentFrame_GetActiveChild 2668
+#define wxMDIParentFrame_GetClientWindow 2669
+#define wxMDIParentFrame_Tile 2670
+#define wxMDIChildFrame_new_0 2671
+#define wxMDIChildFrame_new_4 2672
+#define wxMDIChildFrame_destruct 2673
+#define wxMDIChildFrame_Activate 2674
+#define wxMDIChildFrame_Create 2675
+#define wxMDIChildFrame_Maximize 2676
+#define wxMDIChildFrame_Restore 2677
+#define wxMDIClientWindow_new_0 2678
+#define wxMDIClientWindow_new_2 2679
+#define wxMDIClientWindow_destruct 2680
+#define wxMDIClientWindow_CreateClient 2681
+#define wxLayoutAlgorithm_new 2682
+#define wxLayoutAlgorithm_LayoutFrame 2683
+#define wxLayoutAlgorithm_LayoutMDIFrame 2684
+#define wxLayoutAlgorithm_LayoutWindow 2685
+#define wxLayoutAlgorithm_destroy 2686
+#define wxEvent_GetId 2687
+#define wxEvent_GetSkipped 2688
+#define wxEvent_GetTimestamp 2689
+#define wxEvent_IsCommandEvent 2690
+#define wxEvent_ResumePropagation 2691
+#define wxEvent_ShouldPropagate 2692
+#define wxEvent_Skip 2693
+#define wxEvent_StopPropagation 2694
+#define wxCommandEvent_getClientData 2695
+#define wxCommandEvent_GetExtraLong 2696
+#define wxCommandEvent_GetInt 2697
+#define wxCommandEvent_GetSelection 2698
+#define wxCommandEvent_GetString 2699
+#define wxCommandEvent_IsChecked 2700
+#define wxCommandEvent_IsSelection 2701
+#define wxCommandEvent_SetInt 2702
+#define wxCommandEvent_SetString 2703
+#define wxScrollEvent_GetOrientation 2704
+#define wxScrollEvent_GetPosition 2705
+#define wxScrollWinEvent_GetOrientation 2706
+#define wxScrollWinEvent_GetPosition 2707
+#define wxMouseEvent_AltDown 2708
+#define wxMouseEvent_Button 2709
+#define wxMouseEvent_ButtonDClick 2710
+#define wxMouseEvent_ButtonDown 2711
+#define wxMouseEvent_ButtonUp 2712
+#define wxMouseEvent_CmdDown 2713
+#define wxMouseEvent_ControlDown 2714
+#define wxMouseEvent_Dragging 2715
+#define wxMouseEvent_Entering 2716
+#define wxMouseEvent_GetButton 2717
+#define wxMouseEvent_GetPosition 2720
+#define wxMouseEvent_GetLogicalPosition 2721
+#define wxMouseEvent_GetLinesPerAction 2722
+#define wxMouseEvent_GetWheelRotation 2723
+#define wxMouseEvent_GetWheelDelta 2724
+#define wxMouseEvent_GetX 2725
+#define wxMouseEvent_GetY 2726
+#define wxMouseEvent_IsButton 2727
+#define wxMouseEvent_IsPageScroll 2728
+#define wxMouseEvent_Leaving 2729
+#define wxMouseEvent_LeftDClick 2730
+#define wxMouseEvent_LeftDown 2731
+#define wxMouseEvent_LeftIsDown 2732
+#define wxMouseEvent_LeftUp 2733
+#define wxMouseEvent_MetaDown 2734
+#define wxMouseEvent_MiddleDClick 2735
+#define wxMouseEvent_MiddleDown 2736
+#define wxMouseEvent_MiddleIsDown 2737
+#define wxMouseEvent_MiddleUp 2738
+#define wxMouseEvent_Moving 2739
+#define wxMouseEvent_RightDClick 2740
+#define wxMouseEvent_RightDown 2741
+#define wxMouseEvent_RightIsDown 2742
+#define wxMouseEvent_RightUp 2743
+#define wxMouseEvent_ShiftDown 2744
+#define wxSetCursorEvent_GetCursor 2745
+#define wxSetCursorEvent_GetX 2746
+#define wxSetCursorEvent_GetY 2747
+#define wxSetCursorEvent_HasCursor 2748
+#define wxSetCursorEvent_SetCursor 2749
+#define wxKeyEvent_AltDown 2750
+#define wxKeyEvent_CmdDown 2751
+#define wxKeyEvent_ControlDown 2752
+#define wxKeyEvent_GetKeyCode 2753
+#define wxKeyEvent_GetModifiers 2754
+#define wxKeyEvent_GetPosition 2757
+#define wxKeyEvent_GetRawKeyCode 2758
+#define wxKeyEvent_GetRawKeyFlags 2759
+#define wxKeyEvent_GetUnicodeKey 2760
+#define wxKeyEvent_GetX 2761
+#define wxKeyEvent_GetY 2762
+#define wxKeyEvent_HasModifiers 2763
+#define wxKeyEvent_MetaDown 2764
+#define wxKeyEvent_ShiftDown 2765
+#define wxSizeEvent_GetSize 2766
+#define wxMoveEvent_GetPosition 2767
+#define wxEraseEvent_GetDC 2768
+#define wxFocusEvent_GetWindow 2769
+#define wxChildFocusEvent_GetWindow 2770
+#define wxMenuEvent_GetMenu 2771
+#define wxMenuEvent_GetMenuId 2772
+#define wxMenuEvent_IsPopup 2773
+#define wxCloseEvent_CanVeto 2774
+#define wxCloseEvent_GetLoggingOff 2775
+#define wxCloseEvent_SetCanVeto 2776
+#define wxCloseEvent_SetLoggingOff 2777
+#define wxCloseEvent_Veto 2778
+#define wxShowEvent_SetShow 2779
+#define wxShowEvent_GetShow 2780
+#define wxIconizeEvent_Iconized 2781
+#define wxJoystickEvent_ButtonDown 2782
+#define wxJoystickEvent_ButtonIsDown 2783
+#define wxJoystickEvent_ButtonUp 2784
+#define wxJoystickEvent_GetButtonChange 2785
+#define wxJoystickEvent_GetButtonState 2786
+#define wxJoystickEvent_GetJoystick 2787
+#define wxJoystickEvent_GetPosition 2788
+#define wxJoystickEvent_GetZPosition 2789
+#define wxJoystickEvent_IsButton 2790
+#define wxJoystickEvent_IsMove 2791
+#define wxJoystickEvent_IsZMove 2792
+#define wxUpdateUIEvent_CanUpdate 2793
+#define wxUpdateUIEvent_Check 2794
+#define wxUpdateUIEvent_Enable 2795
+#define wxUpdateUIEvent_Show 2796
+#define wxUpdateUIEvent_GetChecked 2797
+#define wxUpdateUIEvent_GetEnabled 2798
+#define wxUpdateUIEvent_GetShown 2799
+#define wxUpdateUIEvent_GetSetChecked 2800
+#define wxUpdateUIEvent_GetSetEnabled 2801
+#define wxUpdateUIEvent_GetSetShown 2802
+#define wxUpdateUIEvent_GetSetText 2803
+#define wxUpdateUIEvent_GetText 2804
+#define wxUpdateUIEvent_GetMode 2805
+#define wxUpdateUIEvent_GetUpdateInterval 2806
+#define wxUpdateUIEvent_ResetUpdateTime 2807
+#define wxUpdateUIEvent_SetMode 2808
+#define wxUpdateUIEvent_SetText 2809
+#define wxUpdateUIEvent_SetUpdateInterval 2810
+#define wxMouseCaptureChangedEvent_GetCapturedWindow 2811
+#define wxPaletteChangedEvent_SetChangedWindow 2812
+#define wxPaletteChangedEvent_GetChangedWindow 2813
+#define wxQueryNewPaletteEvent_SetPaletteRealized 2814
+#define wxQueryNewPaletteEvent_GetPaletteRealized 2815
+#define wxNavigationKeyEvent_GetDirection 2816
+#define wxNavigationKeyEvent_SetDirection 2817
+#define wxNavigationKeyEvent_IsWindowChange 2818
+#define wxNavigationKeyEvent_SetWindowChange 2819
+#define wxNavigationKeyEvent_IsFromTab 2820
+#define wxNavigationKeyEvent_SetFromTab 2821
+#define wxNavigationKeyEvent_GetCurrentFocus 2822
+#define wxNavigationKeyEvent_SetCurrentFocus 2823
+#define wxHelpEvent_GetOrigin 2824
+#define wxHelpEvent_GetPosition 2825
+#define wxHelpEvent_SetOrigin 2826
+#define wxHelpEvent_SetPosition 2827
+#define wxContextMenuEvent_GetPosition 2828
+#define wxContextMenuEvent_SetPosition 2829
+#define wxIdleEvent_CanSend 2830
+#define wxIdleEvent_GetMode 2831
+#define wxIdleEvent_RequestMore 2832
+#define wxIdleEvent_MoreRequested 2833
+#define wxIdleEvent_SetMode 2834
+#define wxGridEvent_AltDown 2835
+#define wxGridEvent_ControlDown 2836
+#define wxGridEvent_GetCol 2837
+#define wxGridEvent_GetPosition 2838
+#define wxGridEvent_GetRow 2839
+#define wxGridEvent_MetaDown 2840
+#define wxGridEvent_Selecting 2841
+#define wxGridEvent_ShiftDown 2842
+#define wxNotifyEvent_Allow 2843
+#define wxNotifyEvent_IsAllowed 2844
+#define wxNotifyEvent_Veto 2845
+#define wxSashEvent_GetEdge 2846
+#define wxSashEvent_GetDragRect 2847
+#define wxSashEvent_GetDragStatus 2848
+#define wxListEvent_GetCacheFrom 2849
+#define wxListEvent_GetCacheTo 2850
+#define wxListEvent_GetKeyCode 2851
+#define wxListEvent_GetIndex 2852
+#define wxListEvent_GetColumn 2853
+#define wxListEvent_GetPoint 2854
+#define wxListEvent_GetLabel 2855
+#define wxListEvent_GetText 2856
+#define wxListEvent_GetImage 2857
+#define wxListEvent_GetData 2858
+#define wxListEvent_GetMask 2859
+#define wxListEvent_GetItem 2860
+#define wxListEvent_IsEditCancelled 2861
+#define wxDateEvent_GetDate 2862
+#define wxCalendarEvent_GetWeekDay 2863
+#define wxFileDirPickerEvent_GetPath 2864
+#define wxColourPickerEvent_GetColour 2865
+#define wxFontPickerEvent_GetFont 2866
+#define wxStyledTextEvent_GetPosition 2867
+#define wxStyledTextEvent_GetKey 2868
+#define wxStyledTextEvent_GetModifiers 2869
+#define wxStyledTextEvent_GetModificationType 2870
+#define wxStyledTextEvent_GetText 2871
+#define wxStyledTextEvent_GetLength 2872
+#define wxStyledTextEvent_GetLinesAdded 2873
+#define wxStyledTextEvent_GetLine 2874
+#define wxStyledTextEvent_GetFoldLevelNow 2875
+#define wxStyledTextEvent_GetFoldLevelPrev 2876
+#define wxStyledTextEvent_GetMargin 2877
+#define wxStyledTextEvent_GetMessage 2878
+#define wxStyledTextEvent_GetWParam 2879
+#define wxStyledTextEvent_GetLParam 2880
+#define wxStyledTextEvent_GetListType 2881
+#define wxStyledTextEvent_GetX 2882
+#define wxStyledTextEvent_GetY 2883
+#define wxStyledTextEvent_GetDragText 2884
+#define wxStyledTextEvent_GetDragAllowMove 2885
+#define wxStyledTextEvent_GetDragResult 2886
+#define wxStyledTextEvent_GetShift 2887
+#define wxStyledTextEvent_GetControl 2888
+#define wxStyledTextEvent_GetAlt 2889
+#define utils_wxGetKeyState 2890
+#define utils_wxGetMousePosition 2891
+#define utils_wxGetMouseState 2892
+#define utils_wxSetDetectableAutoRepeat 2893
+#define utils_wxBell 2894
+#define utils_wxFindMenuItemId 2895
+#define utils_wxGenericFindWindowAtPoint 2896
+#define utils_wxFindWindowAtPoint 2897
+#define utils_wxBeginBusyCursor 2898
+#define utils_wxEndBusyCursor 2899
+#define utils_wxIsBusy 2900
+#define utils_wxShutdown 2901
+#define utils_wxShell 2902
+#define utils_wxLaunchDefaultBrowser 2903
+#define utils_wxGetEmailAddress 2904
+#define utils_wxGetUserId 2905
+#define utils_wxGetHomeDir 2906
+#define utils_wxNewId 2907
+#define utils_wxRegisterId 2908
+#define utils_wxGetCurrentId 2909
+#define utils_wxGetOsDescription 2910
+#define utils_wxIsPlatformLittleEndian 2911
+#define utils_wxIsPlatform64Bit 2912
+#define wxPrintout_new 2913
+#define wxPrintout_destruct 2914
+#define wxPrintout_GetDC 2915
+#define wxPrintout_GetPageSizeMM 2916
+#define wxPrintout_GetPageSizePixels 2917
+#define wxPrintout_GetPaperRectPixels 2918
+#define wxPrintout_GetPPIPrinter 2919
+#define wxPrintout_GetPPIScreen 2920
+#define wxPrintout_GetTitle 2921
+#define wxPrintout_IsPreview 2922
+#define wxPrintout_FitThisSizeToPaper 2923
+#define wxPrintout_FitThisSizeToPage 2924
+#define wxPrintout_FitThisSizeToPageMargins 2925
+#define wxPrintout_MapScreenSizeToPaper 2926
+#define wxPrintout_MapScreenSizeToPage 2927
+#define wxPrintout_MapScreenSizeToPageMargins 2928
+#define wxPrintout_MapScreenSizeToDevice 2929
+#define wxPrintout_GetLogicalPaperRect 2930
+#define wxPrintout_GetLogicalPageRect 2931
+#define wxPrintout_GetLogicalPageMarginsRect 2932
+#define wxPrintout_SetLogicalOrigin 2933
+#define wxPrintout_OffsetLogicalOrigin 2934
+#define wxStyledTextCtrl_new_2 2935
+#define wxStyledTextCtrl_new_0 2936
+#define wxStyledTextCtrl_destruct 2937
+#define wxStyledTextCtrl_Create 2938
+#define wxStyledTextCtrl_AddText 2939
+#define wxStyledTextCtrl_AddStyledText 2940
+#define wxStyledTextCtrl_InsertText 2941
+#define wxStyledTextCtrl_ClearAll 2942
+#define wxStyledTextCtrl_ClearDocumentStyle 2943
+#define wxStyledTextCtrl_GetLength 2944
+#define wxStyledTextCtrl_GetCharAt 2945
+#define wxStyledTextCtrl_GetCurrentPos 2946
+#define wxStyledTextCtrl_GetAnchor 2947
+#define wxStyledTextCtrl_GetStyleAt 2948
+#define wxStyledTextCtrl_Redo 2949
+#define wxStyledTextCtrl_SetUndoCollection 2950
+#define wxStyledTextCtrl_SelectAll 2951
+#define wxStyledTextCtrl_SetSavePoint 2952
+#define wxStyledTextCtrl_GetStyledText 2953
+#define wxStyledTextCtrl_CanRedo 2954
+#define wxStyledTextCtrl_MarkerLineFromHandle 2955
+#define wxStyledTextCtrl_MarkerDeleteHandle 2956
+#define wxStyledTextCtrl_GetUndoCollection 2957
+#define wxStyledTextCtrl_GetViewWhiteSpace 2958
+#define wxStyledTextCtrl_SetViewWhiteSpace 2959
+#define wxStyledTextCtrl_PositionFromPoint 2960
+#define wxStyledTextCtrl_PositionFromPointClose 2961
+#define wxStyledTextCtrl_GotoLine 2962
+#define wxStyledTextCtrl_GotoPos 2963
+#define wxStyledTextCtrl_SetAnchor 2964
+#define wxStyledTextCtrl_GetCurLine 2965
+#define wxStyledTextCtrl_GetEndStyled 2966
+#define wxStyledTextCtrl_ConvertEOLs 2967
+#define wxStyledTextCtrl_GetEOLMode 2968
+#define wxStyledTextCtrl_SetEOLMode 2969
+#define wxStyledTextCtrl_StartStyling 2970
+#define wxStyledTextCtrl_SetStyling 2971
+#define wxStyledTextCtrl_GetBufferedDraw 2972
+#define wxStyledTextCtrl_SetBufferedDraw 2973
+#define wxStyledTextCtrl_SetTabWidth 2974
+#define wxStyledTextCtrl_GetTabWidth 2975
+#define wxStyledTextCtrl_SetCodePage 2976
+#define wxStyledTextCtrl_MarkerDefine 2977
+#define wxStyledTextCtrl_MarkerSetForeground 2978
+#define wxStyledTextCtrl_MarkerSetBackground 2979
+#define wxStyledTextCtrl_MarkerAdd 2980
+#define wxStyledTextCtrl_MarkerDelete 2981
+#define wxStyledTextCtrl_MarkerDeleteAll 2982
+#define wxStyledTextCtrl_MarkerGet 2983
+#define wxStyledTextCtrl_MarkerNext 2984
+#define wxStyledTextCtrl_MarkerPrevious 2985
+#define wxStyledTextCtrl_MarkerDefineBitmap 2986
+#define wxStyledTextCtrl_MarkerAddSet 2987
+#define wxStyledTextCtrl_MarkerSetAlpha 2988
+#define wxStyledTextCtrl_SetMarginType 2989
+#define wxStyledTextCtrl_GetMarginType 2990
+#define wxStyledTextCtrl_SetMarginWidth 2991
+#define wxStyledTextCtrl_GetMarginWidth 2992
+#define wxStyledTextCtrl_SetMarginMask 2993
+#define wxStyledTextCtrl_GetMarginMask 2994
+#define wxStyledTextCtrl_SetMarginSensitive 2995
+#define wxStyledTextCtrl_GetMarginSensitive 2996
+#define wxStyledTextCtrl_StyleClearAll 2997
+#define wxStyledTextCtrl_StyleSetForeground 2998
+#define wxStyledTextCtrl_StyleSetBackground 2999
+#define wxStyledTextCtrl_StyleSetBold 3000
+#define wxStyledTextCtrl_StyleSetItalic 3001
+#define wxStyledTextCtrl_StyleSetSize 3002
+#define wxStyledTextCtrl_StyleSetFaceName 3003
+#define wxStyledTextCtrl_StyleSetEOLFilled 3004
+#define wxStyledTextCtrl_StyleResetDefault 3005
+#define wxStyledTextCtrl_StyleSetUnderline 3006
+#define wxStyledTextCtrl_StyleSetCase 3007
+#define wxStyledTextCtrl_StyleSetHotSpot 3008
+#define wxStyledTextCtrl_SetSelForeground 3009
+#define wxStyledTextCtrl_SetSelBackground 3010
+#define wxStyledTextCtrl_GetSelAlpha 3011
+#define wxStyledTextCtrl_SetSelAlpha 3012
+#define wxStyledTextCtrl_SetCaretForeground 3013
+#define wxStyledTextCtrl_CmdKeyAssign 3014
+#define wxStyledTextCtrl_CmdKeyClear 3015
+#define wxStyledTextCtrl_CmdKeyClearAll 3016
+#define wxStyledTextCtrl_SetStyleBytes 3017
+#define wxStyledTextCtrl_StyleSetVisible 3018
+#define wxStyledTextCtrl_GetCaretPeriod 3019
+#define wxStyledTextCtrl_SetCaretPeriod 3020
+#define wxStyledTextCtrl_SetWordChars 3021
+#define wxStyledTextCtrl_BeginUndoAction 3022
+#define wxStyledTextCtrl_EndUndoAction 3023
+#define wxStyledTextCtrl_IndicatorSetStyle 3024
+#define wxStyledTextCtrl_IndicatorGetStyle 3025
+#define wxStyledTextCtrl_IndicatorSetForeground 3026
+#define wxStyledTextCtrl_IndicatorGetForeground 3027
+#define wxStyledTextCtrl_SetWhitespaceForeground 3028
+#define wxStyledTextCtrl_SetWhitespaceBackground 3029
+#define wxStyledTextCtrl_GetStyleBits 3030
+#define wxStyledTextCtrl_SetLineState 3031
+#define wxStyledTextCtrl_GetLineState 3032
+#define wxStyledTextCtrl_GetMaxLineState 3033
+#define wxStyledTextCtrl_GetCaretLineVisible 3034
+#define wxStyledTextCtrl_SetCaretLineVisible 3035
+#define wxStyledTextCtrl_GetCaretLineBackground 3036
+#define wxStyledTextCtrl_SetCaretLineBackground 3037
+#define wxStyledTextCtrl_AutoCompShow 3038
+#define wxStyledTextCtrl_AutoCompCancel 3039
+#define wxStyledTextCtrl_AutoCompActive 3040
+#define wxStyledTextCtrl_AutoCompPosStart 3041
+#define wxStyledTextCtrl_AutoCompComplete 3042
+#define wxStyledTextCtrl_AutoCompStops 3043
+#define wxStyledTextCtrl_AutoCompSetSeparator 3044
+#define wxStyledTextCtrl_AutoCompGetSeparator 3045
+#define wxStyledTextCtrl_AutoCompSelect 3046
+#define wxStyledTextCtrl_AutoCompSetCancelAtStart 3047
+#define wxStyledTextCtrl_AutoCompGetCancelAtStart 3048
+#define wxStyledTextCtrl_AutoCompSetFillUps 3049
+#define wxStyledTextCtrl_AutoCompSetChooseSingle 3050
+#define wxStyledTextCtrl_AutoCompGetChooseSingle 3051
+#define wxStyledTextCtrl_AutoCompSetIgnoreCase 3052
+#define wxStyledTextCtrl_AutoCompGetIgnoreCase 3053
+#define wxStyledTextCtrl_UserListShow 3054
+#define wxStyledTextCtrl_AutoCompSetAutoHide 3055
+#define wxStyledTextCtrl_AutoCompGetAutoHide 3056
+#define wxStyledTextCtrl_AutoCompSetDropRestOfWord 3057
+#define wxStyledTextCtrl_AutoCompGetDropRestOfWord 3058
+#define wxStyledTextCtrl_RegisterImage 3059
+#define wxStyledTextCtrl_ClearRegisteredImages 3060
+#define wxStyledTextCtrl_AutoCompGetTypeSeparator 3061
+#define wxStyledTextCtrl_AutoCompSetTypeSeparator 3062
+#define wxStyledTextCtrl_AutoCompSetMaxWidth 3063
+#define wxStyledTextCtrl_AutoCompGetMaxWidth 3064
+#define wxStyledTextCtrl_AutoCompSetMaxHeight 3065
+#define wxStyledTextCtrl_AutoCompGetMaxHeight 3066
+#define wxStyledTextCtrl_SetIndent 3067
+#define wxStyledTextCtrl_GetIndent 3068
+#define wxStyledTextCtrl_SetUseTabs 3069
+#define wxStyledTextCtrl_GetUseTabs 3070
+#define wxStyledTextCtrl_SetLineIndentation 3071
+#define wxStyledTextCtrl_GetLineIndentation 3072
+#define wxStyledTextCtrl_GetLineIndentPosition 3073
+#define wxStyledTextCtrl_GetColumn 3074
+#define wxStyledTextCtrl_SetUseHorizontalScrollBar 3075
+#define wxStyledTextCtrl_GetUseHorizontalScrollBar 3076
+#define wxStyledTextCtrl_SetIndentationGuides 3077
+#define wxStyledTextCtrl_GetIndentationGuides 3078
+#define wxStyledTextCtrl_SetHighlightGuide 3079
+#define wxStyledTextCtrl_GetHighlightGuide 3080
+#define wxStyledTextCtrl_GetLineEndPosition 3081
+#define wxStyledTextCtrl_GetCodePage 3082
+#define wxStyledTextCtrl_GetCaretForeground 3083
+#define wxStyledTextCtrl_GetReadOnly 3084
+#define wxStyledTextCtrl_SetCurrentPos 3085
+#define wxStyledTextCtrl_SetSelectionStart 3086
+#define wxStyledTextCtrl_GetSelectionStart 3087
+#define wxStyledTextCtrl_SetSelectionEnd 3088
+#define wxStyledTextCtrl_GetSelectionEnd 3089
+#define wxStyledTextCtrl_SetPrintMagnification 3090
+#define wxStyledTextCtrl_GetPrintMagnification 3091
+#define wxStyledTextCtrl_SetPrintColourMode 3092
+#define wxStyledTextCtrl_GetPrintColourMode 3093
+#define wxStyledTextCtrl_FindText 3094
+#define wxStyledTextCtrl_FormatRange 3095
+#define wxStyledTextCtrl_GetFirstVisibleLine 3096
+#define wxStyledTextCtrl_GetLine 3097
+#define wxStyledTextCtrl_GetLineCount 3098
+#define wxStyledTextCtrl_SetMarginLeft 3099
+#define wxStyledTextCtrl_GetMarginLeft 3100
+#define wxStyledTextCtrl_SetMarginRight 3101
+#define wxStyledTextCtrl_GetMarginRight 3102
+#define wxStyledTextCtrl_GetModify 3103
+#define wxStyledTextCtrl_SetSelection 3104
+#define wxStyledTextCtrl_GetSelectedText 3105
+#define wxStyledTextCtrl_GetTextRange 3106
+#define wxStyledTextCtrl_HideSelection 3107
+#define wxStyledTextCtrl_LineFromPosition 3108
+#define wxStyledTextCtrl_PositionFromLine 3109
+#define wxStyledTextCtrl_LineScroll 3110
+#define wxStyledTextCtrl_EnsureCaretVisible 3111
+#define wxStyledTextCtrl_ReplaceSelection 3112
+#define wxStyledTextCtrl_SetReadOnly 3113
+#define wxStyledTextCtrl_CanPaste 3114
+#define wxStyledTextCtrl_CanUndo 3115
+#define wxStyledTextCtrl_EmptyUndoBuffer 3116
+#define wxStyledTextCtrl_Undo 3117
+#define wxStyledTextCtrl_Cut 3118
+#define wxStyledTextCtrl_Copy 3119
+#define wxStyledTextCtrl_Paste 3120
+#define wxStyledTextCtrl_Clear 3121
+#define wxStyledTextCtrl_SetText 3122
+#define wxStyledTextCtrl_GetText 3123
+#define wxStyledTextCtrl_GetTextLength 3124
+#define wxStyledTextCtrl_GetOvertype 3125
+#define wxStyledTextCtrl_SetCaretWidth 3126
+#define wxStyledTextCtrl_GetCaretWidth 3127
+#define wxStyledTextCtrl_SetTargetStart 3128
+#define wxStyledTextCtrl_GetTargetStart 3129
+#define wxStyledTextCtrl_SetTargetEnd 3130
+#define wxStyledTextCtrl_GetTargetEnd 3131
+#define wxStyledTextCtrl_ReplaceTarget 3132
+#define wxStyledTextCtrl_SearchInTarget 3133
+#define wxStyledTextCtrl_SetSearchFlags 3134
+#define wxStyledTextCtrl_GetSearchFlags 3135
+#define wxStyledTextCtrl_CallTipShow 3136
+#define wxStyledTextCtrl_CallTipCancel 3137
+#define wxStyledTextCtrl_CallTipActive 3138
+#define wxStyledTextCtrl_CallTipPosAtStart 3139
+#define wxStyledTextCtrl_CallTipSetHighlight 3140
+#define wxStyledTextCtrl_CallTipSetBackground 3141
+#define wxStyledTextCtrl_CallTipSetForeground 3142
+#define wxStyledTextCtrl_CallTipSetForegroundHighlight 3143
+#define wxStyledTextCtrl_CallTipUseStyle 3144
+#define wxStyledTextCtrl_VisibleFromDocLine 3145
+#define wxStyledTextCtrl_DocLineFromVisible 3146
+#define wxStyledTextCtrl_WrapCount 3147
+#define wxStyledTextCtrl_SetFoldLevel 3148
+#define wxStyledTextCtrl_GetFoldLevel 3149
+#define wxStyledTextCtrl_GetLastChild 3150
+#define wxStyledTextCtrl_GetFoldParent 3151
+#define wxStyledTextCtrl_ShowLines 3152
+#define wxStyledTextCtrl_HideLines 3153
+#define wxStyledTextCtrl_GetLineVisible 3154
+#define wxStyledTextCtrl_SetFoldExpanded 3155
+#define wxStyledTextCtrl_GetFoldExpanded 3156
+#define wxStyledTextCtrl_ToggleFold 3157
+#define wxStyledTextCtrl_EnsureVisible 3158
+#define wxStyledTextCtrl_SetFoldFlags 3159
+#define wxStyledTextCtrl_EnsureVisibleEnforcePolicy 3160
+#define wxStyledTextCtrl_SetTabIndents 3161
+#define wxStyledTextCtrl_GetTabIndents 3162
+#define wxStyledTextCtrl_SetBackSpaceUnIndents 3163
+#define wxStyledTextCtrl_GetBackSpaceUnIndents 3164
+#define wxStyledTextCtrl_SetMouseDwellTime 3165
+#define wxStyledTextCtrl_GetMouseDwellTime 3166
+#define wxStyledTextCtrl_WordStartPosition 3167
+#define wxStyledTextCtrl_WordEndPosition 3168
+#define wxStyledTextCtrl_SetWrapMode 3169
+#define wxStyledTextCtrl_GetWrapMode 3170
+#define wxStyledTextCtrl_SetWrapVisualFlags 3171
+#define wxStyledTextCtrl_GetWrapVisualFlags 3172
+#define wxStyledTextCtrl_SetWrapVisualFlagsLocation 3173
+#define wxStyledTextCtrl_GetWrapVisualFlagsLocation 3174
+#define wxStyledTextCtrl_SetWrapStartIndent 3175
+#define wxStyledTextCtrl_GetWrapStartIndent 3176
+#define wxStyledTextCtrl_SetLayoutCache 3177
+#define wxStyledTextCtrl_GetLayoutCache 3178
+#define wxStyledTextCtrl_SetScrollWidth 3179
+#define wxStyledTextCtrl_GetScrollWidth 3180
+#define wxStyledTextCtrl_TextWidth 3181
+#define wxStyledTextCtrl_GetEndAtLastLine 3182
+#define wxStyledTextCtrl_TextHeight 3183
+#define wxStyledTextCtrl_SetUseVerticalScrollBar 3184
+#define wxStyledTextCtrl_GetUseVerticalScrollBar 3185
+#define wxStyledTextCtrl_AppendText 3186
+#define wxStyledTextCtrl_GetTwoPhaseDraw 3187
+#define wxStyledTextCtrl_SetTwoPhaseDraw 3188
+#define wxStyledTextCtrl_TargetFromSelection 3189
+#define wxStyledTextCtrl_LinesJoin 3190
+#define wxStyledTextCtrl_LinesSplit 3191
+#define wxStyledTextCtrl_SetFoldMarginColour 3192
+#define wxStyledTextCtrl_SetFoldMarginHiColour 3193
+#define wxStyledTextCtrl_LineDown 3194
+#define wxStyledTextCtrl_LineDownExtend 3195
+#define wxStyledTextCtrl_LineUp 3196
+#define wxStyledTextCtrl_LineUpExtend 3197
+#define wxStyledTextCtrl_CharLeft 3198
+#define wxStyledTextCtrl_CharLeftExtend 3199
+#define wxStyledTextCtrl_CharRight 3200
+#define wxStyledTextCtrl_CharRightExtend 3201
+#define wxStyledTextCtrl_WordLeft 3202
+#define wxStyledTextCtrl_WordLeftExtend 3203
+#define wxStyledTextCtrl_WordRight 3204
+#define wxStyledTextCtrl_WordRightExtend 3205
+#define wxStyledTextCtrl_Home 3206
+#define wxStyledTextCtrl_HomeExtend 3207
+#define wxStyledTextCtrl_LineEnd 3208
+#define wxStyledTextCtrl_LineEndExtend 3209
+#define wxStyledTextCtrl_DocumentStart 3210
+#define wxStyledTextCtrl_DocumentStartExtend 3211
+#define wxStyledTextCtrl_DocumentEnd 3212
+#define wxStyledTextCtrl_DocumentEndExtend 3213
+#define wxStyledTextCtrl_PageUp 3214
+#define wxStyledTextCtrl_PageUpExtend 3215
+#define wxStyledTextCtrl_PageDown 3216
+#define wxStyledTextCtrl_PageDownExtend 3217
+#define wxStyledTextCtrl_EditToggleOvertype 3218
+#define wxStyledTextCtrl_Cancel 3219
+#define wxStyledTextCtrl_DeleteBack 3220
+#define wxStyledTextCtrl_Tab 3221
+#define wxStyledTextCtrl_BackTab 3222
+#define wxStyledTextCtrl_NewLine 3223
+#define wxStyledTextCtrl_FormFeed 3224
+#define wxStyledTextCtrl_VCHome 3225
+#define wxStyledTextCtrl_VCHomeExtend 3226
+#define wxStyledTextCtrl_ZoomIn 3227
+#define wxStyledTextCtrl_ZoomOut 3228
+#define wxStyledTextCtrl_DelWordLeft 3229
+#define wxStyledTextCtrl_DelWordRight 3230
+#define wxStyledTextCtrl_LineCut 3231
+#define wxStyledTextCtrl_LineDelete 3232
+#define wxStyledTextCtrl_LineTranspose 3233
+#define wxStyledTextCtrl_LineDuplicate 3234
+#define wxStyledTextCtrl_LowerCase 3235
+#define wxStyledTextCtrl_UpperCase 3236
+#define wxStyledTextCtrl_LineScrollDown 3237
+#define wxStyledTextCtrl_LineScrollUp 3238
+#define wxStyledTextCtrl_DeleteBackNotLine 3239
+#define wxStyledTextCtrl_HomeDisplay 3240
+#define wxStyledTextCtrl_HomeDisplayExtend 3241
+#define wxStyledTextCtrl_LineEndDisplay 3242
+#define wxStyledTextCtrl_LineEndDisplayExtend 3243
+#define wxStyledTextCtrl_HomeWrapExtend 3244
+#define wxStyledTextCtrl_LineEndWrap 3245
+#define wxStyledTextCtrl_LineEndWrapExtend 3246
+#define wxStyledTextCtrl_VCHomeWrap 3247
+#define wxStyledTextCtrl_VCHomeWrapExtend 3248
+#define wxStyledTextCtrl_LineCopy 3249
+#define wxStyledTextCtrl_MoveCaretInsideView 3250
+#define wxStyledTextCtrl_LineLength 3251
+#define wxStyledTextCtrl_BraceHighlight 3252
+#define wxStyledTextCtrl_BraceBadLight 3253
+#define wxStyledTextCtrl_BraceMatch 3254
+#define wxStyledTextCtrl_GetViewEOL 3255
+#define wxStyledTextCtrl_SetViewEOL 3256
+#define wxStyledTextCtrl_SetModEventMask 3257
+#define wxStyledTextCtrl_GetEdgeColumn 3258
+#define wxStyledTextCtrl_SetEdgeColumn 3259
+#define wxStyledTextCtrl_GetEdgeMode 3260
+#define wxStyledTextCtrl_GetEdgeColour 3261
+#define wxStyledTextCtrl_SetEdgeColour 3262
+#define wxStyledTextCtrl_SearchAnchor 3263
+#define wxStyledTextCtrl_SearchNext 3264
+#define wxStyledTextCtrl_SearchPrev 3265
+#define wxStyledTextCtrl_LinesOnScreen 3266
+#define wxStyledTextCtrl_UsePopUp 3267
+#define wxStyledTextCtrl_SelectionIsRectangle 3268
+#define wxStyledTextCtrl_SetZoom 3269
+#define wxStyledTextCtrl_GetZoom 3270
+#define wxStyledTextCtrl_GetModEventMask 3271
+#define wxStyledTextCtrl_SetSTCFocus 3272
+#define wxStyledTextCtrl_GetSTCFocus 3273
+#define wxStyledTextCtrl_SetStatus 3274
+#define wxStyledTextCtrl_GetStatus 3275
+#define wxStyledTextCtrl_SetMouseDownCaptures 3276
+#define wxStyledTextCtrl_GetMouseDownCaptures 3277
+#define wxStyledTextCtrl_SetSTCCursor 3278
+#define wxStyledTextCtrl_GetSTCCursor 3279
+#define wxStyledTextCtrl_SetControlCharSymbol 3280
+#define wxStyledTextCtrl_GetControlCharSymbol 3281
+#define wxStyledTextCtrl_WordPartLeft 3282
+#define wxStyledTextCtrl_WordPartLeftExtend 3283
+#define wxStyledTextCtrl_WordPartRight 3284
+#define wxStyledTextCtrl_WordPartRightExtend 3285
+#define wxStyledTextCtrl_SetVisiblePolicy 3286
+#define wxStyledTextCtrl_DelLineLeft 3287
+#define wxStyledTextCtrl_DelLineRight 3288
+#define wxStyledTextCtrl_GetXOffset 3289
+#define wxStyledTextCtrl_ChooseCaretX 3290
+#define wxStyledTextCtrl_SetXCaretPolicy 3291
+#define wxStyledTextCtrl_SetYCaretPolicy 3292
+#define wxStyledTextCtrl_GetPrintWrapMode 3293
+#define wxStyledTextCtrl_SetHotspotActiveForeground 3294
+#define wxStyledTextCtrl_SetHotspotActiveBackground 3295
+#define wxStyledTextCtrl_SetHotspotActiveUnderline 3296
+#define wxStyledTextCtrl_SetHotspotSingleLine 3297
+#define wxStyledTextCtrl_ParaDownExtend 3298
+#define wxStyledTextCtrl_ParaUp 3299
+#define wxStyledTextCtrl_ParaUpExtend 3300
+#define wxStyledTextCtrl_PositionBefore 3301
+#define wxStyledTextCtrl_PositionAfter 3302
+#define wxStyledTextCtrl_CopyRange 3303
+#define wxStyledTextCtrl_CopyText 3304
+#define wxStyledTextCtrl_SetSelectionMode 3305
+#define wxStyledTextCtrl_GetSelectionMode 3306
+#define wxStyledTextCtrl_LineDownRectExtend 3307
+#define wxStyledTextCtrl_LineUpRectExtend 3308
+#define wxStyledTextCtrl_CharLeftRectExtend 3309
+#define wxStyledTextCtrl_CharRightRectExtend 3310
+#define wxStyledTextCtrl_HomeRectExtend 3311
+#define wxStyledTextCtrl_VCHomeRectExtend 3312
+#define wxStyledTextCtrl_LineEndRectExtend 3313
+#define wxStyledTextCtrl_PageUpRectExtend 3314
+#define wxStyledTextCtrl_PageDownRectExtend 3315
+#define wxStyledTextCtrl_StutteredPageUp 3316
+#define wxStyledTextCtrl_StutteredPageUpExtend 3317
+#define wxStyledTextCtrl_StutteredPageDown 3318
+#define wxStyledTextCtrl_StutteredPageDownExtend 3319
+#define wxStyledTextCtrl_WordLeftEnd 3320
+#define wxStyledTextCtrl_WordLeftEndExtend 3321
+#define wxStyledTextCtrl_WordRightEnd 3322
+#define wxStyledTextCtrl_WordRightEndExtend 3323
+#define wxStyledTextCtrl_SetWhitespaceChars 3324
+#define wxStyledTextCtrl_SetCharsDefault 3325
+#define wxStyledTextCtrl_AutoCompGetCurrent 3326
+#define wxStyledTextCtrl_Allocate 3327
+#define wxStyledTextCtrl_FindColumn 3328
+#define wxStyledTextCtrl_GetCaretSticky 3329
+#define wxStyledTextCtrl_SetCaretSticky 3330
+#define wxStyledTextCtrl_ToggleCaretSticky 3331
+#define wxStyledTextCtrl_SetPasteConvertEndings 3332
+#define wxStyledTextCtrl_GetPasteConvertEndings 3333
+#define wxStyledTextCtrl_SelectionDuplicate 3334
+#define wxStyledTextCtrl_SetCaretLineBackAlpha 3335
+#define wxStyledTextCtrl_GetCaretLineBackAlpha 3336
+#define wxStyledTextCtrl_StartRecord 3337
+#define wxStyledTextCtrl_StopRecord 3338
+#define wxStyledTextCtrl_SetLexer 3339
+#define wxStyledTextCtrl_GetLexer 3340
+#define wxStyledTextCtrl_Colourise 3341
+#define wxStyledTextCtrl_SetProperty 3342
+#define wxStyledTextCtrl_SetKeyWords 3343
+#define wxStyledTextCtrl_SetLexerLanguage 3344
+#define wxStyledTextCtrl_GetProperty 3345
+#define wxStyledTextCtrl_GetStyleBitsNeeded 3346
+#define wxStyledTextCtrl_GetCurrentLine 3347
+#define wxStyledTextCtrl_StyleSetSpec 3348
+#define wxStyledTextCtrl_StyleSetFont 3349
+#define wxStyledTextCtrl_StyleSetFontAttr 3350
+#define wxStyledTextCtrl_StyleSetCharacterSet 3351
+#define wxStyledTextCtrl_StyleSetFontEncoding 3352
+#define wxStyledTextCtrl_CmdKeyExecute 3353
+#define wxStyledTextCtrl_SetMargins 3354
+#define wxStyledTextCtrl_GetSelection 3355
+#define wxStyledTextCtrl_PointFromPosition 3356
+#define wxStyledTextCtrl_ScrollToLine 3357
+#define wxStyledTextCtrl_ScrollToColumn 3358
+#define wxStyledTextCtrl_SendMsg 3359
+#define wxStyledTextCtrl_SetVScrollBar 3360
+#define wxStyledTextCtrl_SetHScrollBar 3361
+#define wxStyledTextCtrl_GetLastKeydownProcessed 3362
+#define wxStyledTextCtrl_SetLastKeydownProcessed 3363
+#define wxStyledTextCtrl_SaveFile 3364
+#define wxStyledTextCtrl_LoadFile 3365
+#define wxStyledTextCtrl_DoDragOver 3366
+#define wxStyledTextCtrl_DoDropText 3367
+#define wxStyledTextCtrl_GetUseAntiAliasing 3368
+#define wxStyledTextCtrl_AddTextRaw 3369
+#define wxStyledTextCtrl_InsertTextRaw 3370
+#define wxStyledTextCtrl_GetCurLineRaw 3371
+#define wxStyledTextCtrl_GetLineRaw 3372
+#define wxStyledTextCtrl_GetSelectedTextRaw 3373
+#define wxStyledTextCtrl_GetTextRangeRaw 3374
+#define wxStyledTextCtrl_SetTextRaw 3375
+#define wxStyledTextCtrl_GetTextRaw 3376
+#define wxStyledTextCtrl_AppendTextRaw 3377
+#define wxArtProvider_GetBitmap 3378
+#define wxArtProvider_GetIcon 3379
+#define wxTreeEvent_GetKeyCode 3380
+#define wxTreeEvent_GetItem 3381
+#define wxTreeEvent_GetKeyEvent 3382
+#define wxTreeEvent_GetLabel 3383
+#define wxTreeEvent_GetOldItem 3384
+#define wxTreeEvent_GetPoint 3385
+#define wxTreeEvent_IsEditCancelled 3386
+#define wxTreeEvent_SetToolTip 3387
+#define wxNotebookEvent_GetOldSelection 3388
+#define wxNotebookEvent_GetSelection 3389
+#define wxNotebookEvent_SetOldSelection 3390
+#define wxNotebookEvent_SetSelection 3391
+#define wxFileDataObject_new 3392
+#define wxFileDataObject_AddFile 3393
+#define wxFileDataObject_GetFilenames 3394
+#define wxFileDataObject_destroy 3395
+#define wxTextDataObject_new 3396
+#define wxTextDataObject_GetTextLength 3397
+#define wxTextDataObject_GetText 3398
+#define wxTextDataObject_SetText 3399
+#define wxTextDataObject_destroy 3400
+#define wxBitmapDataObject_new_1_1 3401
+#define wxBitmapDataObject_new_1_0 3402
+#define wxBitmapDataObject_GetBitmap 3403
+#define wxBitmapDataObject_SetBitmap 3404
+#define wxBitmapDataObject_destroy 3405
+#define wxClipboard_new 3407
+#define wxClipboard_destruct 3408
+#define wxClipboard_AddData 3409
+#define wxClipboard_Clear 3410
+#define wxClipboard_Close 3411
+#define wxClipboard_Flush 3412
+#define wxClipboard_GetData 3413
+#define wxClipboard_IsOpened 3414
+#define wxClipboard_Open 3415
+#define wxClipboard_SetData 3416
+#define wxClipboard_UsePrimarySelection 3418
+#define wxClipboard_IsSupported 3419
+#define wxClipboard_Get 3420
+#define wxSpinEvent_GetPosition 3421
+#define wxSpinEvent_SetPosition 3422
+#define wxSplitterWindow_new_0 3423
+#define wxSplitterWindow_new_2 3424
+#define wxSplitterWindow_destruct 3425
+#define wxSplitterWindow_Create 3426
+#define wxSplitterWindow_GetMinimumPaneSize 3427
+#define wxSplitterWindow_GetSashGravity 3428
+#define wxSplitterWindow_GetSashPosition 3429
+#define wxSplitterWindow_GetSplitMode 3430
+#define wxSplitterWindow_GetWindow1 3431
+#define wxSplitterWindow_GetWindow2 3432
+#define wxSplitterWindow_Initialize 3433
+#define wxSplitterWindow_IsSplit 3434
+#define wxSplitterWindow_ReplaceWindow 3435
+#define wxSplitterWindow_SetSashGravity 3436
+#define wxSplitterWindow_SetSashPosition 3437
+#define wxSplitterWindow_SetSashSize 3438
+#define wxSplitterWindow_SetMinimumPaneSize 3439
+#define wxSplitterWindow_SetSplitMode 3440
+#define wxSplitterWindow_SplitHorizontally 3441
+#define wxSplitterWindow_SplitVertically 3442
+#define wxSplitterWindow_Unsplit 3443
+#define wxSplitterWindow_UpdateSize 3444
+#define wxSplitterEvent_GetSashPosition 3445
+#define wxSplitterEvent_GetX 3446
+#define wxSplitterEvent_GetY 3447
+#define wxSplitterEvent_GetWindowBeingRemoved 3448
+#define wxSplitterEvent_SetSashPosition 3449
+#define wxHtmlWindow_new_0 3450
+#define wxHtmlWindow_new_2 3451
+#define wxHtmlWindow_AppendToPage 3452
+#define wxHtmlWindow_GetOpenedAnchor 3453
+#define wxHtmlWindow_GetOpenedPage 3454
+#define wxHtmlWindow_GetOpenedPageTitle 3455
+#define wxHtmlWindow_GetRelatedFrame 3456
+#define wxHtmlWindow_HistoryBack 3457
+#define wxHtmlWindow_HistoryCanBack 3458
+#define wxHtmlWindow_HistoryCanForward 3459
+#define wxHtmlWindow_HistoryClear 3460
+#define wxHtmlWindow_HistoryForward 3461
+#define wxHtmlWindow_LoadFile 3462
+#define wxHtmlWindow_LoadPage 3463
+#define wxHtmlWindow_SelectAll 3464
+#define wxHtmlWindow_SelectionToText 3465
+#define wxHtmlWindow_SelectLine 3466
+#define wxHtmlWindow_SelectWord 3467
+#define wxHtmlWindow_SetBorders 3468
+#define wxHtmlWindow_SetFonts 3469
+#define wxHtmlWindow_SetPage 3470
+#define wxHtmlWindow_SetRelatedFrame 3471
+#define wxHtmlWindow_SetRelatedStatusBar 3472
+#define wxHtmlWindow_ToText 3473
+#define wxHtmlWindow_destroy 3474
+#define wxHtmlLinkEvent_GetLinkInfo 3475
+#define wxAuiNotebookEvent_SetSelection 3476
+#define wxAuiNotebookEvent_GetSelection 3477
+#define wxAuiNotebookEvent_SetOldSelection 3478
+#define wxAuiNotebookEvent_GetOldSelection 3479
+#define wxAuiNotebookEvent_SetDragSource 3480
+#define wxAuiNotebookEvent_GetDragSource 3481
+#define wxAuiManagerEvent_SetManager 3482
+#define wxAuiManagerEvent_GetManager 3483
+#define wxAuiManagerEvent_SetPane 3484
+#define wxAuiManagerEvent_GetPane 3485
+#define wxAuiManagerEvent_SetButton 3486
+#define wxAuiManagerEvent_GetButton 3487
+#define wxAuiManagerEvent_SetDC 3488
+#define wxAuiManagerEvent_GetDC 3489
+#define wxAuiManagerEvent_Veto 3490
+#define wxAuiManagerEvent_GetVeto 3491
+#define wxAuiManagerEvent_SetCanVeto 3492
+#define wxAuiManagerEvent_CanVeto 3493
+#define wxLogNull_new 3494
+#define wxLogNull_destroy 3495
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
index d115bb2243..4486dff63b 100644
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -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%
*/
@@ -615,28 +615,33 @@ int WxeApp::getRef(void * ptr, wxeMemEnv *memenv) {
ptrMap::iterator it = ptr2ref.find(ptr);
if(it != ptr2ref.end()) {
wxeRefData *refd = it->second;
- return refd->ref;
- } else { // New Ptr
- int ref;
- intList free = memenv->free;
-
- if(free.IsEmpty()) {
- ref = memenv->next++;
- } else {
- ref = free.Pop();
- };
- if(ref >= memenv->max) {
- memenv->max *= 2;
- memenv->ref2ptr =
- (void **) driver_realloc(memenv->ref2ptr,memenv->max * sizeof(void*));
- }
+ if(refd->memenv == memenv) {
+ // Found it return
+ return refd->ref;
+ } // else
+ // Old reference to deleted object, release old and recreate in current memenv.
+ clearPtr(ptr);
+ }
+ int ref;
+ intList free = memenv->free;
- memenv->ref2ptr[ref] = ptr;
- ptr2ref[ptr] = new wxeRefData(ref, 0, false, memenv);
- return ref;
+ if(free.IsEmpty()) {
+ ref = memenv->next++;
+ } else {
+ ref = free.Pop();
+ };
+ if(ref >= memenv->max) {
+ memenv->max *= 2;
+ memenv->ref2ptr =
+ (void **) driver_realloc(memenv->ref2ptr,memenv->max * sizeof(void*));
}
+
+ memenv->ref2ptr[ref] = ptr;
+ ptr2ref[ptr] = new wxeRefData(ref, 0, false, memenv);
+ return ref;
}
+
void WxeApp::clearPtr(void * ptr) {
ptrMap::iterator it;
it = ptr2ref.find(ptr);
@@ -697,13 +702,15 @@ void WxeApp::clearPtr(void * ptr) {
void * WxeApp::getPtr(char * bp, wxeMemEnv *memenv) {
int index = *(int *) bp;
- if(!memenv)
+ if(!memenv) {
throw wxe_badarg(index);
+ }
void * temp = memenv->ref2ptr[index];
if((index < memenv->next) && ((index == 0) || (temp > NULL)))
return temp;
- else
+ else {
throw wxe_badarg(index);
+ }
}
void WxeApp::registerPid(char * bp, ErlDrvTermData pid, wxeMemEnv * memenv) {
diff --git a/lib/wx/c_src/wxe_return.cpp b/lib/wx/c_src/wxe_return.cpp
index 8a00d6f4c6..2c4f7541e7 100644
--- a/lib/wx/c_src/wxe_return.cpp
+++ b/lib/wx/c_src/wxe_return.cpp
@@ -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%
*/
@@ -219,7 +219,7 @@ void wxeReturn::add(wxArrayInt val) {
INLINE
void wxeReturn::add(wxUIntPtr *val) {
- addInt((ErlDrvTermData)val); // TODO is this right?
+ add(ERL_DRV_UINT, (ErlDrvTermData) val);
}
INLINE
diff --git a/lib/wx/doc/src/Makefile b/lib/wx/doc/src/Makefile
index fd9f7441a3..c8eb6174c4 100644
--- a/lib/wx/doc/src/Makefile
+++ b/lib/wx/doc/src/Makefile
@@ -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%
#
@@ -82,7 +82,6 @@ XML_FILES = \
$(XML_PART_FILES) $(XML_REF3_FILES) \
$(XML_NOTES_FILES) $(XML_APPLICATION_FILES)
-
# ----------------------------------------------------
INFO_FILE = ../../info
@@ -130,12 +129,13 @@ ref_man.xml: ref_man.xml.src
@echo
$(ErlMods:%.erl=%.xml):
- docb_gen -def vsn $(VSN) -sort_functions false ../../src/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -sort_functions false ../../src/$(@:%.xml=%.erl)
+
$(GenMods:%.erl=%.xml):
- docb_gen -def vsn $(VSN) -sort_functions false ../../src/gen/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -sort_functions false ../../src/gen/$(@:%.xml=%.erl)
$(XML_CHAPTER_FILES):
- docb_gen -chapter -def vsn $(VSN) ../overview.edoc
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -chapter ../overview.edoc
debug opt:
diff --git a/lib/wx/include/wx.hrl b/lib/wx/include/wx.hrl
index b22f7e34b8..f5824196b0 100644
--- a/lib/wx/include/wx.hrl
+++ b/lib/wx/include/wx.hrl
@@ -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%
%% This file is generated DO NOT EDIT
@@ -261,7 +261,7 @@
%% Callback event: {@link wxColourPickerEvent}
-record(wxColourPicker,{type, colour}).
-%% @type wxTree() = #wxTree{type=wxEventType(),item=wxTreeItemId(),itemOld=wxTreeItemId(),pointDrag={X::integer(),Y::integer()}}.
+%% @type wxTree() = #wxTree{type=wxEventType(),item=integer(),itemOld=integer(),pointDrag={X::integer(),Y::integer()}}.
%% <dl><dt>EventType:</dt> <dd><em>command_tree_begin_drag</em>, <em>command_tree_begin_rdrag</em>, <em>command_tree_begin_label_edit</em>, <em>command_tree_end_label_edit</em>, <em>command_tree_delete_item</em>, <em>command_tree_get_info</em>, <em>command_tree_set_info</em>, <em>command_tree_item_expanded</em>, <em>command_tree_item_expanding</em>, <em>command_tree_item_collapsed</em>, <em>command_tree_item_collapsing</em>, <em>command_tree_sel_changed</em>, <em>command_tree_sel_changing</em>, <em>command_tree_key_down</em>, <em>command_tree_item_activated</em>, <em>command_tree_item_right_click</em>, <em>command_tree_item_middle_click</em>, <em>command_tree_end_drag</em>, <em>command_tree_state_image_click</em>, <em>command_tree_item_gettooltip</em>, <em>command_tree_item_menu</em></dd></dl>
%% Callback event: {@link wxTreeEvent}
-record(wxTree,{type, item,itemOld,pointDrag}).
diff --git a/lib/wx/src/gen/wxGenericDirCtrl.erl b/lib/wx/src/gen/wxGenericDirCtrl.erl
index 4146a3bacc..bd97e14816 100644
--- a/lib/wx/src/gen/wxGenericDirCtrl.erl
+++ b/lib/wx/src/gen/wxGenericDirCtrl.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%
%% This file is generated DO NOT EDIT
@@ -191,7 +191,7 @@ getFilterIndex(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:call(?wxGenericDirCtrl_GetFilterIndex,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> wxTreeItemId()
+%% @spec (This::wxGenericDirCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlgetrootid">external documentation</a>.
getRootId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
diff --git a/lib/wx/src/gen/wxTreeCtrl.erl b/lib/wx/src/gen/wxTreeCtrl.erl
index cc08c14754..a5f0bdc750 100644
--- a/lib/wx/src/gen/wxTreeCtrl.erl
+++ b/lib/wx/src/gen/wxTreeCtrl.erl
@@ -1,23 +1,27 @@
%%
%% %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%
%% This file is generated DO NOT EDIT
%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html">wxTreeCtrl</a>.
+%%
+%% Note: The representation of treeItemId() have changed from the original class implementation to be an semi-opaque type,Equality between TreeItemId's can be tested and zero means that the TreeItem is invalid.
+
+%%
%% <p>This class is derived (and can use functions) from:
%% <br />{@link wxControl}
%% <br />{@link wxWindow}
@@ -33,10 +37,10 @@
collapse/2,collapseAndReset/2,create/2,create/3,delete/2,deleteAllItems/1,
deleteChildren/2,destroy/1,ensureVisible/2,expand/2,getBoundingRect/3,
getBoundingRect/4,getChildrenCount/2,getChildrenCount/3,getCount/1,
- getEditControl/1,getFirstVisibleItem/1,getImageList/1,getIndent/1,
- getItemBackgroundColour/2,getItemData/2,getItemFont/2,getItemImage/2,
- getItemImage/3,getItemParent/2,getItemText/2,getItemTextColour/2,
- getLastChild/2,getNextSibling/2,getNextVisible/2,getPrevSibling/2,
+ getEditControl/1,getFirstChild/2,getFirstVisibleItem/1,getImageList/1,
+ getIndent/1,getItemBackgroundColour/2,getItemData/2,getItemFont/2,
+ getItemImage/2,getItemImage/3,getItemParent/2,getItemText/2,getItemTextColour/2,
+ getLastChild/2,getNextChild/3,getNextSibling/2,getNextVisible/2,getPrevSibling/2,
getPrevVisible/2,getRootItem/1,getSelection/1,getSelections/1,getStateImageList/1,
hitTest/2,insertItem/4,insertItem/5,isBold/2,isExpanded/2,isSelected/2,
isVisible/2,itemHasChildren/2,new/0,new/1,new/2,prependItem/3,prependItem/4,
@@ -119,13 +123,13 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxTreeCtrl_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Text::string()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Text::string()) -> integer()
%% @equiv addRoot(This,Text, [])
addRoot(This,Text)
when is_record(This, wx_ref),is_list(Text) ->
addRoot(This,Text, []).
-%% @spec (This::wxTreeCtrl(), Text::string(), [Option]) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Text::string(), [Option]) -> integer()
%% Option = {image, integer()} | {selectedImage, integer()} | {data, term()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrladdroot">external documentation</a>.
addRoot(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
@@ -140,17 +144,17 @@ addRoot(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
wxe_util:call(?wxTreeCtrl_AddRoot,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Parent::wxTreeItemId(), Text::string()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Parent::integer(), Text::string()) -> integer()
%% @equiv appendItem(This,Parent,Text, [])
appendItem(This,Parent,Text)
- when is_record(This, wx_ref),is_record(Parent, wx_ref),is_list(Text) ->
+ when is_record(This, wx_ref),is_integer(Parent),is_list(Text) ->
appendItem(This,Parent,Text, []).
-%% @spec (This::wxTreeCtrl(), Parent::wxTreeItemId(), Text::string(), [Option]) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Parent::integer(), Text::string(), [Option]) -> integer()
%% Option = {image, integer()} | {selectedImage, integer()} | {data, term()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlappenditem">external documentation</a>.
-appendItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ParentRef},Text, Options)
- when is_list(Text),is_list(Options) ->
+appendItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
+ when is_integer(Parent),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
Text_UC = unicode:characters_to_binary([Text,0]),
MOpts = fun({image, Image}, Acc) -> [<<1:32/?UI,Image:32/?UI>>|Acc];
@@ -159,7 +163,7 @@ appendItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ParentR
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:call(?wxTreeCtrl_AppendItem,
- <<ThisRef:32/?UI,ParentRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Parent:64/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @spec (This::wxTreeCtrl(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlassignimagelist">external documentation</a>.
@@ -177,19 +181,21 @@ assignStateImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref
wxe_util:cast(?wxTreeCtrl_AssignStateImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlcollapse">external documentation</a>.
-collapse(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+collapse(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Collapse,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlcollapseandreset">external documentation</a>.
-collapseAndReset(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+collapseAndReset(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_CollapseAndReset,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @spec (This::wxTreeCtrl(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
@@ -214,12 +220,13 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxTreeCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrldelete">external documentation</a>.
-delete(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+delete(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Delete,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @spec (This::wxTreeCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrldeleteallitems">external documentation</a>.
@@ -228,62 +235,65 @@ deleteAllItems(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:cast(?wxTreeCtrl_DeleteAllItems,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrldeletechildren">external documentation</a>.
-deleteChildren(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+deleteChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_DeleteChildren,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlensurevisible">external documentation</a>.
-ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_EnsureVisible,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlexpand">external documentation</a>.
-expand(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+expand(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Expand,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool()
+%% @spec (This::wxTreeCtrl(), Item::integer(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool()
%% @equiv getBoundingRect(This,Item,Rect, [])
getBoundingRect(This,Item,Rect={RectX,RectY,RectW,RectH})
- when is_record(This, wx_ref),is_record(Item, wx_ref),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
+ when is_record(This, wx_ref),is_integer(Item),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
getBoundingRect(This,Item,Rect, []).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}, [Option]) -> bool()
+%% @spec (This::wxTreeCtrl(), Item::integer(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}, [Option]) -> bool()
%% Option = {textOnly, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetboundingrect">external documentation</a>.
-getBoundingRect(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef},{RectX,RectY,RectW,RectH}, Options)
- when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) ->
+getBoundingRect(#wx_ref{type=ThisT,ref=ThisRef},Item,{RectX,RectY,RectW,RectH}, Options)
+ when is_integer(Item),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
MOpts = fun({textOnly, TextOnly}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(TextOnly)):32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:call(?wxTreeCtrl_GetBoundingRect,
- <<ThisRef:32/?UI,ItemRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> integer()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @equiv getChildrenCount(This,Item, [])
getChildrenCount(This,Item)
- when is_record(This, wx_ref),is_record(Item, wx_ref) ->
+ when is_record(This, wx_ref),is_integer(Item) ->
getChildrenCount(This,Item, []).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), [Option]) -> integer()
+%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> integer()
%% Option = {recursively, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetchildrencount">external documentation</a>.
-getChildrenCount(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}, Options)
- when is_list(Options) ->
+getChildrenCount(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
+ when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
MOpts = fun({recursively, Recursively}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Recursively)):32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:call(?wxTreeCtrl_GetChildrenCount,
- <<ThisRef:32/?UI,ItemRef:32/?UI, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetcount">external documentation</a>.
@@ -299,7 +309,23 @@ getEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:call(?wxTreeCtrl_GetEditControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> {integer(),Cookie::integer()}
+%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetfirstchild">external documentation</a>.
+getFirstChild(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
+ ?CLASS(ThisT,wxTreeCtrl),
+ wxe_util:call(?wxTreeCtrl_GetFirstChild,
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
+
+%% @spec (This::wxTreeCtrl(), Item::integer(), Cookie::integer()) -> {integer(),Cookie::integer()}
+%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetnextchild">external documentation</a>.
+getNextChild(#wx_ref{type=ThisT,ref=ThisRef},Item,Cookie)
+ when is_integer(Item),is_integer(Cookie) ->
+ ?CLASS(ThisT,wxTreeCtrl),
+ wxe_util:call(?wxTreeCtrl_GetNextChild,
+ <<ThisRef:32/?UI,0:32,Item:64/?UI,Cookie:64/?UI>>).
+
+%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetfirstvisibleitem">external documentation</a>.
getFirstVisibleItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -320,119 +346,131 @@ getIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:call(?wxTreeCtrl_GetIndent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wx:colour()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitembackgroundcolour">external documentation</a>.
-getItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemBackgroundColour,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> term()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> term()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemdata">external documentation</a>.
-getItemData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getItemData(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemData,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wxFont:wxFont()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemfont">external documentation</a>.
-getItemFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemFont,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> integer()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemimage">external documentation</a>.
-getItemImage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemImage_1,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), [Option]) -> integer()
+%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> integer()
%% Option = {which, WxTreeItemIcon}
%% WxTreeItemIcon = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemimage">external documentation</a>.
%%<br /> WxTreeItemIcon is one of ?wxTreeItemIcon_Normal | ?wxTreeItemIcon_Selected | ?wxTreeItemIcon_Expanded | ?wxTreeItemIcon_SelectedExpanded | ?wxTreeItemIcon_Max
-getItemImage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}, Options)
- when is_list(Options) ->
+getItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
+ when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
MOpts = fun({which, Which}, Acc) -> [<<1:32/?UI,Which:32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:call(?wxTreeCtrl_GetItemImage_2,
- <<ThisRef:32/?UI,ItemRef:32/?UI, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> string()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemtext">external documentation</a>.
-getItemText(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getItemText(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemText,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wx:colour()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemtextcolour">external documentation</a>.
-getItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemTextColour,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetlastchild">external documentation</a>.
-getLastChild(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getLastChild(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetLastChild,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetnextsibling">external documentation</a>.
-getNextSibling(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getNextSibling(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetNextSibling,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetnextvisible">external documentation</a>.
-getNextVisible(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getNextVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetNextVisible,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemparent">external documentation</a>.
-getItemParent(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getItemParent(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemParent,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetprevsibling">external documentation</a>.
-getPrevSibling(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getPrevSibling(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetPrevSibling,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetprevvisible">external documentation</a>.
-getPrevVisible(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+getPrevVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetPrevVisible,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetrootitem">external documentation</a>.
getRootItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetRootItem,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetselection">external documentation</a>.
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> {integer(),Val::[wxTreeItemId()]}
+%% @spec (This::wxTreeCtrl()) -> {integer(),Val::[integer()]}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetselections">external documentation</a>.
getSelections(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -446,7 +484,7 @@ getStateImageList(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:call(?wxTreeCtrl_GetStateImageList,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Point::{X::integer(),Y::integer()}) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Point::{X::integer(),Y::integer()}) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlhittest">external documentation</a>.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY})
when is_integer(PointX),is_integer(PointY) ->
@@ -454,35 +492,17 @@ hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY})
wxe_util:call(?wxTreeCtrl_HitTest,
<<ThisRef:32/?UI,PointX:32/?UI,PointY:32/?UI>>).
-%% @spec (This::wxTreeCtrl(),Parent::wxTreeItemId(),X::integer()|wxTreeItemId(),Text::string()) -> wxTreeItemId()
-%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlinsertitem">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% insertItem(This::wxTreeCtrl(), Parent::wxTreeItemId(), Pos::integer(), Text::string()) -> insertItem(This,Parent,Pos,Text, []) </c></p>
-%% <p><c>
-%% insertItem(This::wxTreeCtrl(), Parent::wxTreeItemId(), IdPrevious::wxTreeItemId(), Text::string()) -> insertItem(This,Parent,IdPrevious,Text, []) </c></p>
-
+%% @spec (This::wxTreeCtrl(), Parent::integer(), Pos::integer(), Text::string()) -> integer()
+%% @equiv insertItem(This,Parent,Pos,Text, [])
insertItem(This,Parent,Pos,Text)
- when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Pos),is_list(Text) ->
- insertItem(This,Parent,Pos,Text, []);
-
-insertItem(This,Parent,IdPrevious,Text)
- when is_record(This, wx_ref),is_record(Parent, wx_ref),is_record(IdPrevious, wx_ref),is_list(Text) ->
- insertItem(This,Parent,IdPrevious,Text, []).
+ when is_record(This, wx_ref),is_integer(Parent),is_integer(Pos),is_list(Text) ->
+ insertItem(This,Parent,Pos,Text, []).
-%% @spec (This::wxTreeCtrl(),Parent::wxTreeItemId(),X::integer()|wxTreeItemId(),Text::string(),[Option]) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Parent::integer(), Pos::integer(), Text::string(), [Option]) -> integer()
+%% Option = {image, integer()} | {selImage, integer()} | {data, term()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlinsertitem">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% insertItem(This::wxTreeCtrl(), Parent::wxTreeItemId(), Pos::integer(), Text::string(), [Option]) -> wxTreeItemId() </c>
-%%<br /> Option = {image, integer()} | {selImage, integer()} | {data, term()}
-%% </p>
-%% <p><c>
-%% insertItem(This::wxTreeCtrl(), Parent::wxTreeItemId(), IdPrevious::wxTreeItemId(), Text::string(), [Option]) -> wxTreeItemId() </c>
-%%<br /> Option = {image, integer()} | {selectedImage, integer()} | {data, term()}
-%% </p>
-insertItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ParentRef},Pos,Text, Options)
- when is_integer(Pos),is_list(Text),is_list(Options) ->
+insertItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Pos,Text, Options)
+ when is_integer(Parent),is_integer(Pos),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
Text_UC = unicode:characters_to_binary([Text,0]),
MOpts = fun({image, Image}, Acc) -> [<<1:32/?UI,Image:32/?UI>>|Acc];
@@ -490,66 +510,60 @@ insertItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ParentR
({data, Data}, Acc) -> wxe_util:send_bin(term_to_binary(Data)),[<<3:32/?UI,0:32>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
- wxe_util:call(?wxTreeCtrl_InsertItem_4_0,
- <<ThisRef:32/?UI,ParentRef:32/?UI,Pos:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>);
-insertItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ParentRef},#wx_ref{type=wxTreeItemId,ref=IdPreviousRef},Text, Options)
- when is_list(Text),is_list(Options) ->
- ?CLASS(ThisT,wxTreeCtrl),
- Text_UC = unicode:characters_to_binary([Text,0]),
- MOpts = fun({image, Image}, Acc) -> [<<1:32/?UI,Image:32/?UI>>|Acc];
- ({selectedImage, SelectedImage}, Acc) -> [<<2:32/?UI,SelectedImage:32/?UI>>|Acc];
- ({data, Data}, Acc) -> wxe_util:send_bin(term_to_binary(Data)),[<<3:32/?UI,0:32>>|Acc];
- (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
- BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
- wxe_util:call(?wxTreeCtrl_InsertItem_4_1,
- <<ThisRef:32/?UI,ParentRef:32/?UI,IdPreviousRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
+ wxe_util:call(?wxTreeCtrl_InsertItem,
+ <<ThisRef:32/?UI,0:32,Parent:64/?UI,Pos:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> bool()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlisbold">external documentation</a>.
-isBold(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+isBold(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_IsBold,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> bool()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlisexpanded">external documentation</a>.
-isExpanded(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+isExpanded(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_IsExpanded,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> bool()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlisselected">external documentation</a>.
-isSelected(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+isSelected(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_IsSelected,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> bool()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlisvisible">external documentation</a>.
-isVisible(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+isVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_IsVisible,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> bool()
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlitemhaschildren">external documentation</a>.
-itemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+itemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_ItemHasChildren,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Parent::wxTreeItemId(), Text::string()) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Parent::integer(), Text::string()) -> integer()
%% @equiv prependItem(This,Parent,Text, [])
prependItem(This,Parent,Text)
- when is_record(This, wx_ref),is_record(Parent, wx_ref),is_list(Text) ->
+ when is_record(This, wx_ref),is_integer(Parent),is_list(Text) ->
prependItem(This,Parent,Text, []).
-%% @spec (This::wxTreeCtrl(), Parent::wxTreeItemId(), Text::string(), [Option]) -> wxTreeItemId()
+%% @spec (This::wxTreeCtrl(), Parent::integer(), Text::string(), [Option]) -> integer()
%% Option = {image, integer()} | {selectedImage, integer()} | {data, term()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlprependitem">external documentation</a>.
-prependItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ParentRef},Text, Options)
- when is_list(Text),is_list(Options) ->
+prependItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
+ when is_integer(Parent),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
Text_UC = unicode:characters_to_binary([Text,0]),
MOpts = fun({image, Image}, Acc) -> [<<1:32/?UI,Image:32/?UI>>|Acc];
@@ -558,33 +572,35 @@ prependItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=Parent
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:call(?wxTreeCtrl_PrependItem,
- <<ThisRef:32/?UI,ParentRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Parent:64/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlscrollto">external documentation</a>.
-scrollTo(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+scrollTo(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_ScrollTo,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlselectitem">external documentation</a>.
-selectItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SelectItem_1,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), [Option]) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> ok
%% Option = {select, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlselectitem">external documentation</a>.
-selectItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}, Options)
- when is_list(Options) ->
+selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
+ when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
MOpts = fun({select, Select}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Select)):32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:cast(?wxTreeCtrl_SelectItem_2,
- <<ThisRef:32/?UI,ItemRef:32/?UI, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
%% @spec (This::wxTreeCtrl(), Indent::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetindent">external documentation</a>.
@@ -602,122 +618,124 @@ setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageLi
wxe_util:cast(?wxTreeCtrl_SetImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Col::wx:colour()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitembackgroundcolour">external documentation</a>.
-setItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef},Col)
- when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
+setItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
+ when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SetItemBackgroundColour,
- <<ThisRef:32/?UI,ItemRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @equiv setItemBold(This,Item, [])
setItemBold(This,Item)
- when is_record(This, wx_ref),is_record(Item, wx_ref) ->
+ when is_record(This, wx_ref),is_integer(Item) ->
setItemBold(This,Item, []).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), [Option]) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> ok
%% Option = {bold, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitembold">external documentation</a>.
-setItemBold(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}, Options)
- when is_list(Options) ->
+setItemBold(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
+ when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
MOpts = fun({bold, Bold}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Bold)):32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:cast(?wxTreeCtrl_SetItemBold,
- <<ThisRef:32/?UI,ItemRef:32/?UI, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Data::term()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), Data::term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemdata">external documentation</a>.
-setItemData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef},Data) ->
+setItemData(#wx_ref{type=ThisT,ref=ThisRef},Item,Data)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:send_bin(term_to_binary(Data)),
wxe_util:cast(?wxTreeCtrl_SetItemData,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @equiv setItemDropHighlight(This,Item, [])
setItemDropHighlight(This,Item)
- when is_record(This, wx_ref),is_record(Item, wx_ref) ->
+ when is_record(This, wx_ref),is_integer(Item) ->
setItemDropHighlight(This,Item, []).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), [Option]) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> ok
%% Option = {highlight, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemdrophighlight">external documentation</a>.
-setItemDropHighlight(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}, Options)
- when is_list(Options) ->
+setItemDropHighlight(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
+ when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
MOpts = fun({highlight, Highlight}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Highlight)):32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:cast(?wxTreeCtrl_SetItemDropHighlight,
- <<ThisRef:32/?UI,ItemRef:32/?UI, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Font::wxFont:wxFont()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemfont">external documentation</a>.
-setItemFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef},#wx_ref{type=FontT,ref=FontRef}) ->
+setItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item,#wx_ref{type=FontT,ref=FontRef})
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxTreeCtrl_SetItemFont,
- <<ThisRef:32/?UI,ItemRef:32/?UI,FontRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @equiv setItemHasChildren(This,Item, [])
setItemHasChildren(This,Item)
- when is_record(This, wx_ref),is_record(Item, wx_ref) ->
+ when is_record(This, wx_ref),is_integer(Item) ->
setItemHasChildren(This,Item, []).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), [Option]) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> ok
%% Option = {has, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemhaschildren">external documentation</a>.
-setItemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}, Options)
- when is_list(Options) ->
+setItemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
+ when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
MOpts = fun({has, Has}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Has)):32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:cast(?wxTreeCtrl_SetItemHasChildren,
- <<ThisRef:32/?UI,ItemRef:32/?UI, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Image::integer()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), Image::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemimage">external documentation</a>.
-setItemImage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef},Image)
- when is_integer(Image) ->
+setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image)
+ when is_integer(Item),is_integer(Image) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SetItemImage_2,
- <<ThisRef:32/?UI,ItemRef:32/?UI,Image:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI,Image:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Image::integer(), [Option]) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), Image::integer(), [Option]) -> ok
%% Option = {which, WxTreeItemIcon}
%% WxTreeItemIcon = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemimage">external documentation</a>.
%%<br /> WxTreeItemIcon is one of ?wxTreeItemIcon_Normal | ?wxTreeItemIcon_Selected | ?wxTreeItemIcon_Expanded | ?wxTreeItemIcon_SelectedExpanded | ?wxTreeItemIcon_Max
-setItemImage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef},Image, Options)
- when is_integer(Image),is_list(Options) ->
+setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image, Options)
+ when is_integer(Item),is_integer(Image),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
MOpts = fun({which, Which}, Acc) -> [<<1:32/?UI,Which:32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:cast(?wxTreeCtrl_SetItemImage_3,
- <<ThisRef:32/?UI,ItemRef:32/?UI,Image:32/?UI, 0:32,BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI,Image:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Text::string()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemtext">external documentation</a>.
-setItemText(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef},Text)
- when is_list(Text) ->
+setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
+ when is_integer(Item),is_list(Text) ->
?CLASS(ThisT,wxTreeCtrl),
Text_UC = unicode:characters_to_binary([Text,0]),
wxe_util:cast(?wxTreeCtrl_SetItemText,
- <<ThisRef:32/?UI,ItemRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId(), Col::wx:colour()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemtextcolour">external documentation</a>.
-setItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef},Col)
- when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
+setItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
+ when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SetItemTextColour,
- <<ThisRef:32/?UI,ItemRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @spec (This::wxTreeCtrl(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetstateimagelist">external documentation</a>.
@@ -735,26 +753,29 @@ setWindowStyle(#wx_ref{type=ThisT,ref=ThisRef},Styles)
wxe_util:cast(?wxTreeCtrl_SetWindowStyle,
<<ThisRef:32/?UI,Styles:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsortchildren">external documentation</a>.
-sortChildren(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+sortChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SortChildren,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrltoggle">external documentation</a>.
-toggle(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+toggle(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Toggle,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrltoggleitemselection">external documentation</a>.
-toggleItemSelection(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+toggleItemSelection(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_ToggleItemSelection,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @spec (This::wxTreeCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlunselect">external documentation</a>.
@@ -770,12 +791,13 @@ unselectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:cast(?wxTreeCtrl_UnselectAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::wxTreeItemId()) -> ok
+%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlunselectitem">external documentation</a>.
-unselectItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=wxTreeItemId,ref=ItemRef}) ->
+unselectItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_UnselectItem,
- <<ThisRef:32/?UI,ItemRef:32/?UI>>).
+ <<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @spec (This::wxTreeCtrl()) -> ok
%% @doc Destroys this object, do not use object again
diff --git a/lib/wx/src/gen/wxTreeEvent.erl b/lib/wx/src/gen/wxTreeEvent.erl
index 3f20e79b22..11e442b0f3 100644
--- a/lib/wx/src/gen/wxTreeEvent.erl
+++ b/lib/wx/src/gen/wxTreeEvent.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%
%% This file is generated DO NOT EDIT
@@ -55,7 +55,7 @@ getKeyCode(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:call(?wxTreeEvent_GetKeyCode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent()) -> wxTreeItemId()
+%% @spec (This::wxTreeEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventgetitem">external documentation</a>.
getItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
@@ -76,7 +76,7 @@ getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:call(?wxTreeEvent_GetLabel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent()) -> wxTreeItemId()
+%% @spec (This::wxTreeEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventgetolditem">external documentation</a>.
getOldItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
diff --git a/lib/wx/src/gen/wxe_debug.hrl b/lib/wx/src/gen/wxe_debug.hrl
index 11f5b9e781..c325170dbb 100644
--- a/lib/wx/src/gen/wxe_debug.hrl
+++ b/lib/wx/src/gen/wxe_debug.hrl
@@ -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%
%% This file is generated DO NOT EDIT
@@ -1842,1438 +1842,1439 @@ wxdebug_table() ->
{2015, {wxTreeCtrl, getChildrenCount, 2}},
{2016, {wxTreeCtrl, getCount, 0}},
{2017, {wxTreeCtrl, getEditControl, 0}},
- {2018, {wxTreeCtrl, getFirstVisibleItem, 0}},
- {2019, {wxTreeCtrl, getImageList, 0}},
- {2020, {wxTreeCtrl, getIndent, 0}},
- {2021, {wxTreeCtrl, getItemBackgroundColour, 1}},
- {2022, {wxTreeCtrl, getItemData, 1}},
- {2023, {wxTreeCtrl, getItemFont, 1}},
- {2024, {wxTreeCtrl, getItemImage_1, 1}},
- {2025, {wxTreeCtrl, getItemImage_2, 2}},
- {2026, {wxTreeCtrl, getItemText, 1}},
- {2027, {wxTreeCtrl, getItemTextColour, 1}},
- {2028, {wxTreeCtrl, getLastChild, 1}},
- {2029, {wxTreeCtrl, getNextSibling, 1}},
- {2030, {wxTreeCtrl, getNextVisible, 1}},
- {2031, {wxTreeCtrl, getItemParent, 1}},
- {2032, {wxTreeCtrl, getPrevSibling, 1}},
- {2033, {wxTreeCtrl, getPrevVisible, 1}},
- {2034, {wxTreeCtrl, getRootItem, 0}},
- {2035, {wxTreeCtrl, getSelection, 0}},
- {2036, {wxTreeCtrl, getSelections, 1}},
- {2037, {wxTreeCtrl, getStateImageList, 0}},
- {2038, {wxTreeCtrl, hitTest, 1}},
- {2039, {wxTreeCtrl, insertItem_4_1, 4}},
- {2040, {wxTreeCtrl, insertItem_4_0, 4}},
- {2041, {wxTreeCtrl, isBold, 1}},
- {2042, {wxTreeCtrl, isExpanded, 1}},
- {2043, {wxTreeCtrl, isSelected, 1}},
- {2044, {wxTreeCtrl, isVisible, 1}},
- {2045, {wxTreeCtrl, itemHasChildren, 1}},
- {2046, {wxTreeCtrl, prependItem, 3}},
- {2047, {wxTreeCtrl, scrollTo, 1}},
- {2048, {wxTreeCtrl, selectItem_1, 1}},
- {2049, {wxTreeCtrl, selectItem_2, 2}},
- {2050, {wxTreeCtrl, setIndent, 1}},
- {2051, {wxTreeCtrl, setImageList, 1}},
- {2052, {wxTreeCtrl, setItemBackgroundColour, 2}},
- {2053, {wxTreeCtrl, setItemBold, 2}},
- {2054, {wxTreeCtrl, setItemData, 2}},
- {2055, {wxTreeCtrl, setItemDropHighlight, 2}},
- {2056, {wxTreeCtrl, setItemFont, 2}},
- {2057, {wxTreeCtrl, setItemHasChildren, 2}},
- {2058, {wxTreeCtrl, setItemImage_2, 2}},
- {2059, {wxTreeCtrl, setItemImage_3, 3}},
- {2060, {wxTreeCtrl, setItemText, 2}},
- {2061, {wxTreeCtrl, setItemTextColour, 2}},
- {2062, {wxTreeCtrl, setStateImageList, 1}},
- {2063, {wxTreeCtrl, setWindowStyle, 1}},
- {2064, {wxTreeCtrl, sortChildren, 1}},
- {2065, {wxTreeCtrl, toggle, 1}},
- {2066, {wxTreeCtrl, toggleItemSelection, 1}},
- {2067, {wxTreeCtrl, unselect, 0}},
- {2068, {wxTreeCtrl, unselectAll, 0}},
- {2069, {wxTreeCtrl, unselectItem, 1}},
- {2070, {wxScrollBar, new_0, 0}},
- {2071, {wxScrollBar, new_3, 3}},
- {2072, {wxScrollBar, destruct, 0}},
- {2073, {wxScrollBar, create, 3}},
- {2074, {wxScrollBar, getRange, 0}},
- {2075, {wxScrollBar, getPageSize, 0}},
- {2076, {wxScrollBar, getThumbPosition, 0}},
- {2077, {wxScrollBar, getThumbSize, 0}},
- {2078, {wxScrollBar, setThumbPosition, 1}},
- {2079, {wxScrollBar, setScrollbar, 5}},
- {2081, {wxSpinButton, new_2, 2}},
- {2082, {wxSpinButton, new_0, 0}},
- {2083, {wxSpinButton, create, 2}},
- {2084, {wxSpinButton, getMax, 0}},
- {2085, {wxSpinButton, getMin, 0}},
- {2086, {wxSpinButton, getValue, 0}},
- {2087, {wxSpinButton, setRange, 2}},
- {2088, {wxSpinButton, setValue, 1}},
- {2089, {wxSpinButton, 'Destroy', undefined}},
- {2090, {wxSpinCtrl, new_0, 0}},
- {2091, {wxSpinCtrl, new_2, 2}},
- {2093, {wxSpinCtrl, create, 2}},
- {2096, {wxSpinCtrl, setValue_1_1, 1}},
- {2097, {wxSpinCtrl, setValue_1_0, 1}},
- {2099, {wxSpinCtrl, getValue, 0}},
- {2101, {wxSpinCtrl, setRange, 2}},
- {2102, {wxSpinCtrl, setSelection, 2}},
- {2104, {wxSpinCtrl, getMin, 0}},
- {2106, {wxSpinCtrl, getMax, 0}},
- {2107, {wxSpinCtrl, 'Destroy', undefined}},
- {2108, {wxStaticText, new_0, 0}},
- {2109, {wxStaticText, new_4, 4}},
- {2110, {wxStaticText, create, 4}},
- {2111, {wxStaticText, getLabel, 0}},
- {2112, {wxStaticText, setLabel, 1}},
- {2113, {wxStaticText, wrap, 1}},
- {2114, {wxStaticText, 'Destroy', undefined}},
- {2115, {wxStaticBitmap, new_0, 0}},
- {2116, {wxStaticBitmap, new_4, 4}},
- {2117, {wxStaticBitmap, create, 4}},
- {2118, {wxStaticBitmap, getBitmap, 0}},
- {2119, {wxStaticBitmap, setBitmap, 1}},
- {2120, {wxStaticBitmap, 'Destroy', undefined}},
- {2121, {wxRadioBox, new, 7}},
- {2123, {wxRadioBox, destruct, 0}},
- {2124, {wxRadioBox, create, 7}},
- {2125, {wxRadioBox, enable_2, 2}},
- {2126, {wxRadioBox, enable_1, 1}},
- {2127, {wxRadioBox, getSelection, 0}},
- {2128, {wxRadioBox, getString, 1}},
- {2129, {wxRadioBox, setSelection, 1}},
- {2130, {wxRadioBox, show_2, 2}},
- {2131, {wxRadioBox, show_1, 1}},
- {2132, {wxRadioBox, getColumnCount, 0}},
- {2133, {wxRadioBox, getItemHelpText, 1}},
- {2134, {wxRadioBox, getItemToolTip, 1}},
- {2136, {wxRadioBox, getItemFromPoint, 1}},
- {2137, {wxRadioBox, getRowCount, 0}},
- {2138, {wxRadioBox, isItemEnabled, 1}},
- {2139, {wxRadioBox, isItemShown, 1}},
- {2140, {wxRadioBox, setItemHelpText, 2}},
- {2141, {wxRadioBox, setItemToolTip, 2}},
- {2142, {wxRadioButton, new_0, 0}},
- {2143, {wxRadioButton, new_4, 4}},
- {2144, {wxRadioButton, create, 4}},
- {2145, {wxRadioButton, getValue, 0}},
- {2146, {wxRadioButton, setValue, 1}},
- {2147, {wxRadioButton, 'Destroy', undefined}},
- {2149, {wxSlider, new_6, 6}},
- {2150, {wxSlider, new_0, 0}},
- {2151, {wxSlider, create, 6}},
- {2152, {wxSlider, getLineSize, 0}},
- {2153, {wxSlider, getMax, 0}},
- {2154, {wxSlider, getMin, 0}},
- {2155, {wxSlider, getPageSize, 0}},
- {2156, {wxSlider, getThumbLength, 0}},
- {2157, {wxSlider, getValue, 0}},
- {2158, {wxSlider, setLineSize, 1}},
- {2159, {wxSlider, setPageSize, 1}},
- {2160, {wxSlider, setRange, 2}},
- {2161, {wxSlider, setThumbLength, 1}},
- {2162, {wxSlider, setValue, 1}},
- {2163, {wxSlider, 'Destroy', undefined}},
- {2165, {wxDialog, new_4, 4}},
- {2166, {wxDialog, new_0, 0}},
- {2168, {wxDialog, destruct, 0}},
- {2169, {wxDialog, create, 4}},
- {2170, {wxDialog, createButtonSizer, 1}},
- {2171, {wxDialog, createStdDialogButtonSizer, 1}},
- {2172, {wxDialog, endModal, 1}},
- {2173, {wxDialog, getAffirmativeId, 0}},
- {2174, {wxDialog, getReturnCode, 0}},
- {2175, {wxDialog, isModal, 0}},
- {2176, {wxDialog, setAffirmativeId, 1}},
- {2177, {wxDialog, setReturnCode, 1}},
- {2178, {wxDialog, show, 1}},
- {2179, {wxDialog, showModal, 0}},
- {2180, {wxColourDialog, new_0, 0}},
- {2181, {wxColourDialog, new_2, 2}},
- {2182, {wxColourDialog, destruct, 0}},
- {2183, {wxColourDialog, create, 2}},
- {2184, {wxColourDialog, getColourData, 0}},
- {2185, {wxColourData, new_0, 0}},
- {2186, {wxColourData, new_1, 1}},
- {2187, {wxColourData, destruct, 0}},
- {2188, {wxColourData, getChooseFull, 0}},
- {2189, {wxColourData, getColour, 0}},
- {2191, {wxColourData, getCustomColour, 1}},
- {2192, {wxColourData, setChooseFull, 1}},
- {2193, {wxColourData, setColour, 1}},
- {2194, {wxColourData, setCustomColour, 2}},
- {2195, {wxPalette, new_0, 0}},
- {2196, {wxPalette, new_4, 4}},
- {2198, {wxPalette, destruct, 0}},
- {2199, {wxPalette, create, 4}},
- {2200, {wxPalette, getColoursCount, 0}},
- {2201, {wxPalette, getPixel, 3}},
- {2202, {wxPalette, getRGB, 4}},
- {2203, {wxPalette, isOk, 0}},
- {2207, {wxDirDialog, new, 2}},
- {2208, {wxDirDialog, destruct, 0}},
- {2209, {wxDirDialog, getPath, 0}},
- {2210, {wxDirDialog, getMessage, 0}},
- {2211, {wxDirDialog, setMessage, 1}},
- {2212, {wxDirDialog, setPath, 1}},
- {2216, {wxFileDialog, new, 2}},
- {2217, {wxFileDialog, destruct, 0}},
- {2218, {wxFileDialog, getDirectory, 0}},
- {2219, {wxFileDialog, getFilename, 0}},
- {2220, {wxFileDialog, getFilenames, 1}},
- {2221, {wxFileDialog, getFilterIndex, 0}},
- {2222, {wxFileDialog, getMessage, 0}},
- {2223, {wxFileDialog, getPath, 0}},
- {2224, {wxFileDialog, getPaths, 1}},
- {2225, {wxFileDialog, getWildcard, 0}},
- {2226, {wxFileDialog, setDirectory, 1}},
- {2227, {wxFileDialog, setFilename, 1}},
- {2228, {wxFileDialog, setFilterIndex, 1}},
- {2229, {wxFileDialog, setMessage, 1}},
- {2230, {wxFileDialog, setPath, 1}},
- {2231, {wxFileDialog, setWildcard, 1}},
- {2232, {wxPickerBase, setInternalMargin, 1}},
- {2233, {wxPickerBase, getInternalMargin, 0}},
- {2234, {wxPickerBase, setTextCtrlProportion, 1}},
- {2235, {wxPickerBase, setPickerCtrlProportion, 1}},
- {2236, {wxPickerBase, getTextCtrlProportion, 0}},
- {2237, {wxPickerBase, getPickerCtrlProportion, 0}},
- {2238, {wxPickerBase, hasTextCtrl, 0}},
- {2239, {wxPickerBase, getTextCtrl, 0}},
- {2240, {wxPickerBase, isTextCtrlGrowable, 0}},
- {2241, {wxPickerBase, setPickerCtrlGrowable, 1}},
- {2242, {wxPickerBase, setTextCtrlGrowable, 1}},
- {2243, {wxPickerBase, isPickerCtrlGrowable, 0}},
- {2244, {wxFilePickerCtrl, new_0, 0}},
- {2245, {wxFilePickerCtrl, new_3, 3}},
- {2246, {wxFilePickerCtrl, create, 3}},
- {2247, {wxFilePickerCtrl, getPath, 0}},
- {2248, {wxFilePickerCtrl, setPath, 1}},
- {2249, {wxFilePickerCtrl, 'Destroy', undefined}},
- {2250, {wxDirPickerCtrl, new_0, 0}},
- {2251, {wxDirPickerCtrl, new_3, 3}},
- {2252, {wxDirPickerCtrl, create, 3}},
- {2253, {wxDirPickerCtrl, getPath, 0}},
- {2254, {wxDirPickerCtrl, setPath, 1}},
- {2255, {wxDirPickerCtrl, 'Destroy', undefined}},
- {2256, {wxColourPickerCtrl, new_0, 0}},
- {2257, {wxColourPickerCtrl, new_3, 3}},
- {2258, {wxColourPickerCtrl, create, 3}},
- {2259, {wxColourPickerCtrl, getColour, 0}},
- {2260, {wxColourPickerCtrl, setColour_1_1, 1}},
- {2261, {wxColourPickerCtrl, setColour_1_0, 1}},
- {2262, {wxColourPickerCtrl, 'Destroy', undefined}},
- {2263, {wxDatePickerCtrl, new_0, 0}},
- {2264, {wxDatePickerCtrl, new_3, 3}},
- {2265, {wxDatePickerCtrl, getRange, 2}},
- {2266, {wxDatePickerCtrl, getValue, 0}},
- {2267, {wxDatePickerCtrl, setRange, 2}},
- {2268, {wxDatePickerCtrl, setValue, 1}},
- {2269, {wxDatePickerCtrl, 'Destroy', undefined}},
- {2270, {wxFontPickerCtrl, new_0, 0}},
- {2271, {wxFontPickerCtrl, new_3, 3}},
- {2272, {wxFontPickerCtrl, create, 3}},
- {2273, {wxFontPickerCtrl, getSelectedFont, 0}},
- {2274, {wxFontPickerCtrl, setSelectedFont, 1}},
- {2275, {wxFontPickerCtrl, getMaxPointSize, 0}},
- {2276, {wxFontPickerCtrl, setMaxPointSize, 1}},
- {2277, {wxFontPickerCtrl, 'Destroy', undefined}},
- {2280, {wxFindReplaceDialog, new_0, 0}},
- {2281, {wxFindReplaceDialog, new_4, 4}},
- {2282, {wxFindReplaceDialog, destruct, 0}},
- {2283, {wxFindReplaceDialog, create, 4}},
- {2284, {wxFindReplaceDialog, getData, 0}},
- {2285, {wxFindReplaceData, new_0, 0}},
- {2286, {wxFindReplaceData, new_1, 1}},
- {2287, {wxFindReplaceData, getFindString, 0}},
- {2288, {wxFindReplaceData, getReplaceString, 0}},
- {2289, {wxFindReplaceData, getFlags, 0}},
- {2290, {wxFindReplaceData, setFlags, 1}},
- {2291, {wxFindReplaceData, setFindString, 1}},
- {2292, {wxFindReplaceData, setReplaceString, 1}},
- {2293, {wxFindReplaceData, 'Destroy', undefined}},
- {2294, {wxMultiChoiceDialog, new_0, 0}},
- {2296, {wxMultiChoiceDialog, new_5, 5}},
- {2297, {wxMultiChoiceDialog, getSelections, 0}},
- {2298, {wxMultiChoiceDialog, setSelections, 1}},
- {2299, {wxMultiChoiceDialog, 'Destroy', undefined}},
- {2300, {wxSingleChoiceDialog, new_0, 0}},
- {2302, {wxSingleChoiceDialog, new_5, 5}},
- {2303, {wxSingleChoiceDialog, getSelection, 0}},
- {2304, {wxSingleChoiceDialog, getStringSelection, 0}},
- {2305, {wxSingleChoiceDialog, setSelection, 1}},
- {2306, {wxSingleChoiceDialog, 'Destroy', undefined}},
- {2307, {wxTextEntryDialog, new, 3}},
- {2308, {wxTextEntryDialog, getValue, 0}},
- {2309, {wxTextEntryDialog, setValue, 1}},
- {2310, {wxTextEntryDialog, 'Destroy', undefined}},
- {2311, {wxPasswordEntryDialog, new, 3}},
- {2312, {wxPasswordEntryDialog, 'Destroy', undefined}},
- {2313, {wxFontData, new_0, 0}},
- {2314, {wxFontData, new_1, 1}},
- {2315, {wxFontData, destruct, 0}},
- {2316, {wxFontData, enableEffects, 1}},
- {2317, {wxFontData, getAllowSymbols, 0}},
- {2318, {wxFontData, getColour, 0}},
- {2319, {wxFontData, getChosenFont, 0}},
- {2320, {wxFontData, getEnableEffects, 0}},
- {2321, {wxFontData, getInitialFont, 0}},
- {2322, {wxFontData, getShowHelp, 0}},
- {2323, {wxFontData, setAllowSymbols, 1}},
- {2324, {wxFontData, setChosenFont, 1}},
- {2325, {wxFontData, setColour, 1}},
- {2326, {wxFontData, setInitialFont, 1}},
- {2327, {wxFontData, setRange, 2}},
- {2328, {wxFontData, setShowHelp, 1}},
- {2332, {wxFontDialog, new_0, 0}},
- {2334, {wxFontDialog, new_2, 2}},
- {2336, {wxFontDialog, create, 2}},
- {2337, {wxFontDialog, getFontData, 0}},
- {2339, {wxFontDialog, 'Destroy', undefined}},
- {2340, {wxProgressDialog, new, 3}},
- {2341, {wxProgressDialog, destruct, 0}},
- {2342, {wxProgressDialog, resume, 0}},
- {2343, {wxProgressDialog, update_2, 2}},
- {2344, {wxProgressDialog, update_0, 0}},
- {2345, {wxMessageDialog, new, 3}},
- {2346, {wxMessageDialog, destruct, 0}},
- {2347, {wxPageSetupDialog, new, 2}},
- {2348, {wxPageSetupDialog, destruct, 0}},
- {2349, {wxPageSetupDialog, getPageSetupData, 0}},
- {2350, {wxPageSetupDialog, showModal, 0}},
- {2351, {wxPageSetupDialogData, new_0, 0}},
- {2352, {wxPageSetupDialogData, new_1_0, 1}},
- {2353, {wxPageSetupDialogData, new_1_1, 1}},
- {2354, {wxPageSetupDialogData, destruct, 0}},
- {2355, {wxPageSetupDialogData, enableHelp, 1}},
- {2356, {wxPageSetupDialogData, enableMargins, 1}},
- {2357, {wxPageSetupDialogData, enableOrientation, 1}},
- {2358, {wxPageSetupDialogData, enablePaper, 1}},
- {2359, {wxPageSetupDialogData, enablePrinter, 1}},
- {2360, {wxPageSetupDialogData, getDefaultMinMargins, 0}},
- {2361, {wxPageSetupDialogData, getEnableMargins, 0}},
- {2362, {wxPageSetupDialogData, getEnableOrientation, 0}},
- {2363, {wxPageSetupDialogData, getEnablePaper, 0}},
- {2364, {wxPageSetupDialogData, getEnablePrinter, 0}},
- {2365, {wxPageSetupDialogData, getEnableHelp, 0}},
- {2366, {wxPageSetupDialogData, getDefaultInfo, 0}},
- {2367, {wxPageSetupDialogData, getMarginTopLeft, 0}},
- {2368, {wxPageSetupDialogData, getMarginBottomRight, 0}},
- {2369, {wxPageSetupDialogData, getMinMarginTopLeft, 0}},
- {2370, {wxPageSetupDialogData, getMinMarginBottomRight, 0}},
- {2371, {wxPageSetupDialogData, getPaperId, 0}},
- {2372, {wxPageSetupDialogData, getPaperSize, 0}},
- {2374, {wxPageSetupDialogData, getPrintData, 0}},
- {2375, {wxPageSetupDialogData, isOk, 0}},
- {2376, {wxPageSetupDialogData, setDefaultInfo, 1}},
- {2377, {wxPageSetupDialogData, setDefaultMinMargins, 1}},
- {2378, {wxPageSetupDialogData, setMarginTopLeft, 1}},
- {2379, {wxPageSetupDialogData, setMarginBottomRight, 1}},
- {2380, {wxPageSetupDialogData, setMinMarginTopLeft, 1}},
- {2381, {wxPageSetupDialogData, setMinMarginBottomRight, 1}},
- {2382, {wxPageSetupDialogData, setPaperId, 1}},
- {2383, {wxPageSetupDialogData, setPaperSize_1_1, 1}},
- {2384, {wxPageSetupDialogData, setPaperSize_1_0, 1}},
- {2385, {wxPageSetupDialogData, setPrintData, 1}},
- {2386, {wxPrintDialog, new_2_0, 2}},
- {2387, {wxPrintDialog, new_2_1, 2}},
- {2388, {wxPrintDialog, destruct, 0}},
- {2389, {wxPrintDialog, getPrintDialogData, 0}},
- {2390, {wxPrintDialog, getPrintDC, 0}},
- {2391, {wxPrintDialogData, new_0, 0}},
- {2392, {wxPrintDialogData, new_1_1, 1}},
- {2393, {wxPrintDialogData, new_1_0, 1}},
- {2394, {wxPrintDialogData, destruct, 0}},
- {2395, {wxPrintDialogData, enableHelp, 1}},
- {2396, {wxPrintDialogData, enablePageNumbers, 1}},
- {2397, {wxPrintDialogData, enablePrintToFile, 1}},
- {2398, {wxPrintDialogData, enableSelection, 1}},
- {2399, {wxPrintDialogData, getAllPages, 0}},
- {2400, {wxPrintDialogData, getCollate, 0}},
- {2401, {wxPrintDialogData, getFromPage, 0}},
- {2402, {wxPrintDialogData, getMaxPage, 0}},
- {2403, {wxPrintDialogData, getMinPage, 0}},
- {2404, {wxPrintDialogData, getNoCopies, 0}},
- {2405, {wxPrintDialogData, getPrintData, 0}},
- {2406, {wxPrintDialogData, getPrintToFile, 0}},
- {2407, {wxPrintDialogData, getSelection, 0}},
- {2408, {wxPrintDialogData, getToPage, 0}},
- {2409, {wxPrintDialogData, isOk, 0}},
- {2410, {wxPrintDialogData, setCollate, 1}},
- {2411, {wxPrintDialogData, setFromPage, 1}},
- {2412, {wxPrintDialogData, setMaxPage, 1}},
- {2413, {wxPrintDialogData, setMinPage, 1}},
- {2414, {wxPrintDialogData, setNoCopies, 1}},
- {2415, {wxPrintDialogData, setPrintData, 1}},
- {2416, {wxPrintDialogData, setPrintToFile, 1}},
- {2417, {wxPrintDialogData, setSelection, 1}},
- {2418, {wxPrintDialogData, setToPage, 1}},
- {2419, {wxPrintData, new_0, 0}},
- {2420, {wxPrintData, new_1, 1}},
- {2421, {wxPrintData, destruct, 0}},
- {2422, {wxPrintData, getCollate, 0}},
- {2423, {wxPrintData, getBin, 0}},
- {2424, {wxPrintData, getColour, 0}},
- {2425, {wxPrintData, getDuplex, 0}},
- {2426, {wxPrintData, getNoCopies, 0}},
- {2427, {wxPrintData, getOrientation, 0}},
- {2428, {wxPrintData, getPaperId, 0}},
- {2429, {wxPrintData, getPrinterName, 0}},
- {2430, {wxPrintData, getQuality, 0}},
- {2431, {wxPrintData, isOk, 0}},
- {2432, {wxPrintData, setBin, 1}},
- {2433, {wxPrintData, setCollate, 1}},
- {2434, {wxPrintData, setColour, 1}},
- {2435, {wxPrintData, setDuplex, 1}},
- {2436, {wxPrintData, setNoCopies, 1}},
- {2437, {wxPrintData, setOrientation, 1}},
- {2438, {wxPrintData, setPaperId, 1}},
- {2439, {wxPrintData, setPrinterName, 1}},
- {2440, {wxPrintData, setQuality, 1}},
- {2443, {wxPrintPreview, new_2, 2}},
- {2444, {wxPrintPreview, new_3, 3}},
- {2446, {wxPrintPreview, destruct, 0}},
- {2447, {wxPrintPreview, getCanvas, 0}},
- {2448, {wxPrintPreview, getCurrentPage, 0}},
- {2449, {wxPrintPreview, getFrame, 0}},
- {2450, {wxPrintPreview, getMaxPage, 0}},
- {2451, {wxPrintPreview, getMinPage, 0}},
- {2452, {wxPrintPreview, getPrintout, 0}},
- {2453, {wxPrintPreview, getPrintoutForPrinting, 0}},
- {2454, {wxPrintPreview, isOk, 0}},
- {2455, {wxPrintPreview, paintPage, 2}},
- {2456, {wxPrintPreview, print, 1}},
- {2457, {wxPrintPreview, renderPage, 1}},
- {2458, {wxPrintPreview, setCanvas, 1}},
- {2459, {wxPrintPreview, setCurrentPage, 1}},
- {2460, {wxPrintPreview, setFrame, 1}},
- {2461, {wxPrintPreview, setPrintout, 1}},
- {2462, {wxPrintPreview, setZoom, 1}},
- {2463, {wxPreviewFrame, new, 3}},
- {2464, {wxPreviewFrame, destruct, 0}},
- {2465, {wxPreviewFrame, createControlBar, 0}},
- {2466, {wxPreviewFrame, createCanvas, 0}},
- {2467, {wxPreviewFrame, initialize, 0}},
- {2468, {wxPreviewFrame, onCloseWindow, 1}},
- {2469, {wxPreviewControlBar, new, 4}},
- {2470, {wxPreviewControlBar, destruct, 0}},
- {2471, {wxPreviewControlBar, createButtons, 0}},
- {2472, {wxPreviewControlBar, getPrintPreview, 0}},
- {2473, {wxPreviewControlBar, getZoomControl, 0}},
- {2474, {wxPreviewControlBar, setZoomControl, 1}},
- {2476, {wxPrinter, new, 1}},
- {2477, {wxPrinter, createAbortWindow, 2}},
- {2478, {wxPrinter, getAbort, 0}},
- {2479, {wxPrinter, getLastError, 0}},
- {2480, {wxPrinter, getPrintDialogData, 0}},
- {2481, {wxPrinter, print, 3}},
- {2482, {wxPrinter, printDialog, 1}},
- {2483, {wxPrinter, reportError, 3}},
- {2484, {wxPrinter, setup, 1}},
- {2485, {wxPrinter, 'Destroy', undefined}},
- {2486, {wxXmlResource, new_1, 1}},
- {2487, {wxXmlResource, new_2, 2}},
- {2488, {wxXmlResource, destruct, 0}},
- {2489, {wxXmlResource, attachUnknownControl, 3}},
- {2490, {wxXmlResource, clearHandlers, 0}},
- {2491, {wxXmlResource, compareVersion, 4}},
- {2492, {wxXmlResource, get, 0}},
- {2493, {wxXmlResource, getFlags, 0}},
- {2494, {wxXmlResource, getVersion, 0}},
- {2495, {wxXmlResource, getXRCID, 2}},
- {2496, {wxXmlResource, initAllHandlers, 0}},
- {2497, {wxXmlResource, load, 1}},
- {2498, {wxXmlResource, loadBitmap, 1}},
- {2499, {wxXmlResource, loadDialog_2, 2}},
- {2500, {wxXmlResource, loadDialog_3, 3}},
- {2501, {wxXmlResource, loadFrame_2, 2}},
- {2502, {wxXmlResource, loadFrame_3, 3}},
- {2503, {wxXmlResource, loadIcon, 1}},
- {2504, {wxXmlResource, loadMenu, 1}},
- {2505, {wxXmlResource, loadMenuBar_2, 2}},
- {2506, {wxXmlResource, loadMenuBar_1, 1}},
- {2507, {wxXmlResource, loadPanel_2, 2}},
- {2508, {wxXmlResource, loadPanel_3, 3}},
- {2509, {wxXmlResource, loadToolBar, 2}},
- {2510, {wxXmlResource, set, 1}},
- {2511, {wxXmlResource, setFlags, 1}},
- {2512, {wxXmlResource, unload, 1}},
- {2513, {wxXmlResource, xrcctrl, 3}},
- {2514, {wxHtmlEasyPrinting, new, 1}},
- {2515, {wxHtmlEasyPrinting, destruct, 0}},
- {2516, {wxHtmlEasyPrinting, getPrintData, 0}},
- {2517, {wxHtmlEasyPrinting, getPageSetupData, 0}},
- {2518, {wxHtmlEasyPrinting, previewFile, 1}},
- {2519, {wxHtmlEasyPrinting, previewText, 2}},
- {2520, {wxHtmlEasyPrinting, printFile, 1}},
- {2521, {wxHtmlEasyPrinting, printText, 2}},
- {2522, {wxHtmlEasyPrinting, pageSetup, 0}},
- {2523, {wxHtmlEasyPrinting, setFonts, 3}},
- {2524, {wxHtmlEasyPrinting, setHeader, 2}},
- {2525, {wxHtmlEasyPrinting, setFooter, 2}},
- {2527, {wxGLCanvas, new_2, 2}},
- {2528, {wxGLCanvas, new_3_1, 3}},
- {2529, {wxGLCanvas, new_3_0, 3}},
- {2530, {wxGLCanvas, getContext, 0}},
- {2532, {wxGLCanvas, setCurrent, 0}},
- {2533, {wxGLCanvas, swapBuffers, 0}},
- {2534, {wxGLCanvas, 'Destroy', undefined}},
- {2535, {wxAuiManager, new, 1}},
- {2536, {wxAuiManager, destruct, 0}},
- {2537, {wxAuiManager, addPane_2_1, 2}},
- {2538, {wxAuiManager, addPane_3, 3}},
- {2539, {wxAuiManager, addPane_2_0, 2}},
- {2540, {wxAuiManager, detachPane, 1}},
- {2541, {wxAuiManager, getAllPanes, 0}},
- {2542, {wxAuiManager, getArtProvider, 0}},
- {2543, {wxAuiManager, getDockSizeConstraint, 2}},
- {2544, {wxAuiManager, getFlags, 0}},
- {2545, {wxAuiManager, getManagedWindow, 0}},
- {2546, {wxAuiManager, getManager, 1}},
- {2547, {wxAuiManager, getPane_1_1, 1}},
- {2548, {wxAuiManager, getPane_1_0, 1}},
- {2549, {wxAuiManager, hideHint, 0}},
- {2550, {wxAuiManager, insertPane, 3}},
- {2551, {wxAuiManager, loadPaneInfo, 2}},
- {2552, {wxAuiManager, loadPerspective, 2}},
- {2553, {wxAuiManager, savePaneInfo, 1}},
- {2554, {wxAuiManager, savePerspective, 0}},
- {2555, {wxAuiManager, setArtProvider, 1}},
- {2556, {wxAuiManager, setDockSizeConstraint, 2}},
- {2557, {wxAuiManager, setFlags, 1}},
- {2558, {wxAuiManager, setManagedWindow, 1}},
- {2559, {wxAuiManager, showHint, 1}},
- {2560, {wxAuiManager, unInit, 0}},
- {2561, {wxAuiManager, update, 0}},
- {2562, {wxAuiPaneInfo, new_0, 0}},
- {2563, {wxAuiPaneInfo, new_1, 1}},
- {2564, {wxAuiPaneInfo, destruct, 0}},
- {2565, {wxAuiPaneInfo, bestSize_1, 1}},
- {2566, {wxAuiPaneInfo, bestSize_2, 2}},
- {2567, {wxAuiPaneInfo, bottom, 0}},
- {2568, {wxAuiPaneInfo, bottomDockable, 1}},
- {2569, {wxAuiPaneInfo, caption, 1}},
- {2570, {wxAuiPaneInfo, captionVisible, 1}},
- {2571, {wxAuiPaneInfo, centre, 0}},
- {2572, {wxAuiPaneInfo, centrePane, 0}},
- {2573, {wxAuiPaneInfo, closeButton, 1}},
- {2574, {wxAuiPaneInfo, defaultPane, 0}},
- {2575, {wxAuiPaneInfo, destroyOnClose, 1}},
- {2576, {wxAuiPaneInfo, direction, 1}},
- {2577, {wxAuiPaneInfo, dock, 0}},
- {2578, {wxAuiPaneInfo, dockable, 1}},
- {2579, {wxAuiPaneInfo, fixed, 0}},
- {2580, {wxAuiPaneInfo, float, 0}},
- {2581, {wxAuiPaneInfo, floatable, 1}},
- {2582, {wxAuiPaneInfo, floatingPosition_1, 1}},
- {2583, {wxAuiPaneInfo, floatingPosition_2, 2}},
- {2584, {wxAuiPaneInfo, floatingSize_1, 1}},
- {2585, {wxAuiPaneInfo, floatingSize_2, 2}},
- {2586, {wxAuiPaneInfo, gripper, 1}},
- {2587, {wxAuiPaneInfo, gripperTop, 1}},
- {2588, {wxAuiPaneInfo, hasBorder, 0}},
- {2589, {wxAuiPaneInfo, hasCaption, 0}},
- {2590, {wxAuiPaneInfo, hasCloseButton, 0}},
- {2591, {wxAuiPaneInfo, hasFlag, 1}},
- {2592, {wxAuiPaneInfo, hasGripper, 0}},
- {2593, {wxAuiPaneInfo, hasGripperTop, 0}},
- {2594, {wxAuiPaneInfo, hasMaximizeButton, 0}},
- {2595, {wxAuiPaneInfo, hasMinimizeButton, 0}},
- {2596, {wxAuiPaneInfo, hasPinButton, 0}},
- {2597, {wxAuiPaneInfo, hide, 0}},
- {2598, {wxAuiPaneInfo, isBottomDockable, 0}},
- {2599, {wxAuiPaneInfo, isDocked, 0}},
- {2600, {wxAuiPaneInfo, isFixed, 0}},
- {2601, {wxAuiPaneInfo, isFloatable, 0}},
- {2602, {wxAuiPaneInfo, isFloating, 0}},
- {2603, {wxAuiPaneInfo, isLeftDockable, 0}},
- {2604, {wxAuiPaneInfo, isMovable, 0}},
- {2605, {wxAuiPaneInfo, isOk, 0}},
- {2606, {wxAuiPaneInfo, isResizable, 0}},
- {2607, {wxAuiPaneInfo, isRightDockable, 0}},
- {2608, {wxAuiPaneInfo, isShown, 0}},
- {2609, {wxAuiPaneInfo, isToolbar, 0}},
- {2610, {wxAuiPaneInfo, isTopDockable, 0}},
- {2611, {wxAuiPaneInfo, layer, 1}},
- {2612, {wxAuiPaneInfo, left, 0}},
- {2613, {wxAuiPaneInfo, leftDockable, 1}},
- {2614, {wxAuiPaneInfo, maxSize_1, 1}},
- {2615, {wxAuiPaneInfo, maxSize_2, 2}},
- {2616, {wxAuiPaneInfo, maximizeButton, 1}},
- {2617, {wxAuiPaneInfo, minSize_1, 1}},
- {2618, {wxAuiPaneInfo, minSize_2, 2}},
- {2619, {wxAuiPaneInfo, minimizeButton, 1}},
- {2620, {wxAuiPaneInfo, movable, 1}},
- {2621, {wxAuiPaneInfo, name, 1}},
- {2622, {wxAuiPaneInfo, paneBorder, 1}},
- {2623, {wxAuiPaneInfo, pinButton, 1}},
- {2624, {wxAuiPaneInfo, position, 1}},
- {2625, {wxAuiPaneInfo, resizable, 1}},
- {2626, {wxAuiPaneInfo, right, 0}},
- {2627, {wxAuiPaneInfo, rightDockable, 1}},
- {2628, {wxAuiPaneInfo, row, 1}},
- {2629, {wxAuiPaneInfo, safeSet, 1}},
- {2630, {wxAuiPaneInfo, setFlag, 2}},
- {2631, {wxAuiPaneInfo, show, 1}},
- {2632, {wxAuiPaneInfo, toolbarPane, 0}},
- {2633, {wxAuiPaneInfo, top, 0}},
- {2634, {wxAuiPaneInfo, topDockable, 1}},
- {2635, {wxAuiPaneInfo, window, 1}},
- {2636, {wxAuiNotebook, new_0, 0}},
- {2637, {wxAuiNotebook, new_2, 2}},
- {2638, {wxAuiNotebook, addPage, 3}},
- {2639, {wxAuiNotebook, create, 2}},
- {2640, {wxAuiNotebook, deletePage, 1}},
- {2641, {wxAuiNotebook, getArtProvider, 0}},
- {2642, {wxAuiNotebook, getPage, 1}},
- {2643, {wxAuiNotebook, getPageBitmap, 1}},
- {2644, {wxAuiNotebook, getPageCount, 0}},
- {2645, {wxAuiNotebook, getPageIndex, 1}},
- {2646, {wxAuiNotebook, getPageText, 1}},
- {2647, {wxAuiNotebook, getSelection, 0}},
- {2648, {wxAuiNotebook, insertPage, 4}},
- {2649, {wxAuiNotebook, removePage, 1}},
- {2650, {wxAuiNotebook, setArtProvider, 1}},
- {2651, {wxAuiNotebook, setFont, 1}},
- {2652, {wxAuiNotebook, setPageBitmap, 2}},
- {2653, {wxAuiNotebook, setPageText, 2}},
- {2654, {wxAuiNotebook, setSelection, 1}},
- {2655, {wxAuiNotebook, setTabCtrlHeight, 1}},
- {2656, {wxAuiNotebook, setUniformBitmapSize, 1}},
- {2657, {wxAuiNotebook, 'Destroy', undefined}},
- {2658, {wxMDIParentFrame, new_0, 0}},
- {2659, {wxMDIParentFrame, new_4, 4}},
- {2660, {wxMDIParentFrame, destruct, 0}},
- {2661, {wxMDIParentFrame, activateNext, 0}},
- {2662, {wxMDIParentFrame, activatePrevious, 0}},
- {2663, {wxMDIParentFrame, arrangeIcons, 0}},
- {2664, {wxMDIParentFrame, cascade, 0}},
- {2665, {wxMDIParentFrame, create, 4}},
- {2666, {wxMDIParentFrame, getActiveChild, 0}},
- {2667, {wxMDIParentFrame, getClientWindow, 0}},
- {2668, {wxMDIParentFrame, tile, 1}},
- {2669, {wxMDIChildFrame, new_0, 0}},
- {2670, {wxMDIChildFrame, new_4, 4}},
- {2671, {wxMDIChildFrame, destruct, 0}},
- {2672, {wxMDIChildFrame, activate, 0}},
- {2673, {wxMDIChildFrame, create, 4}},
- {2674, {wxMDIChildFrame, maximize, 1}},
- {2675, {wxMDIChildFrame, restore, 0}},
- {2676, {wxMDIClientWindow, new_0, 0}},
- {2677, {wxMDIClientWindow, new_2, 2}},
- {2678, {wxMDIClientWindow, destruct, 0}},
- {2679, {wxMDIClientWindow, createClient, 2}},
- {2680, {wxLayoutAlgorithm, new, 0}},
- {2681, {wxLayoutAlgorithm, layoutFrame, 2}},
- {2682, {wxLayoutAlgorithm, layoutMDIFrame, 2}},
- {2683, {wxLayoutAlgorithm, layoutWindow, 2}},
- {2684, {wxLayoutAlgorithm, 'Destroy', undefined}},
- {2685, {wxEvent, getId, 0}},
- {2686, {wxEvent, getSkipped, 0}},
- {2687, {wxEvent, getTimestamp, 0}},
- {2688, {wxEvent, isCommandEvent, 0}},
- {2689, {wxEvent, resumePropagation, 1}},
- {2690, {wxEvent, shouldPropagate, 0}},
- {2691, {wxEvent, skip, 1}},
- {2692, {wxEvent, stopPropagation, 0}},
- {2693, {wxCommandEvent, getClientData, 0}},
- {2694, {wxCommandEvent, getExtraLong, 0}},
- {2695, {wxCommandEvent, getInt, 0}},
- {2696, {wxCommandEvent, getSelection, 0}},
- {2697, {wxCommandEvent, getString, 0}},
- {2698, {wxCommandEvent, isChecked, 0}},
- {2699, {wxCommandEvent, isSelection, 0}},
- {2700, {wxCommandEvent, setInt, 1}},
- {2701, {wxCommandEvent, setString, 1}},
- {2702, {wxScrollEvent, getOrientation, 0}},
- {2703, {wxScrollEvent, getPosition, 0}},
- {2704, {wxScrollWinEvent, getOrientation, 0}},
- {2705, {wxScrollWinEvent, getPosition, 0}},
- {2706, {wxMouseEvent, altDown, 0}},
- {2707, {wxMouseEvent, button, 1}},
- {2708, {wxMouseEvent, buttonDClick, 1}},
- {2709, {wxMouseEvent, buttonDown, 1}},
- {2710, {wxMouseEvent, buttonUp, 1}},
- {2711, {wxMouseEvent, cmdDown, 0}},
- {2712, {wxMouseEvent, controlDown, 0}},
- {2713, {wxMouseEvent, dragging, 0}},
- {2714, {wxMouseEvent, entering, 0}},
- {2715, {wxMouseEvent, getButton, 0}},
- {2718, {wxMouseEvent, getPosition, 0}},
- {2719, {wxMouseEvent, getLogicalPosition, 1}},
- {2720, {wxMouseEvent, getLinesPerAction, 0}},
- {2721, {wxMouseEvent, getWheelRotation, 0}},
- {2722, {wxMouseEvent, getWheelDelta, 0}},
- {2723, {wxMouseEvent, getX, 0}},
- {2724, {wxMouseEvent, getY, 0}},
- {2725, {wxMouseEvent, isButton, 0}},
- {2726, {wxMouseEvent, isPageScroll, 0}},
- {2727, {wxMouseEvent, leaving, 0}},
- {2728, {wxMouseEvent, leftDClick, 0}},
- {2729, {wxMouseEvent, leftDown, 0}},
- {2730, {wxMouseEvent, leftIsDown, 0}},
- {2731, {wxMouseEvent, leftUp, 0}},
- {2732, {wxMouseEvent, metaDown, 0}},
- {2733, {wxMouseEvent, middleDClick, 0}},
- {2734, {wxMouseEvent, middleDown, 0}},
- {2735, {wxMouseEvent, middleIsDown, 0}},
- {2736, {wxMouseEvent, middleUp, 0}},
- {2737, {wxMouseEvent, moving, 0}},
- {2738, {wxMouseEvent, rightDClick, 0}},
- {2739, {wxMouseEvent, rightDown, 0}},
- {2740, {wxMouseEvent, rightIsDown, 0}},
- {2741, {wxMouseEvent, rightUp, 0}},
- {2742, {wxMouseEvent, shiftDown, 0}},
- {2743, {wxSetCursorEvent, getCursor, 0}},
- {2744, {wxSetCursorEvent, getX, 0}},
- {2745, {wxSetCursorEvent, getY, 0}},
- {2746, {wxSetCursorEvent, hasCursor, 0}},
- {2747, {wxSetCursorEvent, setCursor, 1}},
- {2748, {wxKeyEvent, altDown, 0}},
- {2749, {wxKeyEvent, cmdDown, 0}},
- {2750, {wxKeyEvent, controlDown, 0}},
- {2751, {wxKeyEvent, getKeyCode, 0}},
- {2752, {wxKeyEvent, getModifiers, 0}},
- {2755, {wxKeyEvent, getPosition, 0}},
- {2756, {wxKeyEvent, getRawKeyCode, 0}},
- {2757, {wxKeyEvent, getRawKeyFlags, 0}},
- {2758, {wxKeyEvent, getUnicodeKey, 0}},
- {2759, {wxKeyEvent, getX, 0}},
- {2760, {wxKeyEvent, getY, 0}},
- {2761, {wxKeyEvent, hasModifiers, 0}},
- {2762, {wxKeyEvent, metaDown, 0}},
- {2763, {wxKeyEvent, shiftDown, 0}},
- {2764, {wxSizeEvent, getSize, 0}},
- {2765, {wxMoveEvent, getPosition, 0}},
- {2766, {wxEraseEvent, getDC, 0}},
- {2767, {wxFocusEvent, getWindow, 0}},
- {2768, {wxChildFocusEvent, getWindow, 0}},
- {2769, {wxMenuEvent, getMenu, 0}},
- {2770, {wxMenuEvent, getMenuId, 0}},
- {2771, {wxMenuEvent, isPopup, 0}},
- {2772, {wxCloseEvent, canVeto, 0}},
- {2773, {wxCloseEvent, getLoggingOff, 0}},
- {2774, {wxCloseEvent, setCanVeto, 1}},
- {2775, {wxCloseEvent, setLoggingOff, 1}},
- {2776, {wxCloseEvent, veto, 1}},
- {2777, {wxShowEvent, setShow, 1}},
- {2778, {wxShowEvent, getShow, 0}},
- {2779, {wxIconizeEvent, iconized, 0}},
- {2780, {wxJoystickEvent, buttonDown, 1}},
- {2781, {wxJoystickEvent, buttonIsDown, 1}},
- {2782, {wxJoystickEvent, buttonUp, 1}},
- {2783, {wxJoystickEvent, getButtonChange, 0}},
- {2784, {wxJoystickEvent, getButtonState, 0}},
- {2785, {wxJoystickEvent, getJoystick, 0}},
- {2786, {wxJoystickEvent, getPosition, 0}},
- {2787, {wxJoystickEvent, getZPosition, 0}},
- {2788, {wxJoystickEvent, isButton, 0}},
- {2789, {wxJoystickEvent, isMove, 0}},
- {2790, {wxJoystickEvent, isZMove, 0}},
- {2791, {wxUpdateUIEvent, canUpdate, 1}},
- {2792, {wxUpdateUIEvent, check, 1}},
- {2793, {wxUpdateUIEvent, enable, 1}},
- {2794, {wxUpdateUIEvent, show, 1}},
- {2795, {wxUpdateUIEvent, getChecked, 0}},
- {2796, {wxUpdateUIEvent, getEnabled, 0}},
- {2797, {wxUpdateUIEvent, getShown, 0}},
- {2798, {wxUpdateUIEvent, getSetChecked, 0}},
- {2799, {wxUpdateUIEvent, getSetEnabled, 0}},
- {2800, {wxUpdateUIEvent, getSetShown, 0}},
- {2801, {wxUpdateUIEvent, getSetText, 0}},
- {2802, {wxUpdateUIEvent, getText, 0}},
- {2803, {wxUpdateUIEvent, getMode, 0}},
- {2804, {wxUpdateUIEvent, getUpdateInterval, 0}},
- {2805, {wxUpdateUIEvent, resetUpdateTime, 0}},
- {2806, {wxUpdateUIEvent, setMode, 1}},
- {2807, {wxUpdateUIEvent, setText, 1}},
- {2808, {wxUpdateUIEvent, setUpdateInterval, 1}},
- {2809, {wxMouseCaptureChangedEvent, getCapturedWindow, 0}},
- {2810, {wxPaletteChangedEvent, setChangedWindow, 1}},
- {2811, {wxPaletteChangedEvent, getChangedWindow, 0}},
- {2812, {wxQueryNewPaletteEvent, setPaletteRealized, 1}},
- {2813, {wxQueryNewPaletteEvent, getPaletteRealized, 0}},
- {2814, {wxNavigationKeyEvent, getDirection, 0}},
- {2815, {wxNavigationKeyEvent, setDirection, 1}},
- {2816, {wxNavigationKeyEvent, isWindowChange, 0}},
- {2817, {wxNavigationKeyEvent, setWindowChange, 1}},
- {2818, {wxNavigationKeyEvent, isFromTab, 0}},
- {2819, {wxNavigationKeyEvent, setFromTab, 1}},
- {2820, {wxNavigationKeyEvent, getCurrentFocus, 0}},
- {2821, {wxNavigationKeyEvent, setCurrentFocus, 1}},
- {2822, {wxHelpEvent, getOrigin, 0}},
- {2823, {wxHelpEvent, getPosition, 0}},
- {2824, {wxHelpEvent, setOrigin, 1}},
- {2825, {wxHelpEvent, setPosition, 1}},
- {2826, {wxContextMenuEvent, getPosition, 0}},
- {2827, {wxContextMenuEvent, setPosition, 1}},
- {2828, {wxIdleEvent, canSend, 1}},
- {2829, {wxIdleEvent, getMode, 0}},
- {2830, {wxIdleEvent, requestMore, 1}},
- {2831, {wxIdleEvent, moreRequested, 0}},
- {2832, {wxIdleEvent, setMode, 1}},
- {2833, {wxGridEvent, altDown, 0}},
- {2834, {wxGridEvent, controlDown, 0}},
- {2835, {wxGridEvent, getCol, 0}},
- {2836, {wxGridEvent, getPosition, 0}},
- {2837, {wxGridEvent, getRow, 0}},
- {2838, {wxGridEvent, metaDown, 0}},
- {2839, {wxGridEvent, selecting, 0}},
- {2840, {wxGridEvent, shiftDown, 0}},
- {2841, {wxNotifyEvent, allow, 0}},
- {2842, {wxNotifyEvent, isAllowed, 0}},
- {2843, {wxNotifyEvent, veto, 0}},
- {2844, {wxSashEvent, getEdge, 0}},
- {2845, {wxSashEvent, getDragRect, 0}},
- {2846, {wxSashEvent, getDragStatus, 0}},
- {2847, {wxListEvent, getCacheFrom, 0}},
- {2848, {wxListEvent, getCacheTo, 0}},
- {2849, {wxListEvent, getKeyCode, 0}},
- {2850, {wxListEvent, getIndex, 0}},
- {2851, {wxListEvent, getColumn, 0}},
- {2852, {wxListEvent, getPoint, 0}},
- {2853, {wxListEvent, getLabel, 0}},
- {2854, {wxListEvent, getText, 0}},
- {2855, {wxListEvent, getImage, 0}},
- {2856, {wxListEvent, getData, 0}},
- {2857, {wxListEvent, getMask, 0}},
- {2858, {wxListEvent, getItem, 0}},
- {2859, {wxListEvent, isEditCancelled, 0}},
- {2860, {wxDateEvent, getDate, 0}},
- {2861, {wxCalendarEvent, getWeekDay, 0}},
- {2862, {wxFileDirPickerEvent, getPath, 0}},
- {2863, {wxColourPickerEvent, getColour, 0}},
- {2864, {wxFontPickerEvent, getFont, 0}},
- {2865, {wxStyledTextEvent, getPosition, 0}},
- {2866, {wxStyledTextEvent, getKey, 0}},
- {2867, {wxStyledTextEvent, getModifiers, 0}},
- {2868, {wxStyledTextEvent, getModificationType, 0}},
- {2869, {wxStyledTextEvent, getText, 0}},
- {2870, {wxStyledTextEvent, getLength, 0}},
- {2871, {wxStyledTextEvent, getLinesAdded, 0}},
- {2872, {wxStyledTextEvent, getLine, 0}},
- {2873, {wxStyledTextEvent, getFoldLevelNow, 0}},
- {2874, {wxStyledTextEvent, getFoldLevelPrev, 0}},
- {2875, {wxStyledTextEvent, getMargin, 0}},
- {2876, {wxStyledTextEvent, getMessage, 0}},
- {2877, {wxStyledTextEvent, getWParam, 0}},
- {2878, {wxStyledTextEvent, getLParam, 0}},
- {2879, {wxStyledTextEvent, getListType, 0}},
- {2880, {wxStyledTextEvent, getX, 0}},
- {2881, {wxStyledTextEvent, getY, 0}},
- {2882, {wxStyledTextEvent, getDragText, 0}},
- {2883, {wxStyledTextEvent, getDragAllowMove, 0}},
- {2884, {wxStyledTextEvent, getDragResult, 0}},
- {2885, {wxStyledTextEvent, getShift, 0}},
- {2886, {wxStyledTextEvent, getControl, 0}},
- {2887, {wxStyledTextEvent, getAlt, 0}},
- {2888, {utils, getKeyState, 1}},
- {2889, {utils, getMousePosition, 2}},
- {2890, {utils, getMouseState, 0}},
- {2891, {utils, setDetectableAutoRepeat, 1}},
- {2892, {utils, bell, 0}},
- {2893, {utils, findMenuItemId, 3}},
- {2894, {utils, genericFindWindowAtPoint, 1}},
- {2895, {utils, findWindowAtPoint, 1}},
- {2896, {utils, beginBusyCursor, 1}},
- {2897, {utils, endBusyCursor, 0}},
- {2898, {utils, isBusy, 0}},
- {2899, {utils, shutdown, 1}},
- {2900, {utils, shell, 1}},
- {2901, {utils, launchDefaultBrowser, 2}},
- {2902, {utils, getEmailAddress, 0}},
- {2903, {utils, getUserId, 0}},
- {2904, {utils, getHomeDir, 0}},
- {2905, {utils, newId, 0}},
- {2906, {utils, registerId, 1}},
- {2907, {utils, getCurrentId, 0}},
- {2908, {utils, getOsDescription, 0}},
- {2909, {utils, isPlatformLittleEndian, 0}},
- {2910, {utils, isPlatform64Bit, 0}},
- {2911, {wxPrintout, new, 1}},
- {2912, {wxPrintout, destruct, 0}},
- {2913, {wxPrintout, getDC, 0}},
- {2914, {wxPrintout, getPageSizeMM, 2}},
- {2915, {wxPrintout, getPageSizePixels, 2}},
- {2916, {wxPrintout, getPaperRectPixels, 0}},
- {2917, {wxPrintout, getPPIPrinter, 2}},
- {2918, {wxPrintout, getPPIScreen, 2}},
- {2919, {wxPrintout, getTitle, 0}},
- {2920, {wxPrintout, isPreview, 0}},
- {2921, {wxPrintout, fitThisSizeToPaper, 1}},
- {2922, {wxPrintout, fitThisSizeToPage, 1}},
- {2923, {wxPrintout, fitThisSizeToPageMargins, 2}},
- {2924, {wxPrintout, mapScreenSizeToPaper, 0}},
- {2925, {wxPrintout, mapScreenSizeToPage, 0}},
- {2926, {wxPrintout, mapScreenSizeToPageMargins, 1}},
- {2927, {wxPrintout, mapScreenSizeToDevice, 0}},
- {2928, {wxPrintout, getLogicalPaperRect, 0}},
- {2929, {wxPrintout, getLogicalPageRect, 0}},
- {2930, {wxPrintout, getLogicalPageMarginsRect, 1}},
- {2931, {wxPrintout, setLogicalOrigin, 2}},
- {2932, {wxPrintout, offsetLogicalOrigin, 2}},
- {2933, {wxStyledTextCtrl, new_2, 2}},
- {2934, {wxStyledTextCtrl, new_0, 0}},
- {2935, {wxStyledTextCtrl, destruct, 0}},
- {2936, {wxStyledTextCtrl, create, 2}},
- {2937, {wxStyledTextCtrl, addText, 1}},
- {2938, {wxStyledTextCtrl, addStyledText, 1}},
- {2939, {wxStyledTextCtrl, insertText, 2}},
- {2940, {wxStyledTextCtrl, clearAll, 0}},
- {2941, {wxStyledTextCtrl, clearDocumentStyle, 0}},
- {2942, {wxStyledTextCtrl, getLength, 0}},
- {2943, {wxStyledTextCtrl, getCharAt, 1}},
- {2944, {wxStyledTextCtrl, getCurrentPos, 0}},
- {2945, {wxStyledTextCtrl, getAnchor, 0}},
- {2946, {wxStyledTextCtrl, getStyleAt, 1}},
- {2947, {wxStyledTextCtrl, redo, 0}},
- {2948, {wxStyledTextCtrl, setUndoCollection, 1}},
- {2949, {wxStyledTextCtrl, selectAll, 0}},
- {2950, {wxStyledTextCtrl, setSavePoint, 0}},
- {2951, {wxStyledTextCtrl, getStyledText, 2}},
- {2952, {wxStyledTextCtrl, canRedo, 0}},
- {2953, {wxStyledTextCtrl, markerLineFromHandle, 1}},
- {2954, {wxStyledTextCtrl, markerDeleteHandle, 1}},
- {2955, {wxStyledTextCtrl, getUndoCollection, 0}},
- {2956, {wxStyledTextCtrl, getViewWhiteSpace, 0}},
- {2957, {wxStyledTextCtrl, setViewWhiteSpace, 1}},
- {2958, {wxStyledTextCtrl, positionFromPoint, 1}},
- {2959, {wxStyledTextCtrl, positionFromPointClose, 2}},
- {2960, {wxStyledTextCtrl, gotoLine, 1}},
- {2961, {wxStyledTextCtrl, gotoPos, 1}},
- {2962, {wxStyledTextCtrl, setAnchor, 1}},
- {2963, {wxStyledTextCtrl, getCurLine, 1}},
- {2964, {wxStyledTextCtrl, getEndStyled, 0}},
- {2965, {wxStyledTextCtrl, convertEOLs, 1}},
- {2966, {wxStyledTextCtrl, getEOLMode, 0}},
- {2967, {wxStyledTextCtrl, setEOLMode, 1}},
- {2968, {wxStyledTextCtrl, startStyling, 2}},
- {2969, {wxStyledTextCtrl, setStyling, 2}},
- {2970, {wxStyledTextCtrl, getBufferedDraw, 0}},
- {2971, {wxStyledTextCtrl, setBufferedDraw, 1}},
- {2972, {wxStyledTextCtrl, setTabWidth, 1}},
- {2973, {wxStyledTextCtrl, getTabWidth, 0}},
- {2974, {wxStyledTextCtrl, setCodePage, 1}},
- {2975, {wxStyledTextCtrl, markerDefine, 3}},
- {2976, {wxStyledTextCtrl, markerSetForeground, 2}},
- {2977, {wxStyledTextCtrl, markerSetBackground, 2}},
- {2978, {wxStyledTextCtrl, markerAdd, 2}},
- {2979, {wxStyledTextCtrl, markerDelete, 2}},
- {2980, {wxStyledTextCtrl, markerDeleteAll, 1}},
- {2981, {wxStyledTextCtrl, markerGet, 1}},
- {2982, {wxStyledTextCtrl, markerNext, 2}},
- {2983, {wxStyledTextCtrl, markerPrevious, 2}},
- {2984, {wxStyledTextCtrl, markerDefineBitmap, 2}},
- {2985, {wxStyledTextCtrl, markerAddSet, 2}},
- {2986, {wxStyledTextCtrl, markerSetAlpha, 2}},
- {2987, {wxStyledTextCtrl, setMarginType, 2}},
- {2988, {wxStyledTextCtrl, getMarginType, 1}},
- {2989, {wxStyledTextCtrl, setMarginWidth, 2}},
- {2990, {wxStyledTextCtrl, getMarginWidth, 1}},
- {2991, {wxStyledTextCtrl, setMarginMask, 2}},
- {2992, {wxStyledTextCtrl, getMarginMask, 1}},
- {2993, {wxStyledTextCtrl, setMarginSensitive, 2}},
- {2994, {wxStyledTextCtrl, getMarginSensitive, 1}},
- {2995, {wxStyledTextCtrl, styleClearAll, 0}},
- {2996, {wxStyledTextCtrl, styleSetForeground, 2}},
- {2997, {wxStyledTextCtrl, styleSetBackground, 2}},
- {2998, {wxStyledTextCtrl, styleSetBold, 2}},
- {2999, {wxStyledTextCtrl, styleSetItalic, 2}},
- {3000, {wxStyledTextCtrl, styleSetSize, 2}},
- {3001, {wxStyledTextCtrl, styleSetFaceName, 2}},
- {3002, {wxStyledTextCtrl, styleSetEOLFilled, 2}},
- {3003, {wxStyledTextCtrl, styleResetDefault, 0}},
- {3004, {wxStyledTextCtrl, styleSetUnderline, 2}},
- {3005, {wxStyledTextCtrl, styleSetCase, 2}},
- {3006, {wxStyledTextCtrl, styleSetHotSpot, 2}},
- {3007, {wxStyledTextCtrl, setSelForeground, 2}},
- {3008, {wxStyledTextCtrl, setSelBackground, 2}},
- {3009, {wxStyledTextCtrl, getSelAlpha, 0}},
- {3010, {wxStyledTextCtrl, setSelAlpha, 1}},
- {3011, {wxStyledTextCtrl, setCaretForeground, 1}},
- {3012, {wxStyledTextCtrl, cmdKeyAssign, 3}},
- {3013, {wxStyledTextCtrl, cmdKeyClear, 2}},
- {3014, {wxStyledTextCtrl, cmdKeyClearAll, 0}},
- {3015, {wxStyledTextCtrl, setStyleBytes, 2}},
- {3016, {wxStyledTextCtrl, styleSetVisible, 2}},
- {3017, {wxStyledTextCtrl, getCaretPeriod, 0}},
- {3018, {wxStyledTextCtrl, setCaretPeriod, 1}},
- {3019, {wxStyledTextCtrl, setWordChars, 1}},
- {3020, {wxStyledTextCtrl, beginUndoAction, 0}},
- {3021, {wxStyledTextCtrl, endUndoAction, 0}},
- {3022, {wxStyledTextCtrl, indicatorSetStyle, 2}},
- {3023, {wxStyledTextCtrl, indicatorGetStyle, 1}},
- {3024, {wxStyledTextCtrl, indicatorSetForeground, 2}},
- {3025, {wxStyledTextCtrl, indicatorGetForeground, 1}},
- {3026, {wxStyledTextCtrl, setWhitespaceForeground, 2}},
- {3027, {wxStyledTextCtrl, setWhitespaceBackground, 2}},
- {3028, {wxStyledTextCtrl, getStyleBits, 0}},
- {3029, {wxStyledTextCtrl, setLineState, 2}},
- {3030, {wxStyledTextCtrl, getLineState, 1}},
- {3031, {wxStyledTextCtrl, getMaxLineState, 0}},
- {3032, {wxStyledTextCtrl, getCaretLineVisible, 0}},
- {3033, {wxStyledTextCtrl, setCaretLineVisible, 1}},
- {3034, {wxStyledTextCtrl, getCaretLineBackground, 0}},
- {3035, {wxStyledTextCtrl, setCaretLineBackground, 1}},
- {3036, {wxStyledTextCtrl, autoCompShow, 2}},
- {3037, {wxStyledTextCtrl, autoCompCancel, 0}},
- {3038, {wxStyledTextCtrl, autoCompActive, 0}},
- {3039, {wxStyledTextCtrl, autoCompPosStart, 0}},
- {3040, {wxStyledTextCtrl, autoCompComplete, 0}},
- {3041, {wxStyledTextCtrl, autoCompStops, 1}},
- {3042, {wxStyledTextCtrl, autoCompSetSeparator, 1}},
- {3043, {wxStyledTextCtrl, autoCompGetSeparator, 0}},
- {3044, {wxStyledTextCtrl, autoCompSelect, 1}},
- {3045, {wxStyledTextCtrl, autoCompSetCancelAtStart, 1}},
- {3046, {wxStyledTextCtrl, autoCompGetCancelAtStart, 0}},
- {3047, {wxStyledTextCtrl, autoCompSetFillUps, 1}},
- {3048, {wxStyledTextCtrl, autoCompSetChooseSingle, 1}},
- {3049, {wxStyledTextCtrl, autoCompGetChooseSingle, 0}},
- {3050, {wxStyledTextCtrl, autoCompSetIgnoreCase, 1}},
- {3051, {wxStyledTextCtrl, autoCompGetIgnoreCase, 0}},
- {3052, {wxStyledTextCtrl, userListShow, 2}},
- {3053, {wxStyledTextCtrl, autoCompSetAutoHide, 1}},
- {3054, {wxStyledTextCtrl, autoCompGetAutoHide, 0}},
- {3055, {wxStyledTextCtrl, autoCompSetDropRestOfWord, 1}},
- {3056, {wxStyledTextCtrl, autoCompGetDropRestOfWord, 0}},
- {3057, {wxStyledTextCtrl, registerImage, 2}},
- {3058, {wxStyledTextCtrl, clearRegisteredImages, 0}},
- {3059, {wxStyledTextCtrl, autoCompGetTypeSeparator, 0}},
- {3060, {wxStyledTextCtrl, autoCompSetTypeSeparator, 1}},
- {3061, {wxStyledTextCtrl, autoCompSetMaxWidth, 1}},
- {3062, {wxStyledTextCtrl, autoCompGetMaxWidth, 0}},
- {3063, {wxStyledTextCtrl, autoCompSetMaxHeight, 1}},
- {3064, {wxStyledTextCtrl, autoCompGetMaxHeight, 0}},
- {3065, {wxStyledTextCtrl, setIndent, 1}},
- {3066, {wxStyledTextCtrl, getIndent, 0}},
- {3067, {wxStyledTextCtrl, setUseTabs, 1}},
- {3068, {wxStyledTextCtrl, getUseTabs, 0}},
- {3069, {wxStyledTextCtrl, setLineIndentation, 2}},
- {3070, {wxStyledTextCtrl, getLineIndentation, 1}},
- {3071, {wxStyledTextCtrl, getLineIndentPosition, 1}},
- {3072, {wxStyledTextCtrl, getColumn, 1}},
- {3073, {wxStyledTextCtrl, setUseHorizontalScrollBar, 1}},
- {3074, {wxStyledTextCtrl, getUseHorizontalScrollBar, 0}},
- {3075, {wxStyledTextCtrl, setIndentationGuides, 1}},
- {3076, {wxStyledTextCtrl, getIndentationGuides, 0}},
- {3077, {wxStyledTextCtrl, setHighlightGuide, 1}},
- {3078, {wxStyledTextCtrl, getHighlightGuide, 0}},
- {3079, {wxStyledTextCtrl, getLineEndPosition, 1}},
- {3080, {wxStyledTextCtrl, getCodePage, 0}},
- {3081, {wxStyledTextCtrl, getCaretForeground, 0}},
- {3082, {wxStyledTextCtrl, getReadOnly, 0}},
- {3083, {wxStyledTextCtrl, setCurrentPos, 1}},
- {3084, {wxStyledTextCtrl, setSelectionStart, 1}},
- {3085, {wxStyledTextCtrl, getSelectionStart, 0}},
- {3086, {wxStyledTextCtrl, setSelectionEnd, 1}},
- {3087, {wxStyledTextCtrl, getSelectionEnd, 0}},
- {3088, {wxStyledTextCtrl, setPrintMagnification, 1}},
- {3089, {wxStyledTextCtrl, getPrintMagnification, 0}},
- {3090, {wxStyledTextCtrl, setPrintColourMode, 1}},
- {3091, {wxStyledTextCtrl, getPrintColourMode, 0}},
- {3092, {wxStyledTextCtrl, findText, 4}},
- {3093, {wxStyledTextCtrl, formatRange, 7}},
- {3094, {wxStyledTextCtrl, getFirstVisibleLine, 0}},
- {3095, {wxStyledTextCtrl, getLine, 1}},
- {3096, {wxStyledTextCtrl, getLineCount, 0}},
- {3097, {wxStyledTextCtrl, setMarginLeft, 1}},
- {3098, {wxStyledTextCtrl, getMarginLeft, 0}},
- {3099, {wxStyledTextCtrl, setMarginRight, 1}},
- {3100, {wxStyledTextCtrl, getMarginRight, 0}},
- {3101, {wxStyledTextCtrl, getModify, 0}},
- {3102, {wxStyledTextCtrl, setSelection, 2}},
- {3103, {wxStyledTextCtrl, getSelectedText, 0}},
- {3104, {wxStyledTextCtrl, getTextRange, 2}},
- {3105, {wxStyledTextCtrl, hideSelection, 1}},
- {3106, {wxStyledTextCtrl, lineFromPosition, 1}},
- {3107, {wxStyledTextCtrl, positionFromLine, 1}},
- {3108, {wxStyledTextCtrl, lineScroll, 2}},
- {3109, {wxStyledTextCtrl, ensureCaretVisible, 0}},
- {3110, {wxStyledTextCtrl, replaceSelection, 1}},
- {3111, {wxStyledTextCtrl, setReadOnly, 1}},
- {3112, {wxStyledTextCtrl, canPaste, 0}},
- {3113, {wxStyledTextCtrl, canUndo, 0}},
- {3114, {wxStyledTextCtrl, emptyUndoBuffer, 0}},
- {3115, {wxStyledTextCtrl, undo, 0}},
- {3116, {wxStyledTextCtrl, cut, 0}},
- {3117, {wxStyledTextCtrl, copy, 0}},
- {3118, {wxStyledTextCtrl, paste, 0}},
- {3119, {wxStyledTextCtrl, clear, 0}},
- {3120, {wxStyledTextCtrl, setText, 1}},
- {3121, {wxStyledTextCtrl, getText, 0}},
- {3122, {wxStyledTextCtrl, getTextLength, 0}},
- {3123, {wxStyledTextCtrl, getOvertype, 0}},
- {3124, {wxStyledTextCtrl, setCaretWidth, 1}},
- {3125, {wxStyledTextCtrl, getCaretWidth, 0}},
- {3126, {wxStyledTextCtrl, setTargetStart, 1}},
- {3127, {wxStyledTextCtrl, getTargetStart, 0}},
- {3128, {wxStyledTextCtrl, setTargetEnd, 1}},
- {3129, {wxStyledTextCtrl, getTargetEnd, 0}},
- {3130, {wxStyledTextCtrl, replaceTarget, 1}},
- {3131, {wxStyledTextCtrl, searchInTarget, 1}},
- {3132, {wxStyledTextCtrl, setSearchFlags, 1}},
- {3133, {wxStyledTextCtrl, getSearchFlags, 0}},
- {3134, {wxStyledTextCtrl, callTipShow, 2}},
- {3135, {wxStyledTextCtrl, callTipCancel, 0}},
- {3136, {wxStyledTextCtrl, callTipActive, 0}},
- {3137, {wxStyledTextCtrl, callTipPosAtStart, 0}},
- {3138, {wxStyledTextCtrl, callTipSetHighlight, 2}},
- {3139, {wxStyledTextCtrl, callTipSetBackground, 1}},
- {3140, {wxStyledTextCtrl, callTipSetForeground, 1}},
- {3141, {wxStyledTextCtrl, callTipSetForegroundHighlight, 1}},
- {3142, {wxStyledTextCtrl, callTipUseStyle, 1}},
- {3143, {wxStyledTextCtrl, visibleFromDocLine, 1}},
- {3144, {wxStyledTextCtrl, docLineFromVisible, 1}},
- {3145, {wxStyledTextCtrl, wrapCount, 1}},
- {3146, {wxStyledTextCtrl, setFoldLevel, 2}},
- {3147, {wxStyledTextCtrl, getFoldLevel, 1}},
- {3148, {wxStyledTextCtrl, getLastChild, 2}},
- {3149, {wxStyledTextCtrl, getFoldParent, 1}},
- {3150, {wxStyledTextCtrl, showLines, 2}},
- {3151, {wxStyledTextCtrl, hideLines, 2}},
- {3152, {wxStyledTextCtrl, getLineVisible, 1}},
- {3153, {wxStyledTextCtrl, setFoldExpanded, 2}},
- {3154, {wxStyledTextCtrl, getFoldExpanded, 1}},
- {3155, {wxStyledTextCtrl, toggleFold, 1}},
- {3156, {wxStyledTextCtrl, ensureVisible, 1}},
- {3157, {wxStyledTextCtrl, setFoldFlags, 1}},
- {3158, {wxStyledTextCtrl, ensureVisibleEnforcePolicy, 1}},
- {3159, {wxStyledTextCtrl, setTabIndents, 1}},
- {3160, {wxStyledTextCtrl, getTabIndents, 0}},
- {3161, {wxStyledTextCtrl, setBackSpaceUnIndents, 1}},
- {3162, {wxStyledTextCtrl, getBackSpaceUnIndents, 0}},
- {3163, {wxStyledTextCtrl, setMouseDwellTime, 1}},
- {3164, {wxStyledTextCtrl, getMouseDwellTime, 0}},
- {3165, {wxStyledTextCtrl, wordStartPosition, 2}},
- {3166, {wxStyledTextCtrl, wordEndPosition, 2}},
- {3167, {wxStyledTextCtrl, setWrapMode, 1}},
- {3168, {wxStyledTextCtrl, getWrapMode, 0}},
- {3169, {wxStyledTextCtrl, setWrapVisualFlags, 1}},
- {3170, {wxStyledTextCtrl, getWrapVisualFlags, 0}},
- {3171, {wxStyledTextCtrl, setWrapVisualFlagsLocation, 1}},
- {3172, {wxStyledTextCtrl, getWrapVisualFlagsLocation, 0}},
- {3173, {wxStyledTextCtrl, setWrapStartIndent, 1}},
- {3174, {wxStyledTextCtrl, getWrapStartIndent, 0}},
- {3175, {wxStyledTextCtrl, setLayoutCache, 1}},
- {3176, {wxStyledTextCtrl, getLayoutCache, 0}},
- {3177, {wxStyledTextCtrl, setScrollWidth, 1}},
- {3178, {wxStyledTextCtrl, getScrollWidth, 0}},
- {3179, {wxStyledTextCtrl, textWidth, 2}},
- {3180, {wxStyledTextCtrl, getEndAtLastLine, 0}},
- {3181, {wxStyledTextCtrl, textHeight, 1}},
- {3182, {wxStyledTextCtrl, setUseVerticalScrollBar, 1}},
- {3183, {wxStyledTextCtrl, getUseVerticalScrollBar, 0}},
- {3184, {wxStyledTextCtrl, appendText, 1}},
- {3185, {wxStyledTextCtrl, getTwoPhaseDraw, 0}},
- {3186, {wxStyledTextCtrl, setTwoPhaseDraw, 1}},
- {3187, {wxStyledTextCtrl, targetFromSelection, 0}},
- {3188, {wxStyledTextCtrl, linesJoin, 0}},
- {3189, {wxStyledTextCtrl, linesSplit, 1}},
- {3190, {wxStyledTextCtrl, setFoldMarginColour, 2}},
- {3191, {wxStyledTextCtrl, setFoldMarginHiColour, 2}},
- {3192, {wxStyledTextCtrl, lineDown, 0}},
- {3193, {wxStyledTextCtrl, lineDownExtend, 0}},
- {3194, {wxStyledTextCtrl, lineUp, 0}},
- {3195, {wxStyledTextCtrl, lineUpExtend, 0}},
- {3196, {wxStyledTextCtrl, charLeft, 0}},
- {3197, {wxStyledTextCtrl, charLeftExtend, 0}},
- {3198, {wxStyledTextCtrl, charRight, 0}},
- {3199, {wxStyledTextCtrl, charRightExtend, 0}},
- {3200, {wxStyledTextCtrl, wordLeft, 0}},
- {3201, {wxStyledTextCtrl, wordLeftExtend, 0}},
- {3202, {wxStyledTextCtrl, wordRight, 0}},
- {3203, {wxStyledTextCtrl, wordRightExtend, 0}},
- {3204, {wxStyledTextCtrl, home, 0}},
- {3205, {wxStyledTextCtrl, homeExtend, 0}},
- {3206, {wxStyledTextCtrl, lineEnd, 0}},
- {3207, {wxStyledTextCtrl, lineEndExtend, 0}},
- {3208, {wxStyledTextCtrl, documentStart, 0}},
- {3209, {wxStyledTextCtrl, documentStartExtend, 0}},
- {3210, {wxStyledTextCtrl, documentEnd, 0}},
- {3211, {wxStyledTextCtrl, documentEndExtend, 0}},
- {3212, {wxStyledTextCtrl, pageUp, 0}},
- {3213, {wxStyledTextCtrl, pageUpExtend, 0}},
- {3214, {wxStyledTextCtrl, pageDown, 0}},
- {3215, {wxStyledTextCtrl, pageDownExtend, 0}},
- {3216, {wxStyledTextCtrl, editToggleOvertype, 0}},
- {3217, {wxStyledTextCtrl, cancel, 0}},
- {3218, {wxStyledTextCtrl, deleteBack, 0}},
- {3219, {wxStyledTextCtrl, tab, 0}},
- {3220, {wxStyledTextCtrl, backTab, 0}},
- {3221, {wxStyledTextCtrl, newLine, 0}},
- {3222, {wxStyledTextCtrl, formFeed, 0}},
- {3223, {wxStyledTextCtrl, vCHome, 0}},
- {3224, {wxStyledTextCtrl, vCHomeExtend, 0}},
- {3225, {wxStyledTextCtrl, zoomIn, 0}},
- {3226, {wxStyledTextCtrl, zoomOut, 0}},
- {3227, {wxStyledTextCtrl, delWordLeft, 0}},
- {3228, {wxStyledTextCtrl, delWordRight, 0}},
- {3229, {wxStyledTextCtrl, lineCut, 0}},
- {3230, {wxStyledTextCtrl, lineDelete, 0}},
- {3231, {wxStyledTextCtrl, lineTranspose, 0}},
- {3232, {wxStyledTextCtrl, lineDuplicate, 0}},
- {3233, {wxStyledTextCtrl, lowerCase, 0}},
- {3234, {wxStyledTextCtrl, upperCase, 0}},
- {3235, {wxStyledTextCtrl, lineScrollDown, 0}},
- {3236, {wxStyledTextCtrl, lineScrollUp, 0}},
- {3237, {wxStyledTextCtrl, deleteBackNotLine, 0}},
- {3238, {wxStyledTextCtrl, homeDisplay, 0}},
- {3239, {wxStyledTextCtrl, homeDisplayExtend, 0}},
- {3240, {wxStyledTextCtrl, lineEndDisplay, 0}},
- {3241, {wxStyledTextCtrl, lineEndDisplayExtend, 0}},
- {3242, {wxStyledTextCtrl, homeWrapExtend, 0}},
- {3243, {wxStyledTextCtrl, lineEndWrap, 0}},
- {3244, {wxStyledTextCtrl, lineEndWrapExtend, 0}},
- {3245, {wxStyledTextCtrl, vCHomeWrap, 0}},
- {3246, {wxStyledTextCtrl, vCHomeWrapExtend, 0}},
- {3247, {wxStyledTextCtrl, lineCopy, 0}},
- {3248, {wxStyledTextCtrl, moveCaretInsideView, 0}},
- {3249, {wxStyledTextCtrl, lineLength, 1}},
- {3250, {wxStyledTextCtrl, braceHighlight, 2}},
- {3251, {wxStyledTextCtrl, braceBadLight, 1}},
- {3252, {wxStyledTextCtrl, braceMatch, 1}},
- {3253, {wxStyledTextCtrl, getViewEOL, 0}},
- {3254, {wxStyledTextCtrl, setViewEOL, 1}},
- {3255, {wxStyledTextCtrl, setModEventMask, 1}},
- {3256, {wxStyledTextCtrl, getEdgeColumn, 0}},
- {3257, {wxStyledTextCtrl, setEdgeColumn, 1}},
- {3258, {wxStyledTextCtrl, getEdgeMode, 0}},
- {3259, {wxStyledTextCtrl, getEdgeColour, 0}},
- {3260, {wxStyledTextCtrl, setEdgeColour, 1}},
- {3261, {wxStyledTextCtrl, searchAnchor, 0}},
- {3262, {wxStyledTextCtrl, searchNext, 2}},
- {3263, {wxStyledTextCtrl, searchPrev, 2}},
- {3264, {wxStyledTextCtrl, linesOnScreen, 0}},
- {3265, {wxStyledTextCtrl, usePopUp, 1}},
- {3266, {wxStyledTextCtrl, selectionIsRectangle, 0}},
- {3267, {wxStyledTextCtrl, setZoom, 1}},
- {3268, {wxStyledTextCtrl, getZoom, 0}},
- {3269, {wxStyledTextCtrl, getModEventMask, 0}},
- {3270, {wxStyledTextCtrl, setSTCFocus, 1}},
- {3271, {wxStyledTextCtrl, getSTCFocus, 0}},
- {3272, {wxStyledTextCtrl, setStatus, 1}},
- {3273, {wxStyledTextCtrl, getStatus, 0}},
- {3274, {wxStyledTextCtrl, setMouseDownCaptures, 1}},
- {3275, {wxStyledTextCtrl, getMouseDownCaptures, 0}},
- {3276, {wxStyledTextCtrl, setSTCCursor, 1}},
- {3277, {wxStyledTextCtrl, getSTCCursor, 0}},
- {3278, {wxStyledTextCtrl, setControlCharSymbol, 1}},
- {3279, {wxStyledTextCtrl, getControlCharSymbol, 0}},
- {3280, {wxStyledTextCtrl, wordPartLeft, 0}},
- {3281, {wxStyledTextCtrl, wordPartLeftExtend, 0}},
- {3282, {wxStyledTextCtrl, wordPartRight, 0}},
- {3283, {wxStyledTextCtrl, wordPartRightExtend, 0}},
- {3284, {wxStyledTextCtrl, setVisiblePolicy, 2}},
- {3285, {wxStyledTextCtrl, delLineLeft, 0}},
- {3286, {wxStyledTextCtrl, delLineRight, 0}},
- {3287, {wxStyledTextCtrl, getXOffset, 0}},
- {3288, {wxStyledTextCtrl, chooseCaretX, 0}},
- {3289, {wxStyledTextCtrl, setXCaretPolicy, 2}},
- {3290, {wxStyledTextCtrl, setYCaretPolicy, 2}},
- {3291, {wxStyledTextCtrl, getPrintWrapMode, 0}},
- {3292, {wxStyledTextCtrl, setHotspotActiveForeground, 2}},
- {3293, {wxStyledTextCtrl, setHotspotActiveBackground, 2}},
- {3294, {wxStyledTextCtrl, setHotspotActiveUnderline, 1}},
- {3295, {wxStyledTextCtrl, setHotspotSingleLine, 1}},
- {3296, {wxStyledTextCtrl, paraDownExtend, 0}},
- {3297, {wxStyledTextCtrl, paraUp, 0}},
- {3298, {wxStyledTextCtrl, paraUpExtend, 0}},
- {3299, {wxStyledTextCtrl, positionBefore, 1}},
- {3300, {wxStyledTextCtrl, positionAfter, 1}},
- {3301, {wxStyledTextCtrl, copyRange, 2}},
- {3302, {wxStyledTextCtrl, copyText, 2}},
- {3303, {wxStyledTextCtrl, setSelectionMode, 1}},
- {3304, {wxStyledTextCtrl, getSelectionMode, 0}},
- {3305, {wxStyledTextCtrl, lineDownRectExtend, 0}},
- {3306, {wxStyledTextCtrl, lineUpRectExtend, 0}},
- {3307, {wxStyledTextCtrl, charLeftRectExtend, 0}},
- {3308, {wxStyledTextCtrl, charRightRectExtend, 0}},
- {3309, {wxStyledTextCtrl, homeRectExtend, 0}},
- {3310, {wxStyledTextCtrl, vCHomeRectExtend, 0}},
- {3311, {wxStyledTextCtrl, lineEndRectExtend, 0}},
- {3312, {wxStyledTextCtrl, pageUpRectExtend, 0}},
- {3313, {wxStyledTextCtrl, pageDownRectExtend, 0}},
- {3314, {wxStyledTextCtrl, stutteredPageUp, 0}},
- {3315, {wxStyledTextCtrl, stutteredPageUpExtend, 0}},
- {3316, {wxStyledTextCtrl, stutteredPageDown, 0}},
- {3317, {wxStyledTextCtrl, stutteredPageDownExtend, 0}},
- {3318, {wxStyledTextCtrl, wordLeftEnd, 0}},
- {3319, {wxStyledTextCtrl, wordLeftEndExtend, 0}},
- {3320, {wxStyledTextCtrl, wordRightEnd, 0}},
- {3321, {wxStyledTextCtrl, wordRightEndExtend, 0}},
- {3322, {wxStyledTextCtrl, setWhitespaceChars, 1}},
- {3323, {wxStyledTextCtrl, setCharsDefault, 0}},
- {3324, {wxStyledTextCtrl, autoCompGetCurrent, 0}},
- {3325, {wxStyledTextCtrl, allocate, 1}},
- {3326, {wxStyledTextCtrl, findColumn, 2}},
- {3327, {wxStyledTextCtrl, getCaretSticky, 0}},
- {3328, {wxStyledTextCtrl, setCaretSticky, 1}},
- {3329, {wxStyledTextCtrl, toggleCaretSticky, 0}},
- {3330, {wxStyledTextCtrl, setPasteConvertEndings, 1}},
- {3331, {wxStyledTextCtrl, getPasteConvertEndings, 0}},
- {3332, {wxStyledTextCtrl, selectionDuplicate, 0}},
- {3333, {wxStyledTextCtrl, setCaretLineBackAlpha, 1}},
- {3334, {wxStyledTextCtrl, getCaretLineBackAlpha, 0}},
- {3335, {wxStyledTextCtrl, startRecord, 0}},
- {3336, {wxStyledTextCtrl, stopRecord, 0}},
- {3337, {wxStyledTextCtrl, setLexer, 1}},
- {3338, {wxStyledTextCtrl, getLexer, 0}},
- {3339, {wxStyledTextCtrl, colourise, 2}},
- {3340, {wxStyledTextCtrl, setProperty, 2}},
- {3341, {wxStyledTextCtrl, setKeyWords, 2}},
- {3342, {wxStyledTextCtrl, setLexerLanguage, 1}},
- {3343, {wxStyledTextCtrl, getProperty, 1}},
- {3344, {wxStyledTextCtrl, getStyleBitsNeeded, 0}},
- {3345, {wxStyledTextCtrl, getCurrentLine, 0}},
- {3346, {wxStyledTextCtrl, styleSetSpec, 2}},
- {3347, {wxStyledTextCtrl, styleSetFont, 2}},
- {3348, {wxStyledTextCtrl, styleSetFontAttr, 7}},
- {3349, {wxStyledTextCtrl, styleSetCharacterSet, 2}},
- {3350, {wxStyledTextCtrl, styleSetFontEncoding, 2}},
- {3351, {wxStyledTextCtrl, cmdKeyExecute, 1}},
- {3352, {wxStyledTextCtrl, setMargins, 2}},
- {3353, {wxStyledTextCtrl, getSelection, 2}},
- {3354, {wxStyledTextCtrl, pointFromPosition, 1}},
- {3355, {wxStyledTextCtrl, scrollToLine, 1}},
- {3356, {wxStyledTextCtrl, scrollToColumn, 1}},
- {3357, {wxStyledTextCtrl, sendMsg, 2}},
- {3358, {wxStyledTextCtrl, setVScrollBar, 1}},
- {3359, {wxStyledTextCtrl, setHScrollBar, 1}},
- {3360, {wxStyledTextCtrl, getLastKeydownProcessed, 0}},
- {3361, {wxStyledTextCtrl, setLastKeydownProcessed, 1}},
- {3362, {wxStyledTextCtrl, saveFile, 1}},
- {3363, {wxStyledTextCtrl, loadFile, 1}},
- {3364, {wxStyledTextCtrl, doDragOver, 3}},
- {3365, {wxStyledTextCtrl, doDropText, 3}},
- {3366, {wxStyledTextCtrl, getUseAntiAliasing, 0}},
- {3367, {wxStyledTextCtrl, addTextRaw, 1}},
- {3368, {wxStyledTextCtrl, insertTextRaw, 2}},
- {3369, {wxStyledTextCtrl, getCurLineRaw, 1}},
- {3370, {wxStyledTextCtrl, getLineRaw, 1}},
- {3371, {wxStyledTextCtrl, getSelectedTextRaw, 0}},
- {3372, {wxStyledTextCtrl, getTextRangeRaw, 2}},
- {3373, {wxStyledTextCtrl, setTextRaw, 1}},
- {3374, {wxStyledTextCtrl, getTextRaw, 0}},
- {3375, {wxStyledTextCtrl, appendTextRaw, 1}},
- {3376, {wxArtProvider, getBitmap, 2}},
- {3377, {wxArtProvider, getIcon, 2}},
- {3378, {wxTreeEvent, getKeyCode, 0}},
- {3379, {wxTreeEvent, getItem, 0}},
- {3380, {wxTreeEvent, getKeyEvent, 0}},
- {3381, {wxTreeEvent, getLabel, 0}},
- {3382, {wxTreeEvent, getOldItem, 0}},
- {3383, {wxTreeEvent, getPoint, 0}},
- {3384, {wxTreeEvent, isEditCancelled, 0}},
- {3385, {wxTreeEvent, setToolTip, 1}},
- {3386, {wxNotebookEvent, getOldSelection, 0}},
- {3387, {wxNotebookEvent, getSelection, 0}},
- {3388, {wxNotebookEvent, setOldSelection, 1}},
- {3389, {wxNotebookEvent, setSelection, 1}},
- {3390, {wxFileDataObject, new, 0}},
- {3391, {wxFileDataObject, addFile, 1}},
- {3392, {wxFileDataObject, getFilenames, 0}},
- {3393, {wxFileDataObject, 'Destroy', undefined}},
- {3394, {wxTextDataObject, new, 1}},
- {3395, {wxTextDataObject, getTextLength, 0}},
- {3396, {wxTextDataObject, getText, 0}},
- {3397, {wxTextDataObject, setText, 1}},
- {3398, {wxTextDataObject, 'Destroy', undefined}},
- {3399, {wxBitmapDataObject, new_1_1, 1}},
- {3400, {wxBitmapDataObject, new_1_0, 1}},
- {3401, {wxBitmapDataObject, getBitmap, 0}},
- {3402, {wxBitmapDataObject, setBitmap, 1}},
- {3403, {wxBitmapDataObject, 'Destroy', undefined}},
- {3405, {wxClipboard, new, 0}},
- {3406, {wxClipboard, destruct, 0}},
- {3407, {wxClipboard, addData, 1}},
- {3408, {wxClipboard, clear, 0}},
- {3409, {wxClipboard, close, 0}},
- {3410, {wxClipboard, flush, 0}},
- {3411, {wxClipboard, getData, 1}},
- {3412, {wxClipboard, isOpened, 0}},
- {3413, {wxClipboard, open, 0}},
- {3414, {wxClipboard, setData, 1}},
- {3416, {wxClipboard, usePrimarySelection, 1}},
- {3417, {wxClipboard, isSupported, 1}},
- {3418, {wxClipboard, get, 0}},
- {3419, {wxSpinEvent, getPosition, 0}},
- {3420, {wxSpinEvent, setPosition, 1}},
- {3421, {wxSplitterWindow, new_0, 0}},
- {3422, {wxSplitterWindow, new_2, 2}},
- {3423, {wxSplitterWindow, destruct, 0}},
- {3424, {wxSplitterWindow, create, 2}},
- {3425, {wxSplitterWindow, getMinimumPaneSize, 0}},
- {3426, {wxSplitterWindow, getSashGravity, 0}},
- {3427, {wxSplitterWindow, getSashPosition, 0}},
- {3428, {wxSplitterWindow, getSplitMode, 0}},
- {3429, {wxSplitterWindow, getWindow1, 0}},
- {3430, {wxSplitterWindow, getWindow2, 0}},
- {3431, {wxSplitterWindow, initialize, 1}},
- {3432, {wxSplitterWindow, isSplit, 0}},
- {3433, {wxSplitterWindow, replaceWindow, 2}},
- {3434, {wxSplitterWindow, setSashGravity, 1}},
- {3435, {wxSplitterWindow, setSashPosition, 2}},
- {3436, {wxSplitterWindow, setSashSize, 1}},
- {3437, {wxSplitterWindow, setMinimumPaneSize, 1}},
- {3438, {wxSplitterWindow, setSplitMode, 1}},
- {3439, {wxSplitterWindow, splitHorizontally, 3}},
- {3440, {wxSplitterWindow, splitVertically, 3}},
- {3441, {wxSplitterWindow, unsplit, 1}},
- {3442, {wxSplitterWindow, updateSize, 0}},
- {3443, {wxSplitterEvent, getSashPosition, 0}},
- {3444, {wxSplitterEvent, getX, 0}},
- {3445, {wxSplitterEvent, getY, 0}},
- {3446, {wxSplitterEvent, getWindowBeingRemoved, 0}},
- {3447, {wxSplitterEvent, setSashPosition, 1}},
- {3448, {wxHtmlWindow, new_0, 0}},
- {3449, {wxHtmlWindow, new_2, 2}},
- {3450, {wxHtmlWindow, appendToPage, 1}},
- {3451, {wxHtmlWindow, getOpenedAnchor, 0}},
- {3452, {wxHtmlWindow, getOpenedPage, 0}},
- {3453, {wxHtmlWindow, getOpenedPageTitle, 0}},
- {3454, {wxHtmlWindow, getRelatedFrame, 0}},
- {3455, {wxHtmlWindow, historyBack, 0}},
- {3456, {wxHtmlWindow, historyCanBack, 0}},
- {3457, {wxHtmlWindow, historyCanForward, 0}},
- {3458, {wxHtmlWindow, historyClear, 0}},
- {3459, {wxHtmlWindow, historyForward, 0}},
- {3460, {wxHtmlWindow, loadFile, 1}},
- {3461, {wxHtmlWindow, loadPage, 1}},
- {3462, {wxHtmlWindow, selectAll, 0}},
- {3463, {wxHtmlWindow, selectionToText, 0}},
- {3464, {wxHtmlWindow, selectLine, 1}},
- {3465, {wxHtmlWindow, selectWord, 1}},
- {3466, {wxHtmlWindow, setBorders, 1}},
- {3467, {wxHtmlWindow, setFonts, 3}},
- {3468, {wxHtmlWindow, setPage, 1}},
- {3469, {wxHtmlWindow, setRelatedFrame, 2}},
- {3470, {wxHtmlWindow, setRelatedStatusBar, 1}},
- {3471, {wxHtmlWindow, toText, 0}},
- {3472, {wxHtmlWindow, 'Destroy', undefined}},
- {3473, {wxHtmlLinkEvent, getLinkInfo, 0}},
- {3474, {wxAuiNotebookEvent, setSelection, 1}},
- {3475, {wxAuiNotebookEvent, getSelection, 0}},
- {3476, {wxAuiNotebookEvent, setOldSelection, 1}},
- {3477, {wxAuiNotebookEvent, getOldSelection, 0}},
- {3478, {wxAuiNotebookEvent, setDragSource, 1}},
- {3479, {wxAuiNotebookEvent, getDragSource, 0}},
- {3480, {wxAuiManagerEvent, setManager, 1}},
- {3481, {wxAuiManagerEvent, getManager, 0}},
- {3482, {wxAuiManagerEvent, setPane, 1}},
- {3483, {wxAuiManagerEvent, getPane, 0}},
- {3484, {wxAuiManagerEvent, setButton, 1}},
- {3485, {wxAuiManagerEvent, getButton, 0}},
- {3486, {wxAuiManagerEvent, setDC, 1}},
- {3487, {wxAuiManagerEvent, getDC, 0}},
- {3488, {wxAuiManagerEvent, veto, 1}},
- {3489, {wxAuiManagerEvent, getVeto, 0}},
- {3490, {wxAuiManagerEvent, setCanVeto, 1}},
- {3491, {wxAuiManagerEvent, canVeto, 0}},
- {3492, {wxLogNull, new, 0}},
- {3493, {wxLogNull, 'Destroy', undefined}},
+ {2018, {wxTreeCtrl, getFirstChild, 2}},
+ {2019, {wxTreeCtrl, getNextChild, 2}},
+ {2020, {wxTreeCtrl, getFirstVisibleItem, 0}},
+ {2021, {wxTreeCtrl, getImageList, 0}},
+ {2022, {wxTreeCtrl, getIndent, 0}},
+ {2023, {wxTreeCtrl, getItemBackgroundColour, 1}},
+ {2024, {wxTreeCtrl, getItemData, 1}},
+ {2025, {wxTreeCtrl, getItemFont, 1}},
+ {2026, {wxTreeCtrl, getItemImage_1, 1}},
+ {2027, {wxTreeCtrl, getItemImage_2, 2}},
+ {2028, {wxTreeCtrl, getItemText, 1}},
+ {2029, {wxTreeCtrl, getItemTextColour, 1}},
+ {2030, {wxTreeCtrl, getLastChild, 1}},
+ {2031, {wxTreeCtrl, getNextSibling, 1}},
+ {2032, {wxTreeCtrl, getNextVisible, 1}},
+ {2033, {wxTreeCtrl, getItemParent, 1}},
+ {2034, {wxTreeCtrl, getPrevSibling, 1}},
+ {2035, {wxTreeCtrl, getPrevVisible, 1}},
+ {2036, {wxTreeCtrl, getRootItem, 0}},
+ {2037, {wxTreeCtrl, getSelection, 0}},
+ {2038, {wxTreeCtrl, getSelections, 1}},
+ {2039, {wxTreeCtrl, getStateImageList, 0}},
+ {2040, {wxTreeCtrl, hitTest, 1}},
+ {2042, {wxTreeCtrl, insertItem, 4}},
+ {2043, {wxTreeCtrl, isBold, 1}},
+ {2044, {wxTreeCtrl, isExpanded, 1}},
+ {2045, {wxTreeCtrl, isSelected, 1}},
+ {2046, {wxTreeCtrl, isVisible, 1}},
+ {2047, {wxTreeCtrl, itemHasChildren, 1}},
+ {2048, {wxTreeCtrl, prependItem, 3}},
+ {2049, {wxTreeCtrl, scrollTo, 1}},
+ {2050, {wxTreeCtrl, selectItem_1, 1}},
+ {2051, {wxTreeCtrl, selectItem_2, 2}},
+ {2052, {wxTreeCtrl, setIndent, 1}},
+ {2053, {wxTreeCtrl, setImageList, 1}},
+ {2054, {wxTreeCtrl, setItemBackgroundColour, 2}},
+ {2055, {wxTreeCtrl, setItemBold, 2}},
+ {2056, {wxTreeCtrl, setItemData, 2}},
+ {2057, {wxTreeCtrl, setItemDropHighlight, 2}},
+ {2058, {wxTreeCtrl, setItemFont, 2}},
+ {2059, {wxTreeCtrl, setItemHasChildren, 2}},
+ {2060, {wxTreeCtrl, setItemImage_2, 2}},
+ {2061, {wxTreeCtrl, setItemImage_3, 3}},
+ {2062, {wxTreeCtrl, setItemText, 2}},
+ {2063, {wxTreeCtrl, setItemTextColour, 2}},
+ {2064, {wxTreeCtrl, setStateImageList, 1}},
+ {2065, {wxTreeCtrl, setWindowStyle, 1}},
+ {2066, {wxTreeCtrl, sortChildren, 1}},
+ {2067, {wxTreeCtrl, toggle, 1}},
+ {2068, {wxTreeCtrl, toggleItemSelection, 1}},
+ {2069, {wxTreeCtrl, unselect, 0}},
+ {2070, {wxTreeCtrl, unselectAll, 0}},
+ {2071, {wxTreeCtrl, unselectItem, 1}},
+ {2072, {wxScrollBar, new_0, 0}},
+ {2073, {wxScrollBar, new_3, 3}},
+ {2074, {wxScrollBar, destruct, 0}},
+ {2075, {wxScrollBar, create, 3}},
+ {2076, {wxScrollBar, getRange, 0}},
+ {2077, {wxScrollBar, getPageSize, 0}},
+ {2078, {wxScrollBar, getThumbPosition, 0}},
+ {2079, {wxScrollBar, getThumbSize, 0}},
+ {2080, {wxScrollBar, setThumbPosition, 1}},
+ {2081, {wxScrollBar, setScrollbar, 5}},
+ {2083, {wxSpinButton, new_2, 2}},
+ {2084, {wxSpinButton, new_0, 0}},
+ {2085, {wxSpinButton, create, 2}},
+ {2086, {wxSpinButton, getMax, 0}},
+ {2087, {wxSpinButton, getMin, 0}},
+ {2088, {wxSpinButton, getValue, 0}},
+ {2089, {wxSpinButton, setRange, 2}},
+ {2090, {wxSpinButton, setValue, 1}},
+ {2091, {wxSpinButton, 'Destroy', undefined}},
+ {2092, {wxSpinCtrl, new_0, 0}},
+ {2093, {wxSpinCtrl, new_2, 2}},
+ {2095, {wxSpinCtrl, create, 2}},
+ {2098, {wxSpinCtrl, setValue_1_1, 1}},
+ {2099, {wxSpinCtrl, setValue_1_0, 1}},
+ {2101, {wxSpinCtrl, getValue, 0}},
+ {2103, {wxSpinCtrl, setRange, 2}},
+ {2104, {wxSpinCtrl, setSelection, 2}},
+ {2106, {wxSpinCtrl, getMin, 0}},
+ {2108, {wxSpinCtrl, getMax, 0}},
+ {2109, {wxSpinCtrl, 'Destroy', undefined}},
+ {2110, {wxStaticText, new_0, 0}},
+ {2111, {wxStaticText, new_4, 4}},
+ {2112, {wxStaticText, create, 4}},
+ {2113, {wxStaticText, getLabel, 0}},
+ {2114, {wxStaticText, setLabel, 1}},
+ {2115, {wxStaticText, wrap, 1}},
+ {2116, {wxStaticText, 'Destroy', undefined}},
+ {2117, {wxStaticBitmap, new_0, 0}},
+ {2118, {wxStaticBitmap, new_4, 4}},
+ {2119, {wxStaticBitmap, create, 4}},
+ {2120, {wxStaticBitmap, getBitmap, 0}},
+ {2121, {wxStaticBitmap, setBitmap, 1}},
+ {2122, {wxStaticBitmap, 'Destroy', undefined}},
+ {2123, {wxRadioBox, new, 7}},
+ {2125, {wxRadioBox, destruct, 0}},
+ {2126, {wxRadioBox, create, 7}},
+ {2127, {wxRadioBox, enable_2, 2}},
+ {2128, {wxRadioBox, enable_1, 1}},
+ {2129, {wxRadioBox, getSelection, 0}},
+ {2130, {wxRadioBox, getString, 1}},
+ {2131, {wxRadioBox, setSelection, 1}},
+ {2132, {wxRadioBox, show_2, 2}},
+ {2133, {wxRadioBox, show_1, 1}},
+ {2134, {wxRadioBox, getColumnCount, 0}},
+ {2135, {wxRadioBox, getItemHelpText, 1}},
+ {2136, {wxRadioBox, getItemToolTip, 1}},
+ {2138, {wxRadioBox, getItemFromPoint, 1}},
+ {2139, {wxRadioBox, getRowCount, 0}},
+ {2140, {wxRadioBox, isItemEnabled, 1}},
+ {2141, {wxRadioBox, isItemShown, 1}},
+ {2142, {wxRadioBox, setItemHelpText, 2}},
+ {2143, {wxRadioBox, setItemToolTip, 2}},
+ {2144, {wxRadioButton, new_0, 0}},
+ {2145, {wxRadioButton, new_4, 4}},
+ {2146, {wxRadioButton, create, 4}},
+ {2147, {wxRadioButton, getValue, 0}},
+ {2148, {wxRadioButton, setValue, 1}},
+ {2149, {wxRadioButton, 'Destroy', undefined}},
+ {2151, {wxSlider, new_6, 6}},
+ {2152, {wxSlider, new_0, 0}},
+ {2153, {wxSlider, create, 6}},
+ {2154, {wxSlider, getLineSize, 0}},
+ {2155, {wxSlider, getMax, 0}},
+ {2156, {wxSlider, getMin, 0}},
+ {2157, {wxSlider, getPageSize, 0}},
+ {2158, {wxSlider, getThumbLength, 0}},
+ {2159, {wxSlider, getValue, 0}},
+ {2160, {wxSlider, setLineSize, 1}},
+ {2161, {wxSlider, setPageSize, 1}},
+ {2162, {wxSlider, setRange, 2}},
+ {2163, {wxSlider, setThumbLength, 1}},
+ {2164, {wxSlider, setValue, 1}},
+ {2165, {wxSlider, 'Destroy', undefined}},
+ {2167, {wxDialog, new_4, 4}},
+ {2168, {wxDialog, new_0, 0}},
+ {2170, {wxDialog, destruct, 0}},
+ {2171, {wxDialog, create, 4}},
+ {2172, {wxDialog, createButtonSizer, 1}},
+ {2173, {wxDialog, createStdDialogButtonSizer, 1}},
+ {2174, {wxDialog, endModal, 1}},
+ {2175, {wxDialog, getAffirmativeId, 0}},
+ {2176, {wxDialog, getReturnCode, 0}},
+ {2177, {wxDialog, isModal, 0}},
+ {2178, {wxDialog, setAffirmativeId, 1}},
+ {2179, {wxDialog, setReturnCode, 1}},
+ {2180, {wxDialog, show, 1}},
+ {2181, {wxDialog, showModal, 0}},
+ {2182, {wxColourDialog, new_0, 0}},
+ {2183, {wxColourDialog, new_2, 2}},
+ {2184, {wxColourDialog, destruct, 0}},
+ {2185, {wxColourDialog, create, 2}},
+ {2186, {wxColourDialog, getColourData, 0}},
+ {2187, {wxColourData, new_0, 0}},
+ {2188, {wxColourData, new_1, 1}},
+ {2189, {wxColourData, destruct, 0}},
+ {2190, {wxColourData, getChooseFull, 0}},
+ {2191, {wxColourData, getColour, 0}},
+ {2193, {wxColourData, getCustomColour, 1}},
+ {2194, {wxColourData, setChooseFull, 1}},
+ {2195, {wxColourData, setColour, 1}},
+ {2196, {wxColourData, setCustomColour, 2}},
+ {2197, {wxPalette, new_0, 0}},
+ {2198, {wxPalette, new_4, 4}},
+ {2200, {wxPalette, destruct, 0}},
+ {2201, {wxPalette, create, 4}},
+ {2202, {wxPalette, getColoursCount, 0}},
+ {2203, {wxPalette, getPixel, 3}},
+ {2204, {wxPalette, getRGB, 4}},
+ {2205, {wxPalette, isOk, 0}},
+ {2209, {wxDirDialog, new, 2}},
+ {2210, {wxDirDialog, destruct, 0}},
+ {2211, {wxDirDialog, getPath, 0}},
+ {2212, {wxDirDialog, getMessage, 0}},
+ {2213, {wxDirDialog, setMessage, 1}},
+ {2214, {wxDirDialog, setPath, 1}},
+ {2218, {wxFileDialog, new, 2}},
+ {2219, {wxFileDialog, destruct, 0}},
+ {2220, {wxFileDialog, getDirectory, 0}},
+ {2221, {wxFileDialog, getFilename, 0}},
+ {2222, {wxFileDialog, getFilenames, 1}},
+ {2223, {wxFileDialog, getFilterIndex, 0}},
+ {2224, {wxFileDialog, getMessage, 0}},
+ {2225, {wxFileDialog, getPath, 0}},
+ {2226, {wxFileDialog, getPaths, 1}},
+ {2227, {wxFileDialog, getWildcard, 0}},
+ {2228, {wxFileDialog, setDirectory, 1}},
+ {2229, {wxFileDialog, setFilename, 1}},
+ {2230, {wxFileDialog, setFilterIndex, 1}},
+ {2231, {wxFileDialog, setMessage, 1}},
+ {2232, {wxFileDialog, setPath, 1}},
+ {2233, {wxFileDialog, setWildcard, 1}},
+ {2234, {wxPickerBase, setInternalMargin, 1}},
+ {2235, {wxPickerBase, getInternalMargin, 0}},
+ {2236, {wxPickerBase, setTextCtrlProportion, 1}},
+ {2237, {wxPickerBase, setPickerCtrlProportion, 1}},
+ {2238, {wxPickerBase, getTextCtrlProportion, 0}},
+ {2239, {wxPickerBase, getPickerCtrlProportion, 0}},
+ {2240, {wxPickerBase, hasTextCtrl, 0}},
+ {2241, {wxPickerBase, getTextCtrl, 0}},
+ {2242, {wxPickerBase, isTextCtrlGrowable, 0}},
+ {2243, {wxPickerBase, setPickerCtrlGrowable, 1}},
+ {2244, {wxPickerBase, setTextCtrlGrowable, 1}},
+ {2245, {wxPickerBase, isPickerCtrlGrowable, 0}},
+ {2246, {wxFilePickerCtrl, new_0, 0}},
+ {2247, {wxFilePickerCtrl, new_3, 3}},
+ {2248, {wxFilePickerCtrl, create, 3}},
+ {2249, {wxFilePickerCtrl, getPath, 0}},
+ {2250, {wxFilePickerCtrl, setPath, 1}},
+ {2251, {wxFilePickerCtrl, 'Destroy', undefined}},
+ {2252, {wxDirPickerCtrl, new_0, 0}},
+ {2253, {wxDirPickerCtrl, new_3, 3}},
+ {2254, {wxDirPickerCtrl, create, 3}},
+ {2255, {wxDirPickerCtrl, getPath, 0}},
+ {2256, {wxDirPickerCtrl, setPath, 1}},
+ {2257, {wxDirPickerCtrl, 'Destroy', undefined}},
+ {2258, {wxColourPickerCtrl, new_0, 0}},
+ {2259, {wxColourPickerCtrl, new_3, 3}},
+ {2260, {wxColourPickerCtrl, create, 3}},
+ {2261, {wxColourPickerCtrl, getColour, 0}},
+ {2262, {wxColourPickerCtrl, setColour_1_1, 1}},
+ {2263, {wxColourPickerCtrl, setColour_1_0, 1}},
+ {2264, {wxColourPickerCtrl, 'Destroy', undefined}},
+ {2265, {wxDatePickerCtrl, new_0, 0}},
+ {2266, {wxDatePickerCtrl, new_3, 3}},
+ {2267, {wxDatePickerCtrl, getRange, 2}},
+ {2268, {wxDatePickerCtrl, getValue, 0}},
+ {2269, {wxDatePickerCtrl, setRange, 2}},
+ {2270, {wxDatePickerCtrl, setValue, 1}},
+ {2271, {wxDatePickerCtrl, 'Destroy', undefined}},
+ {2272, {wxFontPickerCtrl, new_0, 0}},
+ {2273, {wxFontPickerCtrl, new_3, 3}},
+ {2274, {wxFontPickerCtrl, create, 3}},
+ {2275, {wxFontPickerCtrl, getSelectedFont, 0}},
+ {2276, {wxFontPickerCtrl, setSelectedFont, 1}},
+ {2277, {wxFontPickerCtrl, getMaxPointSize, 0}},
+ {2278, {wxFontPickerCtrl, setMaxPointSize, 1}},
+ {2279, {wxFontPickerCtrl, 'Destroy', undefined}},
+ {2282, {wxFindReplaceDialog, new_0, 0}},
+ {2283, {wxFindReplaceDialog, new_4, 4}},
+ {2284, {wxFindReplaceDialog, destruct, 0}},
+ {2285, {wxFindReplaceDialog, create, 4}},
+ {2286, {wxFindReplaceDialog, getData, 0}},
+ {2287, {wxFindReplaceData, new_0, 0}},
+ {2288, {wxFindReplaceData, new_1, 1}},
+ {2289, {wxFindReplaceData, getFindString, 0}},
+ {2290, {wxFindReplaceData, getReplaceString, 0}},
+ {2291, {wxFindReplaceData, getFlags, 0}},
+ {2292, {wxFindReplaceData, setFlags, 1}},
+ {2293, {wxFindReplaceData, setFindString, 1}},
+ {2294, {wxFindReplaceData, setReplaceString, 1}},
+ {2295, {wxFindReplaceData, 'Destroy', undefined}},
+ {2296, {wxMultiChoiceDialog, new_0, 0}},
+ {2298, {wxMultiChoiceDialog, new_5, 5}},
+ {2299, {wxMultiChoiceDialog, getSelections, 0}},
+ {2300, {wxMultiChoiceDialog, setSelections, 1}},
+ {2301, {wxMultiChoiceDialog, 'Destroy', undefined}},
+ {2302, {wxSingleChoiceDialog, new_0, 0}},
+ {2304, {wxSingleChoiceDialog, new_5, 5}},
+ {2305, {wxSingleChoiceDialog, getSelection, 0}},
+ {2306, {wxSingleChoiceDialog, getStringSelection, 0}},
+ {2307, {wxSingleChoiceDialog, setSelection, 1}},
+ {2308, {wxSingleChoiceDialog, 'Destroy', undefined}},
+ {2309, {wxTextEntryDialog, new, 3}},
+ {2310, {wxTextEntryDialog, getValue, 0}},
+ {2311, {wxTextEntryDialog, setValue, 1}},
+ {2312, {wxTextEntryDialog, 'Destroy', undefined}},
+ {2313, {wxPasswordEntryDialog, new, 3}},
+ {2314, {wxPasswordEntryDialog, 'Destroy', undefined}},
+ {2315, {wxFontData, new_0, 0}},
+ {2316, {wxFontData, new_1, 1}},
+ {2317, {wxFontData, destruct, 0}},
+ {2318, {wxFontData, enableEffects, 1}},
+ {2319, {wxFontData, getAllowSymbols, 0}},
+ {2320, {wxFontData, getColour, 0}},
+ {2321, {wxFontData, getChosenFont, 0}},
+ {2322, {wxFontData, getEnableEffects, 0}},
+ {2323, {wxFontData, getInitialFont, 0}},
+ {2324, {wxFontData, getShowHelp, 0}},
+ {2325, {wxFontData, setAllowSymbols, 1}},
+ {2326, {wxFontData, setChosenFont, 1}},
+ {2327, {wxFontData, setColour, 1}},
+ {2328, {wxFontData, setInitialFont, 1}},
+ {2329, {wxFontData, setRange, 2}},
+ {2330, {wxFontData, setShowHelp, 1}},
+ {2334, {wxFontDialog, new_0, 0}},
+ {2336, {wxFontDialog, new_2, 2}},
+ {2338, {wxFontDialog, create, 2}},
+ {2339, {wxFontDialog, getFontData, 0}},
+ {2341, {wxFontDialog, 'Destroy', undefined}},
+ {2342, {wxProgressDialog, new, 3}},
+ {2343, {wxProgressDialog, destruct, 0}},
+ {2344, {wxProgressDialog, resume, 0}},
+ {2345, {wxProgressDialog, update_2, 2}},
+ {2346, {wxProgressDialog, update_0, 0}},
+ {2347, {wxMessageDialog, new, 3}},
+ {2348, {wxMessageDialog, destruct, 0}},
+ {2349, {wxPageSetupDialog, new, 2}},
+ {2350, {wxPageSetupDialog, destruct, 0}},
+ {2351, {wxPageSetupDialog, getPageSetupData, 0}},
+ {2352, {wxPageSetupDialog, showModal, 0}},
+ {2353, {wxPageSetupDialogData, new_0, 0}},
+ {2354, {wxPageSetupDialogData, new_1_0, 1}},
+ {2355, {wxPageSetupDialogData, new_1_1, 1}},
+ {2356, {wxPageSetupDialogData, destruct, 0}},
+ {2357, {wxPageSetupDialogData, enableHelp, 1}},
+ {2358, {wxPageSetupDialogData, enableMargins, 1}},
+ {2359, {wxPageSetupDialogData, enableOrientation, 1}},
+ {2360, {wxPageSetupDialogData, enablePaper, 1}},
+ {2361, {wxPageSetupDialogData, enablePrinter, 1}},
+ {2362, {wxPageSetupDialogData, getDefaultMinMargins, 0}},
+ {2363, {wxPageSetupDialogData, getEnableMargins, 0}},
+ {2364, {wxPageSetupDialogData, getEnableOrientation, 0}},
+ {2365, {wxPageSetupDialogData, getEnablePaper, 0}},
+ {2366, {wxPageSetupDialogData, getEnablePrinter, 0}},
+ {2367, {wxPageSetupDialogData, getEnableHelp, 0}},
+ {2368, {wxPageSetupDialogData, getDefaultInfo, 0}},
+ {2369, {wxPageSetupDialogData, getMarginTopLeft, 0}},
+ {2370, {wxPageSetupDialogData, getMarginBottomRight, 0}},
+ {2371, {wxPageSetupDialogData, getMinMarginTopLeft, 0}},
+ {2372, {wxPageSetupDialogData, getMinMarginBottomRight, 0}},
+ {2373, {wxPageSetupDialogData, getPaperId, 0}},
+ {2374, {wxPageSetupDialogData, getPaperSize, 0}},
+ {2376, {wxPageSetupDialogData, getPrintData, 0}},
+ {2377, {wxPageSetupDialogData, isOk, 0}},
+ {2378, {wxPageSetupDialogData, setDefaultInfo, 1}},
+ {2379, {wxPageSetupDialogData, setDefaultMinMargins, 1}},
+ {2380, {wxPageSetupDialogData, setMarginTopLeft, 1}},
+ {2381, {wxPageSetupDialogData, setMarginBottomRight, 1}},
+ {2382, {wxPageSetupDialogData, setMinMarginTopLeft, 1}},
+ {2383, {wxPageSetupDialogData, setMinMarginBottomRight, 1}},
+ {2384, {wxPageSetupDialogData, setPaperId, 1}},
+ {2385, {wxPageSetupDialogData, setPaperSize_1_1, 1}},
+ {2386, {wxPageSetupDialogData, setPaperSize_1_0, 1}},
+ {2387, {wxPageSetupDialogData, setPrintData, 1}},
+ {2388, {wxPrintDialog, new_2_0, 2}},
+ {2389, {wxPrintDialog, new_2_1, 2}},
+ {2390, {wxPrintDialog, destruct, 0}},
+ {2391, {wxPrintDialog, getPrintDialogData, 0}},
+ {2392, {wxPrintDialog, getPrintDC, 0}},
+ {2393, {wxPrintDialogData, new_0, 0}},
+ {2394, {wxPrintDialogData, new_1_1, 1}},
+ {2395, {wxPrintDialogData, new_1_0, 1}},
+ {2396, {wxPrintDialogData, destruct, 0}},
+ {2397, {wxPrintDialogData, enableHelp, 1}},
+ {2398, {wxPrintDialogData, enablePageNumbers, 1}},
+ {2399, {wxPrintDialogData, enablePrintToFile, 1}},
+ {2400, {wxPrintDialogData, enableSelection, 1}},
+ {2401, {wxPrintDialogData, getAllPages, 0}},
+ {2402, {wxPrintDialogData, getCollate, 0}},
+ {2403, {wxPrintDialogData, getFromPage, 0}},
+ {2404, {wxPrintDialogData, getMaxPage, 0}},
+ {2405, {wxPrintDialogData, getMinPage, 0}},
+ {2406, {wxPrintDialogData, getNoCopies, 0}},
+ {2407, {wxPrintDialogData, getPrintData, 0}},
+ {2408, {wxPrintDialogData, getPrintToFile, 0}},
+ {2409, {wxPrintDialogData, getSelection, 0}},
+ {2410, {wxPrintDialogData, getToPage, 0}},
+ {2411, {wxPrintDialogData, isOk, 0}},
+ {2412, {wxPrintDialogData, setCollate, 1}},
+ {2413, {wxPrintDialogData, setFromPage, 1}},
+ {2414, {wxPrintDialogData, setMaxPage, 1}},
+ {2415, {wxPrintDialogData, setMinPage, 1}},
+ {2416, {wxPrintDialogData, setNoCopies, 1}},
+ {2417, {wxPrintDialogData, setPrintData, 1}},
+ {2418, {wxPrintDialogData, setPrintToFile, 1}},
+ {2419, {wxPrintDialogData, setSelection, 1}},
+ {2420, {wxPrintDialogData, setToPage, 1}},
+ {2421, {wxPrintData, new_0, 0}},
+ {2422, {wxPrintData, new_1, 1}},
+ {2423, {wxPrintData, destruct, 0}},
+ {2424, {wxPrintData, getCollate, 0}},
+ {2425, {wxPrintData, getBin, 0}},
+ {2426, {wxPrintData, getColour, 0}},
+ {2427, {wxPrintData, getDuplex, 0}},
+ {2428, {wxPrintData, getNoCopies, 0}},
+ {2429, {wxPrintData, getOrientation, 0}},
+ {2430, {wxPrintData, getPaperId, 0}},
+ {2431, {wxPrintData, getPrinterName, 0}},
+ {2432, {wxPrintData, getQuality, 0}},
+ {2433, {wxPrintData, isOk, 0}},
+ {2434, {wxPrintData, setBin, 1}},
+ {2435, {wxPrintData, setCollate, 1}},
+ {2436, {wxPrintData, setColour, 1}},
+ {2437, {wxPrintData, setDuplex, 1}},
+ {2438, {wxPrintData, setNoCopies, 1}},
+ {2439, {wxPrintData, setOrientation, 1}},
+ {2440, {wxPrintData, setPaperId, 1}},
+ {2441, {wxPrintData, setPrinterName, 1}},
+ {2442, {wxPrintData, setQuality, 1}},
+ {2445, {wxPrintPreview, new_2, 2}},
+ {2446, {wxPrintPreview, new_3, 3}},
+ {2448, {wxPrintPreview, destruct, 0}},
+ {2449, {wxPrintPreview, getCanvas, 0}},
+ {2450, {wxPrintPreview, getCurrentPage, 0}},
+ {2451, {wxPrintPreview, getFrame, 0}},
+ {2452, {wxPrintPreview, getMaxPage, 0}},
+ {2453, {wxPrintPreview, getMinPage, 0}},
+ {2454, {wxPrintPreview, getPrintout, 0}},
+ {2455, {wxPrintPreview, getPrintoutForPrinting, 0}},
+ {2456, {wxPrintPreview, isOk, 0}},
+ {2457, {wxPrintPreview, paintPage, 2}},
+ {2458, {wxPrintPreview, print, 1}},
+ {2459, {wxPrintPreview, renderPage, 1}},
+ {2460, {wxPrintPreview, setCanvas, 1}},
+ {2461, {wxPrintPreview, setCurrentPage, 1}},
+ {2462, {wxPrintPreview, setFrame, 1}},
+ {2463, {wxPrintPreview, setPrintout, 1}},
+ {2464, {wxPrintPreview, setZoom, 1}},
+ {2465, {wxPreviewFrame, new, 3}},
+ {2466, {wxPreviewFrame, destruct, 0}},
+ {2467, {wxPreviewFrame, createControlBar, 0}},
+ {2468, {wxPreviewFrame, createCanvas, 0}},
+ {2469, {wxPreviewFrame, initialize, 0}},
+ {2470, {wxPreviewFrame, onCloseWindow, 1}},
+ {2471, {wxPreviewControlBar, new, 4}},
+ {2472, {wxPreviewControlBar, destruct, 0}},
+ {2473, {wxPreviewControlBar, createButtons, 0}},
+ {2474, {wxPreviewControlBar, getPrintPreview, 0}},
+ {2475, {wxPreviewControlBar, getZoomControl, 0}},
+ {2476, {wxPreviewControlBar, setZoomControl, 1}},
+ {2478, {wxPrinter, new, 1}},
+ {2479, {wxPrinter, createAbortWindow, 2}},
+ {2480, {wxPrinter, getAbort, 0}},
+ {2481, {wxPrinter, getLastError, 0}},
+ {2482, {wxPrinter, getPrintDialogData, 0}},
+ {2483, {wxPrinter, print, 3}},
+ {2484, {wxPrinter, printDialog, 1}},
+ {2485, {wxPrinter, reportError, 3}},
+ {2486, {wxPrinter, setup, 1}},
+ {2487, {wxPrinter, 'Destroy', undefined}},
+ {2488, {wxXmlResource, new_1, 1}},
+ {2489, {wxXmlResource, new_2, 2}},
+ {2490, {wxXmlResource, destruct, 0}},
+ {2491, {wxXmlResource, attachUnknownControl, 3}},
+ {2492, {wxXmlResource, clearHandlers, 0}},
+ {2493, {wxXmlResource, compareVersion, 4}},
+ {2494, {wxXmlResource, get, 0}},
+ {2495, {wxXmlResource, getFlags, 0}},
+ {2496, {wxXmlResource, getVersion, 0}},
+ {2497, {wxXmlResource, getXRCID, 2}},
+ {2498, {wxXmlResource, initAllHandlers, 0}},
+ {2499, {wxXmlResource, load, 1}},
+ {2500, {wxXmlResource, loadBitmap, 1}},
+ {2501, {wxXmlResource, loadDialog_2, 2}},
+ {2502, {wxXmlResource, loadDialog_3, 3}},
+ {2503, {wxXmlResource, loadFrame_2, 2}},
+ {2504, {wxXmlResource, loadFrame_3, 3}},
+ {2505, {wxXmlResource, loadIcon, 1}},
+ {2506, {wxXmlResource, loadMenu, 1}},
+ {2507, {wxXmlResource, loadMenuBar_2, 2}},
+ {2508, {wxXmlResource, loadMenuBar_1, 1}},
+ {2509, {wxXmlResource, loadPanel_2, 2}},
+ {2510, {wxXmlResource, loadPanel_3, 3}},
+ {2511, {wxXmlResource, loadToolBar, 2}},
+ {2512, {wxXmlResource, set, 1}},
+ {2513, {wxXmlResource, setFlags, 1}},
+ {2514, {wxXmlResource, unload, 1}},
+ {2515, {wxXmlResource, xrcctrl, 3}},
+ {2516, {wxHtmlEasyPrinting, new, 1}},
+ {2517, {wxHtmlEasyPrinting, destruct, 0}},
+ {2518, {wxHtmlEasyPrinting, getPrintData, 0}},
+ {2519, {wxHtmlEasyPrinting, getPageSetupData, 0}},
+ {2520, {wxHtmlEasyPrinting, previewFile, 1}},
+ {2521, {wxHtmlEasyPrinting, previewText, 2}},
+ {2522, {wxHtmlEasyPrinting, printFile, 1}},
+ {2523, {wxHtmlEasyPrinting, printText, 2}},
+ {2524, {wxHtmlEasyPrinting, pageSetup, 0}},
+ {2525, {wxHtmlEasyPrinting, setFonts, 3}},
+ {2526, {wxHtmlEasyPrinting, setHeader, 2}},
+ {2527, {wxHtmlEasyPrinting, setFooter, 2}},
+ {2529, {wxGLCanvas, new_2, 2}},
+ {2530, {wxGLCanvas, new_3_1, 3}},
+ {2531, {wxGLCanvas, new_3_0, 3}},
+ {2532, {wxGLCanvas, getContext, 0}},
+ {2534, {wxGLCanvas, setCurrent, 0}},
+ {2535, {wxGLCanvas, swapBuffers, 0}},
+ {2536, {wxGLCanvas, 'Destroy', undefined}},
+ {2537, {wxAuiManager, new, 1}},
+ {2538, {wxAuiManager, destruct, 0}},
+ {2539, {wxAuiManager, addPane_2_1, 2}},
+ {2540, {wxAuiManager, addPane_3, 3}},
+ {2541, {wxAuiManager, addPane_2_0, 2}},
+ {2542, {wxAuiManager, detachPane, 1}},
+ {2543, {wxAuiManager, getAllPanes, 0}},
+ {2544, {wxAuiManager, getArtProvider, 0}},
+ {2545, {wxAuiManager, getDockSizeConstraint, 2}},
+ {2546, {wxAuiManager, getFlags, 0}},
+ {2547, {wxAuiManager, getManagedWindow, 0}},
+ {2548, {wxAuiManager, getManager, 1}},
+ {2549, {wxAuiManager, getPane_1_1, 1}},
+ {2550, {wxAuiManager, getPane_1_0, 1}},
+ {2551, {wxAuiManager, hideHint, 0}},
+ {2552, {wxAuiManager, insertPane, 3}},
+ {2553, {wxAuiManager, loadPaneInfo, 2}},
+ {2554, {wxAuiManager, loadPerspective, 2}},
+ {2555, {wxAuiManager, savePaneInfo, 1}},
+ {2556, {wxAuiManager, savePerspective, 0}},
+ {2557, {wxAuiManager, setArtProvider, 1}},
+ {2558, {wxAuiManager, setDockSizeConstraint, 2}},
+ {2559, {wxAuiManager, setFlags, 1}},
+ {2560, {wxAuiManager, setManagedWindow, 1}},
+ {2561, {wxAuiManager, showHint, 1}},
+ {2562, {wxAuiManager, unInit, 0}},
+ {2563, {wxAuiManager, update, 0}},
+ {2564, {wxAuiPaneInfo, new_0, 0}},
+ {2565, {wxAuiPaneInfo, new_1, 1}},
+ {2566, {wxAuiPaneInfo, destruct, 0}},
+ {2567, {wxAuiPaneInfo, bestSize_1, 1}},
+ {2568, {wxAuiPaneInfo, bestSize_2, 2}},
+ {2569, {wxAuiPaneInfo, bottom, 0}},
+ {2570, {wxAuiPaneInfo, bottomDockable, 1}},
+ {2571, {wxAuiPaneInfo, caption, 1}},
+ {2572, {wxAuiPaneInfo, captionVisible, 1}},
+ {2573, {wxAuiPaneInfo, centre, 0}},
+ {2574, {wxAuiPaneInfo, centrePane, 0}},
+ {2575, {wxAuiPaneInfo, closeButton, 1}},
+ {2576, {wxAuiPaneInfo, defaultPane, 0}},
+ {2577, {wxAuiPaneInfo, destroyOnClose, 1}},
+ {2578, {wxAuiPaneInfo, direction, 1}},
+ {2579, {wxAuiPaneInfo, dock, 0}},
+ {2580, {wxAuiPaneInfo, dockable, 1}},
+ {2581, {wxAuiPaneInfo, fixed, 0}},
+ {2582, {wxAuiPaneInfo, float, 0}},
+ {2583, {wxAuiPaneInfo, floatable, 1}},
+ {2584, {wxAuiPaneInfo, floatingPosition_1, 1}},
+ {2585, {wxAuiPaneInfo, floatingPosition_2, 2}},
+ {2586, {wxAuiPaneInfo, floatingSize_1, 1}},
+ {2587, {wxAuiPaneInfo, floatingSize_2, 2}},
+ {2588, {wxAuiPaneInfo, gripper, 1}},
+ {2589, {wxAuiPaneInfo, gripperTop, 1}},
+ {2590, {wxAuiPaneInfo, hasBorder, 0}},
+ {2591, {wxAuiPaneInfo, hasCaption, 0}},
+ {2592, {wxAuiPaneInfo, hasCloseButton, 0}},
+ {2593, {wxAuiPaneInfo, hasFlag, 1}},
+ {2594, {wxAuiPaneInfo, hasGripper, 0}},
+ {2595, {wxAuiPaneInfo, hasGripperTop, 0}},
+ {2596, {wxAuiPaneInfo, hasMaximizeButton, 0}},
+ {2597, {wxAuiPaneInfo, hasMinimizeButton, 0}},
+ {2598, {wxAuiPaneInfo, hasPinButton, 0}},
+ {2599, {wxAuiPaneInfo, hide, 0}},
+ {2600, {wxAuiPaneInfo, isBottomDockable, 0}},
+ {2601, {wxAuiPaneInfo, isDocked, 0}},
+ {2602, {wxAuiPaneInfo, isFixed, 0}},
+ {2603, {wxAuiPaneInfo, isFloatable, 0}},
+ {2604, {wxAuiPaneInfo, isFloating, 0}},
+ {2605, {wxAuiPaneInfo, isLeftDockable, 0}},
+ {2606, {wxAuiPaneInfo, isMovable, 0}},
+ {2607, {wxAuiPaneInfo, isOk, 0}},
+ {2608, {wxAuiPaneInfo, isResizable, 0}},
+ {2609, {wxAuiPaneInfo, isRightDockable, 0}},
+ {2610, {wxAuiPaneInfo, isShown, 0}},
+ {2611, {wxAuiPaneInfo, isToolbar, 0}},
+ {2612, {wxAuiPaneInfo, isTopDockable, 0}},
+ {2613, {wxAuiPaneInfo, layer, 1}},
+ {2614, {wxAuiPaneInfo, left, 0}},
+ {2615, {wxAuiPaneInfo, leftDockable, 1}},
+ {2616, {wxAuiPaneInfo, maxSize_1, 1}},
+ {2617, {wxAuiPaneInfo, maxSize_2, 2}},
+ {2618, {wxAuiPaneInfo, maximizeButton, 1}},
+ {2619, {wxAuiPaneInfo, minSize_1, 1}},
+ {2620, {wxAuiPaneInfo, minSize_2, 2}},
+ {2621, {wxAuiPaneInfo, minimizeButton, 1}},
+ {2622, {wxAuiPaneInfo, movable, 1}},
+ {2623, {wxAuiPaneInfo, name, 1}},
+ {2624, {wxAuiPaneInfo, paneBorder, 1}},
+ {2625, {wxAuiPaneInfo, pinButton, 1}},
+ {2626, {wxAuiPaneInfo, position, 1}},
+ {2627, {wxAuiPaneInfo, resizable, 1}},
+ {2628, {wxAuiPaneInfo, right, 0}},
+ {2629, {wxAuiPaneInfo, rightDockable, 1}},
+ {2630, {wxAuiPaneInfo, row, 1}},
+ {2631, {wxAuiPaneInfo, safeSet, 1}},
+ {2632, {wxAuiPaneInfo, setFlag, 2}},
+ {2633, {wxAuiPaneInfo, show, 1}},
+ {2634, {wxAuiPaneInfo, toolbarPane, 0}},
+ {2635, {wxAuiPaneInfo, top, 0}},
+ {2636, {wxAuiPaneInfo, topDockable, 1}},
+ {2637, {wxAuiPaneInfo, window, 1}},
+ {2638, {wxAuiNotebook, new_0, 0}},
+ {2639, {wxAuiNotebook, new_2, 2}},
+ {2640, {wxAuiNotebook, addPage, 3}},
+ {2641, {wxAuiNotebook, create, 2}},
+ {2642, {wxAuiNotebook, deletePage, 1}},
+ {2643, {wxAuiNotebook, getArtProvider, 0}},
+ {2644, {wxAuiNotebook, getPage, 1}},
+ {2645, {wxAuiNotebook, getPageBitmap, 1}},
+ {2646, {wxAuiNotebook, getPageCount, 0}},
+ {2647, {wxAuiNotebook, getPageIndex, 1}},
+ {2648, {wxAuiNotebook, getPageText, 1}},
+ {2649, {wxAuiNotebook, getSelection, 0}},
+ {2650, {wxAuiNotebook, insertPage, 4}},
+ {2651, {wxAuiNotebook, removePage, 1}},
+ {2652, {wxAuiNotebook, setArtProvider, 1}},
+ {2653, {wxAuiNotebook, setFont, 1}},
+ {2654, {wxAuiNotebook, setPageBitmap, 2}},
+ {2655, {wxAuiNotebook, setPageText, 2}},
+ {2656, {wxAuiNotebook, setSelection, 1}},
+ {2657, {wxAuiNotebook, setTabCtrlHeight, 1}},
+ {2658, {wxAuiNotebook, setUniformBitmapSize, 1}},
+ {2659, {wxAuiNotebook, 'Destroy', undefined}},
+ {2660, {wxMDIParentFrame, new_0, 0}},
+ {2661, {wxMDIParentFrame, new_4, 4}},
+ {2662, {wxMDIParentFrame, destruct, 0}},
+ {2663, {wxMDIParentFrame, activateNext, 0}},
+ {2664, {wxMDIParentFrame, activatePrevious, 0}},
+ {2665, {wxMDIParentFrame, arrangeIcons, 0}},
+ {2666, {wxMDIParentFrame, cascade, 0}},
+ {2667, {wxMDIParentFrame, create, 4}},
+ {2668, {wxMDIParentFrame, getActiveChild, 0}},
+ {2669, {wxMDIParentFrame, getClientWindow, 0}},
+ {2670, {wxMDIParentFrame, tile, 1}},
+ {2671, {wxMDIChildFrame, new_0, 0}},
+ {2672, {wxMDIChildFrame, new_4, 4}},
+ {2673, {wxMDIChildFrame, destruct, 0}},
+ {2674, {wxMDIChildFrame, activate, 0}},
+ {2675, {wxMDIChildFrame, create, 4}},
+ {2676, {wxMDIChildFrame, maximize, 1}},
+ {2677, {wxMDIChildFrame, restore, 0}},
+ {2678, {wxMDIClientWindow, new_0, 0}},
+ {2679, {wxMDIClientWindow, new_2, 2}},
+ {2680, {wxMDIClientWindow, destruct, 0}},
+ {2681, {wxMDIClientWindow, createClient, 2}},
+ {2682, {wxLayoutAlgorithm, new, 0}},
+ {2683, {wxLayoutAlgorithm, layoutFrame, 2}},
+ {2684, {wxLayoutAlgorithm, layoutMDIFrame, 2}},
+ {2685, {wxLayoutAlgorithm, layoutWindow, 2}},
+ {2686, {wxLayoutAlgorithm, 'Destroy', undefined}},
+ {2687, {wxEvent, getId, 0}},
+ {2688, {wxEvent, getSkipped, 0}},
+ {2689, {wxEvent, getTimestamp, 0}},
+ {2690, {wxEvent, isCommandEvent, 0}},
+ {2691, {wxEvent, resumePropagation, 1}},
+ {2692, {wxEvent, shouldPropagate, 0}},
+ {2693, {wxEvent, skip, 1}},
+ {2694, {wxEvent, stopPropagation, 0}},
+ {2695, {wxCommandEvent, getClientData, 0}},
+ {2696, {wxCommandEvent, getExtraLong, 0}},
+ {2697, {wxCommandEvent, getInt, 0}},
+ {2698, {wxCommandEvent, getSelection, 0}},
+ {2699, {wxCommandEvent, getString, 0}},
+ {2700, {wxCommandEvent, isChecked, 0}},
+ {2701, {wxCommandEvent, isSelection, 0}},
+ {2702, {wxCommandEvent, setInt, 1}},
+ {2703, {wxCommandEvent, setString, 1}},
+ {2704, {wxScrollEvent, getOrientation, 0}},
+ {2705, {wxScrollEvent, getPosition, 0}},
+ {2706, {wxScrollWinEvent, getOrientation, 0}},
+ {2707, {wxScrollWinEvent, getPosition, 0}},
+ {2708, {wxMouseEvent, altDown, 0}},
+ {2709, {wxMouseEvent, button, 1}},
+ {2710, {wxMouseEvent, buttonDClick, 1}},
+ {2711, {wxMouseEvent, buttonDown, 1}},
+ {2712, {wxMouseEvent, buttonUp, 1}},
+ {2713, {wxMouseEvent, cmdDown, 0}},
+ {2714, {wxMouseEvent, controlDown, 0}},
+ {2715, {wxMouseEvent, dragging, 0}},
+ {2716, {wxMouseEvent, entering, 0}},
+ {2717, {wxMouseEvent, getButton, 0}},
+ {2720, {wxMouseEvent, getPosition, 0}},
+ {2721, {wxMouseEvent, getLogicalPosition, 1}},
+ {2722, {wxMouseEvent, getLinesPerAction, 0}},
+ {2723, {wxMouseEvent, getWheelRotation, 0}},
+ {2724, {wxMouseEvent, getWheelDelta, 0}},
+ {2725, {wxMouseEvent, getX, 0}},
+ {2726, {wxMouseEvent, getY, 0}},
+ {2727, {wxMouseEvent, isButton, 0}},
+ {2728, {wxMouseEvent, isPageScroll, 0}},
+ {2729, {wxMouseEvent, leaving, 0}},
+ {2730, {wxMouseEvent, leftDClick, 0}},
+ {2731, {wxMouseEvent, leftDown, 0}},
+ {2732, {wxMouseEvent, leftIsDown, 0}},
+ {2733, {wxMouseEvent, leftUp, 0}},
+ {2734, {wxMouseEvent, metaDown, 0}},
+ {2735, {wxMouseEvent, middleDClick, 0}},
+ {2736, {wxMouseEvent, middleDown, 0}},
+ {2737, {wxMouseEvent, middleIsDown, 0}},
+ {2738, {wxMouseEvent, middleUp, 0}},
+ {2739, {wxMouseEvent, moving, 0}},
+ {2740, {wxMouseEvent, rightDClick, 0}},
+ {2741, {wxMouseEvent, rightDown, 0}},
+ {2742, {wxMouseEvent, rightIsDown, 0}},
+ {2743, {wxMouseEvent, rightUp, 0}},
+ {2744, {wxMouseEvent, shiftDown, 0}},
+ {2745, {wxSetCursorEvent, getCursor, 0}},
+ {2746, {wxSetCursorEvent, getX, 0}},
+ {2747, {wxSetCursorEvent, getY, 0}},
+ {2748, {wxSetCursorEvent, hasCursor, 0}},
+ {2749, {wxSetCursorEvent, setCursor, 1}},
+ {2750, {wxKeyEvent, altDown, 0}},
+ {2751, {wxKeyEvent, cmdDown, 0}},
+ {2752, {wxKeyEvent, controlDown, 0}},
+ {2753, {wxKeyEvent, getKeyCode, 0}},
+ {2754, {wxKeyEvent, getModifiers, 0}},
+ {2757, {wxKeyEvent, getPosition, 0}},
+ {2758, {wxKeyEvent, getRawKeyCode, 0}},
+ {2759, {wxKeyEvent, getRawKeyFlags, 0}},
+ {2760, {wxKeyEvent, getUnicodeKey, 0}},
+ {2761, {wxKeyEvent, getX, 0}},
+ {2762, {wxKeyEvent, getY, 0}},
+ {2763, {wxKeyEvent, hasModifiers, 0}},
+ {2764, {wxKeyEvent, metaDown, 0}},
+ {2765, {wxKeyEvent, shiftDown, 0}},
+ {2766, {wxSizeEvent, getSize, 0}},
+ {2767, {wxMoveEvent, getPosition, 0}},
+ {2768, {wxEraseEvent, getDC, 0}},
+ {2769, {wxFocusEvent, getWindow, 0}},
+ {2770, {wxChildFocusEvent, getWindow, 0}},
+ {2771, {wxMenuEvent, getMenu, 0}},
+ {2772, {wxMenuEvent, getMenuId, 0}},
+ {2773, {wxMenuEvent, isPopup, 0}},
+ {2774, {wxCloseEvent, canVeto, 0}},
+ {2775, {wxCloseEvent, getLoggingOff, 0}},
+ {2776, {wxCloseEvent, setCanVeto, 1}},
+ {2777, {wxCloseEvent, setLoggingOff, 1}},
+ {2778, {wxCloseEvent, veto, 1}},
+ {2779, {wxShowEvent, setShow, 1}},
+ {2780, {wxShowEvent, getShow, 0}},
+ {2781, {wxIconizeEvent, iconized, 0}},
+ {2782, {wxJoystickEvent, buttonDown, 1}},
+ {2783, {wxJoystickEvent, buttonIsDown, 1}},
+ {2784, {wxJoystickEvent, buttonUp, 1}},
+ {2785, {wxJoystickEvent, getButtonChange, 0}},
+ {2786, {wxJoystickEvent, getButtonState, 0}},
+ {2787, {wxJoystickEvent, getJoystick, 0}},
+ {2788, {wxJoystickEvent, getPosition, 0}},
+ {2789, {wxJoystickEvent, getZPosition, 0}},
+ {2790, {wxJoystickEvent, isButton, 0}},
+ {2791, {wxJoystickEvent, isMove, 0}},
+ {2792, {wxJoystickEvent, isZMove, 0}},
+ {2793, {wxUpdateUIEvent, canUpdate, 1}},
+ {2794, {wxUpdateUIEvent, check, 1}},
+ {2795, {wxUpdateUIEvent, enable, 1}},
+ {2796, {wxUpdateUIEvent, show, 1}},
+ {2797, {wxUpdateUIEvent, getChecked, 0}},
+ {2798, {wxUpdateUIEvent, getEnabled, 0}},
+ {2799, {wxUpdateUIEvent, getShown, 0}},
+ {2800, {wxUpdateUIEvent, getSetChecked, 0}},
+ {2801, {wxUpdateUIEvent, getSetEnabled, 0}},
+ {2802, {wxUpdateUIEvent, getSetShown, 0}},
+ {2803, {wxUpdateUIEvent, getSetText, 0}},
+ {2804, {wxUpdateUIEvent, getText, 0}},
+ {2805, {wxUpdateUIEvent, getMode, 0}},
+ {2806, {wxUpdateUIEvent, getUpdateInterval, 0}},
+ {2807, {wxUpdateUIEvent, resetUpdateTime, 0}},
+ {2808, {wxUpdateUIEvent, setMode, 1}},
+ {2809, {wxUpdateUIEvent, setText, 1}},
+ {2810, {wxUpdateUIEvent, setUpdateInterval, 1}},
+ {2811, {wxMouseCaptureChangedEvent, getCapturedWindow, 0}},
+ {2812, {wxPaletteChangedEvent, setChangedWindow, 1}},
+ {2813, {wxPaletteChangedEvent, getChangedWindow, 0}},
+ {2814, {wxQueryNewPaletteEvent, setPaletteRealized, 1}},
+ {2815, {wxQueryNewPaletteEvent, getPaletteRealized, 0}},
+ {2816, {wxNavigationKeyEvent, getDirection, 0}},
+ {2817, {wxNavigationKeyEvent, setDirection, 1}},
+ {2818, {wxNavigationKeyEvent, isWindowChange, 0}},
+ {2819, {wxNavigationKeyEvent, setWindowChange, 1}},
+ {2820, {wxNavigationKeyEvent, isFromTab, 0}},
+ {2821, {wxNavigationKeyEvent, setFromTab, 1}},
+ {2822, {wxNavigationKeyEvent, getCurrentFocus, 0}},
+ {2823, {wxNavigationKeyEvent, setCurrentFocus, 1}},
+ {2824, {wxHelpEvent, getOrigin, 0}},
+ {2825, {wxHelpEvent, getPosition, 0}},
+ {2826, {wxHelpEvent, setOrigin, 1}},
+ {2827, {wxHelpEvent, setPosition, 1}},
+ {2828, {wxContextMenuEvent, getPosition, 0}},
+ {2829, {wxContextMenuEvent, setPosition, 1}},
+ {2830, {wxIdleEvent, canSend, 1}},
+ {2831, {wxIdleEvent, getMode, 0}},
+ {2832, {wxIdleEvent, requestMore, 1}},
+ {2833, {wxIdleEvent, moreRequested, 0}},
+ {2834, {wxIdleEvent, setMode, 1}},
+ {2835, {wxGridEvent, altDown, 0}},
+ {2836, {wxGridEvent, controlDown, 0}},
+ {2837, {wxGridEvent, getCol, 0}},
+ {2838, {wxGridEvent, getPosition, 0}},
+ {2839, {wxGridEvent, getRow, 0}},
+ {2840, {wxGridEvent, metaDown, 0}},
+ {2841, {wxGridEvent, selecting, 0}},
+ {2842, {wxGridEvent, shiftDown, 0}},
+ {2843, {wxNotifyEvent, allow, 0}},
+ {2844, {wxNotifyEvent, isAllowed, 0}},
+ {2845, {wxNotifyEvent, veto, 0}},
+ {2846, {wxSashEvent, getEdge, 0}},
+ {2847, {wxSashEvent, getDragRect, 0}},
+ {2848, {wxSashEvent, getDragStatus, 0}},
+ {2849, {wxListEvent, getCacheFrom, 0}},
+ {2850, {wxListEvent, getCacheTo, 0}},
+ {2851, {wxListEvent, getKeyCode, 0}},
+ {2852, {wxListEvent, getIndex, 0}},
+ {2853, {wxListEvent, getColumn, 0}},
+ {2854, {wxListEvent, getPoint, 0}},
+ {2855, {wxListEvent, getLabel, 0}},
+ {2856, {wxListEvent, getText, 0}},
+ {2857, {wxListEvent, getImage, 0}},
+ {2858, {wxListEvent, getData, 0}},
+ {2859, {wxListEvent, getMask, 0}},
+ {2860, {wxListEvent, getItem, 0}},
+ {2861, {wxListEvent, isEditCancelled, 0}},
+ {2862, {wxDateEvent, getDate, 0}},
+ {2863, {wxCalendarEvent, getWeekDay, 0}},
+ {2864, {wxFileDirPickerEvent, getPath, 0}},
+ {2865, {wxColourPickerEvent, getColour, 0}},
+ {2866, {wxFontPickerEvent, getFont, 0}},
+ {2867, {wxStyledTextEvent, getPosition, 0}},
+ {2868, {wxStyledTextEvent, getKey, 0}},
+ {2869, {wxStyledTextEvent, getModifiers, 0}},
+ {2870, {wxStyledTextEvent, getModificationType, 0}},
+ {2871, {wxStyledTextEvent, getText, 0}},
+ {2872, {wxStyledTextEvent, getLength, 0}},
+ {2873, {wxStyledTextEvent, getLinesAdded, 0}},
+ {2874, {wxStyledTextEvent, getLine, 0}},
+ {2875, {wxStyledTextEvent, getFoldLevelNow, 0}},
+ {2876, {wxStyledTextEvent, getFoldLevelPrev, 0}},
+ {2877, {wxStyledTextEvent, getMargin, 0}},
+ {2878, {wxStyledTextEvent, getMessage, 0}},
+ {2879, {wxStyledTextEvent, getWParam, 0}},
+ {2880, {wxStyledTextEvent, getLParam, 0}},
+ {2881, {wxStyledTextEvent, getListType, 0}},
+ {2882, {wxStyledTextEvent, getX, 0}},
+ {2883, {wxStyledTextEvent, getY, 0}},
+ {2884, {wxStyledTextEvent, getDragText, 0}},
+ {2885, {wxStyledTextEvent, getDragAllowMove, 0}},
+ {2886, {wxStyledTextEvent, getDragResult, 0}},
+ {2887, {wxStyledTextEvent, getShift, 0}},
+ {2888, {wxStyledTextEvent, getControl, 0}},
+ {2889, {wxStyledTextEvent, getAlt, 0}},
+ {2890, {utils, getKeyState, 1}},
+ {2891, {utils, getMousePosition, 2}},
+ {2892, {utils, getMouseState, 0}},
+ {2893, {utils, setDetectableAutoRepeat, 1}},
+ {2894, {utils, bell, 0}},
+ {2895, {utils, findMenuItemId, 3}},
+ {2896, {utils, genericFindWindowAtPoint, 1}},
+ {2897, {utils, findWindowAtPoint, 1}},
+ {2898, {utils, beginBusyCursor, 1}},
+ {2899, {utils, endBusyCursor, 0}},
+ {2900, {utils, isBusy, 0}},
+ {2901, {utils, shutdown, 1}},
+ {2902, {utils, shell, 1}},
+ {2903, {utils, launchDefaultBrowser, 2}},
+ {2904, {utils, getEmailAddress, 0}},
+ {2905, {utils, getUserId, 0}},
+ {2906, {utils, getHomeDir, 0}},
+ {2907, {utils, newId, 0}},
+ {2908, {utils, registerId, 1}},
+ {2909, {utils, getCurrentId, 0}},
+ {2910, {utils, getOsDescription, 0}},
+ {2911, {utils, isPlatformLittleEndian, 0}},
+ {2912, {utils, isPlatform64Bit, 0}},
+ {2913, {wxPrintout, new, 1}},
+ {2914, {wxPrintout, destruct, 0}},
+ {2915, {wxPrintout, getDC, 0}},
+ {2916, {wxPrintout, getPageSizeMM, 2}},
+ {2917, {wxPrintout, getPageSizePixels, 2}},
+ {2918, {wxPrintout, getPaperRectPixels, 0}},
+ {2919, {wxPrintout, getPPIPrinter, 2}},
+ {2920, {wxPrintout, getPPIScreen, 2}},
+ {2921, {wxPrintout, getTitle, 0}},
+ {2922, {wxPrintout, isPreview, 0}},
+ {2923, {wxPrintout, fitThisSizeToPaper, 1}},
+ {2924, {wxPrintout, fitThisSizeToPage, 1}},
+ {2925, {wxPrintout, fitThisSizeToPageMargins, 2}},
+ {2926, {wxPrintout, mapScreenSizeToPaper, 0}},
+ {2927, {wxPrintout, mapScreenSizeToPage, 0}},
+ {2928, {wxPrintout, mapScreenSizeToPageMargins, 1}},
+ {2929, {wxPrintout, mapScreenSizeToDevice, 0}},
+ {2930, {wxPrintout, getLogicalPaperRect, 0}},
+ {2931, {wxPrintout, getLogicalPageRect, 0}},
+ {2932, {wxPrintout, getLogicalPageMarginsRect, 1}},
+ {2933, {wxPrintout, setLogicalOrigin, 2}},
+ {2934, {wxPrintout, offsetLogicalOrigin, 2}},
+ {2935, {wxStyledTextCtrl, new_2, 2}},
+ {2936, {wxStyledTextCtrl, new_0, 0}},
+ {2937, {wxStyledTextCtrl, destruct, 0}},
+ {2938, {wxStyledTextCtrl, create, 2}},
+ {2939, {wxStyledTextCtrl, addText, 1}},
+ {2940, {wxStyledTextCtrl, addStyledText, 1}},
+ {2941, {wxStyledTextCtrl, insertText, 2}},
+ {2942, {wxStyledTextCtrl, clearAll, 0}},
+ {2943, {wxStyledTextCtrl, clearDocumentStyle, 0}},
+ {2944, {wxStyledTextCtrl, getLength, 0}},
+ {2945, {wxStyledTextCtrl, getCharAt, 1}},
+ {2946, {wxStyledTextCtrl, getCurrentPos, 0}},
+ {2947, {wxStyledTextCtrl, getAnchor, 0}},
+ {2948, {wxStyledTextCtrl, getStyleAt, 1}},
+ {2949, {wxStyledTextCtrl, redo, 0}},
+ {2950, {wxStyledTextCtrl, setUndoCollection, 1}},
+ {2951, {wxStyledTextCtrl, selectAll, 0}},
+ {2952, {wxStyledTextCtrl, setSavePoint, 0}},
+ {2953, {wxStyledTextCtrl, getStyledText, 2}},
+ {2954, {wxStyledTextCtrl, canRedo, 0}},
+ {2955, {wxStyledTextCtrl, markerLineFromHandle, 1}},
+ {2956, {wxStyledTextCtrl, markerDeleteHandle, 1}},
+ {2957, {wxStyledTextCtrl, getUndoCollection, 0}},
+ {2958, {wxStyledTextCtrl, getViewWhiteSpace, 0}},
+ {2959, {wxStyledTextCtrl, setViewWhiteSpace, 1}},
+ {2960, {wxStyledTextCtrl, positionFromPoint, 1}},
+ {2961, {wxStyledTextCtrl, positionFromPointClose, 2}},
+ {2962, {wxStyledTextCtrl, gotoLine, 1}},
+ {2963, {wxStyledTextCtrl, gotoPos, 1}},
+ {2964, {wxStyledTextCtrl, setAnchor, 1}},
+ {2965, {wxStyledTextCtrl, getCurLine, 1}},
+ {2966, {wxStyledTextCtrl, getEndStyled, 0}},
+ {2967, {wxStyledTextCtrl, convertEOLs, 1}},
+ {2968, {wxStyledTextCtrl, getEOLMode, 0}},
+ {2969, {wxStyledTextCtrl, setEOLMode, 1}},
+ {2970, {wxStyledTextCtrl, startStyling, 2}},
+ {2971, {wxStyledTextCtrl, setStyling, 2}},
+ {2972, {wxStyledTextCtrl, getBufferedDraw, 0}},
+ {2973, {wxStyledTextCtrl, setBufferedDraw, 1}},
+ {2974, {wxStyledTextCtrl, setTabWidth, 1}},
+ {2975, {wxStyledTextCtrl, getTabWidth, 0}},
+ {2976, {wxStyledTextCtrl, setCodePage, 1}},
+ {2977, {wxStyledTextCtrl, markerDefine, 3}},
+ {2978, {wxStyledTextCtrl, markerSetForeground, 2}},
+ {2979, {wxStyledTextCtrl, markerSetBackground, 2}},
+ {2980, {wxStyledTextCtrl, markerAdd, 2}},
+ {2981, {wxStyledTextCtrl, markerDelete, 2}},
+ {2982, {wxStyledTextCtrl, markerDeleteAll, 1}},
+ {2983, {wxStyledTextCtrl, markerGet, 1}},
+ {2984, {wxStyledTextCtrl, markerNext, 2}},
+ {2985, {wxStyledTextCtrl, markerPrevious, 2}},
+ {2986, {wxStyledTextCtrl, markerDefineBitmap, 2}},
+ {2987, {wxStyledTextCtrl, markerAddSet, 2}},
+ {2988, {wxStyledTextCtrl, markerSetAlpha, 2}},
+ {2989, {wxStyledTextCtrl, setMarginType, 2}},
+ {2990, {wxStyledTextCtrl, getMarginType, 1}},
+ {2991, {wxStyledTextCtrl, setMarginWidth, 2}},
+ {2992, {wxStyledTextCtrl, getMarginWidth, 1}},
+ {2993, {wxStyledTextCtrl, setMarginMask, 2}},
+ {2994, {wxStyledTextCtrl, getMarginMask, 1}},
+ {2995, {wxStyledTextCtrl, setMarginSensitive, 2}},
+ {2996, {wxStyledTextCtrl, getMarginSensitive, 1}},
+ {2997, {wxStyledTextCtrl, styleClearAll, 0}},
+ {2998, {wxStyledTextCtrl, styleSetForeground, 2}},
+ {2999, {wxStyledTextCtrl, styleSetBackground, 2}},
+ {3000, {wxStyledTextCtrl, styleSetBold, 2}},
+ {3001, {wxStyledTextCtrl, styleSetItalic, 2}},
+ {3002, {wxStyledTextCtrl, styleSetSize, 2}},
+ {3003, {wxStyledTextCtrl, styleSetFaceName, 2}},
+ {3004, {wxStyledTextCtrl, styleSetEOLFilled, 2}},
+ {3005, {wxStyledTextCtrl, styleResetDefault, 0}},
+ {3006, {wxStyledTextCtrl, styleSetUnderline, 2}},
+ {3007, {wxStyledTextCtrl, styleSetCase, 2}},
+ {3008, {wxStyledTextCtrl, styleSetHotSpot, 2}},
+ {3009, {wxStyledTextCtrl, setSelForeground, 2}},
+ {3010, {wxStyledTextCtrl, setSelBackground, 2}},
+ {3011, {wxStyledTextCtrl, getSelAlpha, 0}},
+ {3012, {wxStyledTextCtrl, setSelAlpha, 1}},
+ {3013, {wxStyledTextCtrl, setCaretForeground, 1}},
+ {3014, {wxStyledTextCtrl, cmdKeyAssign, 3}},
+ {3015, {wxStyledTextCtrl, cmdKeyClear, 2}},
+ {3016, {wxStyledTextCtrl, cmdKeyClearAll, 0}},
+ {3017, {wxStyledTextCtrl, setStyleBytes, 2}},
+ {3018, {wxStyledTextCtrl, styleSetVisible, 2}},
+ {3019, {wxStyledTextCtrl, getCaretPeriod, 0}},
+ {3020, {wxStyledTextCtrl, setCaretPeriod, 1}},
+ {3021, {wxStyledTextCtrl, setWordChars, 1}},
+ {3022, {wxStyledTextCtrl, beginUndoAction, 0}},
+ {3023, {wxStyledTextCtrl, endUndoAction, 0}},
+ {3024, {wxStyledTextCtrl, indicatorSetStyle, 2}},
+ {3025, {wxStyledTextCtrl, indicatorGetStyle, 1}},
+ {3026, {wxStyledTextCtrl, indicatorSetForeground, 2}},
+ {3027, {wxStyledTextCtrl, indicatorGetForeground, 1}},
+ {3028, {wxStyledTextCtrl, setWhitespaceForeground, 2}},
+ {3029, {wxStyledTextCtrl, setWhitespaceBackground, 2}},
+ {3030, {wxStyledTextCtrl, getStyleBits, 0}},
+ {3031, {wxStyledTextCtrl, setLineState, 2}},
+ {3032, {wxStyledTextCtrl, getLineState, 1}},
+ {3033, {wxStyledTextCtrl, getMaxLineState, 0}},
+ {3034, {wxStyledTextCtrl, getCaretLineVisible, 0}},
+ {3035, {wxStyledTextCtrl, setCaretLineVisible, 1}},
+ {3036, {wxStyledTextCtrl, getCaretLineBackground, 0}},
+ {3037, {wxStyledTextCtrl, setCaretLineBackground, 1}},
+ {3038, {wxStyledTextCtrl, autoCompShow, 2}},
+ {3039, {wxStyledTextCtrl, autoCompCancel, 0}},
+ {3040, {wxStyledTextCtrl, autoCompActive, 0}},
+ {3041, {wxStyledTextCtrl, autoCompPosStart, 0}},
+ {3042, {wxStyledTextCtrl, autoCompComplete, 0}},
+ {3043, {wxStyledTextCtrl, autoCompStops, 1}},
+ {3044, {wxStyledTextCtrl, autoCompSetSeparator, 1}},
+ {3045, {wxStyledTextCtrl, autoCompGetSeparator, 0}},
+ {3046, {wxStyledTextCtrl, autoCompSelect, 1}},
+ {3047, {wxStyledTextCtrl, autoCompSetCancelAtStart, 1}},
+ {3048, {wxStyledTextCtrl, autoCompGetCancelAtStart, 0}},
+ {3049, {wxStyledTextCtrl, autoCompSetFillUps, 1}},
+ {3050, {wxStyledTextCtrl, autoCompSetChooseSingle, 1}},
+ {3051, {wxStyledTextCtrl, autoCompGetChooseSingle, 0}},
+ {3052, {wxStyledTextCtrl, autoCompSetIgnoreCase, 1}},
+ {3053, {wxStyledTextCtrl, autoCompGetIgnoreCase, 0}},
+ {3054, {wxStyledTextCtrl, userListShow, 2}},
+ {3055, {wxStyledTextCtrl, autoCompSetAutoHide, 1}},
+ {3056, {wxStyledTextCtrl, autoCompGetAutoHide, 0}},
+ {3057, {wxStyledTextCtrl, autoCompSetDropRestOfWord, 1}},
+ {3058, {wxStyledTextCtrl, autoCompGetDropRestOfWord, 0}},
+ {3059, {wxStyledTextCtrl, registerImage, 2}},
+ {3060, {wxStyledTextCtrl, clearRegisteredImages, 0}},
+ {3061, {wxStyledTextCtrl, autoCompGetTypeSeparator, 0}},
+ {3062, {wxStyledTextCtrl, autoCompSetTypeSeparator, 1}},
+ {3063, {wxStyledTextCtrl, autoCompSetMaxWidth, 1}},
+ {3064, {wxStyledTextCtrl, autoCompGetMaxWidth, 0}},
+ {3065, {wxStyledTextCtrl, autoCompSetMaxHeight, 1}},
+ {3066, {wxStyledTextCtrl, autoCompGetMaxHeight, 0}},
+ {3067, {wxStyledTextCtrl, setIndent, 1}},
+ {3068, {wxStyledTextCtrl, getIndent, 0}},
+ {3069, {wxStyledTextCtrl, setUseTabs, 1}},
+ {3070, {wxStyledTextCtrl, getUseTabs, 0}},
+ {3071, {wxStyledTextCtrl, setLineIndentation, 2}},
+ {3072, {wxStyledTextCtrl, getLineIndentation, 1}},
+ {3073, {wxStyledTextCtrl, getLineIndentPosition, 1}},
+ {3074, {wxStyledTextCtrl, getColumn, 1}},
+ {3075, {wxStyledTextCtrl, setUseHorizontalScrollBar, 1}},
+ {3076, {wxStyledTextCtrl, getUseHorizontalScrollBar, 0}},
+ {3077, {wxStyledTextCtrl, setIndentationGuides, 1}},
+ {3078, {wxStyledTextCtrl, getIndentationGuides, 0}},
+ {3079, {wxStyledTextCtrl, setHighlightGuide, 1}},
+ {3080, {wxStyledTextCtrl, getHighlightGuide, 0}},
+ {3081, {wxStyledTextCtrl, getLineEndPosition, 1}},
+ {3082, {wxStyledTextCtrl, getCodePage, 0}},
+ {3083, {wxStyledTextCtrl, getCaretForeground, 0}},
+ {3084, {wxStyledTextCtrl, getReadOnly, 0}},
+ {3085, {wxStyledTextCtrl, setCurrentPos, 1}},
+ {3086, {wxStyledTextCtrl, setSelectionStart, 1}},
+ {3087, {wxStyledTextCtrl, getSelectionStart, 0}},
+ {3088, {wxStyledTextCtrl, setSelectionEnd, 1}},
+ {3089, {wxStyledTextCtrl, getSelectionEnd, 0}},
+ {3090, {wxStyledTextCtrl, setPrintMagnification, 1}},
+ {3091, {wxStyledTextCtrl, getPrintMagnification, 0}},
+ {3092, {wxStyledTextCtrl, setPrintColourMode, 1}},
+ {3093, {wxStyledTextCtrl, getPrintColourMode, 0}},
+ {3094, {wxStyledTextCtrl, findText, 4}},
+ {3095, {wxStyledTextCtrl, formatRange, 7}},
+ {3096, {wxStyledTextCtrl, getFirstVisibleLine, 0}},
+ {3097, {wxStyledTextCtrl, getLine, 1}},
+ {3098, {wxStyledTextCtrl, getLineCount, 0}},
+ {3099, {wxStyledTextCtrl, setMarginLeft, 1}},
+ {3100, {wxStyledTextCtrl, getMarginLeft, 0}},
+ {3101, {wxStyledTextCtrl, setMarginRight, 1}},
+ {3102, {wxStyledTextCtrl, getMarginRight, 0}},
+ {3103, {wxStyledTextCtrl, getModify, 0}},
+ {3104, {wxStyledTextCtrl, setSelection, 2}},
+ {3105, {wxStyledTextCtrl, getSelectedText, 0}},
+ {3106, {wxStyledTextCtrl, getTextRange, 2}},
+ {3107, {wxStyledTextCtrl, hideSelection, 1}},
+ {3108, {wxStyledTextCtrl, lineFromPosition, 1}},
+ {3109, {wxStyledTextCtrl, positionFromLine, 1}},
+ {3110, {wxStyledTextCtrl, lineScroll, 2}},
+ {3111, {wxStyledTextCtrl, ensureCaretVisible, 0}},
+ {3112, {wxStyledTextCtrl, replaceSelection, 1}},
+ {3113, {wxStyledTextCtrl, setReadOnly, 1}},
+ {3114, {wxStyledTextCtrl, canPaste, 0}},
+ {3115, {wxStyledTextCtrl, canUndo, 0}},
+ {3116, {wxStyledTextCtrl, emptyUndoBuffer, 0}},
+ {3117, {wxStyledTextCtrl, undo, 0}},
+ {3118, {wxStyledTextCtrl, cut, 0}},
+ {3119, {wxStyledTextCtrl, copy, 0}},
+ {3120, {wxStyledTextCtrl, paste, 0}},
+ {3121, {wxStyledTextCtrl, clear, 0}},
+ {3122, {wxStyledTextCtrl, setText, 1}},
+ {3123, {wxStyledTextCtrl, getText, 0}},
+ {3124, {wxStyledTextCtrl, getTextLength, 0}},
+ {3125, {wxStyledTextCtrl, getOvertype, 0}},
+ {3126, {wxStyledTextCtrl, setCaretWidth, 1}},
+ {3127, {wxStyledTextCtrl, getCaretWidth, 0}},
+ {3128, {wxStyledTextCtrl, setTargetStart, 1}},
+ {3129, {wxStyledTextCtrl, getTargetStart, 0}},
+ {3130, {wxStyledTextCtrl, setTargetEnd, 1}},
+ {3131, {wxStyledTextCtrl, getTargetEnd, 0}},
+ {3132, {wxStyledTextCtrl, replaceTarget, 1}},
+ {3133, {wxStyledTextCtrl, searchInTarget, 1}},
+ {3134, {wxStyledTextCtrl, setSearchFlags, 1}},
+ {3135, {wxStyledTextCtrl, getSearchFlags, 0}},
+ {3136, {wxStyledTextCtrl, callTipShow, 2}},
+ {3137, {wxStyledTextCtrl, callTipCancel, 0}},
+ {3138, {wxStyledTextCtrl, callTipActive, 0}},
+ {3139, {wxStyledTextCtrl, callTipPosAtStart, 0}},
+ {3140, {wxStyledTextCtrl, callTipSetHighlight, 2}},
+ {3141, {wxStyledTextCtrl, callTipSetBackground, 1}},
+ {3142, {wxStyledTextCtrl, callTipSetForeground, 1}},
+ {3143, {wxStyledTextCtrl, callTipSetForegroundHighlight, 1}},
+ {3144, {wxStyledTextCtrl, callTipUseStyle, 1}},
+ {3145, {wxStyledTextCtrl, visibleFromDocLine, 1}},
+ {3146, {wxStyledTextCtrl, docLineFromVisible, 1}},
+ {3147, {wxStyledTextCtrl, wrapCount, 1}},
+ {3148, {wxStyledTextCtrl, setFoldLevel, 2}},
+ {3149, {wxStyledTextCtrl, getFoldLevel, 1}},
+ {3150, {wxStyledTextCtrl, getLastChild, 2}},
+ {3151, {wxStyledTextCtrl, getFoldParent, 1}},
+ {3152, {wxStyledTextCtrl, showLines, 2}},
+ {3153, {wxStyledTextCtrl, hideLines, 2}},
+ {3154, {wxStyledTextCtrl, getLineVisible, 1}},
+ {3155, {wxStyledTextCtrl, setFoldExpanded, 2}},
+ {3156, {wxStyledTextCtrl, getFoldExpanded, 1}},
+ {3157, {wxStyledTextCtrl, toggleFold, 1}},
+ {3158, {wxStyledTextCtrl, ensureVisible, 1}},
+ {3159, {wxStyledTextCtrl, setFoldFlags, 1}},
+ {3160, {wxStyledTextCtrl, ensureVisibleEnforcePolicy, 1}},
+ {3161, {wxStyledTextCtrl, setTabIndents, 1}},
+ {3162, {wxStyledTextCtrl, getTabIndents, 0}},
+ {3163, {wxStyledTextCtrl, setBackSpaceUnIndents, 1}},
+ {3164, {wxStyledTextCtrl, getBackSpaceUnIndents, 0}},
+ {3165, {wxStyledTextCtrl, setMouseDwellTime, 1}},
+ {3166, {wxStyledTextCtrl, getMouseDwellTime, 0}},
+ {3167, {wxStyledTextCtrl, wordStartPosition, 2}},
+ {3168, {wxStyledTextCtrl, wordEndPosition, 2}},
+ {3169, {wxStyledTextCtrl, setWrapMode, 1}},
+ {3170, {wxStyledTextCtrl, getWrapMode, 0}},
+ {3171, {wxStyledTextCtrl, setWrapVisualFlags, 1}},
+ {3172, {wxStyledTextCtrl, getWrapVisualFlags, 0}},
+ {3173, {wxStyledTextCtrl, setWrapVisualFlagsLocation, 1}},
+ {3174, {wxStyledTextCtrl, getWrapVisualFlagsLocation, 0}},
+ {3175, {wxStyledTextCtrl, setWrapStartIndent, 1}},
+ {3176, {wxStyledTextCtrl, getWrapStartIndent, 0}},
+ {3177, {wxStyledTextCtrl, setLayoutCache, 1}},
+ {3178, {wxStyledTextCtrl, getLayoutCache, 0}},
+ {3179, {wxStyledTextCtrl, setScrollWidth, 1}},
+ {3180, {wxStyledTextCtrl, getScrollWidth, 0}},
+ {3181, {wxStyledTextCtrl, textWidth, 2}},
+ {3182, {wxStyledTextCtrl, getEndAtLastLine, 0}},
+ {3183, {wxStyledTextCtrl, textHeight, 1}},
+ {3184, {wxStyledTextCtrl, setUseVerticalScrollBar, 1}},
+ {3185, {wxStyledTextCtrl, getUseVerticalScrollBar, 0}},
+ {3186, {wxStyledTextCtrl, appendText, 1}},
+ {3187, {wxStyledTextCtrl, getTwoPhaseDraw, 0}},
+ {3188, {wxStyledTextCtrl, setTwoPhaseDraw, 1}},
+ {3189, {wxStyledTextCtrl, targetFromSelection, 0}},
+ {3190, {wxStyledTextCtrl, linesJoin, 0}},
+ {3191, {wxStyledTextCtrl, linesSplit, 1}},
+ {3192, {wxStyledTextCtrl, setFoldMarginColour, 2}},
+ {3193, {wxStyledTextCtrl, setFoldMarginHiColour, 2}},
+ {3194, {wxStyledTextCtrl, lineDown, 0}},
+ {3195, {wxStyledTextCtrl, lineDownExtend, 0}},
+ {3196, {wxStyledTextCtrl, lineUp, 0}},
+ {3197, {wxStyledTextCtrl, lineUpExtend, 0}},
+ {3198, {wxStyledTextCtrl, charLeft, 0}},
+ {3199, {wxStyledTextCtrl, charLeftExtend, 0}},
+ {3200, {wxStyledTextCtrl, charRight, 0}},
+ {3201, {wxStyledTextCtrl, charRightExtend, 0}},
+ {3202, {wxStyledTextCtrl, wordLeft, 0}},
+ {3203, {wxStyledTextCtrl, wordLeftExtend, 0}},
+ {3204, {wxStyledTextCtrl, wordRight, 0}},
+ {3205, {wxStyledTextCtrl, wordRightExtend, 0}},
+ {3206, {wxStyledTextCtrl, home, 0}},
+ {3207, {wxStyledTextCtrl, homeExtend, 0}},
+ {3208, {wxStyledTextCtrl, lineEnd, 0}},
+ {3209, {wxStyledTextCtrl, lineEndExtend, 0}},
+ {3210, {wxStyledTextCtrl, documentStart, 0}},
+ {3211, {wxStyledTextCtrl, documentStartExtend, 0}},
+ {3212, {wxStyledTextCtrl, documentEnd, 0}},
+ {3213, {wxStyledTextCtrl, documentEndExtend, 0}},
+ {3214, {wxStyledTextCtrl, pageUp, 0}},
+ {3215, {wxStyledTextCtrl, pageUpExtend, 0}},
+ {3216, {wxStyledTextCtrl, pageDown, 0}},
+ {3217, {wxStyledTextCtrl, pageDownExtend, 0}},
+ {3218, {wxStyledTextCtrl, editToggleOvertype, 0}},
+ {3219, {wxStyledTextCtrl, cancel, 0}},
+ {3220, {wxStyledTextCtrl, deleteBack, 0}},
+ {3221, {wxStyledTextCtrl, tab, 0}},
+ {3222, {wxStyledTextCtrl, backTab, 0}},
+ {3223, {wxStyledTextCtrl, newLine, 0}},
+ {3224, {wxStyledTextCtrl, formFeed, 0}},
+ {3225, {wxStyledTextCtrl, vCHome, 0}},
+ {3226, {wxStyledTextCtrl, vCHomeExtend, 0}},
+ {3227, {wxStyledTextCtrl, zoomIn, 0}},
+ {3228, {wxStyledTextCtrl, zoomOut, 0}},
+ {3229, {wxStyledTextCtrl, delWordLeft, 0}},
+ {3230, {wxStyledTextCtrl, delWordRight, 0}},
+ {3231, {wxStyledTextCtrl, lineCut, 0}},
+ {3232, {wxStyledTextCtrl, lineDelete, 0}},
+ {3233, {wxStyledTextCtrl, lineTranspose, 0}},
+ {3234, {wxStyledTextCtrl, lineDuplicate, 0}},
+ {3235, {wxStyledTextCtrl, lowerCase, 0}},
+ {3236, {wxStyledTextCtrl, upperCase, 0}},
+ {3237, {wxStyledTextCtrl, lineScrollDown, 0}},
+ {3238, {wxStyledTextCtrl, lineScrollUp, 0}},
+ {3239, {wxStyledTextCtrl, deleteBackNotLine, 0}},
+ {3240, {wxStyledTextCtrl, homeDisplay, 0}},
+ {3241, {wxStyledTextCtrl, homeDisplayExtend, 0}},
+ {3242, {wxStyledTextCtrl, lineEndDisplay, 0}},
+ {3243, {wxStyledTextCtrl, lineEndDisplayExtend, 0}},
+ {3244, {wxStyledTextCtrl, homeWrapExtend, 0}},
+ {3245, {wxStyledTextCtrl, lineEndWrap, 0}},
+ {3246, {wxStyledTextCtrl, lineEndWrapExtend, 0}},
+ {3247, {wxStyledTextCtrl, vCHomeWrap, 0}},
+ {3248, {wxStyledTextCtrl, vCHomeWrapExtend, 0}},
+ {3249, {wxStyledTextCtrl, lineCopy, 0}},
+ {3250, {wxStyledTextCtrl, moveCaretInsideView, 0}},
+ {3251, {wxStyledTextCtrl, lineLength, 1}},
+ {3252, {wxStyledTextCtrl, braceHighlight, 2}},
+ {3253, {wxStyledTextCtrl, braceBadLight, 1}},
+ {3254, {wxStyledTextCtrl, braceMatch, 1}},
+ {3255, {wxStyledTextCtrl, getViewEOL, 0}},
+ {3256, {wxStyledTextCtrl, setViewEOL, 1}},
+ {3257, {wxStyledTextCtrl, setModEventMask, 1}},
+ {3258, {wxStyledTextCtrl, getEdgeColumn, 0}},
+ {3259, {wxStyledTextCtrl, setEdgeColumn, 1}},
+ {3260, {wxStyledTextCtrl, getEdgeMode, 0}},
+ {3261, {wxStyledTextCtrl, getEdgeColour, 0}},
+ {3262, {wxStyledTextCtrl, setEdgeColour, 1}},
+ {3263, {wxStyledTextCtrl, searchAnchor, 0}},
+ {3264, {wxStyledTextCtrl, searchNext, 2}},
+ {3265, {wxStyledTextCtrl, searchPrev, 2}},
+ {3266, {wxStyledTextCtrl, linesOnScreen, 0}},
+ {3267, {wxStyledTextCtrl, usePopUp, 1}},
+ {3268, {wxStyledTextCtrl, selectionIsRectangle, 0}},
+ {3269, {wxStyledTextCtrl, setZoom, 1}},
+ {3270, {wxStyledTextCtrl, getZoom, 0}},
+ {3271, {wxStyledTextCtrl, getModEventMask, 0}},
+ {3272, {wxStyledTextCtrl, setSTCFocus, 1}},
+ {3273, {wxStyledTextCtrl, getSTCFocus, 0}},
+ {3274, {wxStyledTextCtrl, setStatus, 1}},
+ {3275, {wxStyledTextCtrl, getStatus, 0}},
+ {3276, {wxStyledTextCtrl, setMouseDownCaptures, 1}},
+ {3277, {wxStyledTextCtrl, getMouseDownCaptures, 0}},
+ {3278, {wxStyledTextCtrl, setSTCCursor, 1}},
+ {3279, {wxStyledTextCtrl, getSTCCursor, 0}},
+ {3280, {wxStyledTextCtrl, setControlCharSymbol, 1}},
+ {3281, {wxStyledTextCtrl, getControlCharSymbol, 0}},
+ {3282, {wxStyledTextCtrl, wordPartLeft, 0}},
+ {3283, {wxStyledTextCtrl, wordPartLeftExtend, 0}},
+ {3284, {wxStyledTextCtrl, wordPartRight, 0}},
+ {3285, {wxStyledTextCtrl, wordPartRightExtend, 0}},
+ {3286, {wxStyledTextCtrl, setVisiblePolicy, 2}},
+ {3287, {wxStyledTextCtrl, delLineLeft, 0}},
+ {3288, {wxStyledTextCtrl, delLineRight, 0}},
+ {3289, {wxStyledTextCtrl, getXOffset, 0}},
+ {3290, {wxStyledTextCtrl, chooseCaretX, 0}},
+ {3291, {wxStyledTextCtrl, setXCaretPolicy, 2}},
+ {3292, {wxStyledTextCtrl, setYCaretPolicy, 2}},
+ {3293, {wxStyledTextCtrl, getPrintWrapMode, 0}},
+ {3294, {wxStyledTextCtrl, setHotspotActiveForeground, 2}},
+ {3295, {wxStyledTextCtrl, setHotspotActiveBackground, 2}},
+ {3296, {wxStyledTextCtrl, setHotspotActiveUnderline, 1}},
+ {3297, {wxStyledTextCtrl, setHotspotSingleLine, 1}},
+ {3298, {wxStyledTextCtrl, paraDownExtend, 0}},
+ {3299, {wxStyledTextCtrl, paraUp, 0}},
+ {3300, {wxStyledTextCtrl, paraUpExtend, 0}},
+ {3301, {wxStyledTextCtrl, positionBefore, 1}},
+ {3302, {wxStyledTextCtrl, positionAfter, 1}},
+ {3303, {wxStyledTextCtrl, copyRange, 2}},
+ {3304, {wxStyledTextCtrl, copyText, 2}},
+ {3305, {wxStyledTextCtrl, setSelectionMode, 1}},
+ {3306, {wxStyledTextCtrl, getSelectionMode, 0}},
+ {3307, {wxStyledTextCtrl, lineDownRectExtend, 0}},
+ {3308, {wxStyledTextCtrl, lineUpRectExtend, 0}},
+ {3309, {wxStyledTextCtrl, charLeftRectExtend, 0}},
+ {3310, {wxStyledTextCtrl, charRightRectExtend, 0}},
+ {3311, {wxStyledTextCtrl, homeRectExtend, 0}},
+ {3312, {wxStyledTextCtrl, vCHomeRectExtend, 0}},
+ {3313, {wxStyledTextCtrl, lineEndRectExtend, 0}},
+ {3314, {wxStyledTextCtrl, pageUpRectExtend, 0}},
+ {3315, {wxStyledTextCtrl, pageDownRectExtend, 0}},
+ {3316, {wxStyledTextCtrl, stutteredPageUp, 0}},
+ {3317, {wxStyledTextCtrl, stutteredPageUpExtend, 0}},
+ {3318, {wxStyledTextCtrl, stutteredPageDown, 0}},
+ {3319, {wxStyledTextCtrl, stutteredPageDownExtend, 0}},
+ {3320, {wxStyledTextCtrl, wordLeftEnd, 0}},
+ {3321, {wxStyledTextCtrl, wordLeftEndExtend, 0}},
+ {3322, {wxStyledTextCtrl, wordRightEnd, 0}},
+ {3323, {wxStyledTextCtrl, wordRightEndExtend, 0}},
+ {3324, {wxStyledTextCtrl, setWhitespaceChars, 1}},
+ {3325, {wxStyledTextCtrl, setCharsDefault, 0}},
+ {3326, {wxStyledTextCtrl, autoCompGetCurrent, 0}},
+ {3327, {wxStyledTextCtrl, allocate, 1}},
+ {3328, {wxStyledTextCtrl, findColumn, 2}},
+ {3329, {wxStyledTextCtrl, getCaretSticky, 0}},
+ {3330, {wxStyledTextCtrl, setCaretSticky, 1}},
+ {3331, {wxStyledTextCtrl, toggleCaretSticky, 0}},
+ {3332, {wxStyledTextCtrl, setPasteConvertEndings, 1}},
+ {3333, {wxStyledTextCtrl, getPasteConvertEndings, 0}},
+ {3334, {wxStyledTextCtrl, selectionDuplicate, 0}},
+ {3335, {wxStyledTextCtrl, setCaretLineBackAlpha, 1}},
+ {3336, {wxStyledTextCtrl, getCaretLineBackAlpha, 0}},
+ {3337, {wxStyledTextCtrl, startRecord, 0}},
+ {3338, {wxStyledTextCtrl, stopRecord, 0}},
+ {3339, {wxStyledTextCtrl, setLexer, 1}},
+ {3340, {wxStyledTextCtrl, getLexer, 0}},
+ {3341, {wxStyledTextCtrl, colourise, 2}},
+ {3342, {wxStyledTextCtrl, setProperty, 2}},
+ {3343, {wxStyledTextCtrl, setKeyWords, 2}},
+ {3344, {wxStyledTextCtrl, setLexerLanguage, 1}},
+ {3345, {wxStyledTextCtrl, getProperty, 1}},
+ {3346, {wxStyledTextCtrl, getStyleBitsNeeded, 0}},
+ {3347, {wxStyledTextCtrl, getCurrentLine, 0}},
+ {3348, {wxStyledTextCtrl, styleSetSpec, 2}},
+ {3349, {wxStyledTextCtrl, styleSetFont, 2}},
+ {3350, {wxStyledTextCtrl, styleSetFontAttr, 7}},
+ {3351, {wxStyledTextCtrl, styleSetCharacterSet, 2}},
+ {3352, {wxStyledTextCtrl, styleSetFontEncoding, 2}},
+ {3353, {wxStyledTextCtrl, cmdKeyExecute, 1}},
+ {3354, {wxStyledTextCtrl, setMargins, 2}},
+ {3355, {wxStyledTextCtrl, getSelection, 2}},
+ {3356, {wxStyledTextCtrl, pointFromPosition, 1}},
+ {3357, {wxStyledTextCtrl, scrollToLine, 1}},
+ {3358, {wxStyledTextCtrl, scrollToColumn, 1}},
+ {3359, {wxStyledTextCtrl, sendMsg, 2}},
+ {3360, {wxStyledTextCtrl, setVScrollBar, 1}},
+ {3361, {wxStyledTextCtrl, setHScrollBar, 1}},
+ {3362, {wxStyledTextCtrl, getLastKeydownProcessed, 0}},
+ {3363, {wxStyledTextCtrl, setLastKeydownProcessed, 1}},
+ {3364, {wxStyledTextCtrl, saveFile, 1}},
+ {3365, {wxStyledTextCtrl, loadFile, 1}},
+ {3366, {wxStyledTextCtrl, doDragOver, 3}},
+ {3367, {wxStyledTextCtrl, doDropText, 3}},
+ {3368, {wxStyledTextCtrl, getUseAntiAliasing, 0}},
+ {3369, {wxStyledTextCtrl, addTextRaw, 1}},
+ {3370, {wxStyledTextCtrl, insertTextRaw, 2}},
+ {3371, {wxStyledTextCtrl, getCurLineRaw, 1}},
+ {3372, {wxStyledTextCtrl, getLineRaw, 1}},
+ {3373, {wxStyledTextCtrl, getSelectedTextRaw, 0}},
+ {3374, {wxStyledTextCtrl, getTextRangeRaw, 2}},
+ {3375, {wxStyledTextCtrl, setTextRaw, 1}},
+ {3376, {wxStyledTextCtrl, getTextRaw, 0}},
+ {3377, {wxStyledTextCtrl, appendTextRaw, 1}},
+ {3378, {wxArtProvider, getBitmap, 2}},
+ {3379, {wxArtProvider, getIcon, 2}},
+ {3380, {wxTreeEvent, getKeyCode, 0}},
+ {3381, {wxTreeEvent, getItem, 0}},
+ {3382, {wxTreeEvent, getKeyEvent, 0}},
+ {3383, {wxTreeEvent, getLabel, 0}},
+ {3384, {wxTreeEvent, getOldItem, 0}},
+ {3385, {wxTreeEvent, getPoint, 0}},
+ {3386, {wxTreeEvent, isEditCancelled, 0}},
+ {3387, {wxTreeEvent, setToolTip, 1}},
+ {3388, {wxNotebookEvent, getOldSelection, 0}},
+ {3389, {wxNotebookEvent, getSelection, 0}},
+ {3390, {wxNotebookEvent, setOldSelection, 1}},
+ {3391, {wxNotebookEvent, setSelection, 1}},
+ {3392, {wxFileDataObject, new, 0}},
+ {3393, {wxFileDataObject, addFile, 1}},
+ {3394, {wxFileDataObject, getFilenames, 0}},
+ {3395, {wxFileDataObject, 'Destroy', undefined}},
+ {3396, {wxTextDataObject, new, 1}},
+ {3397, {wxTextDataObject, getTextLength, 0}},
+ {3398, {wxTextDataObject, getText, 0}},
+ {3399, {wxTextDataObject, setText, 1}},
+ {3400, {wxTextDataObject, 'Destroy', undefined}},
+ {3401, {wxBitmapDataObject, new_1_1, 1}},
+ {3402, {wxBitmapDataObject, new_1_0, 1}},
+ {3403, {wxBitmapDataObject, getBitmap, 0}},
+ {3404, {wxBitmapDataObject, setBitmap, 1}},
+ {3405, {wxBitmapDataObject, 'Destroy', undefined}},
+ {3407, {wxClipboard, new, 0}},
+ {3408, {wxClipboard, destruct, 0}},
+ {3409, {wxClipboard, addData, 1}},
+ {3410, {wxClipboard, clear, 0}},
+ {3411, {wxClipboard, close, 0}},
+ {3412, {wxClipboard, flush, 0}},
+ {3413, {wxClipboard, getData, 1}},
+ {3414, {wxClipboard, isOpened, 0}},
+ {3415, {wxClipboard, open, 0}},
+ {3416, {wxClipboard, setData, 1}},
+ {3418, {wxClipboard, usePrimarySelection, 1}},
+ {3419, {wxClipboard, isSupported, 1}},
+ {3420, {wxClipboard, get, 0}},
+ {3421, {wxSpinEvent, getPosition, 0}},
+ {3422, {wxSpinEvent, setPosition, 1}},
+ {3423, {wxSplitterWindow, new_0, 0}},
+ {3424, {wxSplitterWindow, new_2, 2}},
+ {3425, {wxSplitterWindow, destruct, 0}},
+ {3426, {wxSplitterWindow, create, 2}},
+ {3427, {wxSplitterWindow, getMinimumPaneSize, 0}},
+ {3428, {wxSplitterWindow, getSashGravity, 0}},
+ {3429, {wxSplitterWindow, getSashPosition, 0}},
+ {3430, {wxSplitterWindow, getSplitMode, 0}},
+ {3431, {wxSplitterWindow, getWindow1, 0}},
+ {3432, {wxSplitterWindow, getWindow2, 0}},
+ {3433, {wxSplitterWindow, initialize, 1}},
+ {3434, {wxSplitterWindow, isSplit, 0}},
+ {3435, {wxSplitterWindow, replaceWindow, 2}},
+ {3436, {wxSplitterWindow, setSashGravity, 1}},
+ {3437, {wxSplitterWindow, setSashPosition, 2}},
+ {3438, {wxSplitterWindow, setSashSize, 1}},
+ {3439, {wxSplitterWindow, setMinimumPaneSize, 1}},
+ {3440, {wxSplitterWindow, setSplitMode, 1}},
+ {3441, {wxSplitterWindow, splitHorizontally, 3}},
+ {3442, {wxSplitterWindow, splitVertically, 3}},
+ {3443, {wxSplitterWindow, unsplit, 1}},
+ {3444, {wxSplitterWindow, updateSize, 0}},
+ {3445, {wxSplitterEvent, getSashPosition, 0}},
+ {3446, {wxSplitterEvent, getX, 0}},
+ {3447, {wxSplitterEvent, getY, 0}},
+ {3448, {wxSplitterEvent, getWindowBeingRemoved, 0}},
+ {3449, {wxSplitterEvent, setSashPosition, 1}},
+ {3450, {wxHtmlWindow, new_0, 0}},
+ {3451, {wxHtmlWindow, new_2, 2}},
+ {3452, {wxHtmlWindow, appendToPage, 1}},
+ {3453, {wxHtmlWindow, getOpenedAnchor, 0}},
+ {3454, {wxHtmlWindow, getOpenedPage, 0}},
+ {3455, {wxHtmlWindow, getOpenedPageTitle, 0}},
+ {3456, {wxHtmlWindow, getRelatedFrame, 0}},
+ {3457, {wxHtmlWindow, historyBack, 0}},
+ {3458, {wxHtmlWindow, historyCanBack, 0}},
+ {3459, {wxHtmlWindow, historyCanForward, 0}},
+ {3460, {wxHtmlWindow, historyClear, 0}},
+ {3461, {wxHtmlWindow, historyForward, 0}},
+ {3462, {wxHtmlWindow, loadFile, 1}},
+ {3463, {wxHtmlWindow, loadPage, 1}},
+ {3464, {wxHtmlWindow, selectAll, 0}},
+ {3465, {wxHtmlWindow, selectionToText, 0}},
+ {3466, {wxHtmlWindow, selectLine, 1}},
+ {3467, {wxHtmlWindow, selectWord, 1}},
+ {3468, {wxHtmlWindow, setBorders, 1}},
+ {3469, {wxHtmlWindow, setFonts, 3}},
+ {3470, {wxHtmlWindow, setPage, 1}},
+ {3471, {wxHtmlWindow, setRelatedFrame, 2}},
+ {3472, {wxHtmlWindow, setRelatedStatusBar, 1}},
+ {3473, {wxHtmlWindow, toText, 0}},
+ {3474, {wxHtmlWindow, 'Destroy', undefined}},
+ {3475, {wxHtmlLinkEvent, getLinkInfo, 0}},
+ {3476, {wxAuiNotebookEvent, setSelection, 1}},
+ {3477, {wxAuiNotebookEvent, getSelection, 0}},
+ {3478, {wxAuiNotebookEvent, setOldSelection, 1}},
+ {3479, {wxAuiNotebookEvent, getOldSelection, 0}},
+ {3480, {wxAuiNotebookEvent, setDragSource, 1}},
+ {3481, {wxAuiNotebookEvent, getDragSource, 0}},
+ {3482, {wxAuiManagerEvent, setManager, 1}},
+ {3483, {wxAuiManagerEvent, getManager, 0}},
+ {3484, {wxAuiManagerEvent, setPane, 1}},
+ {3485, {wxAuiManagerEvent, getPane, 0}},
+ {3486, {wxAuiManagerEvent, setButton, 1}},
+ {3487, {wxAuiManagerEvent, getButton, 0}},
+ {3488, {wxAuiManagerEvent, setDC, 1}},
+ {3489, {wxAuiManagerEvent, getDC, 0}},
+ {3490, {wxAuiManagerEvent, veto, 1}},
+ {3491, {wxAuiManagerEvent, getVeto, 0}},
+ {3492, {wxAuiManagerEvent, setCanVeto, 1}},
+ {3493, {wxAuiManagerEvent, canVeto, 0}},
+ {3494, {wxLogNull, new, 0}},
+ {3495, {wxLogNull, 'Destroy', undefined}},
{-1, {mod, func, -1}}
].
diff --git a/lib/wx/src/gen/wxe_funcs.hrl b/lib/wx/src/gen/wxe_funcs.hrl
index eef90961db..98e7fbb767 100644
--- a/lib/wx/src/gen/wxe_funcs.hrl
+++ b/lib/wx/src/gen/wxe_funcs.hrl
@@ -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%
%% This file is generated DO NOT EDIT
@@ -1839,1435 +1839,1436 @@
-define(wxTreeCtrl_GetChildrenCount, 2015).
-define(wxTreeCtrl_GetCount, 2016).
-define(wxTreeCtrl_GetEditControl, 2017).
--define(wxTreeCtrl_GetFirstVisibleItem, 2018).
--define(wxTreeCtrl_GetImageList, 2019).
--define(wxTreeCtrl_GetIndent, 2020).
--define(wxTreeCtrl_GetItemBackgroundColour, 2021).
--define(wxTreeCtrl_GetItemData, 2022).
--define(wxTreeCtrl_GetItemFont, 2023).
--define(wxTreeCtrl_GetItemImage_1, 2024).
--define(wxTreeCtrl_GetItemImage_2, 2025).
--define(wxTreeCtrl_GetItemText, 2026).
--define(wxTreeCtrl_GetItemTextColour, 2027).
--define(wxTreeCtrl_GetLastChild, 2028).
--define(wxTreeCtrl_GetNextSibling, 2029).
--define(wxTreeCtrl_GetNextVisible, 2030).
--define(wxTreeCtrl_GetItemParent, 2031).
--define(wxTreeCtrl_GetPrevSibling, 2032).
--define(wxTreeCtrl_GetPrevVisible, 2033).
--define(wxTreeCtrl_GetRootItem, 2034).
--define(wxTreeCtrl_GetSelection, 2035).
--define(wxTreeCtrl_GetSelections, 2036).
--define(wxTreeCtrl_GetStateImageList, 2037).
--define(wxTreeCtrl_HitTest, 2038).
--define(wxTreeCtrl_InsertItem_4_1, 2039).
--define(wxTreeCtrl_InsertItem_4_0, 2040).
--define(wxTreeCtrl_IsBold, 2041).
--define(wxTreeCtrl_IsExpanded, 2042).
--define(wxTreeCtrl_IsSelected, 2043).
--define(wxTreeCtrl_IsVisible, 2044).
--define(wxTreeCtrl_ItemHasChildren, 2045).
--define(wxTreeCtrl_PrependItem, 2046).
--define(wxTreeCtrl_ScrollTo, 2047).
--define(wxTreeCtrl_SelectItem_1, 2048).
--define(wxTreeCtrl_SelectItem_2, 2049).
--define(wxTreeCtrl_SetIndent, 2050).
--define(wxTreeCtrl_SetImageList, 2051).
--define(wxTreeCtrl_SetItemBackgroundColour, 2052).
--define(wxTreeCtrl_SetItemBold, 2053).
--define(wxTreeCtrl_SetItemData, 2054).
--define(wxTreeCtrl_SetItemDropHighlight, 2055).
--define(wxTreeCtrl_SetItemFont, 2056).
--define(wxTreeCtrl_SetItemHasChildren, 2057).
--define(wxTreeCtrl_SetItemImage_2, 2058).
--define(wxTreeCtrl_SetItemImage_3, 2059).
--define(wxTreeCtrl_SetItemText, 2060).
--define(wxTreeCtrl_SetItemTextColour, 2061).
--define(wxTreeCtrl_SetStateImageList, 2062).
--define(wxTreeCtrl_SetWindowStyle, 2063).
--define(wxTreeCtrl_SortChildren, 2064).
--define(wxTreeCtrl_Toggle, 2065).
--define(wxTreeCtrl_ToggleItemSelection, 2066).
--define(wxTreeCtrl_Unselect, 2067).
--define(wxTreeCtrl_UnselectAll, 2068).
--define(wxTreeCtrl_UnselectItem, 2069).
--define(wxScrollBar_new_0, 2070).
--define(wxScrollBar_new_3, 2071).
--define(wxScrollBar_destruct, 2072).
--define(wxScrollBar_Create, 2073).
--define(wxScrollBar_GetRange, 2074).
--define(wxScrollBar_GetPageSize, 2075).
--define(wxScrollBar_GetThumbPosition, 2076).
--define(wxScrollBar_GetThumbSize, 2077).
--define(wxScrollBar_SetThumbPosition, 2078).
--define(wxScrollBar_SetScrollbar, 2079).
--define(wxSpinButton_new_2, 2081).
--define(wxSpinButton_new_0, 2082).
--define(wxSpinButton_Create, 2083).
--define(wxSpinButton_GetMax, 2084).
--define(wxSpinButton_GetMin, 2085).
--define(wxSpinButton_GetValue, 2086).
--define(wxSpinButton_SetRange, 2087).
--define(wxSpinButton_SetValue, 2088).
--define(wxSpinButton_destroy, 2089).
--define(wxSpinCtrl_new_0, 2090).
--define(wxSpinCtrl_new_2, 2091).
--define(wxSpinCtrl_Create, 2093).
--define(wxSpinCtrl_SetValue_1_1, 2096).
--define(wxSpinCtrl_SetValue_1_0, 2097).
--define(wxSpinCtrl_GetValue, 2099).
--define(wxSpinCtrl_SetRange, 2101).
--define(wxSpinCtrl_SetSelection, 2102).
--define(wxSpinCtrl_GetMin, 2104).
--define(wxSpinCtrl_GetMax, 2106).
--define(wxSpinCtrl_destroy, 2107).
--define(wxStaticText_new_0, 2108).
--define(wxStaticText_new_4, 2109).
--define(wxStaticText_Create, 2110).
--define(wxStaticText_GetLabel, 2111).
--define(wxStaticText_SetLabel, 2112).
--define(wxStaticText_Wrap, 2113).
--define(wxStaticText_destroy, 2114).
--define(wxStaticBitmap_new_0, 2115).
--define(wxStaticBitmap_new_4, 2116).
--define(wxStaticBitmap_Create, 2117).
--define(wxStaticBitmap_GetBitmap, 2118).
--define(wxStaticBitmap_SetBitmap, 2119).
--define(wxStaticBitmap_destroy, 2120).
--define(wxRadioBox_new, 2121).
--define(wxRadioBox_destruct, 2123).
--define(wxRadioBox_Create, 2124).
--define(wxRadioBox_Enable_2, 2125).
--define(wxRadioBox_Enable_1, 2126).
--define(wxRadioBox_GetSelection, 2127).
--define(wxRadioBox_GetString, 2128).
--define(wxRadioBox_SetSelection, 2129).
--define(wxRadioBox_Show_2, 2130).
--define(wxRadioBox_Show_1, 2131).
--define(wxRadioBox_GetColumnCount, 2132).
--define(wxRadioBox_GetItemHelpText, 2133).
--define(wxRadioBox_GetItemToolTip, 2134).
--define(wxRadioBox_GetItemFromPoint, 2136).
--define(wxRadioBox_GetRowCount, 2137).
--define(wxRadioBox_IsItemEnabled, 2138).
--define(wxRadioBox_IsItemShown, 2139).
--define(wxRadioBox_SetItemHelpText, 2140).
--define(wxRadioBox_SetItemToolTip, 2141).
--define(wxRadioButton_new_0, 2142).
--define(wxRadioButton_new_4, 2143).
--define(wxRadioButton_Create, 2144).
--define(wxRadioButton_GetValue, 2145).
--define(wxRadioButton_SetValue, 2146).
--define(wxRadioButton_destroy, 2147).
--define(wxSlider_new_6, 2149).
--define(wxSlider_new_0, 2150).
--define(wxSlider_Create, 2151).
--define(wxSlider_GetLineSize, 2152).
--define(wxSlider_GetMax, 2153).
--define(wxSlider_GetMin, 2154).
--define(wxSlider_GetPageSize, 2155).
--define(wxSlider_GetThumbLength, 2156).
--define(wxSlider_GetValue, 2157).
--define(wxSlider_SetLineSize, 2158).
--define(wxSlider_SetPageSize, 2159).
--define(wxSlider_SetRange, 2160).
--define(wxSlider_SetThumbLength, 2161).
--define(wxSlider_SetValue, 2162).
--define(wxSlider_destroy, 2163).
--define(wxDialog_new_4, 2165).
--define(wxDialog_new_0, 2166).
--define(wxDialog_destruct, 2168).
--define(wxDialog_Create, 2169).
--define(wxDialog_CreateButtonSizer, 2170).
--define(wxDialog_CreateStdDialogButtonSizer, 2171).
--define(wxDialog_EndModal, 2172).
--define(wxDialog_GetAffirmativeId, 2173).
--define(wxDialog_GetReturnCode, 2174).
--define(wxDialog_IsModal, 2175).
--define(wxDialog_SetAffirmativeId, 2176).
--define(wxDialog_SetReturnCode, 2177).
--define(wxDialog_Show, 2178).
--define(wxDialog_ShowModal, 2179).
--define(wxColourDialog_new_0, 2180).
--define(wxColourDialog_new_2, 2181).
--define(wxColourDialog_destruct, 2182).
--define(wxColourDialog_Create, 2183).
--define(wxColourDialog_GetColourData, 2184).
--define(wxColourData_new_0, 2185).
--define(wxColourData_new_1, 2186).
--define(wxColourData_destruct, 2187).
--define(wxColourData_GetChooseFull, 2188).
--define(wxColourData_GetColour, 2189).
--define(wxColourData_GetCustomColour, 2191).
--define(wxColourData_SetChooseFull, 2192).
--define(wxColourData_SetColour, 2193).
--define(wxColourData_SetCustomColour, 2194).
--define(wxPalette_new_0, 2195).
--define(wxPalette_new_4, 2196).
--define(wxPalette_destruct, 2198).
--define(wxPalette_Create, 2199).
--define(wxPalette_GetColoursCount, 2200).
--define(wxPalette_GetPixel, 2201).
--define(wxPalette_GetRGB, 2202).
--define(wxPalette_IsOk, 2203).
--define(wxDirDialog_new, 2207).
--define(wxDirDialog_destruct, 2208).
--define(wxDirDialog_GetPath, 2209).
--define(wxDirDialog_GetMessage, 2210).
--define(wxDirDialog_SetMessage, 2211).
--define(wxDirDialog_SetPath, 2212).
--define(wxFileDialog_new, 2216).
--define(wxFileDialog_destruct, 2217).
--define(wxFileDialog_GetDirectory, 2218).
--define(wxFileDialog_GetFilename, 2219).
--define(wxFileDialog_GetFilenames, 2220).
--define(wxFileDialog_GetFilterIndex, 2221).
--define(wxFileDialog_GetMessage, 2222).
--define(wxFileDialog_GetPath, 2223).
--define(wxFileDialog_GetPaths, 2224).
--define(wxFileDialog_GetWildcard, 2225).
--define(wxFileDialog_SetDirectory, 2226).
--define(wxFileDialog_SetFilename, 2227).
--define(wxFileDialog_SetFilterIndex, 2228).
--define(wxFileDialog_SetMessage, 2229).
--define(wxFileDialog_SetPath, 2230).
--define(wxFileDialog_SetWildcard, 2231).
--define(wxPickerBase_SetInternalMargin, 2232).
--define(wxPickerBase_GetInternalMargin, 2233).
--define(wxPickerBase_SetTextCtrlProportion, 2234).
--define(wxPickerBase_SetPickerCtrlProportion, 2235).
--define(wxPickerBase_GetTextCtrlProportion, 2236).
--define(wxPickerBase_GetPickerCtrlProportion, 2237).
--define(wxPickerBase_HasTextCtrl, 2238).
--define(wxPickerBase_GetTextCtrl, 2239).
--define(wxPickerBase_IsTextCtrlGrowable, 2240).
--define(wxPickerBase_SetPickerCtrlGrowable, 2241).
--define(wxPickerBase_SetTextCtrlGrowable, 2242).
--define(wxPickerBase_IsPickerCtrlGrowable, 2243).
--define(wxFilePickerCtrl_new_0, 2244).
--define(wxFilePickerCtrl_new_3, 2245).
--define(wxFilePickerCtrl_Create, 2246).
--define(wxFilePickerCtrl_GetPath, 2247).
--define(wxFilePickerCtrl_SetPath, 2248).
--define(wxFilePickerCtrl_destroy, 2249).
--define(wxDirPickerCtrl_new_0, 2250).
--define(wxDirPickerCtrl_new_3, 2251).
--define(wxDirPickerCtrl_Create, 2252).
--define(wxDirPickerCtrl_GetPath, 2253).
--define(wxDirPickerCtrl_SetPath, 2254).
--define(wxDirPickerCtrl_destroy, 2255).
--define(wxColourPickerCtrl_new_0, 2256).
--define(wxColourPickerCtrl_new_3, 2257).
--define(wxColourPickerCtrl_Create, 2258).
--define(wxColourPickerCtrl_GetColour, 2259).
--define(wxColourPickerCtrl_SetColour_1_1, 2260).
--define(wxColourPickerCtrl_SetColour_1_0, 2261).
--define(wxColourPickerCtrl_destroy, 2262).
--define(wxDatePickerCtrl_new_0, 2263).
--define(wxDatePickerCtrl_new_3, 2264).
--define(wxDatePickerCtrl_GetRange, 2265).
--define(wxDatePickerCtrl_GetValue, 2266).
--define(wxDatePickerCtrl_SetRange, 2267).
--define(wxDatePickerCtrl_SetValue, 2268).
--define(wxDatePickerCtrl_destroy, 2269).
--define(wxFontPickerCtrl_new_0, 2270).
--define(wxFontPickerCtrl_new_3, 2271).
--define(wxFontPickerCtrl_Create, 2272).
--define(wxFontPickerCtrl_GetSelectedFont, 2273).
--define(wxFontPickerCtrl_SetSelectedFont, 2274).
--define(wxFontPickerCtrl_GetMaxPointSize, 2275).
--define(wxFontPickerCtrl_SetMaxPointSize, 2276).
--define(wxFontPickerCtrl_destroy, 2277).
--define(wxFindReplaceDialog_new_0, 2280).
--define(wxFindReplaceDialog_new_4, 2281).
--define(wxFindReplaceDialog_destruct, 2282).
--define(wxFindReplaceDialog_Create, 2283).
--define(wxFindReplaceDialog_GetData, 2284).
--define(wxFindReplaceData_new_0, 2285).
--define(wxFindReplaceData_new_1, 2286).
--define(wxFindReplaceData_GetFindString, 2287).
--define(wxFindReplaceData_GetReplaceString, 2288).
--define(wxFindReplaceData_GetFlags, 2289).
--define(wxFindReplaceData_SetFlags, 2290).
--define(wxFindReplaceData_SetFindString, 2291).
--define(wxFindReplaceData_SetReplaceString, 2292).
--define(wxFindReplaceData_destroy, 2293).
--define(wxMultiChoiceDialog_new_0, 2294).
--define(wxMultiChoiceDialog_new_5, 2296).
--define(wxMultiChoiceDialog_GetSelections, 2297).
--define(wxMultiChoiceDialog_SetSelections, 2298).
--define(wxMultiChoiceDialog_destroy, 2299).
--define(wxSingleChoiceDialog_new_0, 2300).
--define(wxSingleChoiceDialog_new_5, 2302).
--define(wxSingleChoiceDialog_GetSelection, 2303).
--define(wxSingleChoiceDialog_GetStringSelection, 2304).
--define(wxSingleChoiceDialog_SetSelection, 2305).
--define(wxSingleChoiceDialog_destroy, 2306).
--define(wxTextEntryDialog_new, 2307).
--define(wxTextEntryDialog_GetValue, 2308).
--define(wxTextEntryDialog_SetValue, 2309).
--define(wxTextEntryDialog_destroy, 2310).
--define(wxPasswordEntryDialog_new, 2311).
--define(wxPasswordEntryDialog_destroy, 2312).
--define(wxFontData_new_0, 2313).
--define(wxFontData_new_1, 2314).
--define(wxFontData_destruct, 2315).
--define(wxFontData_EnableEffects, 2316).
--define(wxFontData_GetAllowSymbols, 2317).
--define(wxFontData_GetColour, 2318).
--define(wxFontData_GetChosenFont, 2319).
--define(wxFontData_GetEnableEffects, 2320).
--define(wxFontData_GetInitialFont, 2321).
--define(wxFontData_GetShowHelp, 2322).
--define(wxFontData_SetAllowSymbols, 2323).
--define(wxFontData_SetChosenFont, 2324).
--define(wxFontData_SetColour, 2325).
--define(wxFontData_SetInitialFont, 2326).
--define(wxFontData_SetRange, 2327).
--define(wxFontData_SetShowHelp, 2328).
--define(wxFontDialog_new_0, 2332).
--define(wxFontDialog_new_2, 2334).
--define(wxFontDialog_Create, 2336).
--define(wxFontDialog_GetFontData, 2337).
--define(wxFontDialog_destroy, 2339).
--define(wxProgressDialog_new, 2340).
--define(wxProgressDialog_destruct, 2341).
--define(wxProgressDialog_Resume, 2342).
--define(wxProgressDialog_Update_2, 2343).
--define(wxProgressDialog_Update_0, 2344).
--define(wxMessageDialog_new, 2345).
--define(wxMessageDialog_destruct, 2346).
--define(wxPageSetupDialog_new, 2347).
--define(wxPageSetupDialog_destruct, 2348).
--define(wxPageSetupDialog_GetPageSetupData, 2349).
--define(wxPageSetupDialog_ShowModal, 2350).
--define(wxPageSetupDialogData_new_0, 2351).
--define(wxPageSetupDialogData_new_1_0, 2352).
--define(wxPageSetupDialogData_new_1_1, 2353).
--define(wxPageSetupDialogData_destruct, 2354).
--define(wxPageSetupDialogData_EnableHelp, 2355).
--define(wxPageSetupDialogData_EnableMargins, 2356).
--define(wxPageSetupDialogData_EnableOrientation, 2357).
--define(wxPageSetupDialogData_EnablePaper, 2358).
--define(wxPageSetupDialogData_EnablePrinter, 2359).
--define(wxPageSetupDialogData_GetDefaultMinMargins, 2360).
--define(wxPageSetupDialogData_GetEnableMargins, 2361).
--define(wxPageSetupDialogData_GetEnableOrientation, 2362).
--define(wxPageSetupDialogData_GetEnablePaper, 2363).
--define(wxPageSetupDialogData_GetEnablePrinter, 2364).
--define(wxPageSetupDialogData_GetEnableHelp, 2365).
--define(wxPageSetupDialogData_GetDefaultInfo, 2366).
--define(wxPageSetupDialogData_GetMarginTopLeft, 2367).
--define(wxPageSetupDialogData_GetMarginBottomRight, 2368).
--define(wxPageSetupDialogData_GetMinMarginTopLeft, 2369).
--define(wxPageSetupDialogData_GetMinMarginBottomRight, 2370).
--define(wxPageSetupDialogData_GetPaperId, 2371).
--define(wxPageSetupDialogData_GetPaperSize, 2372).
--define(wxPageSetupDialogData_GetPrintData, 2374).
--define(wxPageSetupDialogData_IsOk, 2375).
--define(wxPageSetupDialogData_SetDefaultInfo, 2376).
--define(wxPageSetupDialogData_SetDefaultMinMargins, 2377).
--define(wxPageSetupDialogData_SetMarginTopLeft, 2378).
--define(wxPageSetupDialogData_SetMarginBottomRight, 2379).
--define(wxPageSetupDialogData_SetMinMarginTopLeft, 2380).
--define(wxPageSetupDialogData_SetMinMarginBottomRight, 2381).
--define(wxPageSetupDialogData_SetPaperId, 2382).
--define(wxPageSetupDialogData_SetPaperSize_1_1, 2383).
--define(wxPageSetupDialogData_SetPaperSize_1_0, 2384).
--define(wxPageSetupDialogData_SetPrintData, 2385).
--define(wxPrintDialog_new_2_0, 2386).
--define(wxPrintDialog_new_2_1, 2387).
--define(wxPrintDialog_destruct, 2388).
--define(wxPrintDialog_GetPrintDialogData, 2389).
--define(wxPrintDialog_GetPrintDC, 2390).
--define(wxPrintDialogData_new_0, 2391).
--define(wxPrintDialogData_new_1_1, 2392).
--define(wxPrintDialogData_new_1_0, 2393).
--define(wxPrintDialogData_destruct, 2394).
--define(wxPrintDialogData_EnableHelp, 2395).
--define(wxPrintDialogData_EnablePageNumbers, 2396).
--define(wxPrintDialogData_EnablePrintToFile, 2397).
--define(wxPrintDialogData_EnableSelection, 2398).
--define(wxPrintDialogData_GetAllPages, 2399).
--define(wxPrintDialogData_GetCollate, 2400).
--define(wxPrintDialogData_GetFromPage, 2401).
--define(wxPrintDialogData_GetMaxPage, 2402).
--define(wxPrintDialogData_GetMinPage, 2403).
--define(wxPrintDialogData_GetNoCopies, 2404).
--define(wxPrintDialogData_GetPrintData, 2405).
--define(wxPrintDialogData_GetPrintToFile, 2406).
--define(wxPrintDialogData_GetSelection, 2407).
--define(wxPrintDialogData_GetToPage, 2408).
--define(wxPrintDialogData_IsOk, 2409).
--define(wxPrintDialogData_SetCollate, 2410).
--define(wxPrintDialogData_SetFromPage, 2411).
--define(wxPrintDialogData_SetMaxPage, 2412).
--define(wxPrintDialogData_SetMinPage, 2413).
--define(wxPrintDialogData_SetNoCopies, 2414).
--define(wxPrintDialogData_SetPrintData, 2415).
--define(wxPrintDialogData_SetPrintToFile, 2416).
--define(wxPrintDialogData_SetSelection, 2417).
--define(wxPrintDialogData_SetToPage, 2418).
--define(wxPrintData_new_0, 2419).
--define(wxPrintData_new_1, 2420).
--define(wxPrintData_destruct, 2421).
--define(wxPrintData_GetCollate, 2422).
--define(wxPrintData_GetBin, 2423).
--define(wxPrintData_GetColour, 2424).
--define(wxPrintData_GetDuplex, 2425).
--define(wxPrintData_GetNoCopies, 2426).
--define(wxPrintData_GetOrientation, 2427).
--define(wxPrintData_GetPaperId, 2428).
--define(wxPrintData_GetPrinterName, 2429).
--define(wxPrintData_GetQuality, 2430).
--define(wxPrintData_IsOk, 2431).
--define(wxPrintData_SetBin, 2432).
--define(wxPrintData_SetCollate, 2433).
--define(wxPrintData_SetColour, 2434).
--define(wxPrintData_SetDuplex, 2435).
--define(wxPrintData_SetNoCopies, 2436).
--define(wxPrintData_SetOrientation, 2437).
--define(wxPrintData_SetPaperId, 2438).
--define(wxPrintData_SetPrinterName, 2439).
--define(wxPrintData_SetQuality, 2440).
--define(wxPrintPreview_new_2, 2443).
--define(wxPrintPreview_new_3, 2444).
--define(wxPrintPreview_destruct, 2446).
--define(wxPrintPreview_GetCanvas, 2447).
--define(wxPrintPreview_GetCurrentPage, 2448).
--define(wxPrintPreview_GetFrame, 2449).
--define(wxPrintPreview_GetMaxPage, 2450).
--define(wxPrintPreview_GetMinPage, 2451).
--define(wxPrintPreview_GetPrintout, 2452).
--define(wxPrintPreview_GetPrintoutForPrinting, 2453).
--define(wxPrintPreview_IsOk, 2454).
--define(wxPrintPreview_PaintPage, 2455).
--define(wxPrintPreview_Print, 2456).
--define(wxPrintPreview_RenderPage, 2457).
--define(wxPrintPreview_SetCanvas, 2458).
--define(wxPrintPreview_SetCurrentPage, 2459).
--define(wxPrintPreview_SetFrame, 2460).
--define(wxPrintPreview_SetPrintout, 2461).
--define(wxPrintPreview_SetZoom, 2462).
--define(wxPreviewFrame_new, 2463).
--define(wxPreviewFrame_destruct, 2464).
--define(wxPreviewFrame_CreateControlBar, 2465).
--define(wxPreviewFrame_CreateCanvas, 2466).
--define(wxPreviewFrame_Initialize, 2467).
--define(wxPreviewFrame_OnCloseWindow, 2468).
--define(wxPreviewControlBar_new, 2469).
--define(wxPreviewControlBar_destruct, 2470).
--define(wxPreviewControlBar_CreateButtons, 2471).
--define(wxPreviewControlBar_GetPrintPreview, 2472).
--define(wxPreviewControlBar_GetZoomControl, 2473).
--define(wxPreviewControlBar_SetZoomControl, 2474).
--define(wxPrinter_new, 2476).
--define(wxPrinter_CreateAbortWindow, 2477).
--define(wxPrinter_GetAbort, 2478).
--define(wxPrinter_GetLastError, 2479).
--define(wxPrinter_GetPrintDialogData, 2480).
--define(wxPrinter_Print, 2481).
--define(wxPrinter_PrintDialog, 2482).
--define(wxPrinter_ReportError, 2483).
--define(wxPrinter_Setup, 2484).
--define(wxPrinter_destroy, 2485).
--define(wxXmlResource_new_1, 2486).
--define(wxXmlResource_new_2, 2487).
--define(wxXmlResource_destruct, 2488).
--define(wxXmlResource_AttachUnknownControl, 2489).
--define(wxXmlResource_ClearHandlers, 2490).
--define(wxXmlResource_CompareVersion, 2491).
--define(wxXmlResource_Get, 2492).
--define(wxXmlResource_GetFlags, 2493).
--define(wxXmlResource_GetVersion, 2494).
--define(wxXmlResource_GetXRCID, 2495).
--define(wxXmlResource_InitAllHandlers, 2496).
--define(wxXmlResource_Load, 2497).
--define(wxXmlResource_LoadBitmap, 2498).
--define(wxXmlResource_LoadDialog_2, 2499).
--define(wxXmlResource_LoadDialog_3, 2500).
--define(wxXmlResource_LoadFrame_2, 2501).
--define(wxXmlResource_LoadFrame_3, 2502).
--define(wxXmlResource_LoadIcon, 2503).
--define(wxXmlResource_LoadMenu, 2504).
--define(wxXmlResource_LoadMenuBar_2, 2505).
--define(wxXmlResource_LoadMenuBar_1, 2506).
--define(wxXmlResource_LoadPanel_2, 2507).
--define(wxXmlResource_LoadPanel_3, 2508).
--define(wxXmlResource_LoadToolBar, 2509).
--define(wxXmlResource_Set, 2510).
--define(wxXmlResource_SetFlags, 2511).
--define(wxXmlResource_Unload, 2512).
--define(wxXmlResource_xrcctrl, 2513).
--define(wxHtmlEasyPrinting_new, 2514).
--define(wxHtmlEasyPrinting_destruct, 2515).
--define(wxHtmlEasyPrinting_GetPrintData, 2516).
--define(wxHtmlEasyPrinting_GetPageSetupData, 2517).
--define(wxHtmlEasyPrinting_PreviewFile, 2518).
--define(wxHtmlEasyPrinting_PreviewText, 2519).
--define(wxHtmlEasyPrinting_PrintFile, 2520).
--define(wxHtmlEasyPrinting_PrintText, 2521).
--define(wxHtmlEasyPrinting_PageSetup, 2522).
--define(wxHtmlEasyPrinting_SetFonts, 2523).
--define(wxHtmlEasyPrinting_SetHeader, 2524).
--define(wxHtmlEasyPrinting_SetFooter, 2525).
--define(wxGLCanvas_new_2, 2527).
--define(wxGLCanvas_new_3_1, 2528).
--define(wxGLCanvas_new_3_0, 2529).
--define(wxGLCanvas_GetContext, 2530).
--define(wxGLCanvas_SetCurrent, 2532).
--define(wxGLCanvas_SwapBuffers, 2533).
--define(wxGLCanvas_destroy, 2534).
--define(wxAuiManager_new, 2535).
--define(wxAuiManager_destruct, 2536).
--define(wxAuiManager_AddPane_2_1, 2537).
--define(wxAuiManager_AddPane_3, 2538).
--define(wxAuiManager_AddPane_2_0, 2539).
--define(wxAuiManager_DetachPane, 2540).
--define(wxAuiManager_GetAllPanes, 2541).
--define(wxAuiManager_GetArtProvider, 2542).
--define(wxAuiManager_GetDockSizeConstraint, 2543).
--define(wxAuiManager_GetFlags, 2544).
--define(wxAuiManager_GetManagedWindow, 2545).
--define(wxAuiManager_GetManager, 2546).
--define(wxAuiManager_GetPane_1_1, 2547).
--define(wxAuiManager_GetPane_1_0, 2548).
--define(wxAuiManager_HideHint, 2549).
--define(wxAuiManager_InsertPane, 2550).
--define(wxAuiManager_LoadPaneInfo, 2551).
--define(wxAuiManager_LoadPerspective, 2552).
--define(wxAuiManager_SavePaneInfo, 2553).
--define(wxAuiManager_SavePerspective, 2554).
--define(wxAuiManager_SetArtProvider, 2555).
--define(wxAuiManager_SetDockSizeConstraint, 2556).
--define(wxAuiManager_SetFlags, 2557).
--define(wxAuiManager_SetManagedWindow, 2558).
--define(wxAuiManager_ShowHint, 2559).
--define(wxAuiManager_UnInit, 2560).
--define(wxAuiManager_Update, 2561).
--define(wxAuiPaneInfo_new_0, 2562).
--define(wxAuiPaneInfo_new_1, 2563).
--define(wxAuiPaneInfo_destruct, 2564).
--define(wxAuiPaneInfo_BestSize_1, 2565).
--define(wxAuiPaneInfo_BestSize_2, 2566).
--define(wxAuiPaneInfo_Bottom, 2567).
--define(wxAuiPaneInfo_BottomDockable, 2568).
--define(wxAuiPaneInfo_Caption, 2569).
--define(wxAuiPaneInfo_CaptionVisible, 2570).
--define(wxAuiPaneInfo_Centre, 2571).
--define(wxAuiPaneInfo_CentrePane, 2572).
--define(wxAuiPaneInfo_CloseButton, 2573).
--define(wxAuiPaneInfo_DefaultPane, 2574).
--define(wxAuiPaneInfo_DestroyOnClose, 2575).
--define(wxAuiPaneInfo_Direction, 2576).
--define(wxAuiPaneInfo_Dock, 2577).
--define(wxAuiPaneInfo_Dockable, 2578).
--define(wxAuiPaneInfo_Fixed, 2579).
--define(wxAuiPaneInfo_Float, 2580).
--define(wxAuiPaneInfo_Floatable, 2581).
--define(wxAuiPaneInfo_FloatingPosition_1, 2582).
--define(wxAuiPaneInfo_FloatingPosition_2, 2583).
--define(wxAuiPaneInfo_FloatingSize_1, 2584).
--define(wxAuiPaneInfo_FloatingSize_2, 2585).
--define(wxAuiPaneInfo_Gripper, 2586).
--define(wxAuiPaneInfo_GripperTop, 2587).
--define(wxAuiPaneInfo_HasBorder, 2588).
--define(wxAuiPaneInfo_HasCaption, 2589).
--define(wxAuiPaneInfo_HasCloseButton, 2590).
--define(wxAuiPaneInfo_HasFlag, 2591).
--define(wxAuiPaneInfo_HasGripper, 2592).
--define(wxAuiPaneInfo_HasGripperTop, 2593).
--define(wxAuiPaneInfo_HasMaximizeButton, 2594).
--define(wxAuiPaneInfo_HasMinimizeButton, 2595).
--define(wxAuiPaneInfo_HasPinButton, 2596).
--define(wxAuiPaneInfo_Hide, 2597).
--define(wxAuiPaneInfo_IsBottomDockable, 2598).
--define(wxAuiPaneInfo_IsDocked, 2599).
--define(wxAuiPaneInfo_IsFixed, 2600).
--define(wxAuiPaneInfo_IsFloatable, 2601).
--define(wxAuiPaneInfo_IsFloating, 2602).
--define(wxAuiPaneInfo_IsLeftDockable, 2603).
--define(wxAuiPaneInfo_IsMovable, 2604).
--define(wxAuiPaneInfo_IsOk, 2605).
--define(wxAuiPaneInfo_IsResizable, 2606).
--define(wxAuiPaneInfo_IsRightDockable, 2607).
--define(wxAuiPaneInfo_IsShown, 2608).
--define(wxAuiPaneInfo_IsToolbar, 2609).
--define(wxAuiPaneInfo_IsTopDockable, 2610).
--define(wxAuiPaneInfo_Layer, 2611).
--define(wxAuiPaneInfo_Left, 2612).
--define(wxAuiPaneInfo_LeftDockable, 2613).
--define(wxAuiPaneInfo_MaxSize_1, 2614).
--define(wxAuiPaneInfo_MaxSize_2, 2615).
--define(wxAuiPaneInfo_MaximizeButton, 2616).
--define(wxAuiPaneInfo_MinSize_1, 2617).
--define(wxAuiPaneInfo_MinSize_2, 2618).
--define(wxAuiPaneInfo_MinimizeButton, 2619).
--define(wxAuiPaneInfo_Movable, 2620).
--define(wxAuiPaneInfo_Name, 2621).
--define(wxAuiPaneInfo_PaneBorder, 2622).
--define(wxAuiPaneInfo_PinButton, 2623).
--define(wxAuiPaneInfo_Position, 2624).
--define(wxAuiPaneInfo_Resizable, 2625).
--define(wxAuiPaneInfo_Right, 2626).
--define(wxAuiPaneInfo_RightDockable, 2627).
--define(wxAuiPaneInfo_Row, 2628).
--define(wxAuiPaneInfo_SafeSet, 2629).
--define(wxAuiPaneInfo_SetFlag, 2630).
--define(wxAuiPaneInfo_Show, 2631).
--define(wxAuiPaneInfo_ToolbarPane, 2632).
--define(wxAuiPaneInfo_Top, 2633).
--define(wxAuiPaneInfo_TopDockable, 2634).
--define(wxAuiPaneInfo_Window, 2635).
--define(wxAuiNotebook_new_0, 2636).
--define(wxAuiNotebook_new_2, 2637).
--define(wxAuiNotebook_AddPage, 2638).
--define(wxAuiNotebook_Create, 2639).
--define(wxAuiNotebook_DeletePage, 2640).
--define(wxAuiNotebook_GetArtProvider, 2641).
--define(wxAuiNotebook_GetPage, 2642).
--define(wxAuiNotebook_GetPageBitmap, 2643).
--define(wxAuiNotebook_GetPageCount, 2644).
--define(wxAuiNotebook_GetPageIndex, 2645).
--define(wxAuiNotebook_GetPageText, 2646).
--define(wxAuiNotebook_GetSelection, 2647).
--define(wxAuiNotebook_InsertPage, 2648).
--define(wxAuiNotebook_RemovePage, 2649).
--define(wxAuiNotebook_SetArtProvider, 2650).
--define(wxAuiNotebook_SetFont, 2651).
--define(wxAuiNotebook_SetPageBitmap, 2652).
--define(wxAuiNotebook_SetPageText, 2653).
--define(wxAuiNotebook_SetSelection, 2654).
--define(wxAuiNotebook_SetTabCtrlHeight, 2655).
--define(wxAuiNotebook_SetUniformBitmapSize, 2656).
--define(wxAuiNotebook_destroy, 2657).
--define(wxMDIParentFrame_new_0, 2658).
--define(wxMDIParentFrame_new_4, 2659).
--define(wxMDIParentFrame_destruct, 2660).
--define(wxMDIParentFrame_ActivateNext, 2661).
--define(wxMDIParentFrame_ActivatePrevious, 2662).
--define(wxMDIParentFrame_ArrangeIcons, 2663).
--define(wxMDIParentFrame_Cascade, 2664).
--define(wxMDIParentFrame_Create, 2665).
--define(wxMDIParentFrame_GetActiveChild, 2666).
--define(wxMDIParentFrame_GetClientWindow, 2667).
--define(wxMDIParentFrame_Tile, 2668).
--define(wxMDIChildFrame_new_0, 2669).
--define(wxMDIChildFrame_new_4, 2670).
--define(wxMDIChildFrame_destruct, 2671).
--define(wxMDIChildFrame_Activate, 2672).
--define(wxMDIChildFrame_Create, 2673).
--define(wxMDIChildFrame_Maximize, 2674).
--define(wxMDIChildFrame_Restore, 2675).
--define(wxMDIClientWindow_new_0, 2676).
--define(wxMDIClientWindow_new_2, 2677).
--define(wxMDIClientWindow_destruct, 2678).
--define(wxMDIClientWindow_CreateClient, 2679).
--define(wxLayoutAlgorithm_new, 2680).
--define(wxLayoutAlgorithm_LayoutFrame, 2681).
--define(wxLayoutAlgorithm_LayoutMDIFrame, 2682).
--define(wxLayoutAlgorithm_LayoutWindow, 2683).
--define(wxLayoutAlgorithm_destroy, 2684).
--define(wxEvent_GetId, 2685).
--define(wxEvent_GetSkipped, 2686).
--define(wxEvent_GetTimestamp, 2687).
--define(wxEvent_IsCommandEvent, 2688).
--define(wxEvent_ResumePropagation, 2689).
--define(wxEvent_ShouldPropagate, 2690).
--define(wxEvent_Skip, 2691).
--define(wxEvent_StopPropagation, 2692).
--define(wxCommandEvent_getClientData, 2693).
--define(wxCommandEvent_GetExtraLong, 2694).
--define(wxCommandEvent_GetInt, 2695).
--define(wxCommandEvent_GetSelection, 2696).
--define(wxCommandEvent_GetString, 2697).
--define(wxCommandEvent_IsChecked, 2698).
--define(wxCommandEvent_IsSelection, 2699).
--define(wxCommandEvent_SetInt, 2700).
--define(wxCommandEvent_SetString, 2701).
--define(wxScrollEvent_GetOrientation, 2702).
--define(wxScrollEvent_GetPosition, 2703).
--define(wxScrollWinEvent_GetOrientation, 2704).
--define(wxScrollWinEvent_GetPosition, 2705).
--define(wxMouseEvent_AltDown, 2706).
--define(wxMouseEvent_Button, 2707).
--define(wxMouseEvent_ButtonDClick, 2708).
--define(wxMouseEvent_ButtonDown, 2709).
--define(wxMouseEvent_ButtonUp, 2710).
--define(wxMouseEvent_CmdDown, 2711).
--define(wxMouseEvent_ControlDown, 2712).
--define(wxMouseEvent_Dragging, 2713).
--define(wxMouseEvent_Entering, 2714).
--define(wxMouseEvent_GetButton, 2715).
--define(wxMouseEvent_GetPosition, 2718).
--define(wxMouseEvent_GetLogicalPosition, 2719).
--define(wxMouseEvent_GetLinesPerAction, 2720).
--define(wxMouseEvent_GetWheelRotation, 2721).
--define(wxMouseEvent_GetWheelDelta, 2722).
--define(wxMouseEvent_GetX, 2723).
--define(wxMouseEvent_GetY, 2724).
--define(wxMouseEvent_IsButton, 2725).
--define(wxMouseEvent_IsPageScroll, 2726).
--define(wxMouseEvent_Leaving, 2727).
--define(wxMouseEvent_LeftDClick, 2728).
--define(wxMouseEvent_LeftDown, 2729).
--define(wxMouseEvent_LeftIsDown, 2730).
--define(wxMouseEvent_LeftUp, 2731).
--define(wxMouseEvent_MetaDown, 2732).
--define(wxMouseEvent_MiddleDClick, 2733).
--define(wxMouseEvent_MiddleDown, 2734).
--define(wxMouseEvent_MiddleIsDown, 2735).
--define(wxMouseEvent_MiddleUp, 2736).
--define(wxMouseEvent_Moving, 2737).
--define(wxMouseEvent_RightDClick, 2738).
--define(wxMouseEvent_RightDown, 2739).
--define(wxMouseEvent_RightIsDown, 2740).
--define(wxMouseEvent_RightUp, 2741).
--define(wxMouseEvent_ShiftDown, 2742).
--define(wxSetCursorEvent_GetCursor, 2743).
--define(wxSetCursorEvent_GetX, 2744).
--define(wxSetCursorEvent_GetY, 2745).
--define(wxSetCursorEvent_HasCursor, 2746).
--define(wxSetCursorEvent_SetCursor, 2747).
--define(wxKeyEvent_AltDown, 2748).
--define(wxKeyEvent_CmdDown, 2749).
--define(wxKeyEvent_ControlDown, 2750).
--define(wxKeyEvent_GetKeyCode, 2751).
--define(wxKeyEvent_GetModifiers, 2752).
--define(wxKeyEvent_GetPosition, 2755).
--define(wxKeyEvent_GetRawKeyCode, 2756).
--define(wxKeyEvent_GetRawKeyFlags, 2757).
--define(wxKeyEvent_GetUnicodeKey, 2758).
--define(wxKeyEvent_GetX, 2759).
--define(wxKeyEvent_GetY, 2760).
--define(wxKeyEvent_HasModifiers, 2761).
--define(wxKeyEvent_MetaDown, 2762).
--define(wxKeyEvent_ShiftDown, 2763).
--define(wxSizeEvent_GetSize, 2764).
--define(wxMoveEvent_GetPosition, 2765).
--define(wxEraseEvent_GetDC, 2766).
--define(wxFocusEvent_GetWindow, 2767).
--define(wxChildFocusEvent_GetWindow, 2768).
--define(wxMenuEvent_GetMenu, 2769).
--define(wxMenuEvent_GetMenuId, 2770).
--define(wxMenuEvent_IsPopup, 2771).
--define(wxCloseEvent_CanVeto, 2772).
--define(wxCloseEvent_GetLoggingOff, 2773).
--define(wxCloseEvent_SetCanVeto, 2774).
--define(wxCloseEvent_SetLoggingOff, 2775).
--define(wxCloseEvent_Veto, 2776).
--define(wxShowEvent_SetShow, 2777).
--define(wxShowEvent_GetShow, 2778).
--define(wxIconizeEvent_Iconized, 2779).
--define(wxJoystickEvent_ButtonDown, 2780).
--define(wxJoystickEvent_ButtonIsDown, 2781).
--define(wxJoystickEvent_ButtonUp, 2782).
--define(wxJoystickEvent_GetButtonChange, 2783).
--define(wxJoystickEvent_GetButtonState, 2784).
--define(wxJoystickEvent_GetJoystick, 2785).
--define(wxJoystickEvent_GetPosition, 2786).
--define(wxJoystickEvent_GetZPosition, 2787).
--define(wxJoystickEvent_IsButton, 2788).
--define(wxJoystickEvent_IsMove, 2789).
--define(wxJoystickEvent_IsZMove, 2790).
--define(wxUpdateUIEvent_CanUpdate, 2791).
--define(wxUpdateUIEvent_Check, 2792).
--define(wxUpdateUIEvent_Enable, 2793).
--define(wxUpdateUIEvent_Show, 2794).
--define(wxUpdateUIEvent_GetChecked, 2795).
--define(wxUpdateUIEvent_GetEnabled, 2796).
--define(wxUpdateUIEvent_GetShown, 2797).
--define(wxUpdateUIEvent_GetSetChecked, 2798).
--define(wxUpdateUIEvent_GetSetEnabled, 2799).
--define(wxUpdateUIEvent_GetSetShown, 2800).
--define(wxUpdateUIEvent_GetSetText, 2801).
--define(wxUpdateUIEvent_GetText, 2802).
--define(wxUpdateUIEvent_GetMode, 2803).
--define(wxUpdateUIEvent_GetUpdateInterval, 2804).
--define(wxUpdateUIEvent_ResetUpdateTime, 2805).
--define(wxUpdateUIEvent_SetMode, 2806).
--define(wxUpdateUIEvent_SetText, 2807).
--define(wxUpdateUIEvent_SetUpdateInterval, 2808).
--define(wxMouseCaptureChangedEvent_GetCapturedWindow, 2809).
--define(wxPaletteChangedEvent_SetChangedWindow, 2810).
--define(wxPaletteChangedEvent_GetChangedWindow, 2811).
--define(wxQueryNewPaletteEvent_SetPaletteRealized, 2812).
--define(wxQueryNewPaletteEvent_GetPaletteRealized, 2813).
--define(wxNavigationKeyEvent_GetDirection, 2814).
--define(wxNavigationKeyEvent_SetDirection, 2815).
--define(wxNavigationKeyEvent_IsWindowChange, 2816).
--define(wxNavigationKeyEvent_SetWindowChange, 2817).
--define(wxNavigationKeyEvent_IsFromTab, 2818).
--define(wxNavigationKeyEvent_SetFromTab, 2819).
--define(wxNavigationKeyEvent_GetCurrentFocus, 2820).
--define(wxNavigationKeyEvent_SetCurrentFocus, 2821).
--define(wxHelpEvent_GetOrigin, 2822).
--define(wxHelpEvent_GetPosition, 2823).
--define(wxHelpEvent_SetOrigin, 2824).
--define(wxHelpEvent_SetPosition, 2825).
--define(wxContextMenuEvent_GetPosition, 2826).
--define(wxContextMenuEvent_SetPosition, 2827).
--define(wxIdleEvent_CanSend, 2828).
--define(wxIdleEvent_GetMode, 2829).
--define(wxIdleEvent_RequestMore, 2830).
--define(wxIdleEvent_MoreRequested, 2831).
--define(wxIdleEvent_SetMode, 2832).
--define(wxGridEvent_AltDown, 2833).
--define(wxGridEvent_ControlDown, 2834).
--define(wxGridEvent_GetCol, 2835).
--define(wxGridEvent_GetPosition, 2836).
--define(wxGridEvent_GetRow, 2837).
--define(wxGridEvent_MetaDown, 2838).
--define(wxGridEvent_Selecting, 2839).
--define(wxGridEvent_ShiftDown, 2840).
--define(wxNotifyEvent_Allow, 2841).
--define(wxNotifyEvent_IsAllowed, 2842).
--define(wxNotifyEvent_Veto, 2843).
--define(wxSashEvent_GetEdge, 2844).
--define(wxSashEvent_GetDragRect, 2845).
--define(wxSashEvent_GetDragStatus, 2846).
--define(wxListEvent_GetCacheFrom, 2847).
--define(wxListEvent_GetCacheTo, 2848).
--define(wxListEvent_GetKeyCode, 2849).
--define(wxListEvent_GetIndex, 2850).
--define(wxListEvent_GetColumn, 2851).
--define(wxListEvent_GetPoint, 2852).
--define(wxListEvent_GetLabel, 2853).
--define(wxListEvent_GetText, 2854).
--define(wxListEvent_GetImage, 2855).
--define(wxListEvent_GetData, 2856).
--define(wxListEvent_GetMask, 2857).
--define(wxListEvent_GetItem, 2858).
--define(wxListEvent_IsEditCancelled, 2859).
--define(wxDateEvent_GetDate, 2860).
--define(wxCalendarEvent_GetWeekDay, 2861).
--define(wxFileDirPickerEvent_GetPath, 2862).
--define(wxColourPickerEvent_GetColour, 2863).
--define(wxFontPickerEvent_GetFont, 2864).
--define(wxStyledTextEvent_GetPosition, 2865).
--define(wxStyledTextEvent_GetKey, 2866).
--define(wxStyledTextEvent_GetModifiers, 2867).
--define(wxStyledTextEvent_GetModificationType, 2868).
--define(wxStyledTextEvent_GetText, 2869).
--define(wxStyledTextEvent_GetLength, 2870).
--define(wxStyledTextEvent_GetLinesAdded, 2871).
--define(wxStyledTextEvent_GetLine, 2872).
--define(wxStyledTextEvent_GetFoldLevelNow, 2873).
--define(wxStyledTextEvent_GetFoldLevelPrev, 2874).
--define(wxStyledTextEvent_GetMargin, 2875).
--define(wxStyledTextEvent_GetMessage, 2876).
--define(wxStyledTextEvent_GetWParam, 2877).
--define(wxStyledTextEvent_GetLParam, 2878).
--define(wxStyledTextEvent_GetListType, 2879).
--define(wxStyledTextEvent_GetX, 2880).
--define(wxStyledTextEvent_GetY, 2881).
--define(wxStyledTextEvent_GetDragText, 2882).
--define(wxStyledTextEvent_GetDragAllowMove, 2883).
--define(wxStyledTextEvent_GetDragResult, 2884).
--define(wxStyledTextEvent_GetShift, 2885).
--define(wxStyledTextEvent_GetControl, 2886).
--define(wxStyledTextEvent_GetAlt, 2887).
--define(utils_wxGetKeyState, 2888).
--define(utils_wxGetMousePosition, 2889).
--define(utils_wxGetMouseState, 2890).
--define(utils_wxSetDetectableAutoRepeat, 2891).
--define(utils_wxBell, 2892).
--define(utils_wxFindMenuItemId, 2893).
--define(utils_wxGenericFindWindowAtPoint, 2894).
--define(utils_wxFindWindowAtPoint, 2895).
--define(utils_wxBeginBusyCursor, 2896).
--define(utils_wxEndBusyCursor, 2897).
--define(utils_wxIsBusy, 2898).
--define(utils_wxShutdown, 2899).
--define(utils_wxShell, 2900).
--define(utils_wxLaunchDefaultBrowser, 2901).
--define(utils_wxGetEmailAddress, 2902).
--define(utils_wxGetUserId, 2903).
--define(utils_wxGetHomeDir, 2904).
--define(utils_wxNewId, 2905).
--define(utils_wxRegisterId, 2906).
--define(utils_wxGetCurrentId, 2907).
--define(utils_wxGetOsDescription, 2908).
--define(utils_wxIsPlatformLittleEndian, 2909).
--define(utils_wxIsPlatform64Bit, 2910).
--define(wxPrintout_new, 2911).
--define(wxPrintout_destruct, 2912).
--define(wxPrintout_GetDC, 2913).
--define(wxPrintout_GetPageSizeMM, 2914).
--define(wxPrintout_GetPageSizePixels, 2915).
--define(wxPrintout_GetPaperRectPixels, 2916).
--define(wxPrintout_GetPPIPrinter, 2917).
--define(wxPrintout_GetPPIScreen, 2918).
--define(wxPrintout_GetTitle, 2919).
--define(wxPrintout_IsPreview, 2920).
--define(wxPrintout_FitThisSizeToPaper, 2921).
--define(wxPrintout_FitThisSizeToPage, 2922).
--define(wxPrintout_FitThisSizeToPageMargins, 2923).
--define(wxPrintout_MapScreenSizeToPaper, 2924).
--define(wxPrintout_MapScreenSizeToPage, 2925).
--define(wxPrintout_MapScreenSizeToPageMargins, 2926).
--define(wxPrintout_MapScreenSizeToDevice, 2927).
--define(wxPrintout_GetLogicalPaperRect, 2928).
--define(wxPrintout_GetLogicalPageRect, 2929).
--define(wxPrintout_GetLogicalPageMarginsRect, 2930).
--define(wxPrintout_SetLogicalOrigin, 2931).
--define(wxPrintout_OffsetLogicalOrigin, 2932).
--define(wxStyledTextCtrl_new_2, 2933).
--define(wxStyledTextCtrl_new_0, 2934).
--define(wxStyledTextCtrl_destruct, 2935).
--define(wxStyledTextCtrl_Create, 2936).
--define(wxStyledTextCtrl_AddText, 2937).
--define(wxStyledTextCtrl_AddStyledText, 2938).
--define(wxStyledTextCtrl_InsertText, 2939).
--define(wxStyledTextCtrl_ClearAll, 2940).
--define(wxStyledTextCtrl_ClearDocumentStyle, 2941).
--define(wxStyledTextCtrl_GetLength, 2942).
--define(wxStyledTextCtrl_GetCharAt, 2943).
--define(wxStyledTextCtrl_GetCurrentPos, 2944).
--define(wxStyledTextCtrl_GetAnchor, 2945).
--define(wxStyledTextCtrl_GetStyleAt, 2946).
--define(wxStyledTextCtrl_Redo, 2947).
--define(wxStyledTextCtrl_SetUndoCollection, 2948).
--define(wxStyledTextCtrl_SelectAll, 2949).
--define(wxStyledTextCtrl_SetSavePoint, 2950).
--define(wxStyledTextCtrl_GetStyledText, 2951).
--define(wxStyledTextCtrl_CanRedo, 2952).
--define(wxStyledTextCtrl_MarkerLineFromHandle, 2953).
--define(wxStyledTextCtrl_MarkerDeleteHandle, 2954).
--define(wxStyledTextCtrl_GetUndoCollection, 2955).
--define(wxStyledTextCtrl_GetViewWhiteSpace, 2956).
--define(wxStyledTextCtrl_SetViewWhiteSpace, 2957).
--define(wxStyledTextCtrl_PositionFromPoint, 2958).
--define(wxStyledTextCtrl_PositionFromPointClose, 2959).
--define(wxStyledTextCtrl_GotoLine, 2960).
--define(wxStyledTextCtrl_GotoPos, 2961).
--define(wxStyledTextCtrl_SetAnchor, 2962).
--define(wxStyledTextCtrl_GetCurLine, 2963).
--define(wxStyledTextCtrl_GetEndStyled, 2964).
--define(wxStyledTextCtrl_ConvertEOLs, 2965).
--define(wxStyledTextCtrl_GetEOLMode, 2966).
--define(wxStyledTextCtrl_SetEOLMode, 2967).
--define(wxStyledTextCtrl_StartStyling, 2968).
--define(wxStyledTextCtrl_SetStyling, 2969).
--define(wxStyledTextCtrl_GetBufferedDraw, 2970).
--define(wxStyledTextCtrl_SetBufferedDraw, 2971).
--define(wxStyledTextCtrl_SetTabWidth, 2972).
--define(wxStyledTextCtrl_GetTabWidth, 2973).
--define(wxStyledTextCtrl_SetCodePage, 2974).
--define(wxStyledTextCtrl_MarkerDefine, 2975).
--define(wxStyledTextCtrl_MarkerSetForeground, 2976).
--define(wxStyledTextCtrl_MarkerSetBackground, 2977).
--define(wxStyledTextCtrl_MarkerAdd, 2978).
--define(wxStyledTextCtrl_MarkerDelete, 2979).
--define(wxStyledTextCtrl_MarkerDeleteAll, 2980).
--define(wxStyledTextCtrl_MarkerGet, 2981).
--define(wxStyledTextCtrl_MarkerNext, 2982).
--define(wxStyledTextCtrl_MarkerPrevious, 2983).
--define(wxStyledTextCtrl_MarkerDefineBitmap, 2984).
--define(wxStyledTextCtrl_MarkerAddSet, 2985).
--define(wxStyledTextCtrl_MarkerSetAlpha, 2986).
--define(wxStyledTextCtrl_SetMarginType, 2987).
--define(wxStyledTextCtrl_GetMarginType, 2988).
--define(wxStyledTextCtrl_SetMarginWidth, 2989).
--define(wxStyledTextCtrl_GetMarginWidth, 2990).
--define(wxStyledTextCtrl_SetMarginMask, 2991).
--define(wxStyledTextCtrl_GetMarginMask, 2992).
--define(wxStyledTextCtrl_SetMarginSensitive, 2993).
--define(wxStyledTextCtrl_GetMarginSensitive, 2994).
--define(wxStyledTextCtrl_StyleClearAll, 2995).
--define(wxStyledTextCtrl_StyleSetForeground, 2996).
--define(wxStyledTextCtrl_StyleSetBackground, 2997).
--define(wxStyledTextCtrl_StyleSetBold, 2998).
--define(wxStyledTextCtrl_StyleSetItalic, 2999).
--define(wxStyledTextCtrl_StyleSetSize, 3000).
--define(wxStyledTextCtrl_StyleSetFaceName, 3001).
--define(wxStyledTextCtrl_StyleSetEOLFilled, 3002).
--define(wxStyledTextCtrl_StyleResetDefault, 3003).
--define(wxStyledTextCtrl_StyleSetUnderline, 3004).
--define(wxStyledTextCtrl_StyleSetCase, 3005).
--define(wxStyledTextCtrl_StyleSetHotSpot, 3006).
--define(wxStyledTextCtrl_SetSelForeground, 3007).
--define(wxStyledTextCtrl_SetSelBackground, 3008).
--define(wxStyledTextCtrl_GetSelAlpha, 3009).
--define(wxStyledTextCtrl_SetSelAlpha, 3010).
--define(wxStyledTextCtrl_SetCaretForeground, 3011).
--define(wxStyledTextCtrl_CmdKeyAssign, 3012).
--define(wxStyledTextCtrl_CmdKeyClear, 3013).
--define(wxStyledTextCtrl_CmdKeyClearAll, 3014).
--define(wxStyledTextCtrl_SetStyleBytes, 3015).
--define(wxStyledTextCtrl_StyleSetVisible, 3016).
--define(wxStyledTextCtrl_GetCaretPeriod, 3017).
--define(wxStyledTextCtrl_SetCaretPeriod, 3018).
--define(wxStyledTextCtrl_SetWordChars, 3019).
--define(wxStyledTextCtrl_BeginUndoAction, 3020).
--define(wxStyledTextCtrl_EndUndoAction, 3021).
--define(wxStyledTextCtrl_IndicatorSetStyle, 3022).
--define(wxStyledTextCtrl_IndicatorGetStyle, 3023).
--define(wxStyledTextCtrl_IndicatorSetForeground, 3024).
--define(wxStyledTextCtrl_IndicatorGetForeground, 3025).
--define(wxStyledTextCtrl_SetWhitespaceForeground, 3026).
--define(wxStyledTextCtrl_SetWhitespaceBackground, 3027).
--define(wxStyledTextCtrl_GetStyleBits, 3028).
--define(wxStyledTextCtrl_SetLineState, 3029).
--define(wxStyledTextCtrl_GetLineState, 3030).
--define(wxStyledTextCtrl_GetMaxLineState, 3031).
--define(wxStyledTextCtrl_GetCaretLineVisible, 3032).
--define(wxStyledTextCtrl_SetCaretLineVisible, 3033).
--define(wxStyledTextCtrl_GetCaretLineBackground, 3034).
--define(wxStyledTextCtrl_SetCaretLineBackground, 3035).
--define(wxStyledTextCtrl_AutoCompShow, 3036).
--define(wxStyledTextCtrl_AutoCompCancel, 3037).
--define(wxStyledTextCtrl_AutoCompActive, 3038).
--define(wxStyledTextCtrl_AutoCompPosStart, 3039).
--define(wxStyledTextCtrl_AutoCompComplete, 3040).
--define(wxStyledTextCtrl_AutoCompStops, 3041).
--define(wxStyledTextCtrl_AutoCompSetSeparator, 3042).
--define(wxStyledTextCtrl_AutoCompGetSeparator, 3043).
--define(wxStyledTextCtrl_AutoCompSelect, 3044).
--define(wxStyledTextCtrl_AutoCompSetCancelAtStart, 3045).
--define(wxStyledTextCtrl_AutoCompGetCancelAtStart, 3046).
--define(wxStyledTextCtrl_AutoCompSetFillUps, 3047).
--define(wxStyledTextCtrl_AutoCompSetChooseSingle, 3048).
--define(wxStyledTextCtrl_AutoCompGetChooseSingle, 3049).
--define(wxStyledTextCtrl_AutoCompSetIgnoreCase, 3050).
--define(wxStyledTextCtrl_AutoCompGetIgnoreCase, 3051).
--define(wxStyledTextCtrl_UserListShow, 3052).
--define(wxStyledTextCtrl_AutoCompSetAutoHide, 3053).
--define(wxStyledTextCtrl_AutoCompGetAutoHide, 3054).
--define(wxStyledTextCtrl_AutoCompSetDropRestOfWord, 3055).
--define(wxStyledTextCtrl_AutoCompGetDropRestOfWord, 3056).
--define(wxStyledTextCtrl_RegisterImage, 3057).
--define(wxStyledTextCtrl_ClearRegisteredImages, 3058).
--define(wxStyledTextCtrl_AutoCompGetTypeSeparator, 3059).
--define(wxStyledTextCtrl_AutoCompSetTypeSeparator, 3060).
--define(wxStyledTextCtrl_AutoCompSetMaxWidth, 3061).
--define(wxStyledTextCtrl_AutoCompGetMaxWidth, 3062).
--define(wxStyledTextCtrl_AutoCompSetMaxHeight, 3063).
--define(wxStyledTextCtrl_AutoCompGetMaxHeight, 3064).
--define(wxStyledTextCtrl_SetIndent, 3065).
--define(wxStyledTextCtrl_GetIndent, 3066).
--define(wxStyledTextCtrl_SetUseTabs, 3067).
--define(wxStyledTextCtrl_GetUseTabs, 3068).
--define(wxStyledTextCtrl_SetLineIndentation, 3069).
--define(wxStyledTextCtrl_GetLineIndentation, 3070).
--define(wxStyledTextCtrl_GetLineIndentPosition, 3071).
--define(wxStyledTextCtrl_GetColumn, 3072).
--define(wxStyledTextCtrl_SetUseHorizontalScrollBar, 3073).
--define(wxStyledTextCtrl_GetUseHorizontalScrollBar, 3074).
--define(wxStyledTextCtrl_SetIndentationGuides, 3075).
--define(wxStyledTextCtrl_GetIndentationGuides, 3076).
--define(wxStyledTextCtrl_SetHighlightGuide, 3077).
--define(wxStyledTextCtrl_GetHighlightGuide, 3078).
--define(wxStyledTextCtrl_GetLineEndPosition, 3079).
--define(wxStyledTextCtrl_GetCodePage, 3080).
--define(wxStyledTextCtrl_GetCaretForeground, 3081).
--define(wxStyledTextCtrl_GetReadOnly, 3082).
--define(wxStyledTextCtrl_SetCurrentPos, 3083).
--define(wxStyledTextCtrl_SetSelectionStart, 3084).
--define(wxStyledTextCtrl_GetSelectionStart, 3085).
--define(wxStyledTextCtrl_SetSelectionEnd, 3086).
--define(wxStyledTextCtrl_GetSelectionEnd, 3087).
--define(wxStyledTextCtrl_SetPrintMagnification, 3088).
--define(wxStyledTextCtrl_GetPrintMagnification, 3089).
--define(wxStyledTextCtrl_SetPrintColourMode, 3090).
--define(wxStyledTextCtrl_GetPrintColourMode, 3091).
--define(wxStyledTextCtrl_FindText, 3092).
--define(wxStyledTextCtrl_FormatRange, 3093).
--define(wxStyledTextCtrl_GetFirstVisibleLine, 3094).
--define(wxStyledTextCtrl_GetLine, 3095).
--define(wxStyledTextCtrl_GetLineCount, 3096).
--define(wxStyledTextCtrl_SetMarginLeft, 3097).
--define(wxStyledTextCtrl_GetMarginLeft, 3098).
--define(wxStyledTextCtrl_SetMarginRight, 3099).
--define(wxStyledTextCtrl_GetMarginRight, 3100).
--define(wxStyledTextCtrl_GetModify, 3101).
--define(wxStyledTextCtrl_SetSelection, 3102).
--define(wxStyledTextCtrl_GetSelectedText, 3103).
--define(wxStyledTextCtrl_GetTextRange, 3104).
--define(wxStyledTextCtrl_HideSelection, 3105).
--define(wxStyledTextCtrl_LineFromPosition, 3106).
--define(wxStyledTextCtrl_PositionFromLine, 3107).
--define(wxStyledTextCtrl_LineScroll, 3108).
--define(wxStyledTextCtrl_EnsureCaretVisible, 3109).
--define(wxStyledTextCtrl_ReplaceSelection, 3110).
--define(wxStyledTextCtrl_SetReadOnly, 3111).
--define(wxStyledTextCtrl_CanPaste, 3112).
--define(wxStyledTextCtrl_CanUndo, 3113).
--define(wxStyledTextCtrl_EmptyUndoBuffer, 3114).
--define(wxStyledTextCtrl_Undo, 3115).
--define(wxStyledTextCtrl_Cut, 3116).
--define(wxStyledTextCtrl_Copy, 3117).
--define(wxStyledTextCtrl_Paste, 3118).
--define(wxStyledTextCtrl_Clear, 3119).
--define(wxStyledTextCtrl_SetText, 3120).
--define(wxStyledTextCtrl_GetText, 3121).
--define(wxStyledTextCtrl_GetTextLength, 3122).
--define(wxStyledTextCtrl_GetOvertype, 3123).
--define(wxStyledTextCtrl_SetCaretWidth, 3124).
--define(wxStyledTextCtrl_GetCaretWidth, 3125).
--define(wxStyledTextCtrl_SetTargetStart, 3126).
--define(wxStyledTextCtrl_GetTargetStart, 3127).
--define(wxStyledTextCtrl_SetTargetEnd, 3128).
--define(wxStyledTextCtrl_GetTargetEnd, 3129).
--define(wxStyledTextCtrl_ReplaceTarget, 3130).
--define(wxStyledTextCtrl_SearchInTarget, 3131).
--define(wxStyledTextCtrl_SetSearchFlags, 3132).
--define(wxStyledTextCtrl_GetSearchFlags, 3133).
--define(wxStyledTextCtrl_CallTipShow, 3134).
--define(wxStyledTextCtrl_CallTipCancel, 3135).
--define(wxStyledTextCtrl_CallTipActive, 3136).
--define(wxStyledTextCtrl_CallTipPosAtStart, 3137).
--define(wxStyledTextCtrl_CallTipSetHighlight, 3138).
--define(wxStyledTextCtrl_CallTipSetBackground, 3139).
--define(wxStyledTextCtrl_CallTipSetForeground, 3140).
--define(wxStyledTextCtrl_CallTipSetForegroundHighlight, 3141).
--define(wxStyledTextCtrl_CallTipUseStyle, 3142).
--define(wxStyledTextCtrl_VisibleFromDocLine, 3143).
--define(wxStyledTextCtrl_DocLineFromVisible, 3144).
--define(wxStyledTextCtrl_WrapCount, 3145).
--define(wxStyledTextCtrl_SetFoldLevel, 3146).
--define(wxStyledTextCtrl_GetFoldLevel, 3147).
--define(wxStyledTextCtrl_GetLastChild, 3148).
--define(wxStyledTextCtrl_GetFoldParent, 3149).
--define(wxStyledTextCtrl_ShowLines, 3150).
--define(wxStyledTextCtrl_HideLines, 3151).
--define(wxStyledTextCtrl_GetLineVisible, 3152).
--define(wxStyledTextCtrl_SetFoldExpanded, 3153).
--define(wxStyledTextCtrl_GetFoldExpanded, 3154).
--define(wxStyledTextCtrl_ToggleFold, 3155).
--define(wxStyledTextCtrl_EnsureVisible, 3156).
--define(wxStyledTextCtrl_SetFoldFlags, 3157).
--define(wxStyledTextCtrl_EnsureVisibleEnforcePolicy, 3158).
--define(wxStyledTextCtrl_SetTabIndents, 3159).
--define(wxStyledTextCtrl_GetTabIndents, 3160).
--define(wxStyledTextCtrl_SetBackSpaceUnIndents, 3161).
--define(wxStyledTextCtrl_GetBackSpaceUnIndents, 3162).
--define(wxStyledTextCtrl_SetMouseDwellTime, 3163).
--define(wxStyledTextCtrl_GetMouseDwellTime, 3164).
--define(wxStyledTextCtrl_WordStartPosition, 3165).
--define(wxStyledTextCtrl_WordEndPosition, 3166).
--define(wxStyledTextCtrl_SetWrapMode, 3167).
--define(wxStyledTextCtrl_GetWrapMode, 3168).
--define(wxStyledTextCtrl_SetWrapVisualFlags, 3169).
--define(wxStyledTextCtrl_GetWrapVisualFlags, 3170).
--define(wxStyledTextCtrl_SetWrapVisualFlagsLocation, 3171).
--define(wxStyledTextCtrl_GetWrapVisualFlagsLocation, 3172).
--define(wxStyledTextCtrl_SetWrapStartIndent, 3173).
--define(wxStyledTextCtrl_GetWrapStartIndent, 3174).
--define(wxStyledTextCtrl_SetLayoutCache, 3175).
--define(wxStyledTextCtrl_GetLayoutCache, 3176).
--define(wxStyledTextCtrl_SetScrollWidth, 3177).
--define(wxStyledTextCtrl_GetScrollWidth, 3178).
--define(wxStyledTextCtrl_TextWidth, 3179).
--define(wxStyledTextCtrl_GetEndAtLastLine, 3180).
--define(wxStyledTextCtrl_TextHeight, 3181).
--define(wxStyledTextCtrl_SetUseVerticalScrollBar, 3182).
--define(wxStyledTextCtrl_GetUseVerticalScrollBar, 3183).
--define(wxStyledTextCtrl_AppendText, 3184).
--define(wxStyledTextCtrl_GetTwoPhaseDraw, 3185).
--define(wxStyledTextCtrl_SetTwoPhaseDraw, 3186).
--define(wxStyledTextCtrl_TargetFromSelection, 3187).
--define(wxStyledTextCtrl_LinesJoin, 3188).
--define(wxStyledTextCtrl_LinesSplit, 3189).
--define(wxStyledTextCtrl_SetFoldMarginColour, 3190).
--define(wxStyledTextCtrl_SetFoldMarginHiColour, 3191).
--define(wxStyledTextCtrl_LineDown, 3192).
--define(wxStyledTextCtrl_LineDownExtend, 3193).
--define(wxStyledTextCtrl_LineUp, 3194).
--define(wxStyledTextCtrl_LineUpExtend, 3195).
--define(wxStyledTextCtrl_CharLeft, 3196).
--define(wxStyledTextCtrl_CharLeftExtend, 3197).
--define(wxStyledTextCtrl_CharRight, 3198).
--define(wxStyledTextCtrl_CharRightExtend, 3199).
--define(wxStyledTextCtrl_WordLeft, 3200).
--define(wxStyledTextCtrl_WordLeftExtend, 3201).
--define(wxStyledTextCtrl_WordRight, 3202).
--define(wxStyledTextCtrl_WordRightExtend, 3203).
--define(wxStyledTextCtrl_Home, 3204).
--define(wxStyledTextCtrl_HomeExtend, 3205).
--define(wxStyledTextCtrl_LineEnd, 3206).
--define(wxStyledTextCtrl_LineEndExtend, 3207).
--define(wxStyledTextCtrl_DocumentStart, 3208).
--define(wxStyledTextCtrl_DocumentStartExtend, 3209).
--define(wxStyledTextCtrl_DocumentEnd, 3210).
--define(wxStyledTextCtrl_DocumentEndExtend, 3211).
--define(wxStyledTextCtrl_PageUp, 3212).
--define(wxStyledTextCtrl_PageUpExtend, 3213).
--define(wxStyledTextCtrl_PageDown, 3214).
--define(wxStyledTextCtrl_PageDownExtend, 3215).
--define(wxStyledTextCtrl_EditToggleOvertype, 3216).
--define(wxStyledTextCtrl_Cancel, 3217).
--define(wxStyledTextCtrl_DeleteBack, 3218).
--define(wxStyledTextCtrl_Tab, 3219).
--define(wxStyledTextCtrl_BackTab, 3220).
--define(wxStyledTextCtrl_NewLine, 3221).
--define(wxStyledTextCtrl_FormFeed, 3222).
--define(wxStyledTextCtrl_VCHome, 3223).
--define(wxStyledTextCtrl_VCHomeExtend, 3224).
--define(wxStyledTextCtrl_ZoomIn, 3225).
--define(wxStyledTextCtrl_ZoomOut, 3226).
--define(wxStyledTextCtrl_DelWordLeft, 3227).
--define(wxStyledTextCtrl_DelWordRight, 3228).
--define(wxStyledTextCtrl_LineCut, 3229).
--define(wxStyledTextCtrl_LineDelete, 3230).
--define(wxStyledTextCtrl_LineTranspose, 3231).
--define(wxStyledTextCtrl_LineDuplicate, 3232).
--define(wxStyledTextCtrl_LowerCase, 3233).
--define(wxStyledTextCtrl_UpperCase, 3234).
--define(wxStyledTextCtrl_LineScrollDown, 3235).
--define(wxStyledTextCtrl_LineScrollUp, 3236).
--define(wxStyledTextCtrl_DeleteBackNotLine, 3237).
--define(wxStyledTextCtrl_HomeDisplay, 3238).
--define(wxStyledTextCtrl_HomeDisplayExtend, 3239).
--define(wxStyledTextCtrl_LineEndDisplay, 3240).
--define(wxStyledTextCtrl_LineEndDisplayExtend, 3241).
--define(wxStyledTextCtrl_HomeWrapExtend, 3242).
--define(wxStyledTextCtrl_LineEndWrap, 3243).
--define(wxStyledTextCtrl_LineEndWrapExtend, 3244).
--define(wxStyledTextCtrl_VCHomeWrap, 3245).
--define(wxStyledTextCtrl_VCHomeWrapExtend, 3246).
--define(wxStyledTextCtrl_LineCopy, 3247).
--define(wxStyledTextCtrl_MoveCaretInsideView, 3248).
--define(wxStyledTextCtrl_LineLength, 3249).
--define(wxStyledTextCtrl_BraceHighlight, 3250).
--define(wxStyledTextCtrl_BraceBadLight, 3251).
--define(wxStyledTextCtrl_BraceMatch, 3252).
--define(wxStyledTextCtrl_GetViewEOL, 3253).
--define(wxStyledTextCtrl_SetViewEOL, 3254).
--define(wxStyledTextCtrl_SetModEventMask, 3255).
--define(wxStyledTextCtrl_GetEdgeColumn, 3256).
--define(wxStyledTextCtrl_SetEdgeColumn, 3257).
--define(wxStyledTextCtrl_GetEdgeMode, 3258).
--define(wxStyledTextCtrl_GetEdgeColour, 3259).
--define(wxStyledTextCtrl_SetEdgeColour, 3260).
--define(wxStyledTextCtrl_SearchAnchor, 3261).
--define(wxStyledTextCtrl_SearchNext, 3262).
--define(wxStyledTextCtrl_SearchPrev, 3263).
--define(wxStyledTextCtrl_LinesOnScreen, 3264).
--define(wxStyledTextCtrl_UsePopUp, 3265).
--define(wxStyledTextCtrl_SelectionIsRectangle, 3266).
--define(wxStyledTextCtrl_SetZoom, 3267).
--define(wxStyledTextCtrl_GetZoom, 3268).
--define(wxStyledTextCtrl_GetModEventMask, 3269).
--define(wxStyledTextCtrl_SetSTCFocus, 3270).
--define(wxStyledTextCtrl_GetSTCFocus, 3271).
--define(wxStyledTextCtrl_SetStatus, 3272).
--define(wxStyledTextCtrl_GetStatus, 3273).
--define(wxStyledTextCtrl_SetMouseDownCaptures, 3274).
--define(wxStyledTextCtrl_GetMouseDownCaptures, 3275).
--define(wxStyledTextCtrl_SetSTCCursor, 3276).
--define(wxStyledTextCtrl_GetSTCCursor, 3277).
--define(wxStyledTextCtrl_SetControlCharSymbol, 3278).
--define(wxStyledTextCtrl_GetControlCharSymbol, 3279).
--define(wxStyledTextCtrl_WordPartLeft, 3280).
--define(wxStyledTextCtrl_WordPartLeftExtend, 3281).
--define(wxStyledTextCtrl_WordPartRight, 3282).
--define(wxStyledTextCtrl_WordPartRightExtend, 3283).
--define(wxStyledTextCtrl_SetVisiblePolicy, 3284).
--define(wxStyledTextCtrl_DelLineLeft, 3285).
--define(wxStyledTextCtrl_DelLineRight, 3286).
--define(wxStyledTextCtrl_GetXOffset, 3287).
--define(wxStyledTextCtrl_ChooseCaretX, 3288).
--define(wxStyledTextCtrl_SetXCaretPolicy, 3289).
--define(wxStyledTextCtrl_SetYCaretPolicy, 3290).
--define(wxStyledTextCtrl_GetPrintWrapMode, 3291).
--define(wxStyledTextCtrl_SetHotspotActiveForeground, 3292).
--define(wxStyledTextCtrl_SetHotspotActiveBackground, 3293).
--define(wxStyledTextCtrl_SetHotspotActiveUnderline, 3294).
--define(wxStyledTextCtrl_SetHotspotSingleLine, 3295).
--define(wxStyledTextCtrl_ParaDownExtend, 3296).
--define(wxStyledTextCtrl_ParaUp, 3297).
--define(wxStyledTextCtrl_ParaUpExtend, 3298).
--define(wxStyledTextCtrl_PositionBefore, 3299).
--define(wxStyledTextCtrl_PositionAfter, 3300).
--define(wxStyledTextCtrl_CopyRange, 3301).
--define(wxStyledTextCtrl_CopyText, 3302).
--define(wxStyledTextCtrl_SetSelectionMode, 3303).
--define(wxStyledTextCtrl_GetSelectionMode, 3304).
--define(wxStyledTextCtrl_LineDownRectExtend, 3305).
--define(wxStyledTextCtrl_LineUpRectExtend, 3306).
--define(wxStyledTextCtrl_CharLeftRectExtend, 3307).
--define(wxStyledTextCtrl_CharRightRectExtend, 3308).
--define(wxStyledTextCtrl_HomeRectExtend, 3309).
--define(wxStyledTextCtrl_VCHomeRectExtend, 3310).
--define(wxStyledTextCtrl_LineEndRectExtend, 3311).
--define(wxStyledTextCtrl_PageUpRectExtend, 3312).
--define(wxStyledTextCtrl_PageDownRectExtend, 3313).
--define(wxStyledTextCtrl_StutteredPageUp, 3314).
--define(wxStyledTextCtrl_StutteredPageUpExtend, 3315).
--define(wxStyledTextCtrl_StutteredPageDown, 3316).
--define(wxStyledTextCtrl_StutteredPageDownExtend, 3317).
--define(wxStyledTextCtrl_WordLeftEnd, 3318).
--define(wxStyledTextCtrl_WordLeftEndExtend, 3319).
--define(wxStyledTextCtrl_WordRightEnd, 3320).
--define(wxStyledTextCtrl_WordRightEndExtend, 3321).
--define(wxStyledTextCtrl_SetWhitespaceChars, 3322).
--define(wxStyledTextCtrl_SetCharsDefault, 3323).
--define(wxStyledTextCtrl_AutoCompGetCurrent, 3324).
--define(wxStyledTextCtrl_Allocate, 3325).
--define(wxStyledTextCtrl_FindColumn, 3326).
--define(wxStyledTextCtrl_GetCaretSticky, 3327).
--define(wxStyledTextCtrl_SetCaretSticky, 3328).
--define(wxStyledTextCtrl_ToggleCaretSticky, 3329).
--define(wxStyledTextCtrl_SetPasteConvertEndings, 3330).
--define(wxStyledTextCtrl_GetPasteConvertEndings, 3331).
--define(wxStyledTextCtrl_SelectionDuplicate, 3332).
--define(wxStyledTextCtrl_SetCaretLineBackAlpha, 3333).
--define(wxStyledTextCtrl_GetCaretLineBackAlpha, 3334).
--define(wxStyledTextCtrl_StartRecord, 3335).
--define(wxStyledTextCtrl_StopRecord, 3336).
--define(wxStyledTextCtrl_SetLexer, 3337).
--define(wxStyledTextCtrl_GetLexer, 3338).
--define(wxStyledTextCtrl_Colourise, 3339).
--define(wxStyledTextCtrl_SetProperty, 3340).
--define(wxStyledTextCtrl_SetKeyWords, 3341).
--define(wxStyledTextCtrl_SetLexerLanguage, 3342).
--define(wxStyledTextCtrl_GetProperty, 3343).
--define(wxStyledTextCtrl_GetStyleBitsNeeded, 3344).
--define(wxStyledTextCtrl_GetCurrentLine, 3345).
--define(wxStyledTextCtrl_StyleSetSpec, 3346).
--define(wxStyledTextCtrl_StyleSetFont, 3347).
--define(wxStyledTextCtrl_StyleSetFontAttr, 3348).
--define(wxStyledTextCtrl_StyleSetCharacterSet, 3349).
--define(wxStyledTextCtrl_StyleSetFontEncoding, 3350).
--define(wxStyledTextCtrl_CmdKeyExecute, 3351).
--define(wxStyledTextCtrl_SetMargins, 3352).
--define(wxStyledTextCtrl_GetSelection, 3353).
--define(wxStyledTextCtrl_PointFromPosition, 3354).
--define(wxStyledTextCtrl_ScrollToLine, 3355).
--define(wxStyledTextCtrl_ScrollToColumn, 3356).
--define(wxStyledTextCtrl_SendMsg, 3357).
--define(wxStyledTextCtrl_SetVScrollBar, 3358).
--define(wxStyledTextCtrl_SetHScrollBar, 3359).
--define(wxStyledTextCtrl_GetLastKeydownProcessed, 3360).
--define(wxStyledTextCtrl_SetLastKeydownProcessed, 3361).
--define(wxStyledTextCtrl_SaveFile, 3362).
--define(wxStyledTextCtrl_LoadFile, 3363).
--define(wxStyledTextCtrl_DoDragOver, 3364).
--define(wxStyledTextCtrl_DoDropText, 3365).
--define(wxStyledTextCtrl_GetUseAntiAliasing, 3366).
--define(wxStyledTextCtrl_AddTextRaw, 3367).
--define(wxStyledTextCtrl_InsertTextRaw, 3368).
--define(wxStyledTextCtrl_GetCurLineRaw, 3369).
--define(wxStyledTextCtrl_GetLineRaw, 3370).
--define(wxStyledTextCtrl_GetSelectedTextRaw, 3371).
--define(wxStyledTextCtrl_GetTextRangeRaw, 3372).
--define(wxStyledTextCtrl_SetTextRaw, 3373).
--define(wxStyledTextCtrl_GetTextRaw, 3374).
--define(wxStyledTextCtrl_AppendTextRaw, 3375).
--define(wxArtProvider_GetBitmap, 3376).
--define(wxArtProvider_GetIcon, 3377).
--define(wxTreeEvent_GetKeyCode, 3378).
--define(wxTreeEvent_GetItem, 3379).
--define(wxTreeEvent_GetKeyEvent, 3380).
--define(wxTreeEvent_GetLabel, 3381).
--define(wxTreeEvent_GetOldItem, 3382).
--define(wxTreeEvent_GetPoint, 3383).
--define(wxTreeEvent_IsEditCancelled, 3384).
--define(wxTreeEvent_SetToolTip, 3385).
--define(wxNotebookEvent_GetOldSelection, 3386).
--define(wxNotebookEvent_GetSelection, 3387).
--define(wxNotebookEvent_SetOldSelection, 3388).
--define(wxNotebookEvent_SetSelection, 3389).
--define(wxFileDataObject_new, 3390).
--define(wxFileDataObject_AddFile, 3391).
--define(wxFileDataObject_GetFilenames, 3392).
--define(wxFileDataObject_destroy, 3393).
--define(wxTextDataObject_new, 3394).
--define(wxTextDataObject_GetTextLength, 3395).
--define(wxTextDataObject_GetText, 3396).
--define(wxTextDataObject_SetText, 3397).
--define(wxTextDataObject_destroy, 3398).
--define(wxBitmapDataObject_new_1_1, 3399).
--define(wxBitmapDataObject_new_1_0, 3400).
--define(wxBitmapDataObject_GetBitmap, 3401).
--define(wxBitmapDataObject_SetBitmap, 3402).
--define(wxBitmapDataObject_destroy, 3403).
--define(wxClipboard_new, 3405).
--define(wxClipboard_destruct, 3406).
--define(wxClipboard_AddData, 3407).
--define(wxClipboard_Clear, 3408).
--define(wxClipboard_Close, 3409).
--define(wxClipboard_Flush, 3410).
--define(wxClipboard_GetData, 3411).
--define(wxClipboard_IsOpened, 3412).
--define(wxClipboard_Open, 3413).
--define(wxClipboard_SetData, 3414).
--define(wxClipboard_UsePrimarySelection, 3416).
--define(wxClipboard_IsSupported, 3417).
--define(wxClipboard_Get, 3418).
--define(wxSpinEvent_GetPosition, 3419).
--define(wxSpinEvent_SetPosition, 3420).
--define(wxSplitterWindow_new_0, 3421).
--define(wxSplitterWindow_new_2, 3422).
--define(wxSplitterWindow_destruct, 3423).
--define(wxSplitterWindow_Create, 3424).
--define(wxSplitterWindow_GetMinimumPaneSize, 3425).
--define(wxSplitterWindow_GetSashGravity, 3426).
--define(wxSplitterWindow_GetSashPosition, 3427).
--define(wxSplitterWindow_GetSplitMode, 3428).
--define(wxSplitterWindow_GetWindow1, 3429).
--define(wxSplitterWindow_GetWindow2, 3430).
--define(wxSplitterWindow_Initialize, 3431).
--define(wxSplitterWindow_IsSplit, 3432).
--define(wxSplitterWindow_ReplaceWindow, 3433).
--define(wxSplitterWindow_SetSashGravity, 3434).
--define(wxSplitterWindow_SetSashPosition, 3435).
--define(wxSplitterWindow_SetSashSize, 3436).
--define(wxSplitterWindow_SetMinimumPaneSize, 3437).
--define(wxSplitterWindow_SetSplitMode, 3438).
--define(wxSplitterWindow_SplitHorizontally, 3439).
--define(wxSplitterWindow_SplitVertically, 3440).
--define(wxSplitterWindow_Unsplit, 3441).
--define(wxSplitterWindow_UpdateSize, 3442).
--define(wxSplitterEvent_GetSashPosition, 3443).
--define(wxSplitterEvent_GetX, 3444).
--define(wxSplitterEvent_GetY, 3445).
--define(wxSplitterEvent_GetWindowBeingRemoved, 3446).
--define(wxSplitterEvent_SetSashPosition, 3447).
--define(wxHtmlWindow_new_0, 3448).
--define(wxHtmlWindow_new_2, 3449).
--define(wxHtmlWindow_AppendToPage, 3450).
--define(wxHtmlWindow_GetOpenedAnchor, 3451).
--define(wxHtmlWindow_GetOpenedPage, 3452).
--define(wxHtmlWindow_GetOpenedPageTitle, 3453).
--define(wxHtmlWindow_GetRelatedFrame, 3454).
--define(wxHtmlWindow_HistoryBack, 3455).
--define(wxHtmlWindow_HistoryCanBack, 3456).
--define(wxHtmlWindow_HistoryCanForward, 3457).
--define(wxHtmlWindow_HistoryClear, 3458).
--define(wxHtmlWindow_HistoryForward, 3459).
--define(wxHtmlWindow_LoadFile, 3460).
--define(wxHtmlWindow_LoadPage, 3461).
--define(wxHtmlWindow_SelectAll, 3462).
--define(wxHtmlWindow_SelectionToText, 3463).
--define(wxHtmlWindow_SelectLine, 3464).
--define(wxHtmlWindow_SelectWord, 3465).
--define(wxHtmlWindow_SetBorders, 3466).
--define(wxHtmlWindow_SetFonts, 3467).
--define(wxHtmlWindow_SetPage, 3468).
--define(wxHtmlWindow_SetRelatedFrame, 3469).
--define(wxHtmlWindow_SetRelatedStatusBar, 3470).
--define(wxHtmlWindow_ToText, 3471).
--define(wxHtmlWindow_destroy, 3472).
--define(wxHtmlLinkEvent_GetLinkInfo, 3473).
--define(wxAuiNotebookEvent_SetSelection, 3474).
--define(wxAuiNotebookEvent_GetSelection, 3475).
--define(wxAuiNotebookEvent_SetOldSelection, 3476).
--define(wxAuiNotebookEvent_GetOldSelection, 3477).
--define(wxAuiNotebookEvent_SetDragSource, 3478).
--define(wxAuiNotebookEvent_GetDragSource, 3479).
--define(wxAuiManagerEvent_SetManager, 3480).
--define(wxAuiManagerEvent_GetManager, 3481).
--define(wxAuiManagerEvent_SetPane, 3482).
--define(wxAuiManagerEvent_GetPane, 3483).
--define(wxAuiManagerEvent_SetButton, 3484).
--define(wxAuiManagerEvent_GetButton, 3485).
--define(wxAuiManagerEvent_SetDC, 3486).
--define(wxAuiManagerEvent_GetDC, 3487).
--define(wxAuiManagerEvent_Veto, 3488).
--define(wxAuiManagerEvent_GetVeto, 3489).
--define(wxAuiManagerEvent_SetCanVeto, 3490).
--define(wxAuiManagerEvent_CanVeto, 3491).
--define(wxLogNull_new, 3492).
--define(wxLogNull_destroy, 3493).
+-define(wxTreeCtrl_GetFirstChild, 2018).
+-define(wxTreeCtrl_GetNextChild, 2019).
+-define(wxTreeCtrl_GetFirstVisibleItem, 2020).
+-define(wxTreeCtrl_GetImageList, 2021).
+-define(wxTreeCtrl_GetIndent, 2022).
+-define(wxTreeCtrl_GetItemBackgroundColour, 2023).
+-define(wxTreeCtrl_GetItemData, 2024).
+-define(wxTreeCtrl_GetItemFont, 2025).
+-define(wxTreeCtrl_GetItemImage_1, 2026).
+-define(wxTreeCtrl_GetItemImage_2, 2027).
+-define(wxTreeCtrl_GetItemText, 2028).
+-define(wxTreeCtrl_GetItemTextColour, 2029).
+-define(wxTreeCtrl_GetLastChild, 2030).
+-define(wxTreeCtrl_GetNextSibling, 2031).
+-define(wxTreeCtrl_GetNextVisible, 2032).
+-define(wxTreeCtrl_GetItemParent, 2033).
+-define(wxTreeCtrl_GetPrevSibling, 2034).
+-define(wxTreeCtrl_GetPrevVisible, 2035).
+-define(wxTreeCtrl_GetRootItem, 2036).
+-define(wxTreeCtrl_GetSelection, 2037).
+-define(wxTreeCtrl_GetSelections, 2038).
+-define(wxTreeCtrl_GetStateImageList, 2039).
+-define(wxTreeCtrl_HitTest, 2040).
+-define(wxTreeCtrl_InsertItem, 2042).
+-define(wxTreeCtrl_IsBold, 2043).
+-define(wxTreeCtrl_IsExpanded, 2044).
+-define(wxTreeCtrl_IsSelected, 2045).
+-define(wxTreeCtrl_IsVisible, 2046).
+-define(wxTreeCtrl_ItemHasChildren, 2047).
+-define(wxTreeCtrl_PrependItem, 2048).
+-define(wxTreeCtrl_ScrollTo, 2049).
+-define(wxTreeCtrl_SelectItem_1, 2050).
+-define(wxTreeCtrl_SelectItem_2, 2051).
+-define(wxTreeCtrl_SetIndent, 2052).
+-define(wxTreeCtrl_SetImageList, 2053).
+-define(wxTreeCtrl_SetItemBackgroundColour, 2054).
+-define(wxTreeCtrl_SetItemBold, 2055).
+-define(wxTreeCtrl_SetItemData, 2056).
+-define(wxTreeCtrl_SetItemDropHighlight, 2057).
+-define(wxTreeCtrl_SetItemFont, 2058).
+-define(wxTreeCtrl_SetItemHasChildren, 2059).
+-define(wxTreeCtrl_SetItemImage_2, 2060).
+-define(wxTreeCtrl_SetItemImage_3, 2061).
+-define(wxTreeCtrl_SetItemText, 2062).
+-define(wxTreeCtrl_SetItemTextColour, 2063).
+-define(wxTreeCtrl_SetStateImageList, 2064).
+-define(wxTreeCtrl_SetWindowStyle, 2065).
+-define(wxTreeCtrl_SortChildren, 2066).
+-define(wxTreeCtrl_Toggle, 2067).
+-define(wxTreeCtrl_ToggleItemSelection, 2068).
+-define(wxTreeCtrl_Unselect, 2069).
+-define(wxTreeCtrl_UnselectAll, 2070).
+-define(wxTreeCtrl_UnselectItem, 2071).
+-define(wxScrollBar_new_0, 2072).
+-define(wxScrollBar_new_3, 2073).
+-define(wxScrollBar_destruct, 2074).
+-define(wxScrollBar_Create, 2075).
+-define(wxScrollBar_GetRange, 2076).
+-define(wxScrollBar_GetPageSize, 2077).
+-define(wxScrollBar_GetThumbPosition, 2078).
+-define(wxScrollBar_GetThumbSize, 2079).
+-define(wxScrollBar_SetThumbPosition, 2080).
+-define(wxScrollBar_SetScrollbar, 2081).
+-define(wxSpinButton_new_2, 2083).
+-define(wxSpinButton_new_0, 2084).
+-define(wxSpinButton_Create, 2085).
+-define(wxSpinButton_GetMax, 2086).
+-define(wxSpinButton_GetMin, 2087).
+-define(wxSpinButton_GetValue, 2088).
+-define(wxSpinButton_SetRange, 2089).
+-define(wxSpinButton_SetValue, 2090).
+-define(wxSpinButton_destroy, 2091).
+-define(wxSpinCtrl_new_0, 2092).
+-define(wxSpinCtrl_new_2, 2093).
+-define(wxSpinCtrl_Create, 2095).
+-define(wxSpinCtrl_SetValue_1_1, 2098).
+-define(wxSpinCtrl_SetValue_1_0, 2099).
+-define(wxSpinCtrl_GetValue, 2101).
+-define(wxSpinCtrl_SetRange, 2103).
+-define(wxSpinCtrl_SetSelection, 2104).
+-define(wxSpinCtrl_GetMin, 2106).
+-define(wxSpinCtrl_GetMax, 2108).
+-define(wxSpinCtrl_destroy, 2109).
+-define(wxStaticText_new_0, 2110).
+-define(wxStaticText_new_4, 2111).
+-define(wxStaticText_Create, 2112).
+-define(wxStaticText_GetLabel, 2113).
+-define(wxStaticText_SetLabel, 2114).
+-define(wxStaticText_Wrap, 2115).
+-define(wxStaticText_destroy, 2116).
+-define(wxStaticBitmap_new_0, 2117).
+-define(wxStaticBitmap_new_4, 2118).
+-define(wxStaticBitmap_Create, 2119).
+-define(wxStaticBitmap_GetBitmap, 2120).
+-define(wxStaticBitmap_SetBitmap, 2121).
+-define(wxStaticBitmap_destroy, 2122).
+-define(wxRadioBox_new, 2123).
+-define(wxRadioBox_destruct, 2125).
+-define(wxRadioBox_Create, 2126).
+-define(wxRadioBox_Enable_2, 2127).
+-define(wxRadioBox_Enable_1, 2128).
+-define(wxRadioBox_GetSelection, 2129).
+-define(wxRadioBox_GetString, 2130).
+-define(wxRadioBox_SetSelection, 2131).
+-define(wxRadioBox_Show_2, 2132).
+-define(wxRadioBox_Show_1, 2133).
+-define(wxRadioBox_GetColumnCount, 2134).
+-define(wxRadioBox_GetItemHelpText, 2135).
+-define(wxRadioBox_GetItemToolTip, 2136).
+-define(wxRadioBox_GetItemFromPoint, 2138).
+-define(wxRadioBox_GetRowCount, 2139).
+-define(wxRadioBox_IsItemEnabled, 2140).
+-define(wxRadioBox_IsItemShown, 2141).
+-define(wxRadioBox_SetItemHelpText, 2142).
+-define(wxRadioBox_SetItemToolTip, 2143).
+-define(wxRadioButton_new_0, 2144).
+-define(wxRadioButton_new_4, 2145).
+-define(wxRadioButton_Create, 2146).
+-define(wxRadioButton_GetValue, 2147).
+-define(wxRadioButton_SetValue, 2148).
+-define(wxRadioButton_destroy, 2149).
+-define(wxSlider_new_6, 2151).
+-define(wxSlider_new_0, 2152).
+-define(wxSlider_Create, 2153).
+-define(wxSlider_GetLineSize, 2154).
+-define(wxSlider_GetMax, 2155).
+-define(wxSlider_GetMin, 2156).
+-define(wxSlider_GetPageSize, 2157).
+-define(wxSlider_GetThumbLength, 2158).
+-define(wxSlider_GetValue, 2159).
+-define(wxSlider_SetLineSize, 2160).
+-define(wxSlider_SetPageSize, 2161).
+-define(wxSlider_SetRange, 2162).
+-define(wxSlider_SetThumbLength, 2163).
+-define(wxSlider_SetValue, 2164).
+-define(wxSlider_destroy, 2165).
+-define(wxDialog_new_4, 2167).
+-define(wxDialog_new_0, 2168).
+-define(wxDialog_destruct, 2170).
+-define(wxDialog_Create, 2171).
+-define(wxDialog_CreateButtonSizer, 2172).
+-define(wxDialog_CreateStdDialogButtonSizer, 2173).
+-define(wxDialog_EndModal, 2174).
+-define(wxDialog_GetAffirmativeId, 2175).
+-define(wxDialog_GetReturnCode, 2176).
+-define(wxDialog_IsModal, 2177).
+-define(wxDialog_SetAffirmativeId, 2178).
+-define(wxDialog_SetReturnCode, 2179).
+-define(wxDialog_Show, 2180).
+-define(wxDialog_ShowModal, 2181).
+-define(wxColourDialog_new_0, 2182).
+-define(wxColourDialog_new_2, 2183).
+-define(wxColourDialog_destruct, 2184).
+-define(wxColourDialog_Create, 2185).
+-define(wxColourDialog_GetColourData, 2186).
+-define(wxColourData_new_0, 2187).
+-define(wxColourData_new_1, 2188).
+-define(wxColourData_destruct, 2189).
+-define(wxColourData_GetChooseFull, 2190).
+-define(wxColourData_GetColour, 2191).
+-define(wxColourData_GetCustomColour, 2193).
+-define(wxColourData_SetChooseFull, 2194).
+-define(wxColourData_SetColour, 2195).
+-define(wxColourData_SetCustomColour, 2196).
+-define(wxPalette_new_0, 2197).
+-define(wxPalette_new_4, 2198).
+-define(wxPalette_destruct, 2200).
+-define(wxPalette_Create, 2201).
+-define(wxPalette_GetColoursCount, 2202).
+-define(wxPalette_GetPixel, 2203).
+-define(wxPalette_GetRGB, 2204).
+-define(wxPalette_IsOk, 2205).
+-define(wxDirDialog_new, 2209).
+-define(wxDirDialog_destruct, 2210).
+-define(wxDirDialog_GetPath, 2211).
+-define(wxDirDialog_GetMessage, 2212).
+-define(wxDirDialog_SetMessage, 2213).
+-define(wxDirDialog_SetPath, 2214).
+-define(wxFileDialog_new, 2218).
+-define(wxFileDialog_destruct, 2219).
+-define(wxFileDialog_GetDirectory, 2220).
+-define(wxFileDialog_GetFilename, 2221).
+-define(wxFileDialog_GetFilenames, 2222).
+-define(wxFileDialog_GetFilterIndex, 2223).
+-define(wxFileDialog_GetMessage, 2224).
+-define(wxFileDialog_GetPath, 2225).
+-define(wxFileDialog_GetPaths, 2226).
+-define(wxFileDialog_GetWildcard, 2227).
+-define(wxFileDialog_SetDirectory, 2228).
+-define(wxFileDialog_SetFilename, 2229).
+-define(wxFileDialog_SetFilterIndex, 2230).
+-define(wxFileDialog_SetMessage, 2231).
+-define(wxFileDialog_SetPath, 2232).
+-define(wxFileDialog_SetWildcard, 2233).
+-define(wxPickerBase_SetInternalMargin, 2234).
+-define(wxPickerBase_GetInternalMargin, 2235).
+-define(wxPickerBase_SetTextCtrlProportion, 2236).
+-define(wxPickerBase_SetPickerCtrlProportion, 2237).
+-define(wxPickerBase_GetTextCtrlProportion, 2238).
+-define(wxPickerBase_GetPickerCtrlProportion, 2239).
+-define(wxPickerBase_HasTextCtrl, 2240).
+-define(wxPickerBase_GetTextCtrl, 2241).
+-define(wxPickerBase_IsTextCtrlGrowable, 2242).
+-define(wxPickerBase_SetPickerCtrlGrowable, 2243).
+-define(wxPickerBase_SetTextCtrlGrowable, 2244).
+-define(wxPickerBase_IsPickerCtrlGrowable, 2245).
+-define(wxFilePickerCtrl_new_0, 2246).
+-define(wxFilePickerCtrl_new_3, 2247).
+-define(wxFilePickerCtrl_Create, 2248).
+-define(wxFilePickerCtrl_GetPath, 2249).
+-define(wxFilePickerCtrl_SetPath, 2250).
+-define(wxFilePickerCtrl_destroy, 2251).
+-define(wxDirPickerCtrl_new_0, 2252).
+-define(wxDirPickerCtrl_new_3, 2253).
+-define(wxDirPickerCtrl_Create, 2254).
+-define(wxDirPickerCtrl_GetPath, 2255).
+-define(wxDirPickerCtrl_SetPath, 2256).
+-define(wxDirPickerCtrl_destroy, 2257).
+-define(wxColourPickerCtrl_new_0, 2258).
+-define(wxColourPickerCtrl_new_3, 2259).
+-define(wxColourPickerCtrl_Create, 2260).
+-define(wxColourPickerCtrl_GetColour, 2261).
+-define(wxColourPickerCtrl_SetColour_1_1, 2262).
+-define(wxColourPickerCtrl_SetColour_1_0, 2263).
+-define(wxColourPickerCtrl_destroy, 2264).
+-define(wxDatePickerCtrl_new_0, 2265).
+-define(wxDatePickerCtrl_new_3, 2266).
+-define(wxDatePickerCtrl_GetRange, 2267).
+-define(wxDatePickerCtrl_GetValue, 2268).
+-define(wxDatePickerCtrl_SetRange, 2269).
+-define(wxDatePickerCtrl_SetValue, 2270).
+-define(wxDatePickerCtrl_destroy, 2271).
+-define(wxFontPickerCtrl_new_0, 2272).
+-define(wxFontPickerCtrl_new_3, 2273).
+-define(wxFontPickerCtrl_Create, 2274).
+-define(wxFontPickerCtrl_GetSelectedFont, 2275).
+-define(wxFontPickerCtrl_SetSelectedFont, 2276).
+-define(wxFontPickerCtrl_GetMaxPointSize, 2277).
+-define(wxFontPickerCtrl_SetMaxPointSize, 2278).
+-define(wxFontPickerCtrl_destroy, 2279).
+-define(wxFindReplaceDialog_new_0, 2282).
+-define(wxFindReplaceDialog_new_4, 2283).
+-define(wxFindReplaceDialog_destruct, 2284).
+-define(wxFindReplaceDialog_Create, 2285).
+-define(wxFindReplaceDialog_GetData, 2286).
+-define(wxFindReplaceData_new_0, 2287).
+-define(wxFindReplaceData_new_1, 2288).
+-define(wxFindReplaceData_GetFindString, 2289).
+-define(wxFindReplaceData_GetReplaceString, 2290).
+-define(wxFindReplaceData_GetFlags, 2291).
+-define(wxFindReplaceData_SetFlags, 2292).
+-define(wxFindReplaceData_SetFindString, 2293).
+-define(wxFindReplaceData_SetReplaceString, 2294).
+-define(wxFindReplaceData_destroy, 2295).
+-define(wxMultiChoiceDialog_new_0, 2296).
+-define(wxMultiChoiceDialog_new_5, 2298).
+-define(wxMultiChoiceDialog_GetSelections, 2299).
+-define(wxMultiChoiceDialog_SetSelections, 2300).
+-define(wxMultiChoiceDialog_destroy, 2301).
+-define(wxSingleChoiceDialog_new_0, 2302).
+-define(wxSingleChoiceDialog_new_5, 2304).
+-define(wxSingleChoiceDialog_GetSelection, 2305).
+-define(wxSingleChoiceDialog_GetStringSelection, 2306).
+-define(wxSingleChoiceDialog_SetSelection, 2307).
+-define(wxSingleChoiceDialog_destroy, 2308).
+-define(wxTextEntryDialog_new, 2309).
+-define(wxTextEntryDialog_GetValue, 2310).
+-define(wxTextEntryDialog_SetValue, 2311).
+-define(wxTextEntryDialog_destroy, 2312).
+-define(wxPasswordEntryDialog_new, 2313).
+-define(wxPasswordEntryDialog_destroy, 2314).
+-define(wxFontData_new_0, 2315).
+-define(wxFontData_new_1, 2316).
+-define(wxFontData_destruct, 2317).
+-define(wxFontData_EnableEffects, 2318).
+-define(wxFontData_GetAllowSymbols, 2319).
+-define(wxFontData_GetColour, 2320).
+-define(wxFontData_GetChosenFont, 2321).
+-define(wxFontData_GetEnableEffects, 2322).
+-define(wxFontData_GetInitialFont, 2323).
+-define(wxFontData_GetShowHelp, 2324).
+-define(wxFontData_SetAllowSymbols, 2325).
+-define(wxFontData_SetChosenFont, 2326).
+-define(wxFontData_SetColour, 2327).
+-define(wxFontData_SetInitialFont, 2328).
+-define(wxFontData_SetRange, 2329).
+-define(wxFontData_SetShowHelp, 2330).
+-define(wxFontDialog_new_0, 2334).
+-define(wxFontDialog_new_2, 2336).
+-define(wxFontDialog_Create, 2338).
+-define(wxFontDialog_GetFontData, 2339).
+-define(wxFontDialog_destroy, 2341).
+-define(wxProgressDialog_new, 2342).
+-define(wxProgressDialog_destruct, 2343).
+-define(wxProgressDialog_Resume, 2344).
+-define(wxProgressDialog_Update_2, 2345).
+-define(wxProgressDialog_Update_0, 2346).
+-define(wxMessageDialog_new, 2347).
+-define(wxMessageDialog_destruct, 2348).
+-define(wxPageSetupDialog_new, 2349).
+-define(wxPageSetupDialog_destruct, 2350).
+-define(wxPageSetupDialog_GetPageSetupData, 2351).
+-define(wxPageSetupDialog_ShowModal, 2352).
+-define(wxPageSetupDialogData_new_0, 2353).
+-define(wxPageSetupDialogData_new_1_0, 2354).
+-define(wxPageSetupDialogData_new_1_1, 2355).
+-define(wxPageSetupDialogData_destruct, 2356).
+-define(wxPageSetupDialogData_EnableHelp, 2357).
+-define(wxPageSetupDialogData_EnableMargins, 2358).
+-define(wxPageSetupDialogData_EnableOrientation, 2359).
+-define(wxPageSetupDialogData_EnablePaper, 2360).
+-define(wxPageSetupDialogData_EnablePrinter, 2361).
+-define(wxPageSetupDialogData_GetDefaultMinMargins, 2362).
+-define(wxPageSetupDialogData_GetEnableMargins, 2363).
+-define(wxPageSetupDialogData_GetEnableOrientation, 2364).
+-define(wxPageSetupDialogData_GetEnablePaper, 2365).
+-define(wxPageSetupDialogData_GetEnablePrinter, 2366).
+-define(wxPageSetupDialogData_GetEnableHelp, 2367).
+-define(wxPageSetupDialogData_GetDefaultInfo, 2368).
+-define(wxPageSetupDialogData_GetMarginTopLeft, 2369).
+-define(wxPageSetupDialogData_GetMarginBottomRight, 2370).
+-define(wxPageSetupDialogData_GetMinMarginTopLeft, 2371).
+-define(wxPageSetupDialogData_GetMinMarginBottomRight, 2372).
+-define(wxPageSetupDialogData_GetPaperId, 2373).
+-define(wxPageSetupDialogData_GetPaperSize, 2374).
+-define(wxPageSetupDialogData_GetPrintData, 2376).
+-define(wxPageSetupDialogData_IsOk, 2377).
+-define(wxPageSetupDialogData_SetDefaultInfo, 2378).
+-define(wxPageSetupDialogData_SetDefaultMinMargins, 2379).
+-define(wxPageSetupDialogData_SetMarginTopLeft, 2380).
+-define(wxPageSetupDialogData_SetMarginBottomRight, 2381).
+-define(wxPageSetupDialogData_SetMinMarginTopLeft, 2382).
+-define(wxPageSetupDialogData_SetMinMarginBottomRight, 2383).
+-define(wxPageSetupDialogData_SetPaperId, 2384).
+-define(wxPageSetupDialogData_SetPaperSize_1_1, 2385).
+-define(wxPageSetupDialogData_SetPaperSize_1_0, 2386).
+-define(wxPageSetupDialogData_SetPrintData, 2387).
+-define(wxPrintDialog_new_2_0, 2388).
+-define(wxPrintDialog_new_2_1, 2389).
+-define(wxPrintDialog_destruct, 2390).
+-define(wxPrintDialog_GetPrintDialogData, 2391).
+-define(wxPrintDialog_GetPrintDC, 2392).
+-define(wxPrintDialogData_new_0, 2393).
+-define(wxPrintDialogData_new_1_1, 2394).
+-define(wxPrintDialogData_new_1_0, 2395).
+-define(wxPrintDialogData_destruct, 2396).
+-define(wxPrintDialogData_EnableHelp, 2397).
+-define(wxPrintDialogData_EnablePageNumbers, 2398).
+-define(wxPrintDialogData_EnablePrintToFile, 2399).
+-define(wxPrintDialogData_EnableSelection, 2400).
+-define(wxPrintDialogData_GetAllPages, 2401).
+-define(wxPrintDialogData_GetCollate, 2402).
+-define(wxPrintDialogData_GetFromPage, 2403).
+-define(wxPrintDialogData_GetMaxPage, 2404).
+-define(wxPrintDialogData_GetMinPage, 2405).
+-define(wxPrintDialogData_GetNoCopies, 2406).
+-define(wxPrintDialogData_GetPrintData, 2407).
+-define(wxPrintDialogData_GetPrintToFile, 2408).
+-define(wxPrintDialogData_GetSelection, 2409).
+-define(wxPrintDialogData_GetToPage, 2410).
+-define(wxPrintDialogData_IsOk, 2411).
+-define(wxPrintDialogData_SetCollate, 2412).
+-define(wxPrintDialogData_SetFromPage, 2413).
+-define(wxPrintDialogData_SetMaxPage, 2414).
+-define(wxPrintDialogData_SetMinPage, 2415).
+-define(wxPrintDialogData_SetNoCopies, 2416).
+-define(wxPrintDialogData_SetPrintData, 2417).
+-define(wxPrintDialogData_SetPrintToFile, 2418).
+-define(wxPrintDialogData_SetSelection, 2419).
+-define(wxPrintDialogData_SetToPage, 2420).
+-define(wxPrintData_new_0, 2421).
+-define(wxPrintData_new_1, 2422).
+-define(wxPrintData_destruct, 2423).
+-define(wxPrintData_GetCollate, 2424).
+-define(wxPrintData_GetBin, 2425).
+-define(wxPrintData_GetColour, 2426).
+-define(wxPrintData_GetDuplex, 2427).
+-define(wxPrintData_GetNoCopies, 2428).
+-define(wxPrintData_GetOrientation, 2429).
+-define(wxPrintData_GetPaperId, 2430).
+-define(wxPrintData_GetPrinterName, 2431).
+-define(wxPrintData_GetQuality, 2432).
+-define(wxPrintData_IsOk, 2433).
+-define(wxPrintData_SetBin, 2434).
+-define(wxPrintData_SetCollate, 2435).
+-define(wxPrintData_SetColour, 2436).
+-define(wxPrintData_SetDuplex, 2437).
+-define(wxPrintData_SetNoCopies, 2438).
+-define(wxPrintData_SetOrientation, 2439).
+-define(wxPrintData_SetPaperId, 2440).
+-define(wxPrintData_SetPrinterName, 2441).
+-define(wxPrintData_SetQuality, 2442).
+-define(wxPrintPreview_new_2, 2445).
+-define(wxPrintPreview_new_3, 2446).
+-define(wxPrintPreview_destruct, 2448).
+-define(wxPrintPreview_GetCanvas, 2449).
+-define(wxPrintPreview_GetCurrentPage, 2450).
+-define(wxPrintPreview_GetFrame, 2451).
+-define(wxPrintPreview_GetMaxPage, 2452).
+-define(wxPrintPreview_GetMinPage, 2453).
+-define(wxPrintPreview_GetPrintout, 2454).
+-define(wxPrintPreview_GetPrintoutForPrinting, 2455).
+-define(wxPrintPreview_IsOk, 2456).
+-define(wxPrintPreview_PaintPage, 2457).
+-define(wxPrintPreview_Print, 2458).
+-define(wxPrintPreview_RenderPage, 2459).
+-define(wxPrintPreview_SetCanvas, 2460).
+-define(wxPrintPreview_SetCurrentPage, 2461).
+-define(wxPrintPreview_SetFrame, 2462).
+-define(wxPrintPreview_SetPrintout, 2463).
+-define(wxPrintPreview_SetZoom, 2464).
+-define(wxPreviewFrame_new, 2465).
+-define(wxPreviewFrame_destruct, 2466).
+-define(wxPreviewFrame_CreateControlBar, 2467).
+-define(wxPreviewFrame_CreateCanvas, 2468).
+-define(wxPreviewFrame_Initialize, 2469).
+-define(wxPreviewFrame_OnCloseWindow, 2470).
+-define(wxPreviewControlBar_new, 2471).
+-define(wxPreviewControlBar_destruct, 2472).
+-define(wxPreviewControlBar_CreateButtons, 2473).
+-define(wxPreviewControlBar_GetPrintPreview, 2474).
+-define(wxPreviewControlBar_GetZoomControl, 2475).
+-define(wxPreviewControlBar_SetZoomControl, 2476).
+-define(wxPrinter_new, 2478).
+-define(wxPrinter_CreateAbortWindow, 2479).
+-define(wxPrinter_GetAbort, 2480).
+-define(wxPrinter_GetLastError, 2481).
+-define(wxPrinter_GetPrintDialogData, 2482).
+-define(wxPrinter_Print, 2483).
+-define(wxPrinter_PrintDialog, 2484).
+-define(wxPrinter_ReportError, 2485).
+-define(wxPrinter_Setup, 2486).
+-define(wxPrinter_destroy, 2487).
+-define(wxXmlResource_new_1, 2488).
+-define(wxXmlResource_new_2, 2489).
+-define(wxXmlResource_destruct, 2490).
+-define(wxXmlResource_AttachUnknownControl, 2491).
+-define(wxXmlResource_ClearHandlers, 2492).
+-define(wxXmlResource_CompareVersion, 2493).
+-define(wxXmlResource_Get, 2494).
+-define(wxXmlResource_GetFlags, 2495).
+-define(wxXmlResource_GetVersion, 2496).
+-define(wxXmlResource_GetXRCID, 2497).
+-define(wxXmlResource_InitAllHandlers, 2498).
+-define(wxXmlResource_Load, 2499).
+-define(wxXmlResource_LoadBitmap, 2500).
+-define(wxXmlResource_LoadDialog_2, 2501).
+-define(wxXmlResource_LoadDialog_3, 2502).
+-define(wxXmlResource_LoadFrame_2, 2503).
+-define(wxXmlResource_LoadFrame_3, 2504).
+-define(wxXmlResource_LoadIcon, 2505).
+-define(wxXmlResource_LoadMenu, 2506).
+-define(wxXmlResource_LoadMenuBar_2, 2507).
+-define(wxXmlResource_LoadMenuBar_1, 2508).
+-define(wxXmlResource_LoadPanel_2, 2509).
+-define(wxXmlResource_LoadPanel_3, 2510).
+-define(wxXmlResource_LoadToolBar, 2511).
+-define(wxXmlResource_Set, 2512).
+-define(wxXmlResource_SetFlags, 2513).
+-define(wxXmlResource_Unload, 2514).
+-define(wxXmlResource_xrcctrl, 2515).
+-define(wxHtmlEasyPrinting_new, 2516).
+-define(wxHtmlEasyPrinting_destruct, 2517).
+-define(wxHtmlEasyPrinting_GetPrintData, 2518).
+-define(wxHtmlEasyPrinting_GetPageSetupData, 2519).
+-define(wxHtmlEasyPrinting_PreviewFile, 2520).
+-define(wxHtmlEasyPrinting_PreviewText, 2521).
+-define(wxHtmlEasyPrinting_PrintFile, 2522).
+-define(wxHtmlEasyPrinting_PrintText, 2523).
+-define(wxHtmlEasyPrinting_PageSetup, 2524).
+-define(wxHtmlEasyPrinting_SetFonts, 2525).
+-define(wxHtmlEasyPrinting_SetHeader, 2526).
+-define(wxHtmlEasyPrinting_SetFooter, 2527).
+-define(wxGLCanvas_new_2, 2529).
+-define(wxGLCanvas_new_3_1, 2530).
+-define(wxGLCanvas_new_3_0, 2531).
+-define(wxGLCanvas_GetContext, 2532).
+-define(wxGLCanvas_SetCurrent, 2534).
+-define(wxGLCanvas_SwapBuffers, 2535).
+-define(wxGLCanvas_destroy, 2536).
+-define(wxAuiManager_new, 2537).
+-define(wxAuiManager_destruct, 2538).
+-define(wxAuiManager_AddPane_2_1, 2539).
+-define(wxAuiManager_AddPane_3, 2540).
+-define(wxAuiManager_AddPane_2_0, 2541).
+-define(wxAuiManager_DetachPane, 2542).
+-define(wxAuiManager_GetAllPanes, 2543).
+-define(wxAuiManager_GetArtProvider, 2544).
+-define(wxAuiManager_GetDockSizeConstraint, 2545).
+-define(wxAuiManager_GetFlags, 2546).
+-define(wxAuiManager_GetManagedWindow, 2547).
+-define(wxAuiManager_GetManager, 2548).
+-define(wxAuiManager_GetPane_1_1, 2549).
+-define(wxAuiManager_GetPane_1_0, 2550).
+-define(wxAuiManager_HideHint, 2551).
+-define(wxAuiManager_InsertPane, 2552).
+-define(wxAuiManager_LoadPaneInfo, 2553).
+-define(wxAuiManager_LoadPerspective, 2554).
+-define(wxAuiManager_SavePaneInfo, 2555).
+-define(wxAuiManager_SavePerspective, 2556).
+-define(wxAuiManager_SetArtProvider, 2557).
+-define(wxAuiManager_SetDockSizeConstraint, 2558).
+-define(wxAuiManager_SetFlags, 2559).
+-define(wxAuiManager_SetManagedWindow, 2560).
+-define(wxAuiManager_ShowHint, 2561).
+-define(wxAuiManager_UnInit, 2562).
+-define(wxAuiManager_Update, 2563).
+-define(wxAuiPaneInfo_new_0, 2564).
+-define(wxAuiPaneInfo_new_1, 2565).
+-define(wxAuiPaneInfo_destruct, 2566).
+-define(wxAuiPaneInfo_BestSize_1, 2567).
+-define(wxAuiPaneInfo_BestSize_2, 2568).
+-define(wxAuiPaneInfo_Bottom, 2569).
+-define(wxAuiPaneInfo_BottomDockable, 2570).
+-define(wxAuiPaneInfo_Caption, 2571).
+-define(wxAuiPaneInfo_CaptionVisible, 2572).
+-define(wxAuiPaneInfo_Centre, 2573).
+-define(wxAuiPaneInfo_CentrePane, 2574).
+-define(wxAuiPaneInfo_CloseButton, 2575).
+-define(wxAuiPaneInfo_DefaultPane, 2576).
+-define(wxAuiPaneInfo_DestroyOnClose, 2577).
+-define(wxAuiPaneInfo_Direction, 2578).
+-define(wxAuiPaneInfo_Dock, 2579).
+-define(wxAuiPaneInfo_Dockable, 2580).
+-define(wxAuiPaneInfo_Fixed, 2581).
+-define(wxAuiPaneInfo_Float, 2582).
+-define(wxAuiPaneInfo_Floatable, 2583).
+-define(wxAuiPaneInfo_FloatingPosition_1, 2584).
+-define(wxAuiPaneInfo_FloatingPosition_2, 2585).
+-define(wxAuiPaneInfo_FloatingSize_1, 2586).
+-define(wxAuiPaneInfo_FloatingSize_2, 2587).
+-define(wxAuiPaneInfo_Gripper, 2588).
+-define(wxAuiPaneInfo_GripperTop, 2589).
+-define(wxAuiPaneInfo_HasBorder, 2590).
+-define(wxAuiPaneInfo_HasCaption, 2591).
+-define(wxAuiPaneInfo_HasCloseButton, 2592).
+-define(wxAuiPaneInfo_HasFlag, 2593).
+-define(wxAuiPaneInfo_HasGripper, 2594).
+-define(wxAuiPaneInfo_HasGripperTop, 2595).
+-define(wxAuiPaneInfo_HasMaximizeButton, 2596).
+-define(wxAuiPaneInfo_HasMinimizeButton, 2597).
+-define(wxAuiPaneInfo_HasPinButton, 2598).
+-define(wxAuiPaneInfo_Hide, 2599).
+-define(wxAuiPaneInfo_IsBottomDockable, 2600).
+-define(wxAuiPaneInfo_IsDocked, 2601).
+-define(wxAuiPaneInfo_IsFixed, 2602).
+-define(wxAuiPaneInfo_IsFloatable, 2603).
+-define(wxAuiPaneInfo_IsFloating, 2604).
+-define(wxAuiPaneInfo_IsLeftDockable, 2605).
+-define(wxAuiPaneInfo_IsMovable, 2606).
+-define(wxAuiPaneInfo_IsOk, 2607).
+-define(wxAuiPaneInfo_IsResizable, 2608).
+-define(wxAuiPaneInfo_IsRightDockable, 2609).
+-define(wxAuiPaneInfo_IsShown, 2610).
+-define(wxAuiPaneInfo_IsToolbar, 2611).
+-define(wxAuiPaneInfo_IsTopDockable, 2612).
+-define(wxAuiPaneInfo_Layer, 2613).
+-define(wxAuiPaneInfo_Left, 2614).
+-define(wxAuiPaneInfo_LeftDockable, 2615).
+-define(wxAuiPaneInfo_MaxSize_1, 2616).
+-define(wxAuiPaneInfo_MaxSize_2, 2617).
+-define(wxAuiPaneInfo_MaximizeButton, 2618).
+-define(wxAuiPaneInfo_MinSize_1, 2619).
+-define(wxAuiPaneInfo_MinSize_2, 2620).
+-define(wxAuiPaneInfo_MinimizeButton, 2621).
+-define(wxAuiPaneInfo_Movable, 2622).
+-define(wxAuiPaneInfo_Name, 2623).
+-define(wxAuiPaneInfo_PaneBorder, 2624).
+-define(wxAuiPaneInfo_PinButton, 2625).
+-define(wxAuiPaneInfo_Position, 2626).
+-define(wxAuiPaneInfo_Resizable, 2627).
+-define(wxAuiPaneInfo_Right, 2628).
+-define(wxAuiPaneInfo_RightDockable, 2629).
+-define(wxAuiPaneInfo_Row, 2630).
+-define(wxAuiPaneInfo_SafeSet, 2631).
+-define(wxAuiPaneInfo_SetFlag, 2632).
+-define(wxAuiPaneInfo_Show, 2633).
+-define(wxAuiPaneInfo_ToolbarPane, 2634).
+-define(wxAuiPaneInfo_Top, 2635).
+-define(wxAuiPaneInfo_TopDockable, 2636).
+-define(wxAuiPaneInfo_Window, 2637).
+-define(wxAuiNotebook_new_0, 2638).
+-define(wxAuiNotebook_new_2, 2639).
+-define(wxAuiNotebook_AddPage, 2640).
+-define(wxAuiNotebook_Create, 2641).
+-define(wxAuiNotebook_DeletePage, 2642).
+-define(wxAuiNotebook_GetArtProvider, 2643).
+-define(wxAuiNotebook_GetPage, 2644).
+-define(wxAuiNotebook_GetPageBitmap, 2645).
+-define(wxAuiNotebook_GetPageCount, 2646).
+-define(wxAuiNotebook_GetPageIndex, 2647).
+-define(wxAuiNotebook_GetPageText, 2648).
+-define(wxAuiNotebook_GetSelection, 2649).
+-define(wxAuiNotebook_InsertPage, 2650).
+-define(wxAuiNotebook_RemovePage, 2651).
+-define(wxAuiNotebook_SetArtProvider, 2652).
+-define(wxAuiNotebook_SetFont, 2653).
+-define(wxAuiNotebook_SetPageBitmap, 2654).
+-define(wxAuiNotebook_SetPageText, 2655).
+-define(wxAuiNotebook_SetSelection, 2656).
+-define(wxAuiNotebook_SetTabCtrlHeight, 2657).
+-define(wxAuiNotebook_SetUniformBitmapSize, 2658).
+-define(wxAuiNotebook_destroy, 2659).
+-define(wxMDIParentFrame_new_0, 2660).
+-define(wxMDIParentFrame_new_4, 2661).
+-define(wxMDIParentFrame_destruct, 2662).
+-define(wxMDIParentFrame_ActivateNext, 2663).
+-define(wxMDIParentFrame_ActivatePrevious, 2664).
+-define(wxMDIParentFrame_ArrangeIcons, 2665).
+-define(wxMDIParentFrame_Cascade, 2666).
+-define(wxMDIParentFrame_Create, 2667).
+-define(wxMDIParentFrame_GetActiveChild, 2668).
+-define(wxMDIParentFrame_GetClientWindow, 2669).
+-define(wxMDIParentFrame_Tile, 2670).
+-define(wxMDIChildFrame_new_0, 2671).
+-define(wxMDIChildFrame_new_4, 2672).
+-define(wxMDIChildFrame_destruct, 2673).
+-define(wxMDIChildFrame_Activate, 2674).
+-define(wxMDIChildFrame_Create, 2675).
+-define(wxMDIChildFrame_Maximize, 2676).
+-define(wxMDIChildFrame_Restore, 2677).
+-define(wxMDIClientWindow_new_0, 2678).
+-define(wxMDIClientWindow_new_2, 2679).
+-define(wxMDIClientWindow_destruct, 2680).
+-define(wxMDIClientWindow_CreateClient, 2681).
+-define(wxLayoutAlgorithm_new, 2682).
+-define(wxLayoutAlgorithm_LayoutFrame, 2683).
+-define(wxLayoutAlgorithm_LayoutMDIFrame, 2684).
+-define(wxLayoutAlgorithm_LayoutWindow, 2685).
+-define(wxLayoutAlgorithm_destroy, 2686).
+-define(wxEvent_GetId, 2687).
+-define(wxEvent_GetSkipped, 2688).
+-define(wxEvent_GetTimestamp, 2689).
+-define(wxEvent_IsCommandEvent, 2690).
+-define(wxEvent_ResumePropagation, 2691).
+-define(wxEvent_ShouldPropagate, 2692).
+-define(wxEvent_Skip, 2693).
+-define(wxEvent_StopPropagation, 2694).
+-define(wxCommandEvent_getClientData, 2695).
+-define(wxCommandEvent_GetExtraLong, 2696).
+-define(wxCommandEvent_GetInt, 2697).
+-define(wxCommandEvent_GetSelection, 2698).
+-define(wxCommandEvent_GetString, 2699).
+-define(wxCommandEvent_IsChecked, 2700).
+-define(wxCommandEvent_IsSelection, 2701).
+-define(wxCommandEvent_SetInt, 2702).
+-define(wxCommandEvent_SetString, 2703).
+-define(wxScrollEvent_GetOrientation, 2704).
+-define(wxScrollEvent_GetPosition, 2705).
+-define(wxScrollWinEvent_GetOrientation, 2706).
+-define(wxScrollWinEvent_GetPosition, 2707).
+-define(wxMouseEvent_AltDown, 2708).
+-define(wxMouseEvent_Button, 2709).
+-define(wxMouseEvent_ButtonDClick, 2710).
+-define(wxMouseEvent_ButtonDown, 2711).
+-define(wxMouseEvent_ButtonUp, 2712).
+-define(wxMouseEvent_CmdDown, 2713).
+-define(wxMouseEvent_ControlDown, 2714).
+-define(wxMouseEvent_Dragging, 2715).
+-define(wxMouseEvent_Entering, 2716).
+-define(wxMouseEvent_GetButton, 2717).
+-define(wxMouseEvent_GetPosition, 2720).
+-define(wxMouseEvent_GetLogicalPosition, 2721).
+-define(wxMouseEvent_GetLinesPerAction, 2722).
+-define(wxMouseEvent_GetWheelRotation, 2723).
+-define(wxMouseEvent_GetWheelDelta, 2724).
+-define(wxMouseEvent_GetX, 2725).
+-define(wxMouseEvent_GetY, 2726).
+-define(wxMouseEvent_IsButton, 2727).
+-define(wxMouseEvent_IsPageScroll, 2728).
+-define(wxMouseEvent_Leaving, 2729).
+-define(wxMouseEvent_LeftDClick, 2730).
+-define(wxMouseEvent_LeftDown, 2731).
+-define(wxMouseEvent_LeftIsDown, 2732).
+-define(wxMouseEvent_LeftUp, 2733).
+-define(wxMouseEvent_MetaDown, 2734).
+-define(wxMouseEvent_MiddleDClick, 2735).
+-define(wxMouseEvent_MiddleDown, 2736).
+-define(wxMouseEvent_MiddleIsDown, 2737).
+-define(wxMouseEvent_MiddleUp, 2738).
+-define(wxMouseEvent_Moving, 2739).
+-define(wxMouseEvent_RightDClick, 2740).
+-define(wxMouseEvent_RightDown, 2741).
+-define(wxMouseEvent_RightIsDown, 2742).
+-define(wxMouseEvent_RightUp, 2743).
+-define(wxMouseEvent_ShiftDown, 2744).
+-define(wxSetCursorEvent_GetCursor, 2745).
+-define(wxSetCursorEvent_GetX, 2746).
+-define(wxSetCursorEvent_GetY, 2747).
+-define(wxSetCursorEvent_HasCursor, 2748).
+-define(wxSetCursorEvent_SetCursor, 2749).
+-define(wxKeyEvent_AltDown, 2750).
+-define(wxKeyEvent_CmdDown, 2751).
+-define(wxKeyEvent_ControlDown, 2752).
+-define(wxKeyEvent_GetKeyCode, 2753).
+-define(wxKeyEvent_GetModifiers, 2754).
+-define(wxKeyEvent_GetPosition, 2757).
+-define(wxKeyEvent_GetRawKeyCode, 2758).
+-define(wxKeyEvent_GetRawKeyFlags, 2759).
+-define(wxKeyEvent_GetUnicodeKey, 2760).
+-define(wxKeyEvent_GetX, 2761).
+-define(wxKeyEvent_GetY, 2762).
+-define(wxKeyEvent_HasModifiers, 2763).
+-define(wxKeyEvent_MetaDown, 2764).
+-define(wxKeyEvent_ShiftDown, 2765).
+-define(wxSizeEvent_GetSize, 2766).
+-define(wxMoveEvent_GetPosition, 2767).
+-define(wxEraseEvent_GetDC, 2768).
+-define(wxFocusEvent_GetWindow, 2769).
+-define(wxChildFocusEvent_GetWindow, 2770).
+-define(wxMenuEvent_GetMenu, 2771).
+-define(wxMenuEvent_GetMenuId, 2772).
+-define(wxMenuEvent_IsPopup, 2773).
+-define(wxCloseEvent_CanVeto, 2774).
+-define(wxCloseEvent_GetLoggingOff, 2775).
+-define(wxCloseEvent_SetCanVeto, 2776).
+-define(wxCloseEvent_SetLoggingOff, 2777).
+-define(wxCloseEvent_Veto, 2778).
+-define(wxShowEvent_SetShow, 2779).
+-define(wxShowEvent_GetShow, 2780).
+-define(wxIconizeEvent_Iconized, 2781).
+-define(wxJoystickEvent_ButtonDown, 2782).
+-define(wxJoystickEvent_ButtonIsDown, 2783).
+-define(wxJoystickEvent_ButtonUp, 2784).
+-define(wxJoystickEvent_GetButtonChange, 2785).
+-define(wxJoystickEvent_GetButtonState, 2786).
+-define(wxJoystickEvent_GetJoystick, 2787).
+-define(wxJoystickEvent_GetPosition, 2788).
+-define(wxJoystickEvent_GetZPosition, 2789).
+-define(wxJoystickEvent_IsButton, 2790).
+-define(wxJoystickEvent_IsMove, 2791).
+-define(wxJoystickEvent_IsZMove, 2792).
+-define(wxUpdateUIEvent_CanUpdate, 2793).
+-define(wxUpdateUIEvent_Check, 2794).
+-define(wxUpdateUIEvent_Enable, 2795).
+-define(wxUpdateUIEvent_Show, 2796).
+-define(wxUpdateUIEvent_GetChecked, 2797).
+-define(wxUpdateUIEvent_GetEnabled, 2798).
+-define(wxUpdateUIEvent_GetShown, 2799).
+-define(wxUpdateUIEvent_GetSetChecked, 2800).
+-define(wxUpdateUIEvent_GetSetEnabled, 2801).
+-define(wxUpdateUIEvent_GetSetShown, 2802).
+-define(wxUpdateUIEvent_GetSetText, 2803).
+-define(wxUpdateUIEvent_GetText, 2804).
+-define(wxUpdateUIEvent_GetMode, 2805).
+-define(wxUpdateUIEvent_GetUpdateInterval, 2806).
+-define(wxUpdateUIEvent_ResetUpdateTime, 2807).
+-define(wxUpdateUIEvent_SetMode, 2808).
+-define(wxUpdateUIEvent_SetText, 2809).
+-define(wxUpdateUIEvent_SetUpdateInterval, 2810).
+-define(wxMouseCaptureChangedEvent_GetCapturedWindow, 2811).
+-define(wxPaletteChangedEvent_SetChangedWindow, 2812).
+-define(wxPaletteChangedEvent_GetChangedWindow, 2813).
+-define(wxQueryNewPaletteEvent_SetPaletteRealized, 2814).
+-define(wxQueryNewPaletteEvent_GetPaletteRealized, 2815).
+-define(wxNavigationKeyEvent_GetDirection, 2816).
+-define(wxNavigationKeyEvent_SetDirection, 2817).
+-define(wxNavigationKeyEvent_IsWindowChange, 2818).
+-define(wxNavigationKeyEvent_SetWindowChange, 2819).
+-define(wxNavigationKeyEvent_IsFromTab, 2820).
+-define(wxNavigationKeyEvent_SetFromTab, 2821).
+-define(wxNavigationKeyEvent_GetCurrentFocus, 2822).
+-define(wxNavigationKeyEvent_SetCurrentFocus, 2823).
+-define(wxHelpEvent_GetOrigin, 2824).
+-define(wxHelpEvent_GetPosition, 2825).
+-define(wxHelpEvent_SetOrigin, 2826).
+-define(wxHelpEvent_SetPosition, 2827).
+-define(wxContextMenuEvent_GetPosition, 2828).
+-define(wxContextMenuEvent_SetPosition, 2829).
+-define(wxIdleEvent_CanSend, 2830).
+-define(wxIdleEvent_GetMode, 2831).
+-define(wxIdleEvent_RequestMore, 2832).
+-define(wxIdleEvent_MoreRequested, 2833).
+-define(wxIdleEvent_SetMode, 2834).
+-define(wxGridEvent_AltDown, 2835).
+-define(wxGridEvent_ControlDown, 2836).
+-define(wxGridEvent_GetCol, 2837).
+-define(wxGridEvent_GetPosition, 2838).
+-define(wxGridEvent_GetRow, 2839).
+-define(wxGridEvent_MetaDown, 2840).
+-define(wxGridEvent_Selecting, 2841).
+-define(wxGridEvent_ShiftDown, 2842).
+-define(wxNotifyEvent_Allow, 2843).
+-define(wxNotifyEvent_IsAllowed, 2844).
+-define(wxNotifyEvent_Veto, 2845).
+-define(wxSashEvent_GetEdge, 2846).
+-define(wxSashEvent_GetDragRect, 2847).
+-define(wxSashEvent_GetDragStatus, 2848).
+-define(wxListEvent_GetCacheFrom, 2849).
+-define(wxListEvent_GetCacheTo, 2850).
+-define(wxListEvent_GetKeyCode, 2851).
+-define(wxListEvent_GetIndex, 2852).
+-define(wxListEvent_GetColumn, 2853).
+-define(wxListEvent_GetPoint, 2854).
+-define(wxListEvent_GetLabel, 2855).
+-define(wxListEvent_GetText, 2856).
+-define(wxListEvent_GetImage, 2857).
+-define(wxListEvent_GetData, 2858).
+-define(wxListEvent_GetMask, 2859).
+-define(wxListEvent_GetItem, 2860).
+-define(wxListEvent_IsEditCancelled, 2861).
+-define(wxDateEvent_GetDate, 2862).
+-define(wxCalendarEvent_GetWeekDay, 2863).
+-define(wxFileDirPickerEvent_GetPath, 2864).
+-define(wxColourPickerEvent_GetColour, 2865).
+-define(wxFontPickerEvent_GetFont, 2866).
+-define(wxStyledTextEvent_GetPosition, 2867).
+-define(wxStyledTextEvent_GetKey, 2868).
+-define(wxStyledTextEvent_GetModifiers, 2869).
+-define(wxStyledTextEvent_GetModificationType, 2870).
+-define(wxStyledTextEvent_GetText, 2871).
+-define(wxStyledTextEvent_GetLength, 2872).
+-define(wxStyledTextEvent_GetLinesAdded, 2873).
+-define(wxStyledTextEvent_GetLine, 2874).
+-define(wxStyledTextEvent_GetFoldLevelNow, 2875).
+-define(wxStyledTextEvent_GetFoldLevelPrev, 2876).
+-define(wxStyledTextEvent_GetMargin, 2877).
+-define(wxStyledTextEvent_GetMessage, 2878).
+-define(wxStyledTextEvent_GetWParam, 2879).
+-define(wxStyledTextEvent_GetLParam, 2880).
+-define(wxStyledTextEvent_GetListType, 2881).
+-define(wxStyledTextEvent_GetX, 2882).
+-define(wxStyledTextEvent_GetY, 2883).
+-define(wxStyledTextEvent_GetDragText, 2884).
+-define(wxStyledTextEvent_GetDragAllowMove, 2885).
+-define(wxStyledTextEvent_GetDragResult, 2886).
+-define(wxStyledTextEvent_GetShift, 2887).
+-define(wxStyledTextEvent_GetControl, 2888).
+-define(wxStyledTextEvent_GetAlt, 2889).
+-define(utils_wxGetKeyState, 2890).
+-define(utils_wxGetMousePosition, 2891).
+-define(utils_wxGetMouseState, 2892).
+-define(utils_wxSetDetectableAutoRepeat, 2893).
+-define(utils_wxBell, 2894).
+-define(utils_wxFindMenuItemId, 2895).
+-define(utils_wxGenericFindWindowAtPoint, 2896).
+-define(utils_wxFindWindowAtPoint, 2897).
+-define(utils_wxBeginBusyCursor, 2898).
+-define(utils_wxEndBusyCursor, 2899).
+-define(utils_wxIsBusy, 2900).
+-define(utils_wxShutdown, 2901).
+-define(utils_wxShell, 2902).
+-define(utils_wxLaunchDefaultBrowser, 2903).
+-define(utils_wxGetEmailAddress, 2904).
+-define(utils_wxGetUserId, 2905).
+-define(utils_wxGetHomeDir, 2906).
+-define(utils_wxNewId, 2907).
+-define(utils_wxRegisterId, 2908).
+-define(utils_wxGetCurrentId, 2909).
+-define(utils_wxGetOsDescription, 2910).
+-define(utils_wxIsPlatformLittleEndian, 2911).
+-define(utils_wxIsPlatform64Bit, 2912).
+-define(wxPrintout_new, 2913).
+-define(wxPrintout_destruct, 2914).
+-define(wxPrintout_GetDC, 2915).
+-define(wxPrintout_GetPageSizeMM, 2916).
+-define(wxPrintout_GetPageSizePixels, 2917).
+-define(wxPrintout_GetPaperRectPixels, 2918).
+-define(wxPrintout_GetPPIPrinter, 2919).
+-define(wxPrintout_GetPPIScreen, 2920).
+-define(wxPrintout_GetTitle, 2921).
+-define(wxPrintout_IsPreview, 2922).
+-define(wxPrintout_FitThisSizeToPaper, 2923).
+-define(wxPrintout_FitThisSizeToPage, 2924).
+-define(wxPrintout_FitThisSizeToPageMargins, 2925).
+-define(wxPrintout_MapScreenSizeToPaper, 2926).
+-define(wxPrintout_MapScreenSizeToPage, 2927).
+-define(wxPrintout_MapScreenSizeToPageMargins, 2928).
+-define(wxPrintout_MapScreenSizeToDevice, 2929).
+-define(wxPrintout_GetLogicalPaperRect, 2930).
+-define(wxPrintout_GetLogicalPageRect, 2931).
+-define(wxPrintout_GetLogicalPageMarginsRect, 2932).
+-define(wxPrintout_SetLogicalOrigin, 2933).
+-define(wxPrintout_OffsetLogicalOrigin, 2934).
+-define(wxStyledTextCtrl_new_2, 2935).
+-define(wxStyledTextCtrl_new_0, 2936).
+-define(wxStyledTextCtrl_destruct, 2937).
+-define(wxStyledTextCtrl_Create, 2938).
+-define(wxStyledTextCtrl_AddText, 2939).
+-define(wxStyledTextCtrl_AddStyledText, 2940).
+-define(wxStyledTextCtrl_InsertText, 2941).
+-define(wxStyledTextCtrl_ClearAll, 2942).
+-define(wxStyledTextCtrl_ClearDocumentStyle, 2943).
+-define(wxStyledTextCtrl_GetLength, 2944).
+-define(wxStyledTextCtrl_GetCharAt, 2945).
+-define(wxStyledTextCtrl_GetCurrentPos, 2946).
+-define(wxStyledTextCtrl_GetAnchor, 2947).
+-define(wxStyledTextCtrl_GetStyleAt, 2948).
+-define(wxStyledTextCtrl_Redo, 2949).
+-define(wxStyledTextCtrl_SetUndoCollection, 2950).
+-define(wxStyledTextCtrl_SelectAll, 2951).
+-define(wxStyledTextCtrl_SetSavePoint, 2952).
+-define(wxStyledTextCtrl_GetStyledText, 2953).
+-define(wxStyledTextCtrl_CanRedo, 2954).
+-define(wxStyledTextCtrl_MarkerLineFromHandle, 2955).
+-define(wxStyledTextCtrl_MarkerDeleteHandle, 2956).
+-define(wxStyledTextCtrl_GetUndoCollection, 2957).
+-define(wxStyledTextCtrl_GetViewWhiteSpace, 2958).
+-define(wxStyledTextCtrl_SetViewWhiteSpace, 2959).
+-define(wxStyledTextCtrl_PositionFromPoint, 2960).
+-define(wxStyledTextCtrl_PositionFromPointClose, 2961).
+-define(wxStyledTextCtrl_GotoLine, 2962).
+-define(wxStyledTextCtrl_GotoPos, 2963).
+-define(wxStyledTextCtrl_SetAnchor, 2964).
+-define(wxStyledTextCtrl_GetCurLine, 2965).
+-define(wxStyledTextCtrl_GetEndStyled, 2966).
+-define(wxStyledTextCtrl_ConvertEOLs, 2967).
+-define(wxStyledTextCtrl_GetEOLMode, 2968).
+-define(wxStyledTextCtrl_SetEOLMode, 2969).
+-define(wxStyledTextCtrl_StartStyling, 2970).
+-define(wxStyledTextCtrl_SetStyling, 2971).
+-define(wxStyledTextCtrl_GetBufferedDraw, 2972).
+-define(wxStyledTextCtrl_SetBufferedDraw, 2973).
+-define(wxStyledTextCtrl_SetTabWidth, 2974).
+-define(wxStyledTextCtrl_GetTabWidth, 2975).
+-define(wxStyledTextCtrl_SetCodePage, 2976).
+-define(wxStyledTextCtrl_MarkerDefine, 2977).
+-define(wxStyledTextCtrl_MarkerSetForeground, 2978).
+-define(wxStyledTextCtrl_MarkerSetBackground, 2979).
+-define(wxStyledTextCtrl_MarkerAdd, 2980).
+-define(wxStyledTextCtrl_MarkerDelete, 2981).
+-define(wxStyledTextCtrl_MarkerDeleteAll, 2982).
+-define(wxStyledTextCtrl_MarkerGet, 2983).
+-define(wxStyledTextCtrl_MarkerNext, 2984).
+-define(wxStyledTextCtrl_MarkerPrevious, 2985).
+-define(wxStyledTextCtrl_MarkerDefineBitmap, 2986).
+-define(wxStyledTextCtrl_MarkerAddSet, 2987).
+-define(wxStyledTextCtrl_MarkerSetAlpha, 2988).
+-define(wxStyledTextCtrl_SetMarginType, 2989).
+-define(wxStyledTextCtrl_GetMarginType, 2990).
+-define(wxStyledTextCtrl_SetMarginWidth, 2991).
+-define(wxStyledTextCtrl_GetMarginWidth, 2992).
+-define(wxStyledTextCtrl_SetMarginMask, 2993).
+-define(wxStyledTextCtrl_GetMarginMask, 2994).
+-define(wxStyledTextCtrl_SetMarginSensitive, 2995).
+-define(wxStyledTextCtrl_GetMarginSensitive, 2996).
+-define(wxStyledTextCtrl_StyleClearAll, 2997).
+-define(wxStyledTextCtrl_StyleSetForeground, 2998).
+-define(wxStyledTextCtrl_StyleSetBackground, 2999).
+-define(wxStyledTextCtrl_StyleSetBold, 3000).
+-define(wxStyledTextCtrl_StyleSetItalic, 3001).
+-define(wxStyledTextCtrl_StyleSetSize, 3002).
+-define(wxStyledTextCtrl_StyleSetFaceName, 3003).
+-define(wxStyledTextCtrl_StyleSetEOLFilled, 3004).
+-define(wxStyledTextCtrl_StyleResetDefault, 3005).
+-define(wxStyledTextCtrl_StyleSetUnderline, 3006).
+-define(wxStyledTextCtrl_StyleSetCase, 3007).
+-define(wxStyledTextCtrl_StyleSetHotSpot, 3008).
+-define(wxStyledTextCtrl_SetSelForeground, 3009).
+-define(wxStyledTextCtrl_SetSelBackground, 3010).
+-define(wxStyledTextCtrl_GetSelAlpha, 3011).
+-define(wxStyledTextCtrl_SetSelAlpha, 3012).
+-define(wxStyledTextCtrl_SetCaretForeground, 3013).
+-define(wxStyledTextCtrl_CmdKeyAssign, 3014).
+-define(wxStyledTextCtrl_CmdKeyClear, 3015).
+-define(wxStyledTextCtrl_CmdKeyClearAll, 3016).
+-define(wxStyledTextCtrl_SetStyleBytes, 3017).
+-define(wxStyledTextCtrl_StyleSetVisible, 3018).
+-define(wxStyledTextCtrl_GetCaretPeriod, 3019).
+-define(wxStyledTextCtrl_SetCaretPeriod, 3020).
+-define(wxStyledTextCtrl_SetWordChars, 3021).
+-define(wxStyledTextCtrl_BeginUndoAction, 3022).
+-define(wxStyledTextCtrl_EndUndoAction, 3023).
+-define(wxStyledTextCtrl_IndicatorSetStyle, 3024).
+-define(wxStyledTextCtrl_IndicatorGetStyle, 3025).
+-define(wxStyledTextCtrl_IndicatorSetForeground, 3026).
+-define(wxStyledTextCtrl_IndicatorGetForeground, 3027).
+-define(wxStyledTextCtrl_SetWhitespaceForeground, 3028).
+-define(wxStyledTextCtrl_SetWhitespaceBackground, 3029).
+-define(wxStyledTextCtrl_GetStyleBits, 3030).
+-define(wxStyledTextCtrl_SetLineState, 3031).
+-define(wxStyledTextCtrl_GetLineState, 3032).
+-define(wxStyledTextCtrl_GetMaxLineState, 3033).
+-define(wxStyledTextCtrl_GetCaretLineVisible, 3034).
+-define(wxStyledTextCtrl_SetCaretLineVisible, 3035).
+-define(wxStyledTextCtrl_GetCaretLineBackground, 3036).
+-define(wxStyledTextCtrl_SetCaretLineBackground, 3037).
+-define(wxStyledTextCtrl_AutoCompShow, 3038).
+-define(wxStyledTextCtrl_AutoCompCancel, 3039).
+-define(wxStyledTextCtrl_AutoCompActive, 3040).
+-define(wxStyledTextCtrl_AutoCompPosStart, 3041).
+-define(wxStyledTextCtrl_AutoCompComplete, 3042).
+-define(wxStyledTextCtrl_AutoCompStops, 3043).
+-define(wxStyledTextCtrl_AutoCompSetSeparator, 3044).
+-define(wxStyledTextCtrl_AutoCompGetSeparator, 3045).
+-define(wxStyledTextCtrl_AutoCompSelect, 3046).
+-define(wxStyledTextCtrl_AutoCompSetCancelAtStart, 3047).
+-define(wxStyledTextCtrl_AutoCompGetCancelAtStart, 3048).
+-define(wxStyledTextCtrl_AutoCompSetFillUps, 3049).
+-define(wxStyledTextCtrl_AutoCompSetChooseSingle, 3050).
+-define(wxStyledTextCtrl_AutoCompGetChooseSingle, 3051).
+-define(wxStyledTextCtrl_AutoCompSetIgnoreCase, 3052).
+-define(wxStyledTextCtrl_AutoCompGetIgnoreCase, 3053).
+-define(wxStyledTextCtrl_UserListShow, 3054).
+-define(wxStyledTextCtrl_AutoCompSetAutoHide, 3055).
+-define(wxStyledTextCtrl_AutoCompGetAutoHide, 3056).
+-define(wxStyledTextCtrl_AutoCompSetDropRestOfWord, 3057).
+-define(wxStyledTextCtrl_AutoCompGetDropRestOfWord, 3058).
+-define(wxStyledTextCtrl_RegisterImage, 3059).
+-define(wxStyledTextCtrl_ClearRegisteredImages, 3060).
+-define(wxStyledTextCtrl_AutoCompGetTypeSeparator, 3061).
+-define(wxStyledTextCtrl_AutoCompSetTypeSeparator, 3062).
+-define(wxStyledTextCtrl_AutoCompSetMaxWidth, 3063).
+-define(wxStyledTextCtrl_AutoCompGetMaxWidth, 3064).
+-define(wxStyledTextCtrl_AutoCompSetMaxHeight, 3065).
+-define(wxStyledTextCtrl_AutoCompGetMaxHeight, 3066).
+-define(wxStyledTextCtrl_SetIndent, 3067).
+-define(wxStyledTextCtrl_GetIndent, 3068).
+-define(wxStyledTextCtrl_SetUseTabs, 3069).
+-define(wxStyledTextCtrl_GetUseTabs, 3070).
+-define(wxStyledTextCtrl_SetLineIndentation, 3071).
+-define(wxStyledTextCtrl_GetLineIndentation, 3072).
+-define(wxStyledTextCtrl_GetLineIndentPosition, 3073).
+-define(wxStyledTextCtrl_GetColumn, 3074).
+-define(wxStyledTextCtrl_SetUseHorizontalScrollBar, 3075).
+-define(wxStyledTextCtrl_GetUseHorizontalScrollBar, 3076).
+-define(wxStyledTextCtrl_SetIndentationGuides, 3077).
+-define(wxStyledTextCtrl_GetIndentationGuides, 3078).
+-define(wxStyledTextCtrl_SetHighlightGuide, 3079).
+-define(wxStyledTextCtrl_GetHighlightGuide, 3080).
+-define(wxStyledTextCtrl_GetLineEndPosition, 3081).
+-define(wxStyledTextCtrl_GetCodePage, 3082).
+-define(wxStyledTextCtrl_GetCaretForeground, 3083).
+-define(wxStyledTextCtrl_GetReadOnly, 3084).
+-define(wxStyledTextCtrl_SetCurrentPos, 3085).
+-define(wxStyledTextCtrl_SetSelectionStart, 3086).
+-define(wxStyledTextCtrl_GetSelectionStart, 3087).
+-define(wxStyledTextCtrl_SetSelectionEnd, 3088).
+-define(wxStyledTextCtrl_GetSelectionEnd, 3089).
+-define(wxStyledTextCtrl_SetPrintMagnification, 3090).
+-define(wxStyledTextCtrl_GetPrintMagnification, 3091).
+-define(wxStyledTextCtrl_SetPrintColourMode, 3092).
+-define(wxStyledTextCtrl_GetPrintColourMode, 3093).
+-define(wxStyledTextCtrl_FindText, 3094).
+-define(wxStyledTextCtrl_FormatRange, 3095).
+-define(wxStyledTextCtrl_GetFirstVisibleLine, 3096).
+-define(wxStyledTextCtrl_GetLine, 3097).
+-define(wxStyledTextCtrl_GetLineCount, 3098).
+-define(wxStyledTextCtrl_SetMarginLeft, 3099).
+-define(wxStyledTextCtrl_GetMarginLeft, 3100).
+-define(wxStyledTextCtrl_SetMarginRight, 3101).
+-define(wxStyledTextCtrl_GetMarginRight, 3102).
+-define(wxStyledTextCtrl_GetModify, 3103).
+-define(wxStyledTextCtrl_SetSelection, 3104).
+-define(wxStyledTextCtrl_GetSelectedText, 3105).
+-define(wxStyledTextCtrl_GetTextRange, 3106).
+-define(wxStyledTextCtrl_HideSelection, 3107).
+-define(wxStyledTextCtrl_LineFromPosition, 3108).
+-define(wxStyledTextCtrl_PositionFromLine, 3109).
+-define(wxStyledTextCtrl_LineScroll, 3110).
+-define(wxStyledTextCtrl_EnsureCaretVisible, 3111).
+-define(wxStyledTextCtrl_ReplaceSelection, 3112).
+-define(wxStyledTextCtrl_SetReadOnly, 3113).
+-define(wxStyledTextCtrl_CanPaste, 3114).
+-define(wxStyledTextCtrl_CanUndo, 3115).
+-define(wxStyledTextCtrl_EmptyUndoBuffer, 3116).
+-define(wxStyledTextCtrl_Undo, 3117).
+-define(wxStyledTextCtrl_Cut, 3118).
+-define(wxStyledTextCtrl_Copy, 3119).
+-define(wxStyledTextCtrl_Paste, 3120).
+-define(wxStyledTextCtrl_Clear, 3121).
+-define(wxStyledTextCtrl_SetText, 3122).
+-define(wxStyledTextCtrl_GetText, 3123).
+-define(wxStyledTextCtrl_GetTextLength, 3124).
+-define(wxStyledTextCtrl_GetOvertype, 3125).
+-define(wxStyledTextCtrl_SetCaretWidth, 3126).
+-define(wxStyledTextCtrl_GetCaretWidth, 3127).
+-define(wxStyledTextCtrl_SetTargetStart, 3128).
+-define(wxStyledTextCtrl_GetTargetStart, 3129).
+-define(wxStyledTextCtrl_SetTargetEnd, 3130).
+-define(wxStyledTextCtrl_GetTargetEnd, 3131).
+-define(wxStyledTextCtrl_ReplaceTarget, 3132).
+-define(wxStyledTextCtrl_SearchInTarget, 3133).
+-define(wxStyledTextCtrl_SetSearchFlags, 3134).
+-define(wxStyledTextCtrl_GetSearchFlags, 3135).
+-define(wxStyledTextCtrl_CallTipShow, 3136).
+-define(wxStyledTextCtrl_CallTipCancel, 3137).
+-define(wxStyledTextCtrl_CallTipActive, 3138).
+-define(wxStyledTextCtrl_CallTipPosAtStart, 3139).
+-define(wxStyledTextCtrl_CallTipSetHighlight, 3140).
+-define(wxStyledTextCtrl_CallTipSetBackground, 3141).
+-define(wxStyledTextCtrl_CallTipSetForeground, 3142).
+-define(wxStyledTextCtrl_CallTipSetForegroundHighlight, 3143).
+-define(wxStyledTextCtrl_CallTipUseStyle, 3144).
+-define(wxStyledTextCtrl_VisibleFromDocLine, 3145).
+-define(wxStyledTextCtrl_DocLineFromVisible, 3146).
+-define(wxStyledTextCtrl_WrapCount, 3147).
+-define(wxStyledTextCtrl_SetFoldLevel, 3148).
+-define(wxStyledTextCtrl_GetFoldLevel, 3149).
+-define(wxStyledTextCtrl_GetLastChild, 3150).
+-define(wxStyledTextCtrl_GetFoldParent, 3151).
+-define(wxStyledTextCtrl_ShowLines, 3152).
+-define(wxStyledTextCtrl_HideLines, 3153).
+-define(wxStyledTextCtrl_GetLineVisible, 3154).
+-define(wxStyledTextCtrl_SetFoldExpanded, 3155).
+-define(wxStyledTextCtrl_GetFoldExpanded, 3156).
+-define(wxStyledTextCtrl_ToggleFold, 3157).
+-define(wxStyledTextCtrl_EnsureVisible, 3158).
+-define(wxStyledTextCtrl_SetFoldFlags, 3159).
+-define(wxStyledTextCtrl_EnsureVisibleEnforcePolicy, 3160).
+-define(wxStyledTextCtrl_SetTabIndents, 3161).
+-define(wxStyledTextCtrl_GetTabIndents, 3162).
+-define(wxStyledTextCtrl_SetBackSpaceUnIndents, 3163).
+-define(wxStyledTextCtrl_GetBackSpaceUnIndents, 3164).
+-define(wxStyledTextCtrl_SetMouseDwellTime, 3165).
+-define(wxStyledTextCtrl_GetMouseDwellTime, 3166).
+-define(wxStyledTextCtrl_WordStartPosition, 3167).
+-define(wxStyledTextCtrl_WordEndPosition, 3168).
+-define(wxStyledTextCtrl_SetWrapMode, 3169).
+-define(wxStyledTextCtrl_GetWrapMode, 3170).
+-define(wxStyledTextCtrl_SetWrapVisualFlags, 3171).
+-define(wxStyledTextCtrl_GetWrapVisualFlags, 3172).
+-define(wxStyledTextCtrl_SetWrapVisualFlagsLocation, 3173).
+-define(wxStyledTextCtrl_GetWrapVisualFlagsLocation, 3174).
+-define(wxStyledTextCtrl_SetWrapStartIndent, 3175).
+-define(wxStyledTextCtrl_GetWrapStartIndent, 3176).
+-define(wxStyledTextCtrl_SetLayoutCache, 3177).
+-define(wxStyledTextCtrl_GetLayoutCache, 3178).
+-define(wxStyledTextCtrl_SetScrollWidth, 3179).
+-define(wxStyledTextCtrl_GetScrollWidth, 3180).
+-define(wxStyledTextCtrl_TextWidth, 3181).
+-define(wxStyledTextCtrl_GetEndAtLastLine, 3182).
+-define(wxStyledTextCtrl_TextHeight, 3183).
+-define(wxStyledTextCtrl_SetUseVerticalScrollBar, 3184).
+-define(wxStyledTextCtrl_GetUseVerticalScrollBar, 3185).
+-define(wxStyledTextCtrl_AppendText, 3186).
+-define(wxStyledTextCtrl_GetTwoPhaseDraw, 3187).
+-define(wxStyledTextCtrl_SetTwoPhaseDraw, 3188).
+-define(wxStyledTextCtrl_TargetFromSelection, 3189).
+-define(wxStyledTextCtrl_LinesJoin, 3190).
+-define(wxStyledTextCtrl_LinesSplit, 3191).
+-define(wxStyledTextCtrl_SetFoldMarginColour, 3192).
+-define(wxStyledTextCtrl_SetFoldMarginHiColour, 3193).
+-define(wxStyledTextCtrl_LineDown, 3194).
+-define(wxStyledTextCtrl_LineDownExtend, 3195).
+-define(wxStyledTextCtrl_LineUp, 3196).
+-define(wxStyledTextCtrl_LineUpExtend, 3197).
+-define(wxStyledTextCtrl_CharLeft, 3198).
+-define(wxStyledTextCtrl_CharLeftExtend, 3199).
+-define(wxStyledTextCtrl_CharRight, 3200).
+-define(wxStyledTextCtrl_CharRightExtend, 3201).
+-define(wxStyledTextCtrl_WordLeft, 3202).
+-define(wxStyledTextCtrl_WordLeftExtend, 3203).
+-define(wxStyledTextCtrl_WordRight, 3204).
+-define(wxStyledTextCtrl_WordRightExtend, 3205).
+-define(wxStyledTextCtrl_Home, 3206).
+-define(wxStyledTextCtrl_HomeExtend, 3207).
+-define(wxStyledTextCtrl_LineEnd, 3208).
+-define(wxStyledTextCtrl_LineEndExtend, 3209).
+-define(wxStyledTextCtrl_DocumentStart, 3210).
+-define(wxStyledTextCtrl_DocumentStartExtend, 3211).
+-define(wxStyledTextCtrl_DocumentEnd, 3212).
+-define(wxStyledTextCtrl_DocumentEndExtend, 3213).
+-define(wxStyledTextCtrl_PageUp, 3214).
+-define(wxStyledTextCtrl_PageUpExtend, 3215).
+-define(wxStyledTextCtrl_PageDown, 3216).
+-define(wxStyledTextCtrl_PageDownExtend, 3217).
+-define(wxStyledTextCtrl_EditToggleOvertype, 3218).
+-define(wxStyledTextCtrl_Cancel, 3219).
+-define(wxStyledTextCtrl_DeleteBack, 3220).
+-define(wxStyledTextCtrl_Tab, 3221).
+-define(wxStyledTextCtrl_BackTab, 3222).
+-define(wxStyledTextCtrl_NewLine, 3223).
+-define(wxStyledTextCtrl_FormFeed, 3224).
+-define(wxStyledTextCtrl_VCHome, 3225).
+-define(wxStyledTextCtrl_VCHomeExtend, 3226).
+-define(wxStyledTextCtrl_ZoomIn, 3227).
+-define(wxStyledTextCtrl_ZoomOut, 3228).
+-define(wxStyledTextCtrl_DelWordLeft, 3229).
+-define(wxStyledTextCtrl_DelWordRight, 3230).
+-define(wxStyledTextCtrl_LineCut, 3231).
+-define(wxStyledTextCtrl_LineDelete, 3232).
+-define(wxStyledTextCtrl_LineTranspose, 3233).
+-define(wxStyledTextCtrl_LineDuplicate, 3234).
+-define(wxStyledTextCtrl_LowerCase, 3235).
+-define(wxStyledTextCtrl_UpperCase, 3236).
+-define(wxStyledTextCtrl_LineScrollDown, 3237).
+-define(wxStyledTextCtrl_LineScrollUp, 3238).
+-define(wxStyledTextCtrl_DeleteBackNotLine, 3239).
+-define(wxStyledTextCtrl_HomeDisplay, 3240).
+-define(wxStyledTextCtrl_HomeDisplayExtend, 3241).
+-define(wxStyledTextCtrl_LineEndDisplay, 3242).
+-define(wxStyledTextCtrl_LineEndDisplayExtend, 3243).
+-define(wxStyledTextCtrl_HomeWrapExtend, 3244).
+-define(wxStyledTextCtrl_LineEndWrap, 3245).
+-define(wxStyledTextCtrl_LineEndWrapExtend, 3246).
+-define(wxStyledTextCtrl_VCHomeWrap, 3247).
+-define(wxStyledTextCtrl_VCHomeWrapExtend, 3248).
+-define(wxStyledTextCtrl_LineCopy, 3249).
+-define(wxStyledTextCtrl_MoveCaretInsideView, 3250).
+-define(wxStyledTextCtrl_LineLength, 3251).
+-define(wxStyledTextCtrl_BraceHighlight, 3252).
+-define(wxStyledTextCtrl_BraceBadLight, 3253).
+-define(wxStyledTextCtrl_BraceMatch, 3254).
+-define(wxStyledTextCtrl_GetViewEOL, 3255).
+-define(wxStyledTextCtrl_SetViewEOL, 3256).
+-define(wxStyledTextCtrl_SetModEventMask, 3257).
+-define(wxStyledTextCtrl_GetEdgeColumn, 3258).
+-define(wxStyledTextCtrl_SetEdgeColumn, 3259).
+-define(wxStyledTextCtrl_GetEdgeMode, 3260).
+-define(wxStyledTextCtrl_GetEdgeColour, 3261).
+-define(wxStyledTextCtrl_SetEdgeColour, 3262).
+-define(wxStyledTextCtrl_SearchAnchor, 3263).
+-define(wxStyledTextCtrl_SearchNext, 3264).
+-define(wxStyledTextCtrl_SearchPrev, 3265).
+-define(wxStyledTextCtrl_LinesOnScreen, 3266).
+-define(wxStyledTextCtrl_UsePopUp, 3267).
+-define(wxStyledTextCtrl_SelectionIsRectangle, 3268).
+-define(wxStyledTextCtrl_SetZoom, 3269).
+-define(wxStyledTextCtrl_GetZoom, 3270).
+-define(wxStyledTextCtrl_GetModEventMask, 3271).
+-define(wxStyledTextCtrl_SetSTCFocus, 3272).
+-define(wxStyledTextCtrl_GetSTCFocus, 3273).
+-define(wxStyledTextCtrl_SetStatus, 3274).
+-define(wxStyledTextCtrl_GetStatus, 3275).
+-define(wxStyledTextCtrl_SetMouseDownCaptures, 3276).
+-define(wxStyledTextCtrl_GetMouseDownCaptures, 3277).
+-define(wxStyledTextCtrl_SetSTCCursor, 3278).
+-define(wxStyledTextCtrl_GetSTCCursor, 3279).
+-define(wxStyledTextCtrl_SetControlCharSymbol, 3280).
+-define(wxStyledTextCtrl_GetControlCharSymbol, 3281).
+-define(wxStyledTextCtrl_WordPartLeft, 3282).
+-define(wxStyledTextCtrl_WordPartLeftExtend, 3283).
+-define(wxStyledTextCtrl_WordPartRight, 3284).
+-define(wxStyledTextCtrl_WordPartRightExtend, 3285).
+-define(wxStyledTextCtrl_SetVisiblePolicy, 3286).
+-define(wxStyledTextCtrl_DelLineLeft, 3287).
+-define(wxStyledTextCtrl_DelLineRight, 3288).
+-define(wxStyledTextCtrl_GetXOffset, 3289).
+-define(wxStyledTextCtrl_ChooseCaretX, 3290).
+-define(wxStyledTextCtrl_SetXCaretPolicy, 3291).
+-define(wxStyledTextCtrl_SetYCaretPolicy, 3292).
+-define(wxStyledTextCtrl_GetPrintWrapMode, 3293).
+-define(wxStyledTextCtrl_SetHotspotActiveForeground, 3294).
+-define(wxStyledTextCtrl_SetHotspotActiveBackground, 3295).
+-define(wxStyledTextCtrl_SetHotspotActiveUnderline, 3296).
+-define(wxStyledTextCtrl_SetHotspotSingleLine, 3297).
+-define(wxStyledTextCtrl_ParaDownExtend, 3298).
+-define(wxStyledTextCtrl_ParaUp, 3299).
+-define(wxStyledTextCtrl_ParaUpExtend, 3300).
+-define(wxStyledTextCtrl_PositionBefore, 3301).
+-define(wxStyledTextCtrl_PositionAfter, 3302).
+-define(wxStyledTextCtrl_CopyRange, 3303).
+-define(wxStyledTextCtrl_CopyText, 3304).
+-define(wxStyledTextCtrl_SetSelectionMode, 3305).
+-define(wxStyledTextCtrl_GetSelectionMode, 3306).
+-define(wxStyledTextCtrl_LineDownRectExtend, 3307).
+-define(wxStyledTextCtrl_LineUpRectExtend, 3308).
+-define(wxStyledTextCtrl_CharLeftRectExtend, 3309).
+-define(wxStyledTextCtrl_CharRightRectExtend, 3310).
+-define(wxStyledTextCtrl_HomeRectExtend, 3311).
+-define(wxStyledTextCtrl_VCHomeRectExtend, 3312).
+-define(wxStyledTextCtrl_LineEndRectExtend, 3313).
+-define(wxStyledTextCtrl_PageUpRectExtend, 3314).
+-define(wxStyledTextCtrl_PageDownRectExtend, 3315).
+-define(wxStyledTextCtrl_StutteredPageUp, 3316).
+-define(wxStyledTextCtrl_StutteredPageUpExtend, 3317).
+-define(wxStyledTextCtrl_StutteredPageDown, 3318).
+-define(wxStyledTextCtrl_StutteredPageDownExtend, 3319).
+-define(wxStyledTextCtrl_WordLeftEnd, 3320).
+-define(wxStyledTextCtrl_WordLeftEndExtend, 3321).
+-define(wxStyledTextCtrl_WordRightEnd, 3322).
+-define(wxStyledTextCtrl_WordRightEndExtend, 3323).
+-define(wxStyledTextCtrl_SetWhitespaceChars, 3324).
+-define(wxStyledTextCtrl_SetCharsDefault, 3325).
+-define(wxStyledTextCtrl_AutoCompGetCurrent, 3326).
+-define(wxStyledTextCtrl_Allocate, 3327).
+-define(wxStyledTextCtrl_FindColumn, 3328).
+-define(wxStyledTextCtrl_GetCaretSticky, 3329).
+-define(wxStyledTextCtrl_SetCaretSticky, 3330).
+-define(wxStyledTextCtrl_ToggleCaretSticky, 3331).
+-define(wxStyledTextCtrl_SetPasteConvertEndings, 3332).
+-define(wxStyledTextCtrl_GetPasteConvertEndings, 3333).
+-define(wxStyledTextCtrl_SelectionDuplicate, 3334).
+-define(wxStyledTextCtrl_SetCaretLineBackAlpha, 3335).
+-define(wxStyledTextCtrl_GetCaretLineBackAlpha, 3336).
+-define(wxStyledTextCtrl_StartRecord, 3337).
+-define(wxStyledTextCtrl_StopRecord, 3338).
+-define(wxStyledTextCtrl_SetLexer, 3339).
+-define(wxStyledTextCtrl_GetLexer, 3340).
+-define(wxStyledTextCtrl_Colourise, 3341).
+-define(wxStyledTextCtrl_SetProperty, 3342).
+-define(wxStyledTextCtrl_SetKeyWords, 3343).
+-define(wxStyledTextCtrl_SetLexerLanguage, 3344).
+-define(wxStyledTextCtrl_GetProperty, 3345).
+-define(wxStyledTextCtrl_GetStyleBitsNeeded, 3346).
+-define(wxStyledTextCtrl_GetCurrentLine, 3347).
+-define(wxStyledTextCtrl_StyleSetSpec, 3348).
+-define(wxStyledTextCtrl_StyleSetFont, 3349).
+-define(wxStyledTextCtrl_StyleSetFontAttr, 3350).
+-define(wxStyledTextCtrl_StyleSetCharacterSet, 3351).
+-define(wxStyledTextCtrl_StyleSetFontEncoding, 3352).
+-define(wxStyledTextCtrl_CmdKeyExecute, 3353).
+-define(wxStyledTextCtrl_SetMargins, 3354).
+-define(wxStyledTextCtrl_GetSelection, 3355).
+-define(wxStyledTextCtrl_PointFromPosition, 3356).
+-define(wxStyledTextCtrl_ScrollToLine, 3357).
+-define(wxStyledTextCtrl_ScrollToColumn, 3358).
+-define(wxStyledTextCtrl_SendMsg, 3359).
+-define(wxStyledTextCtrl_SetVScrollBar, 3360).
+-define(wxStyledTextCtrl_SetHScrollBar, 3361).
+-define(wxStyledTextCtrl_GetLastKeydownProcessed, 3362).
+-define(wxStyledTextCtrl_SetLastKeydownProcessed, 3363).
+-define(wxStyledTextCtrl_SaveFile, 3364).
+-define(wxStyledTextCtrl_LoadFile, 3365).
+-define(wxStyledTextCtrl_DoDragOver, 3366).
+-define(wxStyledTextCtrl_DoDropText, 3367).
+-define(wxStyledTextCtrl_GetUseAntiAliasing, 3368).
+-define(wxStyledTextCtrl_AddTextRaw, 3369).
+-define(wxStyledTextCtrl_InsertTextRaw, 3370).
+-define(wxStyledTextCtrl_GetCurLineRaw, 3371).
+-define(wxStyledTextCtrl_GetLineRaw, 3372).
+-define(wxStyledTextCtrl_GetSelectedTextRaw, 3373).
+-define(wxStyledTextCtrl_GetTextRangeRaw, 3374).
+-define(wxStyledTextCtrl_SetTextRaw, 3375).
+-define(wxStyledTextCtrl_GetTextRaw, 3376).
+-define(wxStyledTextCtrl_AppendTextRaw, 3377).
+-define(wxArtProvider_GetBitmap, 3378).
+-define(wxArtProvider_GetIcon, 3379).
+-define(wxTreeEvent_GetKeyCode, 3380).
+-define(wxTreeEvent_GetItem, 3381).
+-define(wxTreeEvent_GetKeyEvent, 3382).
+-define(wxTreeEvent_GetLabel, 3383).
+-define(wxTreeEvent_GetOldItem, 3384).
+-define(wxTreeEvent_GetPoint, 3385).
+-define(wxTreeEvent_IsEditCancelled, 3386).
+-define(wxTreeEvent_SetToolTip, 3387).
+-define(wxNotebookEvent_GetOldSelection, 3388).
+-define(wxNotebookEvent_GetSelection, 3389).
+-define(wxNotebookEvent_SetOldSelection, 3390).
+-define(wxNotebookEvent_SetSelection, 3391).
+-define(wxFileDataObject_new, 3392).
+-define(wxFileDataObject_AddFile, 3393).
+-define(wxFileDataObject_GetFilenames, 3394).
+-define(wxFileDataObject_destroy, 3395).
+-define(wxTextDataObject_new, 3396).
+-define(wxTextDataObject_GetTextLength, 3397).
+-define(wxTextDataObject_GetText, 3398).
+-define(wxTextDataObject_SetText, 3399).
+-define(wxTextDataObject_destroy, 3400).
+-define(wxBitmapDataObject_new_1_1, 3401).
+-define(wxBitmapDataObject_new_1_0, 3402).
+-define(wxBitmapDataObject_GetBitmap, 3403).
+-define(wxBitmapDataObject_SetBitmap, 3404).
+-define(wxBitmapDataObject_destroy, 3405).
+-define(wxClipboard_new, 3407).
+-define(wxClipboard_destruct, 3408).
+-define(wxClipboard_AddData, 3409).
+-define(wxClipboard_Clear, 3410).
+-define(wxClipboard_Close, 3411).
+-define(wxClipboard_Flush, 3412).
+-define(wxClipboard_GetData, 3413).
+-define(wxClipboard_IsOpened, 3414).
+-define(wxClipboard_Open, 3415).
+-define(wxClipboard_SetData, 3416).
+-define(wxClipboard_UsePrimarySelection, 3418).
+-define(wxClipboard_IsSupported, 3419).
+-define(wxClipboard_Get, 3420).
+-define(wxSpinEvent_GetPosition, 3421).
+-define(wxSpinEvent_SetPosition, 3422).
+-define(wxSplitterWindow_new_0, 3423).
+-define(wxSplitterWindow_new_2, 3424).
+-define(wxSplitterWindow_destruct, 3425).
+-define(wxSplitterWindow_Create, 3426).
+-define(wxSplitterWindow_GetMinimumPaneSize, 3427).
+-define(wxSplitterWindow_GetSashGravity, 3428).
+-define(wxSplitterWindow_GetSashPosition, 3429).
+-define(wxSplitterWindow_GetSplitMode, 3430).
+-define(wxSplitterWindow_GetWindow1, 3431).
+-define(wxSplitterWindow_GetWindow2, 3432).
+-define(wxSplitterWindow_Initialize, 3433).
+-define(wxSplitterWindow_IsSplit, 3434).
+-define(wxSplitterWindow_ReplaceWindow, 3435).
+-define(wxSplitterWindow_SetSashGravity, 3436).
+-define(wxSplitterWindow_SetSashPosition, 3437).
+-define(wxSplitterWindow_SetSashSize, 3438).
+-define(wxSplitterWindow_SetMinimumPaneSize, 3439).
+-define(wxSplitterWindow_SetSplitMode, 3440).
+-define(wxSplitterWindow_SplitHorizontally, 3441).
+-define(wxSplitterWindow_SplitVertically, 3442).
+-define(wxSplitterWindow_Unsplit, 3443).
+-define(wxSplitterWindow_UpdateSize, 3444).
+-define(wxSplitterEvent_GetSashPosition, 3445).
+-define(wxSplitterEvent_GetX, 3446).
+-define(wxSplitterEvent_GetY, 3447).
+-define(wxSplitterEvent_GetWindowBeingRemoved, 3448).
+-define(wxSplitterEvent_SetSashPosition, 3449).
+-define(wxHtmlWindow_new_0, 3450).
+-define(wxHtmlWindow_new_2, 3451).
+-define(wxHtmlWindow_AppendToPage, 3452).
+-define(wxHtmlWindow_GetOpenedAnchor, 3453).
+-define(wxHtmlWindow_GetOpenedPage, 3454).
+-define(wxHtmlWindow_GetOpenedPageTitle, 3455).
+-define(wxHtmlWindow_GetRelatedFrame, 3456).
+-define(wxHtmlWindow_HistoryBack, 3457).
+-define(wxHtmlWindow_HistoryCanBack, 3458).
+-define(wxHtmlWindow_HistoryCanForward, 3459).
+-define(wxHtmlWindow_HistoryClear, 3460).
+-define(wxHtmlWindow_HistoryForward, 3461).
+-define(wxHtmlWindow_LoadFile, 3462).
+-define(wxHtmlWindow_LoadPage, 3463).
+-define(wxHtmlWindow_SelectAll, 3464).
+-define(wxHtmlWindow_SelectionToText, 3465).
+-define(wxHtmlWindow_SelectLine, 3466).
+-define(wxHtmlWindow_SelectWord, 3467).
+-define(wxHtmlWindow_SetBorders, 3468).
+-define(wxHtmlWindow_SetFonts, 3469).
+-define(wxHtmlWindow_SetPage, 3470).
+-define(wxHtmlWindow_SetRelatedFrame, 3471).
+-define(wxHtmlWindow_SetRelatedStatusBar, 3472).
+-define(wxHtmlWindow_ToText, 3473).
+-define(wxHtmlWindow_destroy, 3474).
+-define(wxHtmlLinkEvent_GetLinkInfo, 3475).
+-define(wxAuiNotebookEvent_SetSelection, 3476).
+-define(wxAuiNotebookEvent_GetSelection, 3477).
+-define(wxAuiNotebookEvent_SetOldSelection, 3478).
+-define(wxAuiNotebookEvent_GetOldSelection, 3479).
+-define(wxAuiNotebookEvent_SetDragSource, 3480).
+-define(wxAuiNotebookEvent_GetDragSource, 3481).
+-define(wxAuiManagerEvent_SetManager, 3482).
+-define(wxAuiManagerEvent_GetManager, 3483).
+-define(wxAuiManagerEvent_SetPane, 3484).
+-define(wxAuiManagerEvent_GetPane, 3485).
+-define(wxAuiManagerEvent_SetButton, 3486).
+-define(wxAuiManagerEvent_GetButton, 3487).
+-define(wxAuiManagerEvent_SetDC, 3488).
+-define(wxAuiManagerEvent_GetDC, 3489).
+-define(wxAuiManagerEvent_Veto, 3490).
+-define(wxAuiManagerEvent_GetVeto, 3491).
+-define(wxAuiManagerEvent_SetCanVeto, 3492).
+-define(wxAuiManagerEvent_CanVeto, 3493).
+-define(wxLogNull_new, 3494).
+-define(wxLogNull_destroy, 3495).
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index cedbd1ef19..ddb491be6c 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.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%
%%%-------------------------------------------------------------------
%%% File : wx_class_SUITE.erl
@@ -113,12 +113,14 @@ treeCtrl(Config) ->
Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
Panel = wxPanel:new(Frame, []),
Tree = ?mt(wxTreeCtrl,wxTreeCtrl:new(Panel, [{style , ?wxTR_HAS_BUTTONS}])),
- Root = ?mt(wxTreeItemId, wxTreeCtrl:addRoot(Tree, "Root", [])),
- Item1 = ?mt(wxTreeItemId, wxTreeCtrl:appendItem(Tree, Root, "Item1", [])),
- ?m(ok, wxTreeCtrl:setItemData(Tree, Item1, {data, item1})),
- Item2 = ?mt(wxTreeItemId, wxTreeCtrl:appendItem(Tree, Root, "Item2", [])),
- ?m(ok, wxTreeCtrl:setItemData(Tree, Item2, {data, item2})),
- Item3 = ?mt(wxTreeItemId, wxTreeCtrl:appendItem(Tree, Root, "Item3", [])),
+ Root = wxTreeCtrl:addRoot(Tree, "Root", []),
+ ?m(true, is_integer(Root)),
+ Item1 = wxTreeCtrl:appendItem(Tree, Root, "Item1", []),
+ ?m(true, is_integer(Item1)),
+ ?m(ok, wxTreeCtrl:setItemData(Tree, Item1, {data, item1})),
+ Item2 = wxTreeCtrl:appendItem(Tree, Root, "Item2", []),
+ ?m(ok, wxTreeCtrl:setItemData(Tree, Item2, {data, item2})),
+ Item3 = wxTreeCtrl:appendItem(Tree, Root, "Item3", []),
?m(ok, wxTreeCtrl:setItemData(Tree, Item3, {data, item3})),
Sizer = wxBoxSizer:new(?wxVERTICAL),
@@ -373,7 +375,7 @@ radioBox(Config) ->
io:format("TrSortRadioBox ~p ~n", [TrSortRadioBox]),
%% If I uncomment any of these lines, it will crash
- ?m(_, catch wxControlWithItems:setClientData(TrSortRadioBox, 0, timestamp)),
+ io:format("~p~n", [catch wxControlWithItems:setClientData(TrSortRadioBox, 0, timestamp)]),
%?m(_, wxListBox:append(TrSortRadioBox, "Session Id", session_id)),
%?m(_, wxListBox:insert(TrSortRadioBox, "Session Id", 0, session_id)),
diff --git a/lib/wx/test/wx_xtra_SUITE.erl b/lib/wx/test/wx_xtra_SUITE.erl
index 2ce1d18039..d5888bbf94 100644
--- a/lib/wx/test/wx_xtra_SUITE.erl
+++ b/lib/wx/test/wx_xtra_SUITE.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%
%%%-------------------------------------------------------------------
%%% File : wx_basic_SUITE.erl
@@ -51,7 +51,8 @@ all(suite) ->
[
destroy_app,
multiple_add_in_sizer,
- app_dies
+ app_dies,
+ menu_item_debug
].
%% The test cases
@@ -68,10 +69,11 @@ destroy_app_test(N) when N > 0 ->
Wx = ?mr(wx_ref, wx:new()),
Frame = wxFrame:new(Wx, 1, "Destroy"),
?m(ok, wxFrame:destroy(Frame)),
- wx:destroy(),
receive
Msg -> Msg
- after 150 -> destroy_app_test(N-1)
+ after 150 ->
+ wx:destroy(),
+ destroy_app_test(N-1)
end;
destroy_app_test(_) ->
receive
@@ -174,3 +176,57 @@ multiple_add_in_sizer(Config) ->
wxWindow:show(Frame),
wx_test_lib:wx_destroy(Frame, Config).
+menu_item_debug(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
+menu_item_debug(Config) ->
+ %% Debugging a menu entry problem
+ %% Run it with: lists:map(fun(_) -> [{0,{ok,_,_}}] = wxt:t() end, lists:seq(1,50)), ok.
+ Wx = wx:new(),
+ wx:debug(trace),
+ Frame = wxFrame:new(Wx, -1, "Button Fix"),
+ wxFrame:connect(Frame, close_window),
+
+ wxPanel:new(Frame),
+ create_menus(Frame),
+ wxWindow:show(Frame),
+ wx_test_lib:wx_destroy(Frame,Config).
+
+
+create_menus(Frame) ->
+ MenuBar = ?mt(wxMenuBar, wxMenuBar:new()),
+ File = ?mt(wxMenu, wxMenu:new([])),
+ Help = ?mt(wxMenu, wxMenu:new([])),
+
+ ?mt(wxMenuItem, wxMenu:append(Help, ?wxID_ABOUT, "&About", [])),
+ ?mt(wxMenuItem, wxMenu:append(Help, ?wxID_HELP, "&Help", [])),
+ ?mt(wxMenuItem, wxMenu:append(File, ?wxID_EXIT, "Exit", [])),
+ T1 = ?mt(wxMenu, wxMenu:new([])),
+ [wxMenuItem:getId(wxMenu:append(T1, Id, integer_to_list(Id), []))
+ || Id <- lists:seq(100, 120)],
+ T2 = ?mt(wxMenu, wxMenu:new([])),
+ [wxMenuItem:getId(wxMenu:append(T2, Id, integer_to_list(Id), []))
+ || Id <- lists:seq(200, 220)],
+ T3 = ?mt(wxMenu, wxMenu:new([])),
+ [wxMenuItem:getId(wxMenu:append(T3, Id, integer_to_list(Id), []))
+ || Id <- lists:seq(300, 320)],
+ T4 = ?mt(wxMenu, wxMenu:new([])),
+ [wxMenuItem:getId(wxMenu:append(T4, Id, integer_to_list(Id), []))
+ || Id <- lists:seq(400, 420)],
+ T5 = ?mt(wxMenu, wxMenu:new([])),
+ [wxMenuItem:getId(wxMenu:append(T5, Id, integer_to_list(Id), []))
+ || Id <- lists:seq(500, 520)],
+ T6 = ?mt(wxMenu, wxMenu:new([])),
+ [wxMenuItem:getId(wxMenu:append(T6, Id, integer_to_list(Id), []))
+ || Id <- lists:seq(600, 620)],
+
+ ?m(ok,wxFrame:connect(Frame, command_menu_selected)),
+ ?m(true, wxMenuBar:append(MenuBar, File, "&File")),
+ ?m(true, wxMenuBar:append(MenuBar, Help, "&Help")),
+ ?m(true, wxMenuBar:append(MenuBar, T1, "T1")),
+ ?m(true, wxMenuBar:append(MenuBar, T2, "T2")),
+ ?m(true, wxMenuBar:append(MenuBar, T3, "T3")),
+ ?m(true, wxMenuBar:append(MenuBar, T4, "T4")),
+ ?m(true, wxMenuBar:append(MenuBar, T5, "T5")),
+ ?m(true, wxMenuBar:append(MenuBar, T6, "T6")),
+
+
+ ?m(ok, wxFrame:setMenuBar(Frame,MenuBar)).
diff --git a/lib/wx/test/wxt.erl b/lib/wx/test/wxt.erl
index a346a6bdb8..1f5b1cc3b1 100644
--- a/lib/wx/test/wxt.erl
+++ b/lib/wx/test/wxt.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%
%%%-------------------------------------------------------------------
%%% File : wxt.erl
@@ -58,16 +58,16 @@ user(Mod,Tc) when is_atom(Tc) ->
%% Resolves the name of test suites and test cases
%% according to the alias definitions. Single atoms
%% are assumed to be the name of a test suite.
-resolve(Suite0) when atom(Suite0) ->
+resolve(Suite0) when is_atom(Suite0) ->
case alias(Suite0) of
- Suite when atom(Suite) ->
+ Suite when is_atom(Suite) ->
{Suite, all};
{Suite, Case} ->
{Suite, Case}
end;
-resolve({Suite0, Case}) when atom(Suite0), atom(Case) ->
+resolve({Suite0, Case}) when is_atom(Suite0), is_atom(Case) ->
case alias(Suite0) of
- Suite when atom(Suite) ->
+ Suite when is_atom(Suite) ->
{Suite, Case};
{Suite, Case2} ->
{Suite, Case2}
diff --git a/lib/xmerl/doc/src/Makefile b/lib/xmerl/doc/src/Makefile
index e26e77eb96..100a2feb0a 100644
--- a/lib/xmerl/doc/src/Makefile
+++ b/lib/xmerl/doc/src/Makefile
@@ -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%
#
include $(ERL_TOP)/make/target.mk
@@ -126,7 +126,7 @@ pdf: $(TOP_PDF_FILE)
html: gifs $(HTML_REF_MAN_FILE)
$(XMERL_XML_FILES):
- docb_gen $(XMERL_DIR)/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript $(XMERL_DIR)/$(@:%.xml=%.erl)
man: $(MAN3_FILES) $(MAN6_FILES)
diff --git a/make/otp.mk.in b/make/otp.mk.in
index bcf9bd85a4..4d8727d47e 100644
--- a/make/otp.mk.in
+++ b/make/otp.mk.in
@@ -3,20 +3,20 @@
# Make include file for otp
#
# %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%
#
# Author: Lars Thorsen
@@ -53,6 +53,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
+GCC = @GCC@
HCC = @HCC@
CC32 = @CC32@
CFLAGS32 = @CFLAGS32@
@@ -261,7 +262,8 @@ $(MAN9DIR)/%.9:: %.xml
.xmlsrc.xml:
- $(DOCGEN)/priv/bin/codeline_preprocessing.escript $< $@
+ escript $(DOCGEN)/priv/bin/codeline_preprocessing.escript $< $@
.fo.pdf:
$(FOP) -fo $< -pdf $@
+
diff --git a/system/AD.html b/system/AD.html
deleted file mode 100644
index 695f3b40aa..0000000000
--- a/system/AD.html
+++ /dev/null
@@ -1,307 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>AMENDMENT DIRECTIVE, OTP</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF">
-<CENTER>
-<A HREF="http://otp.ericsson.se"><IMG BORDER=0 ALT="[OTP]" SRC="http://otp.ericsson.se/pics/banner/min_head.gif"></A>
-<H1>AMENDMENT DIRECTIVE, OTP</H1>
-<FONT SIZE="+1">
-1/177 82 - APN 181 01I<BR>
-UAB/F Kenneth Lundin, Lars Thors�n, Morgan Eriksson<BR>
-961023<BR>
-</FONT>
-</CENTER>
-<BLOCKQUOTE>
-<H2>Table of Contents</H2>
-1 <A HREF="#1">Introduction</A><BR>
-1.1 <A HREF="#1.1">Purpose</A><BR>
-1.2 <A HREF="#1.2">Revision History</A><BR>
-2 <A HREF="#2">Product Identities</A><BR>
-3 <A HREF="#3">Document Survey</A><BR>
-4 <A HREF="#4">Implemented Change requests</A><BR>
-5 <A HREF="#5">Implemented Trouble Reports</A><BR>
-6 <A HREF="#6">Installation Instructions</A><BR>
-6.1 <A HREF="#6.1">Separate (optional) Installation of XNTP (Network Time Protocol)</A><BR>
-7 <A HREF="#7">Some useful notes</A><BR>
-8 <A HREF="#8">Known problems in this release</A><BR>
-9 <A HREF="#9">References</A><BR>
-
-<A NAME="1"><!-- Empty --></A><H2>1 Introduction</H2>
-<P><A NAME="1.1"><!-- Empty --></A><H3>1.1 Purpose</H3>
-<P>This update release, OTP P1H, contains a fix for the erl_call problems in OTP P1G.<A NAME="1.2"><!-- Empty --></A><H3>1.2 Revision History</H3>
-<P>Rev.A:Kenneth Lundin 1996-05-31<BR>
-
-Rev.B:Lars Thors�n 1996-06-04<BR>
-
-Rev.C:Kenneth Lundin 1996-06-14<BR>
-
-Rev.D:Kenneth Lundin 1996-08-28<BR>
-
-Rev.E:Lars Thors�n 1996-09-12<BR>
-
-Rev.F:Kenneth Lundin 1996-09-13<BR>
-
-Rev.G:Morgan Ericsson 1996-10-08<BR>
-
-Rev.H:Kenneth Lundin 1996-10-14<BR>
-
-Rev.I:Morgan Eriksson 1996-10-23<BR>
-<P>The exact changes between revisions of this document can be generated from our ClearCase repository upon request , or a simple unix "diff" can be used.<A NAME="2"><!-- Empty --></A><H2>2 Product Identities</H2>
-<P><P><TABLE BORDER=1>
-<TR>
-<TD><B>Product Name</B></TD>
-<TD><B>Product Number</B></TD>
-<TD><B>R-state</B></TD>
-</TR>
-<TR>
-<TD>OTP</TD>
-<TD>APN 181 01</TD>
-<TD>P1H</TD>
-</TR>
-<TR>
-<TD>ERTS (sunos4)</TD>
-<TD>CXC 138 10/1</TD>
-<TD>P1G</TD>
-</TR>
-<TR>
-<TD>ERTS (sunos5)</TD>
-<TD>CXC 138 10/2</TD>
-<TD>P1G</TD>
-</TR>
-<TR>
-<TD>SASL (BOS) (sunos4)</TD>
-<TD>CXC 138 11/1</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>SASL (BOS) (sunos5)</TD>
-<TD>CXC 138 11/2</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>MNESIA</TD>
-<TD>CXC 138 12/1</TD>
-<TD>P1E</TD>
-</TR>
-<TR>
-<TD>SNMPEA</TD>
-<TD>CXC 138 13/1</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>ERLDEV (Compiler & Debugger)</TD>
-<TD>CXC 138 15/1</TD>
-<TD>P1C</TD>
-</TR>
-<TR>
-<TD>DEVTOOLS (sunos4)</TD>
-<TD>CXC 138 16/1</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>DEVTOOLS (sunos5)</TD>
-<TD>CXC 138 16/2</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>XLATETOOLS (sunos4)</TD>
-<TD>CXC 138 17/1</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>XLATETOOLS (sunos5)</TD>
-<TD>CXC 138 17/2</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>CPO Solaris (XNTP)</TD>
-<TD>CXC 138 46/1</TD>
-<TD>P1A</TD>
-</TR>
-</TABLE>
-<A NAME="3"><!-- Empty --></A><H2>3 Document Survey</H2>
-<P><P><TABLE BORDER=1>
-<TR>
-<TD><B>Document name</B></TD>
-<TD><B>Document number</B></TD>
-<TD>Rev</TD>
-</TR>
-<TR>
-<TD>Systems Overview</TD>
-<TD>1551-APN 181 01</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Tools Introduction</TD>
-<TD>EPK-95:030/1</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Tools User's Guide</TD>
-<TD>EPK-95:030/2</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Tools</TD>
-<TD>EPK-95:030/3</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Distributed Erlang User's Guide</TD>
-<TD>EPK-95:030/4</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Tools Examples</TD>
-<TD>EPK-95:030/5</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>User's Guide to the Erlang Interface Library</TD>
-<TD>3/1553-CNA 121 16</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Interface Library Examples</TD>
-<TD>1/198 17-CNA 121 16</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Programmer's Guide to the Erlang Interface Library</TD>
-<TD>2/198 17-CNA 121 16</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>OTP Erlang User's guide</TD>
-<TD>1553-CNA 121 17</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>The Mnesia Query Language Mnemosyne</TD>
-<TD>1553-CNA 121 18</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>SNMPEA User's Guide</TD>
-<TD>1553-CNA 121 19</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>SNMPEA Reference Guide</TD>
-<TD>1551-CNA 121 19</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>User's Guide to the Interface Generator</TD>
-<TD>1553-CNA 121 38</TD>
-<TD>A</TD>
-</TR>
-</TABLE>
-<P>A complete browseable document survey is available at the OTP WWW-server http://otp.ericsson.se and can also be found in the release at $OTP_ROOT/doc/all.html when the
-release file is un-tar:ed at $OTP_ROOT.<A NAME="4"><!-- Empty --></A><H2>4 Implemented Change requests</H2>
-<P>-<A NAME="5"><!-- Empty --></A><H2>5 Implemented Trouble Reports</H2>
-<P><P><TABLE BORDER=1>
-<TR>
-<TD><B>Block</B></TD>
-<TD><B>TR id</B></TD>
-<TD><B>Slogan</B></TD>
-</TR>
-<TR>
-<TD>ERTS</TD>
-<TD>-</TD>
-<TD>erl_call crashes (Segmentation fault) has now been fixed</TD>
-</TR>
-</TABLE>
-<A NAME="6"><!-- Empty --></A><H2>6 Installation Instructions</H2>
-<P>The release is delivered as a compressed tar-file <B>otp_APN18101_P1H.&#60;target&#62;.tar.Z</B>, where &#60;target&#62; is substituted with <B>sunos4</B> or <B>sunos5</B>.<P>Then the following steps shall be performed at installation time:<UL>
-<LI>Create a new directory $OTP_INSTALL_DIR where OTP can be installed.
-<PRE>mkdir $OTP_INSTALL_DIR
-cd $OTP_INSTALL_DIR
-uncompress $XXX/otp_APN18101_P1H.&lt;target&gt;.tar.Z
-tar xvfp $XXX/otp_APN18101_P1H.&lt;target&gt;.tar</PRE>
-
-<LI>Run the OTP installscript and answer the questions.
-<PRE>./Install $OTP_INSTALL_DIR</PRE>
-<BR>The Install command will ask a number of questions during the installation.
-<B>OBS!</B> When installing on a system where DNS is not used you
-should answer <B>NO</B> on the question "WILL YOU USE DNS?"
-
-<LI>Prepare the OTP man pages.
-<PRE>mkdir man/cat1 man/cat3
-./format_man_pages</PRE>
-
-<LI>Update the erl_interface library with ranlib (sunos4 only).
-<PRE>cd $OTP_INSTALL_DIR/usr/lib
-ranlib liberl_interface.a</PRE>
-
-</UL>
-<P>Add $OTP_INSTALL_DIR/bin to the path variable and $OTP_INSTALL_DIR/man to the MANPATH variable.<P>Where <B>$XXX</B> denotes the path at which otp_APN18101_P1H.&#60;target&#62;.tar resides.
-<A NAME="6.1"><!-- Empty --></A><H3>6.1 Separate (optional) Installation of XNTP (Network Time Protocol)</H3>
-<P>XNTP (Network Time Protocol) <B>for use in an embedded system running Sunos5</B> is
-delivered in this release. The XNTP resides in the tar-file xntp_CXC_13846_P1A.sunos5.tar.Z and can be fetched with Netscape from the same place as the other OTP deliverables.<UL>
-<LI>Create a new directory $XNTP_DIR where the XNTP distribution can be loaded.
-<PRE>mkdir $XNTP_DIR
-cd $XNTP_DIR
-uncompress $XXX/xntp_CXC_13846_P1A.sunos5.tar.Z
-tar xvf $XXX/xntp_CXC_13846_P1A.sunos5.tar.Z</PRE>
-
-<LI>Read the README-file which is included, below follows information which
-is partly the same as can be found at the end of the README file.
-
-<LI>Note, the xntp3.5a.export subdirectory is not needed for installation.
-
-<BR>Create a suitable configuration file based on the samples in the
-'config' directory, and copy it to /etc/ntp.conf.
-
-<LI>Create a directory for the binaries and copy them there:<BR>
-
-<PRE>mkdir -p /opt/xntp/bin
-cp bin/* /opt/xntp/bin</PRE>
-<BR>Note!, if you prefer another installation directory for the binaries, you have to edit one line in the "Run Commands" script xntp (located in the init directory):
-<PRE>BINDIR=&lt;your new bindir&gt;</PRE>
-
-<LI>Install the "Run Commands" script:<BR>
-
-<PRE>cp init/xntp /etc/init.d/xntp&lt;br&gt;
-ln /etc/init.d/xntp /etc/rc0.d/K57xntp
-ln /etc/init.d/xntp /etc/rc1.d/K57xntp
-ln /etc/init.d/xntp /etc/rc2.d/S78xntp</PRE>
-
-<LI>Modify the /etc/system file (you probably want to save the original):<BR>
-
-<PRE>cat init/system &gt;&gt; /etc/system</PRE>
-
-</UL>
-<P>Where <B>$XXX</B> denotes the path at which xntp_CXC13846_P1A.sunos5.tar.Z resides.<A NAME="7"><!-- Empty --></A><H2>7 Some useful notes</H2>
-<P>To make it possible to browse Framemaker documents through Netscape the files
-.mime.types and .mailcap should be modified (see below). The modifications
-can be made as systems defaults if they are placed in e.g /usr/local/lib/netscape (see Netscape Handbook for details) or as personal defaults if placed in the
-users $HOME directory.<P>.mime.types<P><PRE>application/x-maker fm</PRE>
-<P>
-.mailcap<P><PRE>application/x-maker; fmclient -f %s</PRE>
-<A NAME="8"><!-- Empty --></A><H2>8 Known problems in this release</H2>
-<P><UL>
-<LI>In the manual-page for module code, the returned value of the function
-which is described to be String but in reality it is an Atom (for compatibility
-reasons). In the next release the return type will however be String as it says
-in the manual-page.
-
-<LI>On SunOS4.x platforms, the format_man_pages script (executed as a part of installation) will cause following error messages for missing manual sections:
-<BR>
-<PRE>opendir:man{2,4,5,6,7,8,l,n}: No such file or directory</PRE>
-<BR>These messages should be ignored.
-
-</UL>
-<A NAME="9"><!-- Empty --></A><H2>9 References</H2>
-<P><I>Nothing to reference</I>
-</BLOCKQUOTE>
-<CENTER>
-<HR>
-<P><FONT SIZE=-1>
-Copyright &copy; 1996 <A HREF="http://otp.ericsson.se">Open Telecom Platform</A><BR>
-<!--#include virtual="/ssi/otp_footer.html"-->
-</FONT>
-</CENTER>
-</BODY>
-</HTML>
diff --git a/system/AD.sgml b/system/AD.sgml
deleted file mode 100644
index e7fc9755ed..0000000000
--- a/system/AD.sgml
+++ /dev/null
@@ -1,367 +0,0 @@
-<!doctype report PUBLIC "-//Stork//DTD report//EN">
-
-<report>
- <header>
- <title>AMENDMENT DIRECTIVE, OTP</title>
- <prepared>ETX/B/SFP Kenneth Lundin, Lars Thors&#233;n, Morgan Eriksson</prepared>
- <responsible></responsible>
- <docno>1/177 82 - APN 181 01</docno>
- <approved>ETX/B/SF Torbj&ouml;rn Johnson</approved>
- <checked></checked>
- <date>961023</date>
- <rev>I</rev>
- <file>tr1c.sgml</file>
- </header>
-
-<section>
-<title>Introduction</title>
-<p>
-<section><title>Purpose</title>
-<p>
-This update release, OTP P1H, contains a fix for the erl_call problems in OTP P1G.
-</section>
-
-<section><title>Revision History</title>
-<p>
-Rev.A:Kenneth Lundin 1996-05-31<br>
-Rev.B:Lars Thors&#233;n 1996-06-04<br>
-Rev.C:Kenneth Lundin 1996-06-14<br>
-Rev.D:Kenneth Lundin 1996-08-28<br>
-Rev.E:Lars Thors&#233;n 1996-09-12<br>
-Rev.F:Kenneth Lundin 1996-09-13<br>
-Rev.G:Morgan Ericsson 1996-10-08<br>
-Rev.H:Kenneth Lundin 1996-10-14<br>
-Rev.I:Morgan Eriksson 1996-10-23<br>
-<p>
-The exact changes between revisions of this document can be generated from our ClearCase repository upon request , or a simple unix "diff" can be used.
-</section>
-</section>
-<section><title>Product Identities</title>
-<p>
-<table>
-<row>
-<cell><b>Product Name</b></cell>
-<cell><b>Product Number</b></cell>
-<cell><b>R-state</b></cell>
-</row>
-<row>
-<cell>OTP</cell>
-<cell>APN 181 01</cell>
-<cell>P1H</cell>
-</row>
-<row>
-<cell>ERTS (sunos4)</cell>
-<cell>CXC 138 10/1</cell>
-<cell>P1G</cell>
-</row>
-<row>
-<cell>ERTS (sunos5)</cell>
-<cell>CXC 138 10/2</cell>
-<cell>P1G</cell>
-</row>
-<row>
-<cell>SASL (BOS) (sunos4)</cell>
-<cell>CXC 138 11/1</cell>
-<cell>P1D</cell>
-</row>
-<row>
-<cell>SASL (BOS) (sunos5)</cell>
-<cell>CXC 138 11/2</cell>
-<cell>P1D</cell>
-</row>
-<row>
-<cell>MNESIA</cell>
-<cell>CXC 138 12/1</cell>
-<cell>P1E</cell>
-</row>
-<row>
-<cell>SNMPEA</cell>
-<cell>CXC 138 13/1</cell>
-<cell>P1D</cell>
-</row>
-<row>
-<cell>ERLDEV (Compiler & Debugger)</cell>
-<cell>CXC 138 15/1</cell>
-<cell>P1C</cell>
-</row>
-<row>
-<cell>DEVTOOLS (sunos4)</cell>
-<cell>CXC 138 16/1</cell>
-<cell>P1D</cell>
-</row>
-<row>
-<cell>DEVTOOLS (sunos5)</cell>
-<cell>CXC 138 16/2</cell>
-<cell>P1D</cell>
-</row>
-<row>
-<cell>XLATETOOLS (sunos4)</cell>
-<cell>CXC 138 17/1</cell>
-<cell>P1D</cell>
-</row>
-<row>
-<cell>XLATETOOLS (sunos5)</cell>
-<cell>CXC 138 17/2</cell>
-<cell>P1D</cell>
-</row>
-<row>
-<cell>CPO Solaris (XNTP)</cell>
-<cell>CXC 138 46/1</cell>
-<cell>P1A</cell>
-</row>
-</table>
-</section>
-<section><title>Document Survey</title>
-<p>
-<table>
-<row>
-<cell><b>Document name</b></cell>
-<cell><b>Document number</b></cell>
-<cell>Rev</cell>
-</row>
-<row>
-<cell>Systems Overview</cell>
-<cell>1551-APN 181 01</cell>
-<cell>A</cell>
-</row>
-<row>
-<cell>Erlang Tools Introduction</cell>
-<cell>EPK-95:030/1</cell>
-<cell>A</cell>
-</row>
-<row>
-<cell>Erlang Tools User's Guide</cell>
-<cell>EPK-95:030/2</cell>
-<cell>A</cell>
-</row>
-<row>
-<cell>Erlang Tools</cell>
-<cell>EPK-95:030/3</cell>
-<cell>A</cell>
-</row>
-<row>
-<cell>Distributed Erlang User's Guide</cell>
-<cell>EPK-95:030/4</cell>
-<cell>A</cell>
-</row>
-<row>
-<cell>Erlang Tools Examples</cell>
-<cell>EPK-95:030/5</cell>
-<cell>A</cell>
-</row>
-
-<row>
-<cell>User's Guide to the Erlang Interface Library</cell>
-<cell>3/1553-CNA 121 16</cell>
-<cell>A</cell>
-</row>
-<row>
-<cell>Erlang Interface Library Examples</cell>
-<cell>1/198 17-CNA 121 16</cell>
-<cell>A</cell>
-</row>
-<row>
-<cell>Programmer's Guide to the Erlang Interface Library</cell>
-<cell>2/198 17-CNA 121 16</cell>
-<cell>A</cell>
-</row>
-
-<row>
-<cell>OTP Erlang User's guide</cell>
-<cell>1553-CNA 121 17</cell>
-<cell>A</cell>
-</row>
-
-<row>
-<cell>The Mnesia Query Language Mnemosyne</cell>
-<cell>1553-CNA 121 18</cell>
-<cell>A</cell>
-</row>
-
-<row>
-<cell>SNMPEA User's Guide</cell>
-<cell>1553-CNA 121 19</cell>
-<cell>A</cell>
-</row>
-
-<row>
-<cell>SNMPEA Reference Guide</cell>
-<cell>1551-CNA 121 19</cell>
-<cell>A</cell>
-</row>
-
-<row>
-<cell>User's Guide to the Interface Generator</cell>
-<cell>1553-CNA 121 38</cell>
-<cell>A</cell>
-</row>
-
-</table>
-
-<p>
-A complete browseable document survey is available at the OTP WWW-server http://otp.ericsson.se and can also be found in the release at $OTP_ROOT/doc/all.html when the
-release file is un-tar:ed at $OTP_ROOT.
-</section>
-<section><title>Implemented Change requests</title>
-<p>
--
-</section>
-<section><title>Implemented Trouble Reports</title>
-<p>
-<table>
-<row>
-<cell><b>Block</b></cell>
-<cell><b>TR id</b></cell>
-<cell><b>Slogan</b></cell>
-</row>
-<row>
-<cell>ERTS</cell>
-<cell>-</cell>
-<cell>
-erl_call crashes (Segmentation fault) has now been fixed
-</cell>
-</row>
-</table>
-</section>
-<section><title>Installation Instructions</title>
-<p>
-The release is delivered as a compressed tar-file <b>otp_APN18101_P1H.&lt;target&gt;.tar.Z</b>, where &lt;target&gt; is substituted with <b>sunos4</b> or <b>sunos5</b>.
-<p>
-Then the following steps shall be performed at installation time:
-</p>
-<list>
-<item><p>Create a new directory $OTP_INSTALL_DIR where OTP can be installed.
-<code>
-mkdir $OTP_INSTALL_DIR
-cd $OTP_INSTALL_DIR
-uncompress $XXX/otp_APN18101_P1H.<target>.tar.Z
-tar xvfp $XXX/otp_APN18101_P1H.<target>.tar
-</code>
-</item>
-<item><p>Run the OTP installscript and answer the questions.
-<code>
-./Install $OTP_INSTALL_DIR
-</code>
-<p>
-The Install command will ask a number of questions during the installation.
-<b>OBS!</b> When installing on a system where DNS is not used you
-should answer <b>NO</b> on the question "WILL YOU USE DNS?"
-</item>
-<item><p>Prepare the OTP man pages.
-<code>
-mkdir man/cat1 man/cat3
-./format_man_pages
-</code>
-<item><p>Update the erl_interface library with ranlib (sunos4 only).
-<code>
-cd $OTP_INSTALL_DIR/usr/lib
-ranlib liberl_interface.a
-</code>
-</item>
-</list>
-<p>
-Add $OTP_INSTALL_DIR/bin to the path variable and $OTP_INSTALL_DIR/man to the MANPATH variable.
-<p>
-Where <b>$XXX</b> denotes the path at which otp_APN18101_P1H.&lt;target&gt;.tar resides.
-
-<section><title>Separate (optional) Installation of XNTP (Network Time Protocol)</title>
-<p>
-XNTP (Network Time Protocol) <b>for use in an embedded system running Sunos5</b> is
-delivered in this release. The XNTP resides in the tar-file xntp_CXC_13846_P1A.sunos5.tar.Z and can be fetched with Netscape from the same place as the other OTP deliverables.
-<list>
-<item><p>Create a new directory $XNTP_DIR where the XNTP distribution can be loaded.
-<code>
-mkdir $XNTP_DIR
-cd $XNTP_DIR
-uncompress $XXX/xntp_CXC_13846_P1A.sunos5.tar.Z
-tar xvf $XXX/xntp_CXC_13846_P1A.sunos5.tar.Z
-</code>
-</item>
-<item><p>Read the README-file which is included, below follows information which
-is partly the same as can be found at the end of the README file.</item>
-<item><p>Note, the xntp3.5a.export subdirectory is not needed for installation.
-
-<p>Create a suitable configuration file based on the samples in the
-'config' directory, and copy it to /etc/ntp.conf.</item>
-
-<item><p>Create a directory for the binaries and copy them there:<br>
-<code>
-mkdir -p /opt/xntp/bin
-cp bin/* /opt/xntp/bin
-</code>
-<p>Note!, if you prefer another installation directory for the binaries, you have to edit one line in the "Run Commands" script xntp (located in the init directory):
-<code>
-BINDIR=<your new bindir>;
-</code>
-</item>
-
-<item><p>Install the "Run Commands" script:<br>
-<code>
-cp init/xntp /etc/init.d/xntp<br>
-ln /etc/init.d/xntp /etc/rc0.d/K57xntp
-ln /etc/init.d/xntp /etc/rc1.d/K57xntp
-ln /etc/init.d/xntp /etc/rc2.d/S78xntp
-</code>
-</item>
-
-<item><p>Modify the /etc/system file (you probably want to save the original):<br>
-<code>
-cat init/system >> /etc/system
-</code>
-</item>
-
-</list>
-<p>
-Where <b>$XXX</b> denotes the path at which xntp_CXC13846_P1A.sunos5.tar.Z resides.
-</section>
-</section>
-
-<section><title>Some useful notes</title>
-<p>
-To make it possible to browse Framemaker documents through Netscape the files
-.mime.types and .mailcap should be modified (see below). The modifications
-can be made as systems defaults if they are placed in e.g /usr/local/lib/netscape (see Netscape Handbook for details) or as personal defaults if placed in the
-users $HOME directory.
-<p>
-.mime.types
-<p>
-<pre>
-application/x-maker fm
-</pre>
-<p>
-
-.mailcap
-<p>
-<pre>
-application/x-maker; fmclient -f %s
-</pre>
-</section>
-<section><title>Known problems in this release</title>
-<p>
-<list>
-<item><p>In the manual-page for module code, the returned value of the function
-which is described to be String but in reality it is an Atom (for compatibility
-reasons). In the next release the return type will however be String as it says
-in the manual-page.</item>
-<item><p>On SunOS4.x platforms, the format_man_pages script (executed as a part of installation) will cause following error messages for missing manual sections:
-<p><code>opendir:man{2,4,5,6,7,8,l,n}: No such file or directory</code>
-<p>These messages should be ignored.
-</item>
-
-</list>
-</section>
-<section><title>References</title>
-<p>
-<i>Nothing to reference</i>
-
-</section>
-</report>
-
-
-
-
-
-
-
-
-
diff --git a/system/ADbeam.html b/system/ADbeam.html
deleted file mode 100644
index abb80c9f0a..0000000000
--- a/system/ADbeam.html
+++ /dev/null
@@ -1,261 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>AMENDMENT DIRECTIVE, OTP-BEAM
- </TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF">
-<TABLE WIDTH=100%>
-<TR>
-<TD ROWSPAN=2 WIDTH=50%><IMG ALT="Ericsson" SRC="http://otp.ericsson.se/pics/logo/elogo.gif"></TD>
-<TD VALIGN=TOP WIDTH=50%><BR><BR></TD>
-</TR>
-<TR>
-<TD VALIGN=TOP WIDTH=50%><B>OTP Report</B></TD>
-</TR>
-</TABLE><CENTER>
-<TABLE BORDER CELLSPACING=0 CELLPADDING=2 WIDTH=100%>
-<TR>
-<TD VALIGN=TOP WIDTH=30% COLSPAN=3>
-<FONT SIZE=1>Uppgjord - <I>Prepared</I></FONT><BR>
-<FONT SIZE=3>UAB/F Kenneth Lundin, Lars Thors�n
-</FONT>
-</TD>
-<TD VALIGN=TOP WIDTH=20% COLSPAN=2 NOWRAP>
-<FONT SIZE=1>Faktaansvarig - <I>Subject responsible</I></FONT><BR>
-<FONT SIZE=3> </FONT><BR>
-</TD>
-<TD VALIGN=TOP WIDTH=50% COLSPAN=5>
-<FONT SIZE=1>Nr - <I>No</I></FONT><BR>
-<FONT SIZE=3>3/177 82 - APN 181 01
-</FONT>
-</TD>
-</TR>
-<TR>
-<TD VALIGN=TOP WIDTH=40% COLSPAN=4 NOWRAP>
-<FONT SIZE=1>Dokansv/Godk - <I>Doc respons/Approved</I></FONT><BR>
-<FONT SIZE=3>ETX/B/DU Torbj&ouml;rn Johnsson
-</FONT>
-</TD>
-<TD VALIGN=TOP WIDTH=10%>
-<FONT SIZE=1>Kontr - <I>Checked</I></FONT><BR>
-<FONT SIZE=3> </FONT>
-</TD>
-<TD VALIGN=TOP WIDTH=20% COLSPAN=2 NOWRAP>
-<FONT SIZE=1>Datum - <I>Date</I></FONT><BR>
-<FONT SIZE=3>960828
-</FONT></TD>
-<TD VALIGN=TOP WIDTH=10%><FONT SIZE=1>Rev</FONT><BR>
-<FONT SIZE=3>D
-</FONT>
-</TD>
-<TD VALIGN=TOP WIDTH=20% COLSPAN=2>
-<FONT SIZE=1>File</FONT><BR>
-<FONT SIZE=3>tr1c.sgml
-<BR></FONT>
-</TD>
-</TR>
-</TABLE><P>
-<A HREF="http://otp.ericsson.se/">
-<STRONG>OTP</STRONG></A> /
-<STRONG>...</STRONG> /
-<A HREF="../
- ">
-<STRONG>Up</STRONG></A> /
-<P><B><FONT SIZE=8>AMENDMENT DIRECTIVE, OTP-BEAM
-</FONT></B>
-</CENTER>
-<HR>
-<H2>Introduction</H2>
-<P>
-<H3>Purpose</H3>
-<P>This is a first prototype release of the OTP-BEAM system for SunOS5.
-This version is intended to be used for various capacity measurements and the functionality is comparable to that of OTP rev P1D (APN 181 01 P1D).
-
-<H3>Revision History</H3>
-<P>Rev.A:Kenneth Lundin 1996-08-28<BR>
-
-<P>The exact changes between revisions of this document can be generated from our ClearCase repository upon request , or a simple unix "diff" can be used.
-<H2>Product Identities</H2>
-<P><CENTER><TABLE BORDER=1>
-<TR>
-<TH>Product Name</TH>
-<TH>Product Number</TH>
-<TH>R-state</TH>
-</TR>
-<TR>
-<TD>OTP</TD>
-<TD>APN 181 01</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>ERTS (sunos5-beam)</TD>
-<TD>CXC 138 10/3</TD>
-<TD>P1D</TD>
-</TR>
-<TR>
-<TD>SASL (BOS) (sunos5-beam)</TD>
-<TD>CXC 138 11/3</TD>
-<TD>P1C</TD>
-</TR>
-<TR>
-<TD>MNESIA</TD>
-<TD>CXC 138 12/1</TD>
-<TD>P1C</TD>
-</TR>
-<TR>
-<TD>SNMPEA</TD>
-<TD>CXC 138 13/1</TD>
-<TD>P1C</TD>
-</TR>
-<TR>
-<TD>ERLDEV (Compiler & Debugger)</TD>
-<TD>CXC 138 15/1</TD>
-<TD>P1B</TD>
-</TR>
-<TR>
-<TD>DEVTOOLS (sunos5-beam)</TD>
-<TD>CXC 138 16/3</TD>
-<TD>P1C</TD>
-</TR>
-<TR>
-<TD>XLATETOOLS (sunos5-beam)</TD>
-<TD>CXC 138 17/3</TD>
-<TD>P1C</TD>
-</TR>
-</TABLE></CENTER>
-
-<H2>Document Survey</H2>
-<P><CENTER><TABLE BORDER=1>
-<TR>
-<TH>Document name</TH>
-<TH>Document number</TH>
-<TH>Rev</TH>
-</TR>
-<TR>
-<TD>Systems Overview</TD>
-<TD>1551-APN 181 01</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Tools Introduction</TD>
-<TD>EPK-95:030/1</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Tools User's Guide</TD>
-<TD>EPK-95:030/2</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Tools</TD>
-<TD>EPK-95:030/3</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Distributed Erlang User's Guide</TD>
-<TD>EPK-95:030/4</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Tools Examples</TD>
-<TD>EPK-95:030/5</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>User's Guide to the Erlang Interface Library</TD>
-<TD>3/1553-CNA 121 16</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Erlang Interface Library Examples</TD>
-<TD>1/198 17-CNA 121 16</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Programmer's Guide to the Erlang Interface Library</TD>
-<TD>2/198 17-CNA 121 16</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>OTP Erlang User's guide</TD>
-<TD>1553-CNA 121 17</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>Mnesia Users Guide (changed name and much improved)</TD>
-<TD>1553-CNA 121 18</TD>
-<TD>PB1</TD>
-</TR>
-<TR>
-<TD>SNMPEA User's Guide</TD>
-<TD>1553-CNA 121 19</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>SNMPEA Reference Guide</TD>
-<TD>1551-CNA 121 19</TD>
-<TD>A</TD>
-</TR>
-<TR>
-<TD>User's Guide to the Interface Generator</TD>
-<TD>1553-CNA 121 38</TD>
-<TD>A</TD>
-</TR>
-</TABLE></CENTER>
-
-
-<P>A complete browseable document survey is available at the OTP WWW-server http://otp.ericsson.se and can also be found in the release at $OTP_ROOT/doc/all.html when the
-release file is un-tar:ed at $OTP_ROOT.
-<H2>Implemented Change requests</H2>
-<P>Comparable in functionality with OTP 181 01 P1D (jam).
-
-<H2>Implemented Trouble Reports</H2>
-<P>This is the first version.
-
-<H2>Installation Instructions</H2>
-<P><B>OBS! The installation path selected below must not be the same as the one used for an OTP -jam system. </B>
-<P>The release is delivered as a compressed tar-file
-<B>otp_APN18101_beam_P1D.&lt;target&gt;.tar.Z</B>,
-where &lt;target&gt; is substituted with <B>sunos5</B>.
-<P>Then the following steps shall be performed at installation time:
-<UL>
-<LI>mkdir <I>&lt;installation path&gt;</I>
-<LI>cd <I>&lt;installation path&gt;</I>
-<LI>uncompress $XXX/otp_APN18101_beam_P1D.&lt;target&gt;.tar.Z
-<LI>tar xvfp $XXX/otp_APN18101_beam_P1D.&lt;target&gt;.tar
-<LI>./Install <I>&lt;installation path&gt;</I><BR>
-The Install command will ask a number of questions during the installation.<BR>
-<B>OBS!</B> When installing on a system where DNS is not used you
-should answer <B>NO</B> on the question "WILL YOU USE DNS?"
-<LI>mkdir man/cat1 man/cat3
-<LI>./format_man_pages
-<LI>cd <I>&lt;installation path&gt;</I>/usr/lib and run ranlib on liberl_interface.a (only sunos4)
-</UL>
-
-Add <I>&lt;installation path&gt;</I>/bin to the path variable and <I>&lt;installation path&gt;</I>/man to the MANPATH variable.
-<P>Where $XXX denotes the path at which otp_APN18101_beam_P1D.&lt;target&gt;.tar resides.
-<H2>Some useful notes</H2>
-<P>To make it possible to browse Framemaker documents through Netscape the files
-.mime.types and .mailcap should be modified (see below). The modifications
-can be made as systems defaults if they are placed in e.g /usr/local/lib/netscape (see Netscape Handbook for details) or as personal defaults if placed in the
-users $HOME directory.
-<P>.mime.types
-<P>
-<PRE>application/x-maker fm</PRE>
-
-<P>
-.mailcap
-<P>
-<PRE>application/x-maker; fmclient -f %s</PRE>
-
-<H2>Known problems in this release</H2>
-<P><UL>
-<LI>Some html-links may still be faulty.
-</UL>
-
-<H2>References</H2>
-<P><I>Nothing to reference</I>
-
-
-</BODY>
-</HTML> \ No newline at end of file
diff --git a/system/ADbeam.sgml b/system/ADbeam.sgml
deleted file mode 100644
index 63995fe26e..0000000000
--- a/system/ADbeam.sgml
+++ /dev/null
@@ -1,246 +0,0 @@
-<!doctype report PUBLIC "-//Stork//DTD tr1c//EN">
-
-<report>
- <header>
- <title>AMENDMENT DIRECTIVE, OTP-BEAM
- <prepared>ETX/B/DUP Kenneth Lundin, Lars Thors&#233;n
- <responsible>
- <docno>3/177 82 - APN 181 01
- <approved>ETX/B/DU Torbj&ouml;rn Johnsson
- <checked>
- <date>960828
- <rev>D
- <file>tr1c.sgml
- <parent>../
- </header>
-
- <section>
-<h1>Introduction</h1>
-<p>
-<h2>Purpose</h2>
-<p>
-This is a first prototype release of the OTP-BEAM system for SunOS5.
-This version is intended to be used for various capacity measurements and the functionality is comparable to that of OTP rev P1D (APN 181 01 P1D).
-
-<h2>Revision History</h2>
-<p>
-Rev.A:Kenneth Lundin 1996-08-28<br>
-
-<p>
-The exact changes between revisions of this document can be generated from our ClearCase repository upon request , or a simple unix "diff" can be used.
-<h1>Product Identities</h1>
-<p>
-<table>
-<row>
-<hcell>Product Name
-<hcell>Product Number
-<hcell>R-state
-</row>
-<row>
-<cell>OTP
-<cell>APN 181 01
-<cell>P1D
-</row>
-<row>
-<cell>ERTS (sunos5-beam)
-<cell>CXC 138 10/3
-<cell>P1D
-</row>
-<row>
-<cell>SASL (BOS) (sunos5-beam)
-<cell>CXC 138 11/3
-<cell>P1C
-</row>
-<row>
-<cell>MNESIA
-<cell>CXC 138 12/1
-<cell>P1C
-</row>
-<row>
-<cell>SNMPEA
-<cell>CXC 138 13/1
-<cell>P1C
-</row>
-<row>
-<cell>ERLDEV (Compiler & Debugger)
-<cell>CXC 138 15/1
-<cell>P1B
-</row>
-<row>
-<cell>DEVTOOLS (sunos5-beam)
-<cell>CXC 138 16/3
-<cell>P1C
-</row>
-<row>
-<cell>XLATETOOLS (sunos5-beam)
-<cell>CXC 138 17/3
-<cell>P1C
-</row>
-</table>
-<h1>Document Survey</h1>
-<p>
-<table>
-<row>
-<hcell>Document name
-<hcell>Document number
-<hcell>Rev
-</row>
-<row>
-<cell>Systems Overview
-<cell>1551-APN 181 01
-<cell>A
-</row>
-<row>
-<cell>Erlang Tools Introduction
-<cell>EPK-95:030/1
-<cell>A
-</row>
-<row>
-<cell>Erlang Tools User's Guide
-<cell>EPK-95:030/2
-<cell>A
-</row>
-<row>
-<cell>Erlang Tools
-<cell>EPK-95:030/3
-<cell>A
-</row>
-<row>
-<cell>Distributed Erlang User's Guide
-<cell>EPK-95:030/4
-<cell>A
-</row>
-<row>
-<cell>Erlang Tools Examples
-<cell>EPK-95:030/5
-<cell>A
-</row>
-
-<row>
-<cell>User's Guide to the Erlang Interface Library
-<cell>3/1553-CNA 121 16
-<cell>A
-</row>
-<row>
-<cell>Erlang Interface Library Examples
-<cell>1/198 17-CNA 121 16
-<cell>A
-</row>
-<row>
-<cell>Programmer's Guide to the Erlang Interface Library
-<cell>2/198 17-CNA 121 16
-<cell>A
-</row>
-
-<row>
-<cell>OTP Erlang User's guide
-<cell>1553-CNA 121 17
-<cell>A
-</row>
-
-<row>
-<cell>Mnesia Users Guide (changed name and much improved)
-<cell>1553-CNA 121 18
-<cell>PB1
-</row>
-
-<row>
-<cell>SNMPEA User's Guide
-<cell>1553-CNA 121 19
-<cell>A
-</row>
-
-<row>
-<cell>SNMPEA Reference Guide
-<cell>1551-CNA 121 19
-<cell>A
-</row>
-
-<row>
-<cell>User's Guide to the Interface Generator
-<cell>1553-CNA 121 38
-<cell>A
-</row>
-
-</table>
-
-<p>
-A complete browseable document survey is available at the OTP WWW-server http://otp.ericsson.se and can also be found in the release at $OTP_ROOT/doc/all.html when the
-release file is un-tar:ed at $OTP_ROOT.
-<h1>Implemented Change requests</h1>
-<p>
-Comparable in functionality with OTP 181 01 P1D (jam).
-
-<h1>Implemented Trouble Reports</h1>
-<p>
-This is the first version.
-
-<h1>Installation Instructions</h1>
-<p>
-<b>OBS! The installation path selected below must not be the same as the one used for an OTP -jam system. </b>
-<p>
-The release is delivered as a compressed tar-file
-<b>otp_APN18101_beam_P1D.&lt;target&gt;.tar.Z</b>,
-where &lt;target&gt; is substituted with <b>sunos5</b>.
-<p>
-Then the following steps shall be performed at installation time:
-<list>
-<item>mkdir <i>&lt;installation path&gt;</i>
-<item>cd <i>&lt;installation path&gt;</i>
-<item>uncompress $XXX/otp_APN18101_beam_P1D.&lt;target&gt;.tar.Z
-<item>tar xvfp $XXX/otp_APN18101_beam_P1D.&lt;target&gt;.tar
-<item>./Install <i>&lt;installation path&gt;</i><br>
-The Install command will ask a number of questions during the installation.<br>
-<b>OBS!</b> When installing on a system where DNS is not used you
-should answer <b>NO</b> on the question "WILL YOU USE DNS?"
-<item>mkdir man/cat1 man/cat3
-<item>./format_man_pages
-<item>cd <i>&lt;installation path&gt;</i>/usr/lib and run ranlib on liberl_interface.a (only sunos4)
-</list>
-Add <i>&lt;installation path&gt;</i>/bin to the path variable and <i>&lt;installation path&gt;</i>/man to the MANPATH variable.
-<p>
-Where $XXX denotes the path at which otp_APN18101_beam_P1D.&lt;target&gt;.tar resides.
-<h1>Some useful notes</h1>
-<p>
-To make it possible to browse Framemaker documents through Netscape the files
-.mime.types and .mailcap should be modified (see below). The modifications
-can be made as systems defaults if they are placed in e.g /usr/local/lib/netscape (see Netscape Handbook for details) or as personal defaults if placed in the
-users $HOME directory.
-<p>
-.mime.types
-<p>
-<pre>
-application/x-maker fm
-</pre>
-<p>
-
-.mailcap
-<p>
-<pre>
-application/x-maker; fmclient -f %s
-</pre>
-<h1>Known problems in this release</h1>
-<p>
-<list>
-<item>Some html-links may still be faulty.
-</list>
-<h1>References</h1>
-<p>
-<i>Nothing to reference</i>
-
- </section>
-</report>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/system/doc/book.xml b/system/doc/book.xml
deleted file mode 100644
index d1ec093019..0000000000
--- a/system/doc/book.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE book SYSTEM "book.dtd">
-
-<book xmlns:xi="http://www.w3.org/2001/XInclude">
- <header titlestyle="normal">
- <copyright>
- <year>1997</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>Erlang/OTP System Documentation</title>
- <prepared>OTP Team</prepared>
- <docno></docno>
- <date>2009-08-21</date>
- <rev>A</rev>
- <file>book.xml</file>
- </header>
- <insidecover>
- </insidecover>
- <pagetext></pagetext>
- <preamble>
- <contents level="2"></contents>
- </preamble>
- <parts lift="no">
- <xi:include href="installation_guide/part.xml"/>
- <xi:include href="system_principles/part.xml"/>
- <xi:include href="embedded/part.xml"/>
- <xi:include href="getting_started/part.xml"/>
- <xi:include href="reference_manual/part.xml"/>
- <xi:include href="getting_started/part.xml"/>
- <xi:include href="efficiency_guide/part.xml"/>
- <xi:include href="tutorial/part.xml"/>
- <xi:include href="design_principles/part.xml"/>
- <xi:include href="oam/part.xml"/>
- </parts>
- <listofterms></listofterms>
- <index></index>
-</book>
-
diff --git a/system/doc/extensions/Makefile b/system/doc/extensions/Makefile
deleted file mode 100644
index cfc506f7e8..0000000000
--- a/system/doc/extensions/Makefile
+++ /dev/null
@@ -1,142 +0,0 @@
-# ``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/.
-#
-# 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$
-#
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-# ----------------------------------------------------
-# Application version
-# ----------------------------------------------------
-include $(ERL_TOP)/erts/vsn.mk
-#VSN=$(SYSTEM_VSN)
-
-# ----------------------------------------------------
-# Include dependency
-# ----------------------------------------------------
-
-include make.dep
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/doc/extensions
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-XML_PART_FILES = part.xml
-XML_CHAPTER_FILES = \
- funs.xml \
- macros.xml \
- misc.xml \
- include.xml \
- records.xml \
- list_comprehensions.xml \
- bit_syntax.xml
-
-BOOK_FILES = book.xml
-
-GIF_FILES = note.gif
-
-PS_FILES =
-
-# ----------------------------------------------------
-
-HTML_FILES = \
- $(XML_PART_FILES:%.xml=%.html)
-
-HTMLDIR = .
-EXTRA_FILES = $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_CHAPTER_FILES:%.xml=%.html)
-
-TEX_FILES_BOOK = \
- $(BOOK_FILES:%.xml=%.tex)
-TEX_FILES_USERS_GUIDE = \
- $(XML_CHAPTER_FILES:%.xml=%.tex)
-
-TOP_PDF_FILE = extensions-$(VSN).pdf
-TOP_PS_FILE = extensions-$(VSN).ps
-
-$(TOP_PDF_FILE): book.dvi $(ERL_TOP)/erts/vsn.mk
- $(DVI2PS) $(DVIPS_FLAGS) -f $< | $(DISTILL) $(DISTILL_FLAGS) > $@
-
-$(TOP_PS_FILE): book.dvi $(ERL_TOP)/erts/vsn.mk
- $(DVI2PS) $(DVIPS_FLAGS) -f $< > $@
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-
-ifeq ($(DOCTYPE),pdf)
-docs: pdf
-else
-ifeq ($(DOCTYPE),ps)
-docs: ps
-else
-docs: html
-endif
-endif
-
-pdf: $(TOP_PDF_FILE)
-
-ps: $(TOP_PS_FILE)
-
-html: $(HTML_FILES) $(GIF_FILES)
-
-debug opt:
-
-clean_tex:
- -rm -f $(TEX_FILES_USERS_GUIDE) $(TEX_FILES_BOOK)
-
-clean:
- rm -f *.html $(TEX_FILES_USERS_GUIDE)
- rm -f $(TOP_PS_FILES)
- rm -f errs core *~ $(LATEX_CLEAN)
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-ifeq ($(DOCTYPE),pdf)
-release_docs_spec: pdf
- $(INSTALL_DIR) $(RELEASE_PATH)/pdf
- $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELEASE_PATH)/pdf
-else
-ifeq ($(DOCTYPE),ps)
-release_docs_spec: ps
- $(INSTALL_DIR) $(RELEASE_PATH)/ps
- $(INSTALL_DATA) $(TOP_PS_FILE) $(RELEASE_PATH)/ps
-else
-release_docs_spec: docs
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTML_FILES) \
- $(RELSYSDIR)
-endif
-endif
-
-release_spec:
-
-
-
diff --git a/system/doc/extensions/bit_syntax.xml b/system/doc/extensions/bit_syntax.xml
deleted file mode 100644
index d86f73cd9a..0000000000
--- a/system/doc/extensions/bit_syntax.xml
+++ /dev/null
@@ -1,403 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>2000</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>The Bit Syntax</title>
- <prepared>Bj&ouml;rn Gustavsson</prepared>
- <responsible>Bjarne D&auml;cker</responsible>
- <docno>1</docno>
- <approved>Bjarne D&auml;Ker</approved>
- <checked></checked>
- <date>00-06-21</date>
- <rev>PA1</rev>
- <file>bit_syntax.sgml</file>
- </header>
- <p>This section describes the "bit syntax" which was added to
- the Erlang language in release 5.0 (R7).
- Compared to the original bit syntax prototype
- by Claes Wikstr&ouml;m and Tony Rogvall (presented on the
- Erlang User's Conference 1999), this implementation differs
- primarily in the following respects,
- </p>
- <list type="ordered">
- <item>
- <p>the character pairs '&lt;&lt;' and '&gt;&gt;' are used to delimit
- a binary patterns and constructor (not '&lt;' and '&gt;' as in
- the prototype),
- </p>
- </item>
- <item>
- <p>the tail syntax ('|Variable') has been eliminated,
- </p>
- </item>
- <item>
- <p>all size expressions must be bound,
- </p>
- </item>
- <item>
- <p>a type <c>unit:U</c> has been added,
- </p>
- </item>
- <item>
- <p>lists and tuples cannot be generated
- </p>
- </item>
- <item>
- <p>there are no paddings whatsoever.
- </p>
- </item>
- </list>
-
- <section>
- <title>Introduction</title>
- <p>In Erlang a Bin is used for constructing binaries and
- matching binary patterns. A Bin is written with the
- following syntax:</p>
- <code type="none"><![CDATA[
- <<E1, E2, ... En>>
- ]]></code>
- <p>A Bin is a low-level sequence of bytes. The purpose of a
- Bin is to be able to, from a high level,
- <em>construct</em> a binary,
- </p>
- <code type="none"><![CDATA[
- Bin = <<E1, E2, ... En>>
- ]]></code>
- <p>in which case all elements must be bound, or to
- <em>match</em> a binary,
- </p>
- <code type="none"><![CDATA[
- <<E1, E2, ... En>> = Bin
- ]]></code>
- <p>where <c>Bin</c> is bound, and where the elements are bound or unbound,
- as in any match.
- </p>
- <p>Each element specifies a certain <em>segment</em> of the binary.
- A segment is is a set of contiguous bits of the binary (not
- necessarily on a byte boundary). The first element specifies
- the initial segment, the second element specifies the following
- segment etc.
- </p>
- <p>The following examples illustrate how binaries are constructed
- or matched, and how elements and tails are specified.
- </p>
-
- <section>
- <title>Examples</title>
- <p><em>Example 1: </em>A binary can be constructed from a set of
- constants or a string literal:</p>
- <code type="none"><![CDATA[
- Bin11 = <<1, 17, 42>>,
- Bin12 = <<"abc">>
- ]]></code>
- <p>yields binaries of size 3; <c>binary_to_list(Bin11)</c>
- evaluates to <c>[1, 17, 42]</c>, and
- <c>binary_to_list(Bin12)</c> evaluates to <c>[97, 98, 99]</c>.
- </p>
- <p><em>Example 2: </em>Similarly, a binary can be constructed
- from a set of bound variables:</p>
- <code type="none"><![CDATA[
- A = 1, B = 17, C = 42,
- Bin2 = <<A, B, C:16>>
- ]]></code>
- <p>yields a binary of size 4, and <c>binary_to_list(Bin2)</c>
- evaluates to <c>[1, 17, 00, 42]</c> too. Here we used a
- <em>size expression</em> for the variable <c>C</c> in order to
- specify a 16-bits segment of <c>Bin2</c>.
- </p>
- <p><em>Example 3: </em>A Bin can also be used for matching: if
- <c>D</c>, <c>E</c>, and <c>F</c> are unbound variables, and
- <c>Bin2</c> is bound as in the former example,</p>
- <code type="none"><![CDATA[
- <<D:16, E, F/binary>> = Bin2
- ]]></code>
- <p>yields <c>D = 273</c>, <c>E = 00</c>, and F binds to a binary
- of size 1: <c>binary_to_list(F) = [42]</c>.
- </p>
- <p><em>Example 4: </em>The following is a more elaborate example
- of matching, where <c>Dgram</c> is bound to the consecutive
- bytes of an IP datagram of IP protocol version 4, and where we
- want to extract the header and the data of the datagram:</p>
- <code type="none"><![CDATA[
- -define(IP_VERSION, 4).
- -define(IP_MIN_HDR_LEN, 5).
-
- DgramSize = byte_size(Dgram),
- case Dgram of
- <<?IP_VERSION:4, HLen:4, SrvcType:8, TotLen:16,
- ID:16, Flgs:3, FragOff:13,
- TTL:8, Proto:8, HdrChkSum:16,
- SrcIP:32,
- DestIP:32, RestDgram/binary>> when HLen >= 5, 4*HLen =< DgramSize ->
- OptsLen = 4*(HLen - ?IP_MIN_HDR_LEN),
- <<Opts:OptsLen/binary,Data/binary>> = RestDgram,
- ...
- end.
- ]]></code>
- <p>Here the segment corresponding to the <c>Opts</c> variable
- has a <em>type modifier</em> specifying that <c>Opts</c> should
- bind to a binary. All other variables have the default type
- equal to unsigned integer.
- </p>
- <p>An IP datagram header is of variable length, and its length -
- measured in the number of 32-bit words - is given in the segment
- corresponding to <c>HLen</c>, the minimum value of which is
- 5. It is the segment corresponding to <c>Opts</c> that is
- variable: if <c>HLen</c> is equal to 5, <c>Opts</c> will be an
- empty binary.
- </p>
- <p>The tail variables <c>RestDgram</c> and <c>Data</c> bind to
- binaries, as all tail variables do. Both may bind to empty
- binaries.
- </p>
- <p>If the first 4-bits segment of <c>Dgram</c> is not equal to
- 4, or if <c>HLen</c> is less than 5, or if the size of
- <c>Dgram</c> is less than <c>4*HLen</c>, the match of
- <c>Dgram</c> fails.
- </p>
- </section>
- </section>
-
- <section>
- <title>A Lexical Note</title>
- <p>Note that "<c><![CDATA[B=<<1>>]]></c>" will be interpreted as
- "<c><![CDATA[B =< ;<1>>]]></c>", which is a syntax error.
- The correct way to write the expression is "<c><![CDATA[B = <<1>>]]></c>".</p>
- </section>
-
- <section>
- <title>Segments</title>
- <p>Each segment has the following general syntax:</p>
- <p><c>Value:Size/TypeSpecifierList</c></p>
- <p>Both the <c>Size</c> and the <c>TypeSpecifier</c> or both may be
- omitted; thus the following variations are allowed:
- </p>
- <p><c>Value</c></p>
- <p><c>Value:Size</c></p>
- <p><c>Value/TypeSpecifierList</c></p>
- <p>Default values will be used for missing specifications. The default
- values are described in the section "Defaults" below.
- </p>
- <p>Used in binary construction, the <c>Value</c> part is any expression.
- Used in binary matching, the <c>Value</c> part must be a literal or
- variable. You can read more about the <c>Value</c> part in the
- sections about constructing binaries and matching binaries.
- </p>
- <p>The <c>Size</c> part of the segment multiplied by the unit in the
- <c>TypeSpecifierList</c> (described below) gives the number of bits
- for the segment. In construction, <c>Size</c> is any expression that
- evaluates to an integer. In matching, <c>Size</c> must be a constant
- expression or a variable.
- </p>
- <p>The <c>TypeSpecifierList</c> is a list of type specifiers separated by
- hyphens.
- </p>
- <taglist>
- <tag>Type</tag>
- <item>The type can be <c>integer</c>, <c>float</c>, or <c>binary</c>.</item>
- <tag>Signedness</tag>
- <item>The signedness specification can be either <c>signed</c>
- or <c>unsigned</c>. Note that signedness only matters for matching.</item>
- <tag>Endianness</tag>
- <item>The endianness specification can be either <c>big</c>,
- <c>little</c>, or <c>native</c>. Native-endian means that
- the endian will be resolved at load time to be either
- big-endian or little-endian, depending on what is "native"
- for the CPU that the Erlang machine is run on.</item>
- <tag>Unit</tag>
- <item>The unit size is given as <c>unit:IntegerLiteral</c>.
- The allowed range is 1-256. It will be multiplied by the <c>Size</c>
- specifier to give the effective size of the segment.</item>
- </taglist>
- <p>Example:
- </p>
- <code type="none">
-X:4/little-signed-integer-unit:8
- </code>
- <p>This element has a total size of 4*8 = 32 bits, and it contains a
- signed integer in little-endian order.</p>
- </section>
-
- <section>
- <title>Defaults</title>
- <p>The default type for a segment is <c>integer</c>. The default type
- does <em>not</em> depend on the value, even if the value is a literal.
- For instance, the default type in '<c><![CDATA[<<3.14>>]]></c>' is <c>integer</c>,
- not <c>float</c>.
- </p>
- <p>The default <c>Size</c> depends on the type.
- For <c>integer</c> it is 8. For <c>float</c> it is 64.
- For <c>binary</c> it is all of the binary. In matching, this default
- value is only valid for the very last element. All other binary elements
- in matching must have a size specification.
- </p>
- <p>The default unit depends on the the type.
- For <c>integer</c> and <c>float</c> it is 1.
- For <c>binary</c> it is 8.
- </p>
- <p>The default signedness is <c>unsigned</c>.
- </p>
- <p>The default endianness is <c>big</c>.</p>
- </section>
-
- <section>
- <title>Constructing Binaries</title>
- <p>This section describes the rules for constructing binaries using
- the bit syntax. Unlike when constructing lists or tuples, the construction
- of a binary can fail with a <c>badarg</c> exception.
- </p>
- <p>There can be zero or more segments in a binary to be constructed.
- The expression '<c><![CDATA[<<>>]]></c>' constructs a zero length binary.
- </p>
- <p>Each segment in a binary can consist of zero or more bits.
- There are no alignment rules for individual segments, but the total
- number of bits in all segments must be evenly divisible by 8,
- or in other words, the resulting binary must consist of a whole number
- of bytes. An <c>badarg</c> exception will be thrown if the resulting
- binary is not byte-aligned. Example:
- </p>
- <code type="none"><![CDATA[
-<<X:1,Y:6>>
- ]]></code>
- <p>The total number of bits is 7, which is not evenly divisible by 8;
- thus, there will be <c>badarg</c> exception (and a compiler warning
- as well). The following example
- </p>
- <code type="none"><![CDATA[
-<<X:1,Y:6,Z:1>>
- ]]></code>
- <p>will successfully construct a binary of 8 bits, or one byte. (Provided
- that all of X, Y and Z are integers.)
- </p>
- <p>As noted earlier, segments have the following general syntax:
- </p>
- <p><c>Value:Size/TypeSpecifierList</c></p>
- <p>When constructing binaries, <c>Value</c> and <c>Size</c> can be
- any Erlang expression. However, for syntactical reasons,
- both <c>Value</c> and <c>Size</c> must be enclosed in parenthesis
- if the expression consists of anything more than a single literal
- or variable. The following gives a compiler syntax error:
- </p>
- <code type="none"><![CDATA[
-<<X+1:8>>
- ]]></code>
- <p>This expression must be rewritten to
- </p>
- <code type="none"><![CDATA[
-<<(X+1):8>>
- ]]></code>
- <p>in order to be accepted by the compiler.
- </p>
-
- <section>
- <title>Including Literal Strings</title>
- <p>As syntactic sugar, an literal string may be written instead of a
- element.</p>
- <code type="none"><![CDATA[
-<<"hello">> ]]></code>
- <p>which is syntactic sugar for</p>
- <code type="none"><![CDATA[
-<<$h,$e,$l,$l,$o>> ]]></code>
- </section>
- </section>
-
- <section>
- <title>Matching Binaries</title>
- <p>This section describes the rules for matching binaries using the
- bit syntax.
- </p>
- <p>There can be zero or more segments in a binary binary pattern.
- A binary pattern can occur in every place patterns are allowed, also
- inside other patterns. Binary patterns cannot be nested.
- </p>
- <p>The pattern '<c><![CDATA[<<>>]]></c>' matches a zero length binary.
- </p>
- <p>Each segment in a binary can consist of zero or more bits.
- </p>
- <p>A segment of type <c>binary</c> must have a size evenly divisible by 8.
- </p>
- <p>This means that the following head will never match:</p>
- <code type="none"><![CDATA[
-foo(<<X:7/binary,Y:1/binary>>) -> ]]></code>
- <p>As noted earlier, segments have the following general syntax:
- </p>
- <p><c>Value:Size/TypeSpecifierList</c></p>
- <p>When matching <c>Value</c> value must be either a variable or an integer
- or floating point literal. Expressions are not allowed.
- </p>
- <p><c>Size</c> must be an integer literal, or a previously bound variable.
- Note that the following is not allowed:</p>
- <code type="none"><![CDATA[
-foo(N, <<X:N,T/binary>>) ->
- {X,T}. ]]></code>
- <p>The two occurrences of <c>N</c> are not related. The compiler
- will complain that the <c>N</c> in the size field is unbound.
- </p>
- <p>The correct way to write this example is like this:</p>
- <code type="none"><![CDATA[
-foo(N, Bin) ->
- <<X:N,T/binary>> = Bin,
- {X,T}. ]]></code>
-
- <section>
- <title>Getting the Rest of the Binary</title>
- <p>To match out the rest of binary, specify a binary field without size:</p>
- <code type="none"><![CDATA[
-foo(<<A:8,Rest/binary>>) -> ]]></code>
- <p>As always, the size of the tail must be evenly divisible by 8.
- </p>
- </section>
- </section>
-
- <section>
- <title>Traps and Pitfalls</title>
- <p>Assume that we need a function that creates a binary out of a
- list of triples of integers. A first (inefficient) version of such
- a function could look like this:</p>
- <code type="none"><![CDATA[
-triples_to_bin(T) ->
- triples_to_bin(T, <<>>).
-
-triples_to_bin([{X,Y,Z} | T], Acc) ->
- triples_to_bin(T, <<Acc/binary, X:32, Y:32, Z:32>>); % inefficient
-triples_to_bin([], Acc) ->
- Acc. ]]></code>
- <p>The reason for the inefficiency of this function is that for
- each triple, the binary constructed so far (<c>Acc</c>) is copied.
- (Note: The original bit syntax prototype avoided the copy operation
- by using segmented binaries, which are not implemented in R7.)
- </p>
- <p>The efficient way to write this function in R7 is:</p>
- <code type="none"><![CDATA[
-triples_to_bin(T) ->
- triples_to_bin(T, []).
-
-triples_to_bin([{X,Y,Z} | T], Acc) ->
- triples_to_bin(T, [<<X:32, Y:32, Z:32>> | Acc]);
-triples_to_bin([], Acc) ->
- list_to_binary(lists:reverse(Acc)). ]]></code>
- <p>Note that <c>list_to_binary/1</c> handles deep lists of binaries
- and small integers. (This fact was previously undocumented.)
- </p>
- </section>
-</chapter>
-
diff --git a/system/doc/extensions/book.xml b/system/doc/extensions/book.xml
deleted file mode 100644
index ffdbe6cb44..0000000000
--- a/system/doc/extensions/book.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE book SYSTEM "book.dtd">
-
-<book>
- <header titlestyle="normal">
- <copyright>
- <year>1997</year>
- <year>2007</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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>Erlang Extensions Since 4.4</title>
- <prepared>OTP Team</prepared>
- <docno></docno>
- <date>1997-05-21</date>
- <rev></rev>
- <file>book.sgml</file>
- </header>
- <insidecover>
- </insidecover>
- <pagetext>Erlang Extensions Since 4.4</pagetext>
- <preamble>
- <contents level="2"></contents>
- </preamble>
- <parts lift="no">
- <include file="part"></include>
- </parts>
- <listofterms></listofterms>
- <index></index>
-</book>
-
diff --git a/system/doc/extensions/fun_test.erl b/system/doc/extensions/fun_test.erl
deleted file mode 100644
index 8472fd87f8..0000000000
--- a/system/doc/extensions/fun_test.erl
+++ /dev/null
@@ -1,17 +0,0 @@
-%1
--module(fun_test).
--export([t1/0, t2/0, t3/0, t4/0, double/1]).
--import(lists, [map/2]).
-
-t1() -> map(fun(X) -> 2 * X end, [1,2,3,4,5]).
-
-t2() -> map(fun double/1, [1,2,3,4,5]).
-
-t3() -> map({?MODULE, double}, [1,2,3,4,5]).
-
-double(X) -> X * 2.
-%1
-
-
-t4() ->
- "hello world".
diff --git a/system/doc/extensions/funparse.erl b/system/doc/extensions/funparse.erl
deleted file mode 100644
index 5e23c90df9..0000000000
--- a/system/doc/extensions/funparse.erl
+++ /dev/null
@@ -1,74 +0,0 @@
--module(funparse).
--compile(export_all).
--import(lists, [reverse/1]).
-
-%17
-%% > hof:parse([a,c]).
-%% {ok,{'and',{'or',1,{const,a}},{'or',1,{const,c}}}}
-%% > hof:parse([a,d]).
-%% {ok,{'and',{'or',1,{const,a}},{'or',2,{const,d}}}}
-%% > hof:parse([b,c]).
-%% {ok,{'and',{'or',2,{const,b}},{'or',1,{const,c}}}}
-%% > hof:parse([b,d]).
-%% {ok,{'and',{'or',2,{const,b}},{'or',2,{const,d}}}}
-%% > hof:parse([a,b]).
-%% fail
-%17
-
-%% Grammar = (a | b) & (c | d)
-
-%12
-parse(List) ->
- (grammar())(List).
-%12
-
-%13
-grammar() ->
- pand(
- por(pconst(a), pconst(b)),
- por(pconst(c), pconst(d))).
-%13
-
-%14
-pconst(X) ->
- fun (T) ->
- case T of
- [X|T1] -> {ok, {const, X}, T1};
- _ -> fail
- end
- end.
-%14
-
-%15
-por(P1, P2) ->
- fun (T) ->
- case P1(T) of
- {ok, R, T1} ->
- {ok, {'or',1,R}, T1};
- fail ->
- case P2(T) of
- {ok, R1, T1} ->
- {ok, {'or',2,R1}, T1};
- fail ->
- fail
- end
- end
- end.
-%15
-
-%16
-pand(P1, P2) ->
- fun (T) ->
- case P1(T) of
- {ok, R1, T1} ->
- case P2(T1) of
- {ok, R2, T2} ->
- {ok, {'and', R1, R2}};
- fail ->
- fail
- end;
- fail ->
- fail
- end
- end.
-%16
diff --git a/system/doc/extensions/funs.xml b/system/doc/extensions/funs.xml
deleted file mode 100644
index f9c003c8ee..0000000000
--- a/system/doc/extensions/funs.xml
+++ /dev/null
@@ -1,486 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1997</year>
- <year>2007</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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>Programming with Funs</title>
- <prepared>Joe Armstrong</prepared>
- <responsible>Bjarne D&auml;cker</responsible>
- <docno>1</docno>
- <approved>Bjarne D&auml;Ker</approved>
- <checked></checked>
- <date>96-01-16</date>
- <rev>PA1</rev>
- <file>funs.sgml</file>
- </header>
- <p>This section introduces functional objects (Funs). That is a new data type introduced in Erlang 4.4. Functions which takes Funs as arguments, or which return Funs are called higher order functions.</p>
- <list type="bulleted">
- <item>Funs can be passed as arguments to other functions, just like lists or tuples</item>
- <item>functions can be written which return Funs, just like any other data object.</item>
- </list>
-
- <section>
- <title>Higher Order Functions </title>
- <p>Funs encourages us to encapsulate common patterns of design into functional forms called higher order functions. These functions not only shortens programs, but also produce clearer programs because the intended meaning of the program is explicitly rather than implicitly stated.</p>
- <p>The concepts of higher order functions and procedural abstraction are introduced with two brief examples.</p>
-
- <section>
- <title>Example 1 - map</title>
- <p>If we want to double every element in a list, we could write a function named <c>double</c>:</p>
- <code type="none">
-
-double([H|T]) -> [2*H|double(T)];
-double([]) -> [] </code>
- <p>This function obviously doubles the argument entered as input as follows:</p>
- <pre>
-
-> <input>double([1,2,3,4]).</input>
-[2,4,6,8] </pre>
- <p>We now add the function <c>add_one</c>, which adds one to every element in a list:</p>
- <code type="none">
-
-add_one([H|T]) -> [H+1|add_one(T)];
-add_one([]) -> []. </code>
- <p>These functions, <c>double</c> and <c>add_one</c>, have a very similar structure. We can exploit this fact and write a function <c>map</c> which expresses this similarity:</p>
- <codeinclude file="funs1.erl" tag="%1" type="erl"></codeinclude>
- <p>We can now express the functions <c>double</c> and <c>add_one</c> in terms of <c>map</c> as follows:</p>
- <code type="none">
-
-double(L) -> map(fun(X) -> 2*X end, L).
-add_one(L) -> map(fun(X) -> 1 + X end, L). </code>
- <p><c>map(F, List)</c> is a function which takes a function <c>F</c> and a list <c>L</c> as arguments and
- returns the new list which is obtained by applying <c>F</c> to each of the elements in <c>L</c>.</p>
- <p>The process of abstracting out the common features of a number of different programs is called procedural abstraction. Procedural abstraction can be used in order to write several different functions which have a similar structure, but differ only in some minor detail. This is done as follows:</p>
- <list type="ordered">
- <item>write one function which represents the common features of these functions</item>
- <item>parameterize the difference in terms of functions which are passed as arguments to the common function.</item>
- </list>
- </section>
-
- <section>
- <title>Example 2 - foreach</title>
- <p>This example illustrates procedural abstraction. Initially, we show the following two examples written as conventional functions:</p>
- <list type="ordered">
- <item>all elements of a list are printed onto a stream</item>
- <item>a message is broadcast to a list of processes.</item>
- </list>
- <code type="none">
-
-print_list(Stream, [H|T]) ->
- io:format(Stream, "~p~n", [H]),
- print_list(Stream, T);
-print_on_list(Stream, []) ->
- true. </code>
- <code type="none">
-
-broadcast(Msg, [Pid|Pids]) ->
- Pid ! Msg,
- broadcast(Msg, Pids);
-broadcast(_, []) ->
- true. </code>
- <p>Both these functions have a very similar structure. They both iterate over a list doing something to each element in the list. The "something" has to be carried round as an extra argument to the function which does this.</p>
- <p>The function <c>foreach</c> expresses this similarity:</p>
- <codeinclude file="funs1.erl" tag="%2" type="erl"></codeinclude>
- <p>Using <c>foreach</c>, <c>print_on_list</c> becomes:</p>
- <code type="none">
-
-foreach(fun(H) -> io:format(S, "~p~n~,[H]) end, L) </code>
- <p><c>broadcast</c> becomes:</p>
- <code type="none">
-
-foreach(fun(Pid) -> Pid ! M end, L) </code>
- <p><c>foreach</c> is evaluated for its side-effect and not its value. <c>foreach(Fun ,L)</c> calls <c>Fun(X)</c> for each element <c>X</c> in <c>L</c> and the processing occurs in the order in which the elements were defined in <c>L</c>. <c>map</c> does not define the order in which its elements are processed.</p>
- </section>
- </section>
-
- <section>
- <title>Advantages of Higher Order Functions</title>
- <p>Programming with higher order functions, such as <c>map</c> and <c>foreach</c>, has a number of advantages:</p>
- <list type="bulleted">
- <item>It is much easier to understand the program and the intention of the programmer is clearly expressed in the code. The statement <c>foreach(fun(X) -></c> clearly indicates that the intention of this program is to do something to each element in the list <c>L</c>. We also know that the function which is passed as the first argument of <c>foreach</c> takes one argument <c>X</c>, which will be successively bound to each of the elements in <c>L</c>.</item>
- <item>Functions which take Funs as arguments are much easier to re-use than other functions. </item>
- </list>
- </section>
-
- <section>
- <title>The Syntax of Funs</title>
- <p>Funs are written with the syntax:</p>
- <code type="none">
-
-F = fun (Arg1, Arg2, ... ArgN) ->
- ...
- end </code>
- <p>This creates an anonymous function of <c>N</c> arguments and binds it to the variable <c>F</c>.</p>
- <p>If we have already written a function in the same module and wish to pass this function as an argument, we can use the following syntax:</p>
- <code type="none">
-
-F = fun FunctionName/Arity </code>
- <p>With this form of function reference, the function which is referred to does not need to be exported from the module.</p>
- <p>We can also refer to a function defined in a different module with the following syntax:</p>
- <code type="none">
-
-F = {Module, FunctionName} </code>
- <p>In this case, the function must be exported from the module in question.</p>
- <p>The follow program illustrates the different ways of creating Funs:</p>
- <codeinclude file="fun_test.erl" tag="%1" type="erl"></codeinclude>
- <p>We can evaluate the fun <c>F</c> with the syntax:</p>
- <code type="none">
-
-F(Arg1, Arg2, ..., Argn) </code>
- <p>To check whether a term is a Fun, use the test <c>function/1</c>
- in a guard. Example:</p>
- <code type="none">
-f(F, Args) when function(F) ->
- apply(F, Args);
-f(N, _) when integer(N) ->
- N. </code>
- <p>Funs are a distinct type. The BIFs erlang:fun_info/1,2 can
- be used to retrieve information about a fun, and the BIF
- erlang:fun_to_list/1 returns a textual representation of a fun.
- The check_process_code/2 BIF returns true if the
- process contains funs that depend on the old version of
- a module.</p>
- <note>
- <p>In OTP R5 and earlier releases, funs were represented
- using tuples.</p>
- </note>
- </section>
-
- <section>
- <title>Variable Bindings within a Fun</title>
- <p>The scope rules for variables which occur in Funs are as follows:</p>
- <list type="bulleted">
- <item>All variables which occur in the head of a Fun are assumed to be "fresh" variables.</item>
- <item>Variables which are defined before the Fun, and which occur in function calls or guard tests within the Fun, have the values they had outside the Fun.</item>
- <item>No variables may be exported from a Fun.</item>
- </list>
- <p>The following examples illustrate these rules:</p>
- <code type="none">
-
-print_list(File, List) ->
- {ok, Stream} = file:open(File, write),
- foreach(fun(X) -> io:format(Stream,"~p~n",[X]) end, List),
- file:close(Stream). </code>
- <p>In the above example, the variable <c>X</c> which is defined in the head of the Fun is a new variable. The value of the variable <c>Stream</c> which is used within within the Fun gets its value from the
- <c>file:open</c> line.</p>
- <p>Since any variable which occurs in the head of a Fun is considered a new variable it would be equally valid to write:</p>
- <code type="none">
-
-print_list(File, List) ->
- {ok, Stream} = file:open(File, write),
- foreach(fun(File) ->
- io:format(Stream,"~p~n",[File])
- end, List),
- file:close(Stream). </code>
- <p>In this example, <c>File</c> is used as the new variable instead of <c>X</c>. This is rather silly since code in the body of the Fun cannot refer to the variable <c>File</c> which is defined outside the Fun. Compiling this example will yield the diagnostic:</p>
- <code type="none">
-
-./FileName.erl:Line: Warning: variable 'File'
- shadowed in 'lambda head' </code>
- <p>This reminds us that the variable <c>File</c> which is defined inside the Fun collides with the variable <c>File</c> which is defined outside the Fun.</p>
- <p>The rules for importing variables into a Fun has the consequence that certain pattern matching operations have to be moved into guard expressions and cannot be written in the head of the Fun. For example, we might write the following code if we intend the first clause of <c>F</c> to be evaluated when the value of its argument is <c>Y</c>:</p>
- <code type="none">
-
-f(...) ->
- Y = ...
- map(fun(X) when X == Y ->
- ;
- (_) ->
- ...
- end, ...)
- ... </code>
- <p>instead of</p>
- <code type="none">
-
-f(...) ->
- Y = ...
- map(fun(Y) ->
- ;
- (_) ->
- ...
- end, ...)
- ... </code>
- </section>
-
- <section>
- <title>Funs and the Module Lists</title>
- <p>The following examples show a dialogue with the Erlang shell. All the higher order functions discussed are exported from the module <c>lists</c>.</p>
-
- <section>
- <title>map</title>
- <codeinclude file="funs1.erl" tag="%1" type="erl"></codeinclude>
- <p><c>map</c> takes a function of one argument and a list of terms. It returns the list obtained by applying the function to every argument in the list.</p>
- <pre>
-
-1> <input>Double = fun(X) -> 2 * X end.</input>
-#Fun&lt;erl_eval>
-2><input>lists:map(Double, [1,2,3,4,5]).</input>
-[2,4,6,8,10] </pre>
- <p>When a new Fun is defined in the shell, the value of the Fun is printed as <c><![CDATA[Fun#<erl_eval>]]></c></p>
- </section>
-
- <section>
- <title>any</title>
- <codeinclude file="funs1.erl" tag="%4" type="erl"></codeinclude>
- <p><c>any</c> takes a predicate <c>P</c> of one argument and a list of terms. A predicate is a function which returns <c>true</c> or <c>false</c>. <c>any</c> is true if there is a term <c>X</c> in the list such that <c>P(X)</c> is <c>true</c>.</p>
- <p>We define a predicate <c>Big(X)</c> which is <c>true</c> if its argument is greater that 10.</p>
- <pre>
-
-3> <input>Big = fun(X) -> if X > 10 -> true; true -> false end end.</input>
-#Fun&lt;erl_eval>
-4><input>lists:any(Big, [1,2,3,4]).</input>
-false.
-5> <input>lists:any(Big, [1,2,3,12,5]).</input>
-true. </pre>
- </section>
-
- <section>
- <title>all</title>
- <codeinclude file="funs1.erl" tag="%3" type="erl"></codeinclude>
- <p><c>all</c> has the same arguments as <c>any</c>. It is true if the predicate applied to all elements in the list is true.</p>
- <pre>
-
-6><input>lists:all(Big, [1,2,3,4,12,6]).</input>
-false
-7><input>lists:all(Big, [12,13,14,15]).</input>
-true </pre>
- </section>
-
- <section>
- <title>foreach</title>
- <codeinclude file="funs1.erl" tag="%2" type="erl"></codeinclude>
- <p><c>foreach</c> takes a function of one argument and a list of terms. The function is applied to each argument in the list. <c>foreach</c> returns <c>ok</c>. It is used for its side-effect only.</p>
- <pre>
-
-8> <input>lists:foreach(fun(X) -> io:format("~w~n",[X]) end, [1,2,3,4]).</input>
-1
-2
-3
-4
-true </pre>
- </section>
-
- <section>
- <title>foldl</title>
- <codeinclude file="funs1.erl" tag="%8" type="erl"></codeinclude>
- <p><c>foldl</c> takes a function of two arguments, an accumulator and a list. The function is called with two arguments. The first argument is the successive elements in the list, the second argument is the accumulator. The function must return a new accumulator which is used the next time the function is called.</p>
- <p>If we have a list of lists <c>L = ["I","like","Erlang"]</c>, then we can sum the lengths of all the strings in <c>L</c> as follows:</p>
- <pre>
-
-9> <input>L = ["I","like","Erlang"].</input>
-["I","like","Erlang"]
-10> <input>lists:foldl(fun(X, Sum) -> length(X) + Sum end, 0, L).</input>
-11 </pre>
- <p><c>foldl</c> works like a <c>while</c> loop in an imperative language:</p>
- <code type="none">
-
- L = ["I","like","Erlang"],
- Sum = 0,
- while( L != []){
- Sum += length(head(L)),
- L = tail(L)
- end </code>
- </section>
-
- <section>
- <title>mapfoldl</title>
- <codeinclude file="funs1.erl" tag="%10" type="erl"></codeinclude>
- <p><c>mapfoldl</c> simultaneously maps and folds over a list. The following example shows how to change all letters in <c>L</c> to upper case and count them.</p>
- <p>First upcase:</p>
- <pre>
-
-11> <input>Upcase = fun(X) when $a =&lt; X, X =&lt; $z -> X + $A - $a;</input>
-<input>(X) -> X</input>
-<input>end.</input>
-#Fun&lt;erl_eval>
-12> <input>Upcase_word =</input>
-<input>fun(X) -></input>
-<input>lists:map(Upcase, X)</input>
-<input>end.</input>
-#Fun&lt;erl_eval>
-13><input>Upcase_word("Erlang").</input>
-"ERLANG"
-14><input>lists:map(Upcase_word, L).</input>
-["I","LIKE","ERLANG"] </pre>
- <p>Now we can do the fold and the map at the same time:</p>
- <pre>
-
-14> <input>lists:mapfoldl(fun(Word, Sum) -></input>
-14> <input>{Upcase_word(Word), Sum + length(Word)}</input>
-14> <input>end, 0, L).</input>
-{["I","LIKE","ERLANG"],11} </pre>
- </section>
-
- <section>
- <title>filter</title>
- <codeinclude file="funs1.erl" tag="%9" type="erl"></codeinclude>
- <p><c>filter</c> takes a predicate of one argument and a list and returns all element in the list which satisfy the predicate.</p>
- <pre>
-
-15><input>lists:filter(Big, [500,12,2,45,6,7]).</input>
-[500,12,45] </pre>
- <p>When we combine maps and filters we can write very succinct and obviously correct code. For example, suppose we want to define a set difference function. We want to define <c>diff(L1, L2)</c> to be the difference between the lists <c>L1</c> and <c>L2</c>.
- This is the list of all elements in L1 which are not contained in L2. This code can be written as follows:</p>
- <code type="none">
-
-diff(L1, L2) ->
- filter(fun(X) -> not member(X, L2) end, L1). </code>
- <p>The AND intersection of the list <c>L1</c> and <c>L2</c> is also easily defined:</p>
- <code type="none">
-
-intersection(L1,L2) -> filter(fun(X) -> member(X,L1) end, L2). </code>
- </section>
-
- <section>
- <title>takewhile</title>
- <codeinclude file="funs1.erl" tag="%5" type="erl"></codeinclude>
- <p><c>takewhile(P, L)</c> takes elements <c>X</c> from a list <c>L</c> as long as the predicate <c>P(X)</c> is true.</p>
- <pre>
-
-16><input>lists:takewhile(Big, [200,500,45,5,3,45,6]).</input>
-[200,500,45] </pre>
- </section>
-
- <section>
- <title>dropwhile</title>
- <codeinclude file="funs1.erl" tag="%6" type="erl"></codeinclude>
- <p><c>dropwhile</c> is the complement of <c>takewhile</c>.</p>
- <pre>
-
-17> <input>lists:dropwhile(Big, [200,500,45,5,3,45,6]).</input>
-[5,3,45,6] </pre>
- </section>
-
- <section>
- <title>splitlist</title>
- <codeinclude file="funs1.erl" tag="%7" type="erl"></codeinclude>
- <p><c>splitlist(P, L)</c> splits the list <c>L</c> into the two sub-lists <c>{L1, L2}</c>, where <c>L = takewhile(P, L)</c> and <c>L2 = dropwhile(P, L)</c>.</p>
- <pre>
-
-18><input>lists:splitlist(Big, [200,500,45,5,3,45,6]).</input>
-{[200,500,45],[5,3,45,6]} </pre>
- </section>
-
- <section>
- <title>first</title>
- <codeinclude file="funs1.erl" tag="%11" type="erl"></codeinclude>
- <p><c>first</c> returns <c>{true, R}</c>, where <c>R</c> is the first element in a list satisfying a predicate or <c>false</c>:</p>
- <pre>
-
-19><input>lists:first(Big, [1,2,45,6,123]).</input>
-{true,45}
-20><input>lists:first(Big, [1,2,4,5]). </input>
-false </pre>
- </section>
- </section>
-
- <section>
- <title>Funs which Return Funs</title>
- <p>So far, this section has only described functions which take Funs as arguments. It is also possible to write more powerful functions which themselves return Funs. The following examples illustrate these type of functions.</p>
-
- <section>
- <title>Simple Higher Order Functions</title>
- <p><c>Adder(X)</c> is a function which, given <c>X</c>, returns a new function <c>G</c> such that <c>G(K)</c> returns <c>K + X</c>.</p>
- <pre>
-
-21> <input>Adder = fun(X) -> fun(Y) -> X + Y end end.</input>
-#Fun&lt;erl_eval>
-22> <input>Add6 = Adder(6).</input>
-#Fun&lt;erl_eval>
-23><input>Add6(10).</input>
-16 </pre>
- </section>
-
- <section>
- <title>Infinite Lists</title>
- <p>The idea is to write something like:</p>
- <code type="none">
-
--module(lazy).
--export([ints_from/1]).
-ints_from(N) ->
- fun() ->
- [N|ints_from(N+1)]
- end. </code>
- <p>Then we can proceed as follows:</p>
- <code type="none"><![CDATA[
-
-24> XX = lazy:ints_from(1).
-#Fun<lazy>
-25> XX().
-[1|#Fun<lazy>]
-26> hd(XX()).
-1
-27> Y = tl(XX()).
-#Fun<lazy>
-28> hd(Y()).
-2 ]]></code>
- <p>etc. - this is an example of "lazy embedding"</p>
- </section>
-
- <section>
- <title>Parsing</title>
- <p>The following examples show parsers of the following type:</p>
- <pre>
-Parser(Toks) -> {ok, Tree, Toks1} | fail </pre>
- <p><c>Toks</c> is the list of tokens to be parsed. A successful parse returns <c>{ok, Tree, Toks1}</c>, where <c>Tree</c> is a parse tree and <c>Toks1</c> is a tail of <c>Tree</c> which contains symbols encountered after the structure which was correctly parsed. Otherwise <c>fail</c> is returned.</p>
- <p>The example which follows illustrates a simple, functional parser which parses the grammar:</p>
- <pre>
-(a | b) &amp; (c | d) </pre>
- <p>The following code defines a function <c>pconst(X)</c> in the module <c>funparse</c>, which returns a Fun which parses a list of tokens.</p>
- <codeinclude file="funparse.erl" tag="%14" type="erl"></codeinclude>
- <p>This function can be used as follows:</p>
- <pre>
-29><input>P1 = funparse:pconst(a).</input>
-#Fun&lt;hof>
-30> <input>P1([a,b,c]).</input>
-{ok,{const,a},[b,c]}
-31> <input>P1([x,y,z]).</input>
-fail </pre>
- <p>Next, we define the two higher order functions <c>pand</c> and <c>por</c> which combine primitive parsers to produce more complex parsers. Firstly <c>pand</c>:</p>
- <codeinclude file="funparse.erl" tag="%16" type="erl"></codeinclude>
- <p>Given a parser <c>P1</c> for grammar <c>G1</c>, and a parser <c>P2</c> for grammar <c>G2</c>, <c>pand(P1, P2)</c>
- returns a parser for the grammar which consists of sequences of tokens which satisfy <c>G1</c> followed by sequences of tokens which satisfy <c>G2</c>.</p>
- <p><c>por(P1, P2)</c> returns a parser for the language described by the grammar <c>G1</c> or <c>G2</c>.</p>
- <codeinclude file="funparse.erl" tag="%15" type="erl"></codeinclude>
- <p>The original problem was to parse the grammar <c><![CDATA[(a | b) & (c | d)]]></c>. The following code addresses this problem: </p>
- <codeinclude file="funparse.erl" tag="%13" type="erl"></codeinclude>
- <p>The following code adds a parser interface to the grammar:</p>
- <codeinclude file="funparse.erl" tag="%12" type="erl"></codeinclude>
- <p>We can test this parser as follows:</p>
- <pre>
-
-32> <input>funparse:parse([a,c]).</input>
-{ok,{'and',{'or',1,{const,a}},{'or',1,{const,c}}}}
-33> <input>funparse:parse([a,d]).</input>
-{ok,{'and',{'or',1,{const,a}},{'or',2,{const,d}}}}
-34> <input>funparse:parse([b,c]).</input>
-{ok,{'and',{'or',2,{const,b}},{'or',1,{const,c}}}}
-35> <input>funparse:parse([b,d]).</input>
-{ok,{'and',{'or',2,{const,b}},{'or',2,{const,d}}}}
-36> <input>funparse:parse([a,b]).</input>
-fail </pre>
- </section>
- </section>
-</chapter>
-
diff --git a/system/doc/extensions/funs1.erl b/system/doc/extensions/funs1.erl
deleted file mode 100644
index b1a3e21525..0000000000
--- a/system/doc/extensions/funs1.erl
+++ /dev/null
@@ -1,125 +0,0 @@
--module(funs1).
--compile(export_all).
--import(lists, [reverse/1]).
-
-%1
-map(F, [H|T]) -> [F(H)|map(F, T)];
-map(F, []) -> [].
-%1
-
-%2
-foreach(F, [H|T]) ->
- F(H),
- foreach(F, T);
-foreach(F, []) ->
- ok.
-%2
-%
-%3
-all(Pred, [H|T]) ->
- case Pred(H) of
- true -> all(Pred, T);
- false -> false
- end;
-all(Pred, []) ->
- true.
-%3
-%4
-any(Pred, [H|T]) ->
- case Pred(H) of
- true -> true;
- false -> any(Pred, T)
- end;
-any(Pred, []) ->
- false.
-%4
-%5
-takewhile(Pred, [H|T]) ->
- case Pred(H) of
- true -> [H|takewhile(Pred, T)];
- false -> []
- end;
-takewhile(Pred, []) ->
- [].
-%5
-%6
-dropwhile(Pred, [H|T]) ->
- case Pred(H) of
- true -> dropwhile(Pred, T);
- false -> [H|T]
- end;
-dropwhile(Pred, []) ->
- [].
-%6
-%7
-splitlist(Pred, L) ->
- splitlist(Pred, L, []).
-
-splitlist(Pred, [H|T], L) ->
- case Pred(H) of
- true -> splitlist(Pred, T, [H|L]);
- false -> {reverse(L), [H|T]}
- end;
-splitlist(Pred, [], L) ->
- {reverse(L), []}.
-%7
-
-flatmap(F, [Hd|Tail]) ->
- F(Hd) ++ flatmap(F, Tail);
-flatmap(F, []) -> [].
-
-%8
-foldl(F, Accu, [Hd|Tail]) ->
- foldl(F, F(Hd, Accu), Tail);
-foldl(F, Accu, []) -> Accu.
-%8
-%
-foldr(F, Accu, [Hd|Tail]) ->
- F(Hd, foldr(F, Accu, Tail));
-foldr(F, Accu, []) -> Accu.
-%9
-filter(F, [H|T]) ->
- case F(H) of
- true -> [H|filter(F, T)];
- false -> filter(F, T)
- end;
-filter(F, []) -> [].
-%9
-%10
-mapfoldl(F, Accu0, [Hd|Tail]) ->
- {R,Accu1} = F(Hd, Accu0),
- {Rs,Accu2} = mapfoldl(F, Accu1, Tail),
- {[R|Rs], Accu2};
-mapfoldl(F, Accu, []) -> {[], Accu}.
-%10
-mapfoldr(F, Accu0, [Hd|Tail]) ->
- {Rs,Accu1} = mapfoldr(F, Accu0, Tail),
- {R,Accu2} = F(Hd, Accu1),
- {[R|Rs],Accu2};
-mapfoldr(F, Accu, []) -> {[], Accu}.
-%11
-first(Pred, [H|T]) ->
- case Pred(H) of
- true ->
- {true, H};
- false ->
- first(Pred, T)
- end;
-first(Pred, []) ->
- false.
-%11
-%
-compose(F, G) ->
- fun(X) ->
- F(G(X))
- end.
-
-%20
-iterate(N, F) ->
- iterate(N, N+1, F).
-
-iterate(Stop, Stop, _) ->
- [];
-iterate(N, Stop, Fun) ->
- [Fun(N)|iterate(N+1, Stop, Fun)].
-%20
diff --git a/system/doc/extensions/include.xml b/system/doc/extensions/include.xml
deleted file mode 100644
index cd78644b95..0000000000
--- a/system/doc/extensions/include.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1999</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>Includes</title>
- <prepared>Arndt Jonasson</prepared>
- <docno>1</docno>
- <date>99-01-25</date>
- <rev>PA1</rev>
- <file>include.sgml</file>
- </header>
- <p>There are two directives which can be used in Erlang source
- files to cause the compiler to temporarily read input from another
- source. They are typically used to provide macro definitions and
- record definitions from header files. It is recommended to use the
- file name extension <c>".hrl"</c> for files which are meant to be
- included (the 'h' can be read as "header").</p>
- <p>When locating header files a list of directory names, the
- compiler include path, is used. In short the list contains the current
- working directory of the file server, the base name of the compiled
- file, and the directories given by the include option, in that order.
- See <c>erlc(1)</c> and <c>compile(3)</c> for the details of the
- compiler include path.</p>
-
- <section>
- <title>The -include Directive</title>
- <p>The first action taken by the <c>-include</c> directive is to
- check if the format of the first path component of the specified
- filename is <c>$VAR</c>, for some string <c>VAR</c>. If that is the
- case, the value of the environment variable <c>VAR</c> as returned by
- <c>os:getenv(VAR)</c> is substituted for the first path component. If
- <c>os:getenv/1</c> returns <c>false</c>, the first path component is
- left as is. If the filename is absolute (possibly after variable
- substitution), the header file with that name is included. Otherwise,
- the specified header file is searched for in the directories in the
- compiler include path, starting with the first directory in the list.
- The first file found while traversing the list is included. Examples:</p>
- <code type="none">
- -include("my_records.hrl").
- -include("incdir/more_records.hrl").
- -include("/home/users/proj/recs.hrl").
- -include("$PROJ_ROOT/app1/defs.hrl"). </code>
- </section>
-
- <section>
- <title>The -include_lib Directive</title>
- <p>The <c>-include_lib</c> directive first tries to find the
- specified header file using the procedure employed for the
- <c>-include</c> directive. If no header file can be found by searching
- the compiler include path, the first path component of the specified
- filename (possibly after variable substitution) is regarded as the
- name of an application, and the directory of the current version of
- the application is searched. Example:</p>
- <code type="none">
- -include_lib("mnesia/include/mnemosyne.hrl"). </code>
- <p>The compiler is instructed to look for the directory where the
- current version of the <c>mnesia</c> application is installed, that is
- <c>code:lib_dir(mnesia)</c>, and then search the subdirectory
- <c>include</c> for the file <c>mnemosyne.hrl</c>.</p>
- </section>
-</chapter>
-
diff --git a/system/doc/extensions/list_comprehensions.erl b/system/doc/extensions/list_comprehensions.erl
deleted file mode 100644
index 21ac562aa5..0000000000
--- a/system/doc/extensions/list_comprehensions.erl
+++ /dev/null
@@ -1,118 +0,0 @@
--module(t).
--author('[email protected]').
-
-%%-export([test/2]).
--compile(export_all).
-
-%% Odd numbers.
-
-%%foo(L) -> [ X || X <- L, (X > X-1) == (X /= X-1) ].
-
-bar(L) -> [ X || X <- L, integer(X), gt(X, 3) ].
-
-bar(L, M) -> [ Y || X <- L, integer(X), gt(X, 3),
- Y <- M, float(Y), gt(X, Y)
- ].
-
-baz(L) -> [ X || X <- L, atom(X) ].
-
-buz(L, Min) -> [ X || Min > 3, X <- L, X >= Min ].
-
-gt(X, Y) when X > Y -> true;
-gt(X, Y) -> false.
-
-%% Turn a list into a set.
-make_set([]) -> [];
-make_set([H|T]) ->
- [H|[
- Y || Y <- make_set(T),
- Y =/= H
- ]].
-
-%% Return the Pythagorean triangles with sides
-%% of total length less than N
-pyth(N) ->
- [ {A,B,C} ||
- A <- lists:seq(1,N),
- B <- lists:seq(1,N),
- C <- lists:seq(1,N),
- A+B+C =< N,
- A*A+B*B == C*C
- ].
-
-%% Cut the search space a bit..
-pyth2(N) ->
- [ {A,B,C} ||
- A <- lists:seq(1,N),
- B <- lists:seq(1,N-A+1),
- C <- lists:seq(1,N-A-B+2),
- A+B+C =< N,
- A*A+B*B == C*C ].
-
-%% Return the Cartesian product
-cp() ->
- [ {X,Y} ||
- X <- a(),
- Y <- b()
- ].
-
-cp(A,B) when list(A),list(B) ->
- [ {X,Y} ||
- X <- A,
- Y <- B
- ].
-
-%a() -> 1/0.
-a() -> [a,b].
-b() -> [1,2,3].
-
-%% Return all permutations of a list
-perms([]) -> [[]];
-perms(L) -> [ [H|T] || H <- L, T <- perms(L--[H]) ].
-
-%% Quick sort
-sort([X|Xs]) ->
- sort([ Y || Y <- Xs, Y < X ]) ++
- [X] ++
- sort([ Y || Y <- Xs, Y >= X ]);
-sort([]) -> [].
-
-%% Vector addition
-vecAdd(Xs,Ys) ->
- [ X+Y || {X,Y} <- zip(Xs,Ys) ].
-
-zip([X|Xs],[Y|Ys]) -> [{X,Y}|zip(Xs,Ys)];
-zip([],[]) -> [].
-
-qsort([X|Xs]) ->
- qsort(lt(X,Xs))
- ++ [X] ++
- qsort(ge(X,Xs));
-qsort([]) -> [].
-
-lt(X,[H|T]) when X>H -> [H|lt(X,T)];
-lt(X,[_|T]) -> lt(X,T);
-lt(_,[]) -> [].
-
-ge(X,[H|T]) when X=<H -> [H|ge(X,T)];
-ge(X,[_|T]) -> ge(X,T);
-ge(_,[]) -> [].
-
-test(1,N) -> statistics(runtime),test1(N),statistics(runtime);
-test(2,N) -> statistics(runtime),test2(N),statistics(runtime);
-test(3,N) -> statistics(runtime),test3(N),statistics(runtime).
-
-test1(0) -> true;
-test1(N) ->
- sort([21,12,45,1,3,87,55,77,11,20,6,99,91,13,14,15,66,62,69,71,67,82,83,84,87,86,85]),
- test1(N-1).
-
-test2(0) -> true;
-test2(N) ->
- qsort([21,12,45,1,3,87,55,77,11,20,6,99,91,13,14,15,66,62,69,71,67,82,83,84,87,86,85]),
- test2(N-1).
-
-test3(0) -> true;
-test3(N) ->
- lists:sort([21,12,45,1,3,87,55,77,11,20,6,99,91,13,14,15,66,62,69,71,67,82,83,84,87,86,85]),
- test3(N-1).
diff --git a/system/doc/extensions/list_comprehensions.xml b/system/doc/extensions/list_comprehensions.xml
deleted file mode 100644
index 30e32da79c..0000000000
--- a/system/doc/extensions/list_comprehensions.xml
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1997</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>List Comprehensions</title>
- <prepared>Joe Armstrong</prepared>
- <responsible>Bjarne D&auml;cker</responsible>
- <docno>1</docno>
- <approved>Bjarne D&auml;Ker</approved>
- <checked></checked>
- <date>96-09-10</date>
- <rev>PA1</rev>
- <file>list_comprehensions.sgml</file>
- </header>
- <p>List comprehensions are a feature of many modern functional programming languages. Subject to certain rules, they provide a succinct notation for generating elements in a list.</p>
- <p>List comprehensions are analogous to set comprehensions
- in Zermelo-Frankel set theory and are called ZF expressions in
- Miranda. They are analogous to the <c>setof</c> and
- <c>findall</c> predicates in Prolog.</p>
- <p>List comprehensions are written with the following syntax:
- </p>
- <code type="none">
-
-[Expression || Qualifier1, Qualifier2, ...] </code>
- <p><c>Expression</c> is an arbitrary expression, and each <c>Qualifier</c> is either a generator or a filter.</p>
- <list type="bulleted">
- <item>A <em>generator</em> written as <c><![CDATA[Pattern <- ListExpr]]></c>. <c>ListExpr</c> must be an expression which evaluates to a list of terms.</item>
- <item>A <em>filter</em> is either a predicate or a boolean expression. A predicate is a function which returns <c>true</c> or <c>false</c>.</item>
- </list>
-
- <section>
- <title>Examples of List Comprehensions</title>
- <p>We start with a simple example:</p>
- <code type="none"><![CDATA[
-
-> [X || X <- [1,2,a,3,4,b,5,6], X > 3].
-[a,4,b,5,6] ]]></code>
- <p>This should be read as follows:</p>
- <quote>
- <p>The list of X such that X is taken from the list <c>[1,2,a,...]</c> and X is greater than 3.</p>
- </quote>
- <p>The notation <c><![CDATA[X <- [1,2,a,...]]]></c> is a generator and the expression <c>X > 3</c> is a filter.</p>
- <p>An additional filter can be added in order to restrict the result to integers:</p>
- <code type="none"><![CDATA[
-
-> [X || X <- [1,2,a,3,4,b,5,6], integer(X), X > 3].
-[4,5,6] ]]></code>
- <p>Generators can be combined. For example, the Cartesian product of two lists can be written as follows:</p>
- <code type="none"><![CDATA[
-
-> [{X, Y} || X <- [1,2,3], Y <- [a,b]].
-[{1,a},{1,b},{2,a},{2,b},{3,a},{3,b}] ]]></code>
-
- <section>
- <title>Quick Sort</title>
- <p>The well known quick sort routine can be written as follows:</p>
- <code type="none"><![CDATA[
-
-sort([Pivot|T]) ->
- sort([ X || X <- T, X < Pivot]) ++
- [Pivot] ++
- sort([ X || X <- T, X >= Pivot]);
-sort([]) -> []. ]]></code>
- <p>The expression <c><![CDATA[[X || X <- T, X < Pivot]]]></c> is the list of all elements in <c>T</c>, which are less than <c>Pivot</c>.</p>
- <p><c><![CDATA[[X || X <- T, X >= Pivot]]]></c> is the list of all elements in <c>T</c>, which are greater or equal to <c>Pivot</c>.</p>
- <p>To sort a list, we isolate the first element in the list and split the list into two sub-lists. The first sub-list contains all elements which are smaller than the first element in the list, the second contains all elements which are greater than or equal to the first element in the list. We then sort the sub-lists and combine the results.</p>
- </section>
-
- <section>
- <title>Permutations</title>
- <p>The following example generates all permutations of the elements in a list:</p>
- <code type="none"><![CDATA[
-
-perms([]) -> [[]];
-perms(L) -> [[H|T] || H <- L, T <- perms(L--[H])]. ]]></code>
- <p>We take take <c>H</c> from <c>L</c> in all possible ways. The result is the set of all lists <c>[H|T]</c>, where <c>T</c> is the set of all possible permutations of <c>L</c> with <c>H</c> removed.</p>
- <code type="none">
-
-> perms([b,u,g]).
-[[b,u,g],[b,g,u],[u,b,g],[u,g,b],[g,b,u],[g,u,b]] </code>
- </section>
-
- <section>
- <title>Pythagorean Triplets</title>
- <p>Pythagorean triplets are sets of integers <c>{A,B,C}</c> such that <c>A**2 + B**2 = C**2</c>.</p>
- <p>The function <c>pyth(N)</c> generates a list of all integers <c>{A,B,C}</c> such that <c>A**2 + B**2 = C**2</c> and where the sum of the sides is less than <c>N</c>.</p>
- <code type="none"><![CDATA[
-
-pyth(N) ->
- [ {A,B,C} ||
- A <- lists:seq(1,N),
- B <- lists:seq(1,N),
- C <- lists:seq(1,N),
- A+B+C =< N,
- A*A+B*B == C*C
- ]. ]]></code>
- <pre>
-
-> <input>pyth(3).</input>
-[].
-> <input>pyth(11).</input>
-[].
-><input>pyth(12).</input>
-[{3,4,5},{4,3,5}]
-> <input>pyth(50).</input>
-[{3,4,5},
- {4,3,5},
- {5,12,13},
- {6,8,10},
- {8,6,10},
- {8,15,17},
- {9,12,15},
- {12,5,13},
- {12,9,15},
- {12,16,20},
- {15,8,17},
- {16,12,20}]</pre>
- <p>The following code reduces the search space and is more efficient:</p>
- <code type="none"><![CDATA[
-
-pyth1(N) ->
- [{A,B,C} ||
- A <- lists:seq(1,N),
- B <- lists:seq(1,N-A+1),
- C <- lists:seq(1,N-A-B+2),
- A+B+C =< N,
- A*A+B*B == C*C ]. ]]></code>
- </section>
-
- <section>
- <title>Simplifications with List Comprehensions</title>
- <p>As an example, list comprehensions can be used to simplify some of the functions in <c>lists.erl</c>:</p>
- <code type="none"><![CDATA[
-
-append(L) -> [X || L1 <- L, X <- L1].
-map(Fun, L) -> [Fun(X) || X <- L].
-filter(Pred, L) -> [X || X <- L, Pred(X)]. ]]></code>
- </section>
- </section>
-
- <section>
- <title>Variable Bindings in List Comprehensions</title>
- <p>The scope rules for variables which occur in list comprehensions are as follows:</p>
- <list type="bulleted">
- <item>all variables which occur in a generator pattern are assumed to be "fresh" variables</item>
- <item>any variables which are defined before the list comprehension and which are used in filters have the values they had before the list comprehension</item>
- <item>no variables may be exported from a list comprehension.</item>
- </list>
- <p>As an example of these rules, suppose we want to write the function <c>select</c>, which selects certain elements from a list of tuples. We might write <c><![CDATA[select(X, L) -> [Y || {X, Y} <- L].]]></c> with the intention of extracting all tuples from <c>L</c> where the first item is <c>X</c>.</p>
- <p>Compiling this yields the following diagnostic:</p>
- <code type="none">
-
-./FileName.erl:Line: Warning: variable 'X' shadowed in generate </code>
- <p>This diagnostic warns us that the variable <c>X</c> in the pattern is not the same variable as the variable <c>X</c> which occurs in the function head.</p>
- <p>Evaluating <c>select</c> yields the following result:</p>
- <pre>
-
-> <input>select(b,[{a,1},{b,2},{c,3},{b,7}]).</input>
-[1,2,3,7] </pre>
- <p>This result is not what we wanted. To achieve the desired effect we must write <c>select</c> as follows:</p>
- <code type="none"><![CDATA[
-
-select(X, L) -> [Y || {X1, Y} <- L, X == X1]. ]]></code>
- <p>The generator now contains unbound variables and the test has been moved into the filter. This now works as expected:</p>
- <pre>
-
-> <input>select(b,[{a,1},{b,2},{c,3},{b,7}]).</input>
-[2,7] </pre>
- <p>One consequence of the rules for importing variables into a list comprehensions is that certain pattern matching operations have to be moved into the filters and cannot be written directly in the generators. To illustrate this, do <em>not</em> write as follows:</p>
- <code type="none"><![CDATA[
-
-f(...) ->
- Y = ...
- [ Expression || PatternInvolving Y <- Expr, ...]
- ... ]]></code>
- <p>Instead, write as follows:</p>
- <code type="none"><![CDATA[
-
-f(...) ->
- Y = ...
- [ Expression || PatternInvolving Y1 <- Expr, Y == Y1, ...]
- ...
- ]]></code>
- </section>
-</chapter>
-
diff --git a/system/doc/extensions/list_comrehensions.erl b/system/doc/extensions/list_comrehensions.erl
deleted file mode 100644
index f6a23b5dca..0000000000
--- a/system/doc/extensions/list_comrehensions.erl
+++ /dev/null
@@ -1,75 +0,0 @@
--module(zf).
-
--compile(export_all).
-
-
-%% Odd numbers.
-
-%%foo(L) -> [ X || X <- L, (X > X-1) == (X /= X-1) ].
-
-boo() -> [X||X <- [1,2,a,3,4,b,5,6], X > 3].
-boo1() -> [X||X <- [1,2,a,3,4,b,5,6], integer(X),X > 3].
-boo2() -> [{X,Y} || X <- [1,2,3], Y <- [a,b]].
-
-bar(L) -> [ X || X <- L, integer(X), gt(X, 3) ].
-
-bar(L, M) -> [ Y || X <- L, integer(X), gt(X, 3),
- Y <- M, float(Y), gt(X, Y)
- ].
-
-baz(L) -> [ X || X <- L, atom(X) ].
-
-buz(L, Min) -> [ X || Min > 3, X <- L, X >= Min ].
-
-gt(X, Y) when X > Y -> true;
-gt(X, Y) -> false.
-
-
-%% Return the Pythagorean triangles with sides
-%% of total length less than N
-pyth(N) ->
- [ {A,B,C} ||
- A <- lists:seq(1,N),
- B <- lists:seq(1,N),
- C <- lists:seq(1,N),
- A+B+C =< N,
- A*A+B*B == C*C
- ].
-
-%% Cut the search space a bit..
-pyth2(N) ->
- [ {A,B,C} ||
- A <- lists:seq(1,N),
- B <- lists:seq(1,N-A+1),
- C <- lists:seq(1,N-A-B+2),
- A+B+C =< N,
- A*A+B*B == C*C ].
-
-%% Return the Cartesian product
-
-cp(A,B) ->
- [ {X,Y} ||
- X <- A,
- Y <- B
- ].
-
-%% Return all permutations of a list
-perms([]) -> [[]];
-perms(L) -> [ [H|T] || H <- L, T <- perms(L--[H]) ].
-
-%% Quick sort
-sort([X|Xs]) ->
- sort([ Y || Y <- Xs, Y < X ]) ++
- [X] ++
- sort([ Y || Y <- Xs, Y >= X ]);
-sort([]) -> [].
-
-%% append
-
-append(L) -> [X||L1<-L,X<-L1].
-
-map(Fun, L) -> [Fun(X)||X<-L].
-
-filter(Pred, L) -> [X||X<-L,Pred(X)].
-
-select(X, L) -> [Y || {X1,Y} <- L, X == X1].
diff --git a/system/doc/extensions/macros.xml b/system/doc/extensions/macros.xml
deleted file mode 100644
index feb3de6102..0000000000
--- a/system/doc/extensions/macros.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1997</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>Macros</title>
- <prepared>Joe Armstrong</prepared>
- <responsible>Bjarne D&auml;cker</responsible>
- <docno>1</docno>
- <approved>Bjarne D&auml;Ker</approved>
- <checked></checked>
- <date>96-09-10</date>
- <rev>PA1</rev>
- <file>macros.sgml</file>
- </header>
- <p>Macros in Erlang are written with the following syntax:</p>
- <code type="none">
-
--define(Const, Replacement).
--define(Fun(Var1, Var2,.., Var), Replacement). </code>
- <p>Macros are expanded when the syntax <c>?MacroName</c> is encountered.</p>
- <p>Consider the macro definition:</p>
- <code type="none">
-
--define(timeout, 200). </code>
- <p>The expression <c>?timeout</c>, which can occur anywhere in the code which follows the macro definition, will be replaced by <c>200</c>.</p>
- <p>Macros with arguments are written as follows:</p>
- <code type="none">
-
- -define(macro1(X, Y), {a, X, b, Y}). </code>
- <p>This type of macro can be used as follows:</p>
- <code type="none">
-
-bar(X) ->
- ?macro1(a, b),
- ?macro1(X, 123) </code>
- <p>This expands to:</p>
- <code type="none">
-
-bar(X) ->
- {a,a,b,b},
- {a,X,b,123}. </code>
-
- <section>
- <title>Macros and Tokens</title>
- <p>Macro expansion works at a token level. We might define a macro as follows:</p>
- <code type="none">
-
--define(macro2(X, Y), {a,X,b,Y). </code>
- <p>The replacement value of the macro is not a valid Erlang term because the closing right curly bracket is missing. <c>macro2</c> expands into a sequence of tokens <c>{</c>, <c>a</c>, <c>X</c> which are then pasted into the place where the macro is used.</p>
- <p>We might use this macro as follows:</p>
- <code type="none">
-
-bar() ->
- ?macro2(x,y)}. </code>
- <p>This will expand into the valid sequence of tokens <c>{a,x,y,b}</c> before being parsed and compiled.</p>
- <note>
- <p>It is good programming practise to ensure that the replacement text of a macro is a valid Erlang syntactic form.</p>
- </note>
- </section>
-
- <section>
- <title>Pre-Defined Macros</title>
- <p>The following macros are pre-defined:</p>
- <taglist>
- <tag><c>?MODULE</c>. </tag>
- <item>This macro returns the name of the current module.
- </item>
- <tag><c>?MODULE_STRING</c>. </tag>
- <item>This macro returns the name of the current module, as a string.</item>
- <tag><c>?FILE</c>.</tag>
- <item>This macro returns the current file name.</item>
- <tag><c>?LINE</c>.</tag>
- <item>This macro returns the current line number.</item>
- <tag><c>?MACHINE</c>.</tag>
- <item>This macro returns the current machine name,
- <c>'BEAM'</c>,</item>
- </taglist>
- </section>
-
- <section>
- <title>Stringifying Macro Arguments</title>
- <p>The construction <c>??Arg</c> for an argument to a macro expands to a
- string containing the tokens of the argument, similar to the
- <c>#arg</c> stringifying construction in C. This was added in Erlang
- 5.0 (OTP R7A).</p>
- <p>Example:</p>
- <code type="none">
--define(TESTCALL(Call), io:format("Call ~s: ~w~n", [??Call, Call])).
-
-?TESTCALL(myfunction(1,2)),
-?TESTCALL(you:function(2,1)).</code>
- <p>results in</p>
- <code type="none">
-io:format("Call ~s: ~w~n",["myfunction ( 1 , 2 )",m:myfunction(1,2)]),
-io:format("Call ~s: ~w~n",["you : function ( 2 , 1 )",you:function(2,1)]).</code>
- </section>
-
- <section>
- <title>Flow Control in Macros</title>
- <p>The following macro directives are supplied:</p>
- <taglist>
- <tag>-undef(Macro).</tag>
- <item>Causes the macro to behave as if it had never been defined.</item>
- <tag>-ifdef(Macro).</tag>
- <item>Do the following lines if <c>Macro</c> is defined.</item>
- <tag>-ifndef(Macro).</tag>
- <item>Do the following lines if <c>Macro</c> is not defined.</item>
- <tag>-else.</tag>
- <item>"else" macro</item>
- <tag>-endif.</tag>
- <item>"endif" macro.</item>
- </taglist>
- <p>The conditional macros must be properly nested. They are usually grouped as follows:</p>
- <code type="none">
-
--ifdef(debug)
--define(....)
--else
--define(...)
--endif </code>
- <p>The following example illustrates this grouping:</p>
- <code type="none">
-
--define(debug, true).
--ifdef(debug).
--define(trace(Str, X), io:format("Mod:~w line:~w ~p ~p~n",
- [?MODULE,?LINE, Str, X])).
--else.
--define(trace(X, Y), true).
--endif. </code>
- <p>Given these definitions, the expression <c>?trace("X=", X).</c> in line 10 of the module <c>foo</c> expands to:</p>
- <code type="none">
-
-io:format("Mod:~w line:~w ~p ~p~n",[foo,100,"X=",[X]]), </code>
- <p>If we remove the <c>-define(debug, true).</c> line, then the same expression expands to <c>true</c>.</p>
- </section>
-
- <section>
- <title>A Macro Expansion Utility</title>
- <p>The following code can be used to expand a macro and display the result:</p>
- <code type="none">
-
--module(mexpand).
--export([file/1]).
--import(lists, [foreach/2]).
-file(File) ->
- case epp:parse_file(File ++ ".erl", [],[]) of
- {ok, L} ->
- {ok, Stream} = file:open(File ++ ".out", write),
- foreach(fun(X) ->
- io:format(Stream,"~s~n",[erl_pp:form(X)])
- end, L),
- file:close(Stream)
- end.</code>
- <p>Alternatively, we can compile the file with the <c>'P'</c> option. <c>compile:file(File, ['P'])</c> produces a list file <c>File.P</c>, in which the result of any macro expansions can be seen.</p>
- </section>
-</chapter>
-
diff --git a/system/doc/extensions/make.dep b/system/doc/extensions/make.dep
deleted file mode 100644
index fdac959667..0000000000
--- a/system/doc/extensions/make.dep
+++ /dev/null
@@ -1,21 +0,0 @@
-# ----------------------------------------------------
-# >>>> Do not edit this file <<<<
-# This file was automaticly generated by
-# /home/otp/bin/docdepend
-# ----------------------------------------------------
-
-
-# ----------------------------------------------------
-# TeX files that the DVI file depend on
-# ----------------------------------------------------
-
-book.dvi: bit_syntax.tex book.tex funs.tex include.tex \
- list_comprehensions.tex macros.tex misc.tex \
- part.tex records.tex
-
-# ----------------------------------------------------
-# Source inlined when transforming from source to LaTeX
-# ----------------------------------------------------
-
-funs.tex: fun_test.erl funparse.erl funs1.erl
-
diff --git a/system/doc/extensions/mexpand.erl b/system/doc/extensions/mexpand.erl
deleted file mode 100644
index 261f99da46..0000000000
--- a/system/doc/extensions/mexpand.erl
+++ /dev/null
@@ -1,16 +0,0 @@
--module(mexpand).
-
--export([file/1]).
-
--import(lists, [foreach/2]).
-
-file(File) ->
- case epp:parse_file(File ++ ".erl", [],[]) of
- {ok, L} ->
- {ok, Stream} = file:open(File ++ ".out", write),
- foreach(fun(X) ->
- io:format(Stream,"~s~n",
- [erl_pp:form(X)])
- end, L),
- file:close(Stream)
- end.
diff --git a/system/doc/extensions/misc.xml b/system/doc/extensions/misc.xml
deleted file mode 100644
index 576f705278..0000000000
--- a/system/doc/extensions/misc.xml
+++ /dev/null
@@ -1,310 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1999</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>Miscellaneous</title>
- <prepared>Arndt Jonasson</prepared>
- <docno>1</docno>
- <date>99-01-25</date>
- <rev>PA1</rev>
- <file>misc.sgml</file>
- </header>
- <p>In this chapter, a number of miscellaneous features of Erlang
- are described.</p>
-
- <section>
- <title>Token Syntax</title>
- <p>In Erlang 4.8 (OTP R5A) the syntax of Erlang tokens have been
- extended to allow the use of the full ISO-8859-1 (Latin-1) character
- set. This is noticeable in the following ways:</p>
- <list type="bulleted">
- <item>All the Latin-1 printable characters can be used and are shown without
- the escape backslash convention.</item>
- <item>Atoms and variables can use all Latin-1 letters.</item>
- </list>
- <p>The new characters from Latin-1 have the following
- classifications in Erlang:</p>
- <table>
- <row>
- <cell align="left" valign="middle"><em>Octal</em></cell>
- <cell align="left" valign="middle"><em>Decimal</em></cell>
- <cell align="left" valign="middle">&nbsp;</cell>
- <cell align="left" valign="middle"><em>Class</em></cell>
- </row>
- <row>
- <cell align="left" valign="middle">200 - 237</cell>
- <cell align="left" valign="middle">128 - 159</cell>
- <cell align="left" valign="middle">&nbsp;</cell>
- <cell align="left" valign="middle">Control characters</cell>
- </row>
- <row>
- <cell align="left" valign="middle">240 - 277</cell>
- <cell align="left" valign="middle">160 - 191</cell>
- <cell align="right" valign="middle">- &iquest;</cell>
- <cell align="left" valign="middle">Punctuation characters</cell>
- </row>
- <row>
- <cell align="left" valign="middle">300 - 326</cell>
- <cell align="left" valign="middle">192 - 214</cell>
- <cell align="center" valign="middle">&Agrave; - &Ouml;</cell>
- <cell align="left" valign="middle">Uppercase letters</cell>
- </row>
- <row>
- <cell align="center" valign="middle">327</cell>
- <cell align="center" valign="middle">215</cell>
- <cell align="center" valign="middle">&times;</cell>
- <cell align="left" valign="middle">Punctuation character</cell>
- </row>
- <row>
- <cell align="left" valign="middle">330 - 336</cell>
- <cell align="left" valign="middle">216 - 222</cell>
- <cell align="center" valign="middle">&Oslash; - &THORN;</cell>
- <cell align="left" valign="middle">Uppercase letters</cell>
- </row>
- <row>
- <cell align="left" valign="middle">337 - 366</cell>
- <cell align="left" valign="middle">223 - 246</cell>
- <cell align="center" valign="middle">&szlig; - &ouml;</cell>
- <cell align="left" valign="middle">Lowercase letters</cell>
- </row>
- <row>
- <cell align="center" valign="middle">367</cell>
- <cell align="center" valign="middle">247</cell>
- <cell align="center" valign="middle">&divide;</cell>
- <cell align="left" valign="middle">Punctuation character</cell>
- </row>
- <row>
- <cell align="left" valign="middle">370 - 377</cell>
- <cell align="left" valign="middle">248 - 255</cell>
- <cell align="center" valign="middle">&oslash; - &yuml;</cell>
- <cell align="left" valign="middle">Lowercase letters</cell>
- </row>
- <tcaption>Character classes</tcaption>
- </table>
- </section>
-
- <section>
- <title>String Concatenation</title>
- <p>Two adjacent string literals are concatenated into one. This is done already
- at compile-time, and doesn't incur any runtime overhead. Example:</p>
- <code type="none">
- "string" "42" </code>
- <p>is equivalent to</p>
- <code type="none">
- "string42" </code>
- <p>This feature is convenient in at least two situations:</p>
- <list type="bulleted">
- <item>when one of the
- strings is the result of a macro expansion;</item>
- <item>when a string is very
- long, and would otherwise either have to wrap, making the source code
- harder to read, or force the use of some runtime append operation.</item>
- </list>
- </section>
-
- <section>
- <title>The ++ list Concatenation Operator</title>
- <p>Since list concatenation is a very common operation, it is convenient
- to have a terse way of expressing it. The ++ operator appends its second
- argument to its first. Example:
- </p>
- <code type="none">
- X = [1,2,3],
- Y = [4,5],
- X ++ Y. </code>
- <p>results in <c>[1,2,3,4,5]</c>.</p>
- <p>The ++ operator has precedence between the binary '+' operator and
- the comparison operators.
- </p>
- </section>
-
- <section>
- <title>The - - list Subtraction Operator</title>
- <p>The - - operator produces a list which is a copy of the first
- argument, subjected to the following procedure: for each element in
- the second argument, its first occurrence in the first argument is
- removed.</p>
- <code type="none">
- X = [1,2,3,2,1,2],
- Y = [2,1,2],
- X -- Y. </code>
- <p>results in <c>[3,1,2]</c>.</p>
- <p>The - - operator has precedence between the binary '+' operator and
- the comparison operators.
- </p>
- </section>
-
- <section>
- <title>Bitwise Operator bnot</title>
- <p>Apart from the binary bitwise operators <c>band</c>, <c>bor</c>
- and <c>bxor</c>, there is a unary operator <c>bnot</c> with the same
- precedence as the other unary operators + and -, i.e., higher than
- the binary operators. Example:</p>
- <code type="none">
- bnot 7. </code>
- <p>returns -8.
- </p>
- </section>
-
- <section>
- <title>Logical Operators</title>
- <p>The atoms <c>true</c> and <c>false</c> are usually used for representing
- Boolean values. With the binary operators <c>and</c>, <c>or</c> and
- <c>xor</c>, and the unary operator <c>not</c>, Boolean values can be
- combined. Example:</p>
- <code type="none">
-
- M1 = lists:member(A, List1),
- M2 = lists:member(A, List2),
- M1 and M2.</code>
- <p>Note that the operators are strict, i.e., they always evaluate both
- their arguments.</p>
- <p><c>not</c> has the same priority as the other unary operators. The
- binary logical operators have precedence between the <c>=</c> operator
- and the comparison operators, the <c>and</c> operator having higher
- precedence than <c>or</c> and <c>xor</c>.
- </p>
- </section>
-
- <section>
- <title>Match Operator = In Patterns</title>
- <p>This extension was added in Erlang 4.8 (OTP R5A).</p>
- <p>The = operator is also called the `match' operator. The match operator
- can now be used in a pattern, so that <c>P1 = P2</c> is a valid pattern,
- where both <c>P1</c> and <c>P2</c> are patterns. This compound pattern
- when matched against a term causes the term to be matched against both
- <c>P1</c> and <c>P2</c>.</p>
- <p>One use for this construction is to avoid reconstructing a term which
- was part of an argument to a function. Example:</p>
- <code type="none">
- f({'+',X,Y}=T) -> {X+Y,T}.</code>
- <p>It also makes it possible to rewrite the construction</p>
- <code type="none">
- f(X) when X == #rec{x=1, y=a} -> ... </code>
- <p>as</p>
- <code type="none">
- f(#rec{x=1, y=a} = X) -> ... </code>
- <p>In the absence of optimization for the former case, the
- latter case is more efficient.
- </p>
- </section>
-
- <section>
- <title>Literal String Prefix in Patterns</title>
- <p>This extension was added in Erlang 4.8 (OTP R5A).</p>
- <p>A new construction is allowed in patterns, namely a literal
- string as the first operand of the ++ operator. Example:</p>
- <code type="none">
- f("prefix" ++ L) -> ... </code>
- <p>This is syntactic sugar for the equivalent, but harder to read</p>
- <code type="none">
- f([$p,$r,$e,$f,$i,$x | L]) -> ... </code>
- </section>
-
- <section>
- <title>Disjunctions in Guards</title>
- <p>This extension was added in Erlang 4.9 (OTP R6A).</p>
- <p>A new construction is allowed in guards, the disjunction operator
- ';'. The construction is syntactic sugar which removes the bother of
- writing the same body after several guards.</p>
- <code type="none">
- f(X) when xxx ; yyy ; zzz ->
- pop(X).</code>
- <p>This is syntactic sugar for the equivalent</p>
- <code type="none">
- f(X) when xxx ->
- pop(X);
- f(X) when yyy ->
- pop(X);
- f(X) when zzz ->
- pop(X). </code>
- <p>The abstract format has been changed accordingly to contain a list of
- (conjunctive) guards where there was previously only one guard.
- </p>
- </section>
-
- <section>
- <title>Expressions in Patterns</title>
- <p>This extension was added in Erlang 5.0 (OTP R7A).</p>
- <p>An arithmetic expression can be used within a pattern, if it uses
- only numeric or bitwise operators, and if its value can be evaluated
- to a constant at compile-time. This is especially useful when the
- expression is defined by a macro.
- </p>
- <p>Example:</p>
- <code type="none">
- case X of
- {1+2, T} -> T
- end.</code>
- </section>
-
- <section>
- <title>Boolean expresions in guards</title>
- <p>This extension was added in Erlang 5.1 (OTP R8).</p>
- <p>In guards, the use of <c>and</c>, <c>or</c> and <c>not</c> is
- now allowed. Guard expressions can combine these with
- parenthesis. This allows for more elaborate guards than what
- may be given with <c>,</c> and <c>;</c>.</p>
- <note>
- <p>The guard expressions written with these operators are boolean
- expressions, and the boolean functions <c>is_list</c>,
- <c>is_integer</c> etc. should be used, rather than
- <c>list</c>, <c>integer</c> etc.</p>
- </note>
- <p>Example 1:</p>
- <code type="none">
- f(X) when not (is_tuple(X) or is_list(X)) ->
- ... </code>
- <p>Example 2:</p>
- <code type="none"><![CDATA[
- g(A, B) when (A > 0) and (B > 0) and not (A*A < B*B) ->
- ... ]]></code>
- </section>
-
- <section>
- <title>Short-circuit boolean expressions</title>
- <p>This extension was added in Erlang 5.1 (OTP R8).</p>
- <p>In a boolean expression it is unnecessary to always evaluate all
- terms. If the first term gives a result that determines the
- result, the second term is not needed. In Erlang two new
- keywords handles boolean expressions without evaluating both
- terms, if it's unnecessary. (This is called short-curcuit
- boolean evaluation.)</p>
- <p>The keyword <c>andalso</c> is a short-curcuit version of
- <c>and</c>. The keyword <c>orelse</c> is a short-curcuit version
- of <c>or</c>. They can be used in boolean expressions (not
- guards) instead of <c>and</c> and <c>or</c>.</p>
- <p>Example 1:</p>
- <code type="none">
- case A >= -1.0 andalso math:sqrt(A+1) > B of </code>
- <p>This will work even if <c>A</c> is less than <c>-1.0</c>, since
- in that case, the second term (after <c>andalso</c>) is never
- evaluated. (Of course, the same effects could have been done
- using guards. In guards, evaluation is always short-circuited,
- since guard tests are known to be free of side-effects.)</p>
- <p>Example 2:</p>
- <code type="none">
- OnlyOne = is_atom(L) orelse
- (is_list(L) andalso length(L) == 1), </code>
- </section>
-</chapter>
-
diff --git a/system/doc/extensions/part.xml b/system/doc/extensions/part.xml
deleted file mode 100644
index 56fd2c09a6..0000000000
--- a/system/doc/extensions/part.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part>
- <header>
- <copyright>
- <year>1997</year>
- <year>2007</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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>Erlang Extensions Since 4.4</title>
- <prepared>OTP Team</prepared>
- <docno></docno>
- <date>1997-02-21</date>
- <rev>E</rev>
- <file>part.sgml</file>
- </header>
- <description>
- <p>This chapter describes extensions made to the Erlang language
- since version 4.4 (where nothing is said to the contrary, an extension
- was added in version 4.4).
- The chapter contains the following sections:
- </p>
- <list type="bulleted">
- <item>Records</item>
- <item>Functional Objects (Funs)</item>
- <item>List Comprehensions</item>
- <item>Macros</item>
- <item>File inclusion</item>
- <item>Bit syntax</item>
- <item>Miscellaneous</item>
- </list>
- </description>
- <include file="records"></include>
- <include file="funs"></include>
- <include file="list_comprehensions"></include>
- <include file="macros"></include>
- <include file="include"></include>
- <include file="bit_syntax"></include>
- <include file="misc"></include>
-</part>
-
diff --git a/system/doc/extensions/records.xml b/system/doc/extensions/records.xml
deleted file mode 100644
index 21ec73ab77..0000000000
--- a/system/doc/extensions/records.xml
+++ /dev/null
@@ -1,284 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1997</year>
- <year>2007</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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>Records</title>
- <prepared>Joe Armstrong</prepared>
- <responsible>Bjarne D&auml;cker</responsible>
- <docno>1</docno>
- <approved>Bjarne D&auml;Ker</approved>
- <checked></checked>
- <date>96-09-10</date>
- <rev>PA1</rev>
- <file>records.sgml</file>
- </header>
- <p>A record is a data structure intended for storing a fixed number of related data items. It is
- similar to a <c>struct</c> in C, or a <c>record</c> in Pascal. </p>
- <p>The main advantage of using records instead of tuples is that fields in a record are accessed by name, whereas fields in a tuple are accessed by position. To illustrate these differences, suppose that we want to represent a person with the <em>tuple</em><c>{Name, Address, Phone}</c>.</p>
- <p>We must remember that the <c>Name</c> field is the first element of the tuple, the <c>Address</c> field is the second element, and so on, in order to write functions which manipulate this data. For example, to extract data from a variable <c>P</c> which contains such a tuple we might write the following code and then use pattern matching to extract the relevant fields.</p>
- <code type="none">
-
-Name = element(1, P),
-Address = element(2, P),
-... </code>
- <p>Code like this is difficult to read and understand and errors occur if we get the numbering of the elements in the tuple wrong. If we change the data representation by re-ordering the fields, or by adding or removing a field, then all references to the person tuple, wherever they occur, must be checked and possibly modified.</p>
- <p><em>Records</em> allow us to refer to the fields by name and not position. We use a record instead of a tuple to store the data . If we write a record definition of the type shown below, we can then refer to the fields of the record by name.</p>
- <code type="none">
-
--record(person, {name, phone, address}). </code>
- <p>For example, if <c>P</c> is now a variable whose value is a <c>person</c> record, we can code as follows in order to access the name and address fields of the records.</p>
- <code type="none">
-
-Name = P#person.name,
-Address = P#person.address,
-... </code>
- <p>In the following sections we describe the different operations which can be performed on records:</p>
-
- <section>
- <title>Defining a Record</title>
- <p>A record is defined with the following syntax:</p>
- <code type="none">
-
--record(RecordName, {Field1 [= DefaultValue1],
- Field2 [= DefaultValue2],
- ...,
- FieldN [= DefaultValueN]}). </code>
- <p>The record name and field names must be atoms. The optional default values, which are terms, are used if no value is supplied for a field when a new instance of the record is created. If the default value is not supplied, then the atom <c>undefined</c> is assumed.</p>
- <p>For example, in the following record definition, the address field is <c>undefined</c>.</p>
- <pre>
--record(person, {name = "", phone = [], address}). </pre>
- <p>This definition of a person will be used in many of the examples which follow.</p>
- </section>
-
- <section>
- <title>Including a Record Definition</title>
- <p>If the record is used in several modules, its definition should be placed in a <c>.hrl</c> header file. Each module which uses the record definition should have a <c>-include(FileName).</c> statement. For example:</p>
- <code type="none">
-
--include("my_data_structures.hrl"). </code>
- <note>
- <p>The definition of the record must come before it is used.</p>
- </note>
- </section>
-
- <section>
- <title>Creating a Record</title>
- <p>A new record is created with the following syntax:</p>
- <code type="none">
-
-#RecordName{Field1=Expr1,
- ...,
- FieldM=ExprM}. </code>
- <p>If any of the fields is omitted, then the default value supplied in the record definition is used. For example:</p>
- <pre>
-> #person{phone = [0,8,2,3,4,3,1,2], name = "Robert"}.
-{person, "Robert", [0,8,2,3,4,3,1,2], undefined}. </pre>
- <p>There is a new feature introduced in Erlang 5.1 (OTP release
- R8), with which you can set a value to all fields in a record,
- overriding the defaults in the record specification. The special
- field <c>_</c>, means "all fields not explicitly specified".</p>
- <pre>
-> #person{name = "Jakob", _ = '_'}
-{person, "Jakob", '_', '_'} </pre>
- <p>It is primarily intended to be used in <c>ets:match/2</c> and
- <c>mnesia:match_object/3</c>, to set record fields to the atom
- <c>'_'</c>. (This is a wildcard in <c>ets:match/2</c>.)</p>
- </section>
-
- <section>
- <title>Selectors</title>
- <p>The following syntax is used to select an individual field from a record:</p>
- <code type="none">
-
-Variable#RecordName.Field </code>
- <note>
- <p>The values contained in record names and fields must be constants, not variables.</p>
- </note>
- <note>
- <p>For the purposes of illustration, we will demonstrate the use of records using an imaginary dialogue with the Erlang shell. Currently the Erlang evaluator does not support records so you may not be able to reproduce this dialogue.</p>
- </note>
- <pre>
-
-> <input>P = #person{name = "Joe", phone = [0,8,2,3,4,3,1,2]}.</input>
-{person, "Joe", [0,8,2,3,4,3,1,2], undefined}
-> <input>P#person.name.</input>
-"Joe" </pre>
- <note>
- <p>Selectors for records are allowed in guards.</p>
- </note>
- </section>
-
- <section>
- <title>Updating a Record</title>
- <p>The following syntax is used to create a new copy of the record with some of the fields changed. Only the fields to be changed need to be referred to, all other fields retain their old values.</p>
- <code type="none">
-
-OldVariable#RecordName{Field1 = NewValue1,
- ...,
- FieldM = NewValueM} </code>
- <p>For example:</p>
- <pre>
-> P1 = #person{name="Joe", phone=[1,2,3], address="A street"}.
-{person, "Joe", [1,2,3], "A street"}
-> P2 = P1#person{name="Robert"}.
-{person, "Robert", [1,2,3], "A street"} </pre>
- </section>
-
- <section>
- <title>Type Testing</title>
- <p>The following guard test is used to test the type of a record:</p>
- <code type="none">
-
-record(Variable, RecordName) </code>
- <p>The following example shows that the guard succeeds if <c>P</c> is record of type <c>person</c>.</p>
- <pre>
-foo(P) when record(P, person) -> a_person;
-foo(_) -> not_a_person. </pre>
- <note>
- <p>This test checks that <c>P</c> is a tuple of arity <c>N + 1</c>, where <c>N</c> is the number
- of fields in the record, and the first element in the tuple is the atom <c>person</c>.</p>
- </note>
- </section>
-
- <section>
- <title>Pattern Matching</title>
- <p>Matching can be used in combination with records as shown in the following example:</p>
- <pre>
-> P = #person{name="Joe", phone=[0,0,7], address="A street"}.
-{person, "Joe", [0,0,7], "A street"}
-> #person{name = Name} = P, Name.
-"Joe" </pre>
- <p>The following function takes a list of <c>person</c> records and searches for the phone number of a person with a particular name:</p>
- <code type="none">
-
-find_phone([#person{name=Name, phone=Phone} | _], Name) ->
- {found, Phone};
-find_phone([_| T], Name) ->
- find_phone(T, Name);
-find_phone([], Name) ->
- not_found. </code>
- <note>
- <p>The fields referred to in the pattern can be given in any order.</p>
- </note>
- </section>
-
- <section>
- <title>Nested Records</title>
- <p>The value of a field in a record might be an instance of a record. Retrieval of nested data can be done stepwise, or in a single step, as shown in the following example:</p>
- <pre>
--record(name, {first = "Robert", last = "Ericsson"}).
--record(person, {name = #name{}, phone}).
-
-demo() ->
- P = #person{name= #name{first="Robert",last="Virding"}, phone=123},
- First = (P#person.name)#name.first. </pre>
- <note>
- <p>In this example, <c>demo()</c> evaluates to <c>"Robert"</c>.</p>
- </note>
- </section>
-
- <section>
- <title>Internal Representation of Records</title>
- <p>It is often desirable to write generic functions which will work on any record, not just a record of a particular type. For this reason, records are represented internally as tuples and the ordering of the fields in the tuple is strictly defined.</p>
- <p>For example, the record <c>-record(person, {name, phone, address}).</c> is represented internally by the tuple <c>{person, X, Y, Z}</c>.</p>
- <p>The arity of the tuple is one more than the number of fields in the tuple. The first element of the tuple is the name of the record, and the elements of the tuple are the fields in the record. The variables <c>X</c>, <c>Y</c> and <c>Z</c> will store the data contained in the record fields.</p>
- <p>The following two functions determine the indices in the tuple which refer to the named fields in the record:</p>
- <list type="bulleted">
- <item><c>record_info(fields, Rec) -> [Names]</c>. This function returns the names of the fields in the record <c>Rec</c>. For example, <c>record_info(fields, person)</c> evaluates to <c>[name, address, phone]</c>.</item>
- <item><c>record_info(size, Rec) -> Size</c>. This function returns the size of the record <c>Rec</c> when represented as a tuple, which is one more than the number of fields. For example, <c>record_info(size, person)</c> returns <c>4</c>.</item>
- </list>
- <p>In addition, <c>#Rec.Name</c> returns the index in the tuple representation of <c>Name</c> of the record <c>Rec</c>.</p>
- <note>
- <p><c>Name</c> must be an atom.</p>
- </note>
- <p>For example, the following test function <c>test()</c> might return the result shown:</p>
- <pre>
-test() ->
- {record_info(fields, person),
- record_info(size, person),
- #person.name}. </pre>
- <pre>
-> <input>Mod:test().</input>
-{[name,address,phone],4,2} </pre>
- <p>The order in which records map onto tuples is implementation dependent.</p>
- <note>
- <p><c>record_info</c> is a pseudo-function which cannot be exported from the module where it occurs.</p>
- </note>
- </section>
-
- <section>
- <title>Example</title>
- <pre>
-%% File: person.hrl
-
-%%-----------------------------------------------------------
-%% Data Type: person
-%% where:
-%% name: A string (default is undefined).
-%% age: An integer (default is undefined).
-%% phone: A list of integers (default is []).
-%% dict: A dictionary containing various information
-%% about the person.
-%% A {Key, Value} list (default is the empty list).
-%%------------------------------------------------------------
--record(person, {name, age, phone = [], dict = []}).
- </pre>
- <pre>
--module(person).
--include("person.hrl").
--compile(export_all). % For test purposes only.
-
-%% This creates an instance of a person.
-%% Note: The phone number is not supplied so the
-%% default value [] will be used.
-
-make_hacker_without_phone(Name, Age) ->
- #person{name = Name, age = Age,
- dict = [{computer_knowledge, excellent},
- {drinks, coke}]}.
-
-%% This demonstrates matching in arguments
-
-print(#person{name = Name, age = Age,
- phone = Phone, dict = Dict}) ->
- io:format("Name: ~s, Age: ~w, Phone: ~w ~n"
- "Dictionary: ~w.~n", [Name, Age, Phone, Dict]).
-
-%% Demonstrates type testing, selector, updating.
-
-birthday(P) when record(P, person) ->
- P#person{age = P#person.age + 1}.
-
-register_two_hackers() ->
- Hacker1 = make_hacker_without_phone("Joe", 29),
- OldHacker = birthday(Hacker1),
- % The central_register_server should have
- % an interface function for this.
- central_register_server ! {register_person, Hacker1},
- central_register_server ! {register_person,
- OldHacker#person{name = "Robert",
- phone = [0,8,3,2,4,5,3,1]}}. </pre>
- </section>
-</chapter>
-
diff --git a/system/doc/extensions/warning.gif b/system/doc/extensions/warning.gif
deleted file mode 100644
index 96af52360e..0000000000
--- a/system/doc/extensions/warning.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/Makefile b/system/doc/pics/Makefile
deleted file mode 100644
index fc5996259d..0000000000
--- a/system/doc/pics/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (C) 1996,1997 Ericsson Telecommunications
-# Author: Lars Thorsen
-#
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/doc
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-#
-# Common macros
-#
-
-GIF_FILES= \
- min_head.gif \
- ps.gif
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-
-docs:
-
-pdf:
-
-ps:
-
-debug opt:
-
-
-
-clean:
- @echo "No action" >/dev/null
-
-#
-# Release Targets
-#
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-ifeq ($(DOCTYPE),pdf)
-release_docs_spec: pdf
-else
-ifeq ($(DOCTYPE),ps)
-release_docs_spec: ps
-else
-release_docs_spec: docs
- $(INSTALL_DIR) $(RELSYSDIR)/pics
- $(INSTALL_DATA) $(GIF_FILES) $(RELSYSDIR)/pics
-endif
-endif
-
-release_spec:
diff --git a/system/doc/pics/app.gif b/system/doc/pics/app.gif
deleted file mode 100644
index 345d5795b1..0000000000
--- a/system/doc/pics/app.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/ede.gif b/system/doc/pics/ede.gif
deleted file mode 100644
index 7a51766898..0000000000
--- a/system/doc/pics/ede.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/ede_logo.gif b/system/doc/pics/ede_logo.gif
deleted file mode 100644
index f7c902791b..0000000000
--- a/system/doc/pics/ede_logo.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/min_head.gif b/system/doc/pics/min_head.gif
deleted file mode 100644
index 67948a6378..0000000000
--- a/system/doc/pics/min_head.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/notes.gif b/system/doc/pics/notes.gif
deleted file mode 100644
index e000cca26a..0000000000
--- a/system/doc/pics/notes.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/otp.gif b/system/doc/pics/otp.gif
deleted file mode 100644
index 48c4ca9c02..0000000000
--- a/system/doc/pics/otp.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/otp_logo.gif b/system/doc/pics/otp_logo.gif
deleted file mode 100644
index d1a1f7f72d..0000000000
--- a/system/doc/pics/otp_logo.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/ps.gif b/system/doc/pics/ps.gif
deleted file mode 100644
index 186dfc7e24..0000000000
--- a/system/doc/pics/ps.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/ref_man.gif b/system/doc/pics/ref_man.gif
deleted file mode 100644
index b13c4efd53..0000000000
--- a/system/doc/pics/ref_man.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/pics/user_guide.gif b/system/doc/pics/user_guide.gif
deleted file mode 100644
index e6275a803d..0000000000
--- a/system/doc/pics/user_guide.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/top/bin/otp_man_index b/system/doc/top/bin/otp_man_index
index bb913b25df..57a0f12d32 120000..100755
--- a/system/doc/top/bin/otp_man_index
+++ b/system/doc/top/bin/otp_man_index
@@ -1 +1,106 @@
-../../../../internal_tools/integration/scripts/otp_man_index \ No newline at end of file
+#!/opt/local/bin/perl
+
+use File::Find;
+use strict;
+
+#########################################
+# Usage:
+# $ cd $ERLANG_RELEASE
+# otp_man_index > doc/man_index.html
+#########################################
+
+my (@list,$info);
+
+find(\&wanted,'.');
+
+header();
+
+foreach $info (sort {lc($a->[0]) cmp lc($b->[0])} @list) {
+ my ($module,$application,$dir,$path) = @$info;
+
+ my $idx = -f "$dir/index.html" ? "$dir/index.html" : "$dir/../index.html";
+ # Remove .html extension from module name, if there is one
+ if ($module =~ /(\w+).html$/) {
+ $module = "$1";
+ }
+ print " <TR>\n";
+ print " <TD><A HREF=\"../$path\">$module</A></TD>\n";
+ print " <TD><A HREF=\"../$idx\">$application</A></TD>\n";
+ print " </TR>\n";
+}
+
+footer();
+
+###########################################################################
+
+sub wanted {
+ return unless /\.html$/ and -f $_;
+
+ open(FILE,$_) or die "ERROR: Can't open $File::Find::name: $!\n";
+ my $line;
+
+ while (defined ($line = <FILE>)) {
+ if ($line =~ /<!-- refpage -->/) {
+ close FILE;
+ my $path = $File::Find::name;
+ $path =~ s/\.\///; # Remove './' prefix
+ my $dir = $File::Find::dir;
+ $dir =~ s/\.\///; # Remove './' prefix
+ $dir =~ m&([^/]+)/doc/html$&;
+ my $application = $1;
+ push(@list, [$_,$application,$dir,$path]);
+ return;
+ }
+ }
+ close FILE;
+}
+
+
+sub header {
+ print <<EOS;
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!-- This file was generated by the otp_man_index script -->
+<HTML>
+<HEAD>
+ <link rel="stylesheet" href="otp_doc.css" type="text/css"/>
+ <TITLE>Erlang/OTP Manual Page Index</TITLE>
+</HEAD>
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
+ ALINK="#FF0000">
+<CENTER>
+<!-- A HREF="http://www.erlang.org/">
+<img alt="Erlang logo" src="erlang-logo.png"/ >
+</A><BR -->
+<SMALL>
+[<A HREF="index.html">Up</A> |
+<A HREF="http://www.erlang.org/">Erlang</A>]
+</SMALL><BR>
+<P><FONT SIZE="+4">Manual Page Index</FONT><BR>
+</CENTER>
+<CENTER>
+<P>
+<TABLE BORDER=1>
+<TR>
+ <TH>Manual Page</TH><TH>Application</TH>
+</TR>
+EOS
+}
+
+sub footer {
+ my $year = (localtime)[5] + 1900;
+ print <<EOS;
+</TABLE>
+</CENTER>
+<P>
+<CENTER>
+<HR>
+<SMALL>
+Copyright &copy; 1991-$year
+<a href="http://www.ericsson.com/technology/opensource/erlang/">
+Ericsson AB</a>
+</SMALL>
+</CENTER>
+</BODY>
+</HTML>
+EOS
+}
diff --git a/system/doc/top/src/erl_html_tools.erl b/system/doc/top/src/erl_html_tools.erl
index 35a199b08d..d93516768e 120000..100644
--- a/system/doc/top/src/erl_html_tools.erl
+++ b/system/doc/top/src/erl_html_tools.erl
@@ -1 +1,727 @@
-../../../../internal_tools/integration/scripts/make_index/erl_html_tools.erl \ No newline at end of file
+%% ``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/.
+%%
+%% 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.''
+%%
+-module(erl_html_tools).
+
+%% This file contains tools for updating HTML files in an installed system
+%% depending on the installed applications. Currently the only use is
+%% to update the top index file.
+
+
+%% ------ VERY IMPORTANT ------
+%%
+%% Original location for this file:
+%% /clearcase/otp/internal_tools/integration/scripts/make_index/
+%% When updating this file, copy the source to
+%% /home/otp/patch/share/program/
+%% and place .beam files (compiled with correct release) in all
+%% /home/otp/patch/share/program/<release>
+%% for releases >= R9C
+%%
+%% ----------------------------
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This program generate the top index files for the OTP documentation.
+% Part of the HTML code is in templates, like "index.html.src" and
+% part is written out from this module. So the program and the templates
+% has to match.
+%
+% The templates are searched from the current directory, a directory
+% "templates" relative to the current directory or at RootDir.
+%
+% RootDir is given as an argument or assumed to be code:root_dir(),
+% i.e. the root of the system running this program.
+%
+% The output is put into DestDir or RootDir if not given.
+%
+% The functions to call are
+%
+% top_index()
+% top_index([RootDir])
+% top_index([RootDir,DestDir,OtpRel])
+% top_index(RootDir)
+% top_index(RootDir, DestDir, OtpRel)
+%
+% where RootDir can be a string or an atom.
+%
+%
+% USING THIS SCRIPT FROM THE UNIX COMMAND LINE
+% --------------------------------------------
+% If the Erlang started is the same as the Erlang to create index.html
+% for the use
+%
+% % erl -noshell -s erl_html_tools top_index
+%
+% If you want to create an index for another Erlang installation or
+% documentation located separate from the object code, then use
+%
+% % erl -noshell -s erl_html_tools top_index /path/to/erlang/root
+%
+%
+% COLLECTING INFORMATION
+% ----------------------
+% This script assumes that all applications have an "info" file
+% in their top directory. This file should have some keywords with
+% values defined. The keys are 'group' and 'short' (for "short
+% description). See the OTP applications for examples.
+%
+% Some HTML code is generated by this program, others are taken from
+% the file "index.html.src" that may be located in the patch directory
+% or in the "$ERLANG_ROOT/doc/" directory.
+%
+% The code for creating the top index page assumes all applications
+% have a file "info" with some fields filled in
+%
+% short: Text Short text describing the application
+% group: tag [Heading] Group tag optionally followed by a description.
+% Only one app need to describe the group but
+% more than one can.
+%
+% FIXME: Check that there is documentation for the application, not just
+% an info file.
+% FIXME: Use records, it is now unreadable :-(
+% FIXME: Use a separate URL and URLIndexFile
+% FIXME: Pass the OTP release name as an argument instead of in
+% process dictionary (for elegance).
+
+-export([top_index/0,top_index/1,top_index/3,top_index_silent/3]).
+
+% This is the order groups are inserted into the file. Groups
+% not in this list is inserted in undefined order.
+
+group_order() ->
+ [
+ basic,
+ dat,
+ oam,
+ orb,
+ comm,
+ tools
+ ].
+
+top_index() ->
+ top_index(code:root_dir()).
+
+top_index([RootDir]) when atom(RootDir) ->
+ top_index(atom_to_list(RootDir));
+top_index([RootDir,DestDir,OtpRel])
+ when is_atom(RootDir), is_atom(DestDir), is_atom(OtpRel) ->
+ top_index(atom_to_list(RootDir), atom_to_list(DestDir), atom_to_list(OtpRel));
+top_index(RootDir) ->
+ {_,RelName} = init:script_id(),
+ top_index(RootDir, filename:join(RootDir, "doc"), RelName).
+
+top_index(RootDir, DestDir, OtpRel) ->
+ report("****\nRootDir: ~p", [RootDir]),
+ report("****\nDestDir: ~p", [DestDir]),
+ report("****\nOtpRel: ~p", [OtpRel]),
+
+ put(otp_release, OtpRel),
+
+ Templates = find_templates(["","templates",DestDir]),
+ report("****\nTemplates: ~p", [Templates]),
+ Bases = [{"../lib/", filename:join(RootDir,"lib")},
+ {"../", RootDir}],
+ Groups = find_information(Bases),
+ report("****\nGroups: ~p", [Groups]),
+ process_templates(Templates, DestDir, Groups).
+
+top_index_silent(RootDir, DestDir, OtpRel) ->
+ put(silent,true),
+ Result = top_index(RootDir, DestDir, OtpRel),
+ erase(silent),
+ Result.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Main loop - process templates
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+process_templates([], _DestDir, _Groups) ->
+ report("\n", []);
+process_templates([Template | Templates], DestDir, Groups) ->
+ report("****\nIN-FILE: ~s", [Template]),
+ BaseName = filename:basename(Template, ".src"),
+ case lists:reverse(filename:rootname(BaseName)) of
+ "_"++_ ->
+ %% One template expands to several output files.
+ process_multi_template(BaseName, Template, DestDir, Groups);
+ _ ->
+ %% Standard one-to-one template.
+ OutFile = filename:join(DestDir, BaseName),
+ subst_file("", OutFile, Template, Groups)
+ end,
+ process_templates(Templates, DestDir, Groups).
+
+
+process_multi_template(BaseName0, Template, DestDir, Info) ->
+ Ext = filename:extension(BaseName0),
+ BaseName1 = filename:basename(BaseName0, Ext),
+ [_|BaseName2] = lists:reverse(BaseName1),
+ BaseName = lists:reverse(BaseName2),
+ Groups0 = [{[$_|atom_to_list(G)],G} || G <- group_order()],
+ Groups = [{"",basic}|Groups0],
+ process_multi_template_1(Groups, BaseName, Ext, Template, DestDir, Info).
+
+process_multi_template_1([{Suffix,Group}|Gs], BaseName, Ext, Template, DestDir, Info) ->
+ OutFile = filename:join(DestDir, BaseName++Suffix++Ext),
+ subst_file(Group, OutFile, Template, Info),
+ process_multi_template_1(Gs, BaseName, Ext, Template, DestDir, Info);
+process_multi_template_1([], _, _, _, _, _) -> ok.
+
+subst_file(Group, OutFile, Template, Info) ->
+ report("\nOUTFILE: ~s", [OutFile]),
+ case subst_template(Group, Template, Info) of
+ {ok,Text,_NewInfo} ->
+ case file:open(OutFile, [write]) of
+ {ok, Stream} ->
+ file:write(Stream, Text),
+ file:close(Stream);
+ Error ->
+ error("Can't write to file ~s: ~w", [OutFile,Error])
+ end;
+ Error ->
+ error("Can't write to file ~s: ~w", [OutFile,Error])
+ end.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Find the templates
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+find_templates(SearchPaths) ->
+ find_templates(SearchPaths, SearchPaths).
+
+find_templates([SearchPath | SearchPaths], AllSearchPaths) ->
+ case filelib:wildcard(filename:join(SearchPath, "*.html.src")) of
+ [] ->
+ find_templates(SearchPaths, AllSearchPaths);
+ Result ->
+ Result
+ end;
+find_templates([], AllSearchPaths) ->
+ error("No templates found in ~p",[AllSearchPaths]).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This function read all application names and if present all "info" files.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+find_information(Bases) ->
+ Paths = find_application_paths(Bases),
+% report("****\nPaths: ~p", [Paths]),
+ Apps = find_application_infos(Paths),
+% report("****\nApps: ~p", [Apps]),
+ form_groups(Apps).
+
+% The input is a list of tuples of the form
+%
+% IN: [{BaseURL,SearchDir}, ...]
+%
+% and the output is a list
+%
+% OUT: [{Appname,AppVersion,AppPath,IndexUTL}, ...]
+%
+% We know URL ends in a slash.
+
+find_application_paths([]) ->
+ [];
+find_application_paths([{URL,Dir} | Paths]) ->
+ Sub1 = "doc/html/index.html",
+%% Sub2 = "doc/index.html",
+ case file:list_dir(Dir) of
+ {ok, Dirs} ->
+ AppDirs =
+ lists:filter(
+ fun(E) ->
+ is_match(E, "^[A-Za-z0-9_]+-[0-9\\.]+")
+ end, Dirs),
+ AppPaths =
+ lists:map(
+ fun(AppDir) ->
+ {ok,[App,Ver]} = regexp:split(AppDir, "-"),
+ DirPath = filename:join(Dir,AppDir),
+ AppURL = URL ++ AppDir,
+ {App,Ver,DirPath,AppURL ++ "/" ++ Sub1}
+%% case file:read_file_info(
+%% filename:join(DirPath, Sub1)) of
+%% {ok, _} ->
+%% {App,Ver,DirPath,AppURL ++ "/" ++ Sub1};
+%% _ ->
+%% {App,Ver,DirPath,AppURL ++ "/" ++ Sub2}
+%% end
+ end, AppDirs),
+ AppPaths ++ find_application_paths(Paths)
+ end.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Find info for one application.
+% Read the "info" file for each application. Look at "group" and "short".
+% key words.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% IN: [{Appname,AppVersion,AppPath,IndexUTL}, ...]
+% OUT: [{Group,Heading,[{AppName,[{AppVersion,Path,URL,Text} | ...]}
+% | ...]}, ...]
+
+find_application_infos([]) ->
+ [];
+find_application_infos([{App,Ver,AppPath,IndexURL} | Paths]) ->
+ case read_info(filename:join(AppPath,"info")) of
+ {error,_Reason} ->
+ warning("No info for app ~p", [AppPath]),
+ find_application_infos(Paths);
+ Db ->
+ {Group,Heading} =
+ case lists:keysearch("group", 1, Db) of
+ {value, {_, G0}} ->
+ % This value may be in two parts,
+ % tag and desciption
+ case string:str(G0," ") of
+ 0 ->
+ {list_to_atom(G0),""};
+ N ->
+ {list_to_atom(string:substr(G0,1,N-1)),
+ string:substr(G0,N+1)}
+ end;
+ false ->
+ error("No group given",[])
+ end,
+ Text =
+ case lists:keysearch("short", 1, Db) of
+ {value, {_, G1}} ->
+ G1;
+ false ->
+ ""
+ end,
+ [{Group,Heading,{App,{Ver,AppPath,IndexURL,Text}}}
+ | find_application_infos(Paths)]
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Group into one list element for each group name.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% IN : {Group,Heading,{AppName,{AppVersion,Path,URL,Text}}}
+% OUT: {Group,Heading,[{AppName,[{AppVersion,Path,URL,Text} | ...]} | ...]}
+
+form_groups(Apps) ->
+ group_apps(lists:sort(Apps)).
+
+group_apps([{Group,Heading,AppInfo} | Info]) ->
+ group_apps(Info, Group, Heading, [AppInfo]);
+group_apps([]) ->
+ [].
+
+% First description
+group_apps([{Group,"",AppInfo} | Info], Group, Heading, AppInfos) ->
+ group_apps(Info, Group, Heading, [AppInfo | AppInfos]);
+group_apps([{Group,Heading,AppInfo} | Info], Group, "", AppInfos) ->
+ group_apps(Info, Group, Heading, [AppInfo | AppInfos]);
+% Exact match
+group_apps([{Group,Heading,AppInfo} | Info], Group, Heading, AppInfos) ->
+ group_apps(Info, Group, Heading, [AppInfo | AppInfos]);
+% Different descriptions
+group_apps([{Group,_OtherHeading,AppInfo} | Info], Group, Heading, AppInfos) ->
+ warning("Group ~w descriptions differ",[Group]),
+ group_apps(Info, Group, Heading, [AppInfo | AppInfos]);
+group_apps(Info, Group, Heading, AppInfos) ->
+ [{Group,Heading,combine_apps(AppInfos)} | group_apps(Info)].
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Group into one list element for each application name.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% IN : {AppName,{AppVersion,Path,URL,Text}}
+% OUT: {AppName,[{AppVersion,Path,URL,Text} | ...]}
+
+combine_apps(Apps) ->
+ combine_apps(Apps,[],[]).
+
+combine_apps([{AppName,{Vsn1,Path1,URL1,Text1}},
+ {AppName,{Vsn2,Path2,URL2,Text2}} | Apps], AppAcc, Acc) ->
+ combine_apps([{AppName,{Vsn2,Path2,URL2,Text2}} | Apps],
+ [{Vsn1,Path1,URL1,Text1} | AppAcc],
+ Acc);
+combine_apps([{AppName,{Vsn1,Path1,URL1,Text1}},
+ {NewAppName,{Vsn2,Path2,URL2,Text2}} | Apps], AppAcc, Acc) ->
+ App = lists:sort(fun vsncmp/2,[{Vsn1,Path1,URL1,Text1}|AppAcc]),
+ combine_apps([{NewAppName,{Vsn2,Path2,URL2,Text2}} | Apps],
+ [],
+ [{AppName,App}|Acc]);
+combine_apps([{AppName,{Vsn,Path,URL,Text}}], AppAcc, Acc) ->
+ App = lists:sort(fun vsncmp/2,[{Vsn,Path,URL,Text}|AppAcc]),
+ [{AppName,App}|Acc].
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Open a template and fill in the missing parts
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% IN : {Group,Heading,[{AppName,[{AppVersion,Path,URL,Text} | ...]} | ...]}
+% OUT: String that is the HTML code
+
+subst_template(Group, File, Info) ->
+ case file:open(File, read) of
+ {ok,Stream} ->
+ Res = subst_template_1(Group, Stream, Info),
+ file:close(Stream),
+ Res;
+ {error,Reason} ->
+ {error, Reason}
+ end.
+
+subst_template_1(Group, Stream, Info) ->
+ case file:read(Stream, 100000) of
+ {ok, Template} ->
+ Fun = fun(Match, _) -> {subst(Match, Info, Group),Info} end,
+ gsub(Template, "#[A-Za-z0-9]+#", Fun, Info);
+ {error, Reason} ->
+ {error, Reason}
+ end.
+
+get_version(Info) ->
+ case lists:keysearch('runtime', 1, Info) of
+ {value, {_,_,Apps}} ->
+ case lists:keysearch("erts", 1, Apps) of
+ {value, {_,[{Vers,_,_,_} | _]}} ->
+ Vers;
+ _ ->
+ ""
+ end;
+ _ ->
+ ""
+ end.
+
+subst("#release#", _Info, _Group) ->
+ get(otp_release);
+subst("#version#", Info, _Group) ->
+ get_version(Info);
+subst("#copyright#", _Info, _Group) ->
+ "copyright Copyright &copy; 1991-2004";
+subst("#groups#", Info, _Group) ->
+ [
+ "<table border=0 width=\"90%\" cellspacing=3 cellpadding=5>\n",
+ subst_groups(Info),
+ "</table>\n"
+ ];
+subst("#applinks#", Info, Group) ->
+ subst_applinks(Info, Group);
+subst(KeyWord, Info, _Group) ->
+ case search_appname(KeyWord -- "##", Info) of
+ {ok,URL} ->
+ URL;
+ _ ->
+ warning("Can't substitute keyword ~s~n",[KeyWord]),
+ ""
+ end.
+
+search_appname(App, [{_Group,_,Apps} | Groups]) ->
+ case lists:keysearch(App, 1, Apps) of
+ {value, {_,[{_Vers,_Path,URL,_Text} | _]}} ->
+ {ok,lists:sublist(URL, length(URL) - length("/index.html"))};
+ _ ->
+ search_appname(App, Groups)
+ end;
+search_appname(_App, []) ->
+ {error,noapp}.
+
+subst_applinks(Info, Group) ->
+ subst_applinks_1(group_order(), Info, Group).
+
+subst_applinks_1([G|Gs], Info0, Group) ->
+ case lists:keysearch(G, 1, Info0) of
+ {value,{G,Heading,Apps}} ->
+ Info = lists:keydelete(G, 1, Info0),
+ ["\n<li>",Heading,"\n<ul>\n",
+ html_applinks(Apps),"\n</ul></li>\n"|
+ subst_applinks_1(Gs, Info, Group)];
+ false ->
+ warning("No applications in group ~w\n", [G]),
+ subst_applinks_1(Gs, Info0, Group)
+ end;
+subst_applinks_1([], [], _) -> [];
+subst_applinks_1([], Info, _) ->
+ error("Info left:\n", [Info]),
+ [].
+
+html_applinks([{Name,[{_,_,URL,_}|_]}|AppNames]) ->
+ ["<li><a href=\"",URL,"\">",Name,
+ "</a></li>\n"|html_applinks(AppNames)];
+html_applinks([]) -> [].
+
+
+% Info: [{Group,Heading,[{AppName,[{AppVersion,Path,URL,Text} | ..]} | ..]} ..]
+
+subst_groups(Info0) ->
+ {Html1,Info1} = subst_known_groups(group_order(), Info0, ""),
+ {Html2,Info} = subst_unknown_groups(Info1, Html1, []),
+ Fun = fun({_Group,_GText,Applist}, Acc) -> Applist ++ Acc end,
+ case lists:foldl(Fun, [], Info) of
+ [] ->
+ Html2;
+ Apps ->
+ [Html2,group_table("Misc Applications",Apps)]
+ end.
+
+
+subst_known_groups([], Info, Text) ->
+ {Text,Info};
+subst_known_groups([Group | Groups], Info0, Text0) ->
+ case lists:keysearch(Group, 1, Info0) of
+ {value,{_,Heading,Apps}} ->
+ Text = group_table(Heading,Apps),
+ Info = lists:keydelete(Group, 1, Info0),
+ subst_known_groups(Groups, Info, Text0 ++ Text);
+ false ->
+ warning("No applications in group ~w~n",[Group]),
+ subst_known_groups(Groups, Info0, Text0)
+ end.
+
+
+subst_unknown_groups([], Text0, Left) ->
+ {Text0,Left};
+subst_unknown_groups([{Group,"",Apps} | Groups], Text0, Left) ->
+ warning("No text describes ~w",[Group]),
+ subst_unknown_groups(Groups, Text0, [{Group,"",Apps} | Left]);
+subst_unknown_groups([{_Group,Heading,Apps} | Groups], Text0, Left) ->
+ Text = group_table(Heading,Apps),
+ subst_unknown_groups(Groups, Text0 ++ Text, Left).
+
+
+group_table(Heading,Apps) ->
+ [
+ " <tr>\n",
+ " <td colspan=2 class=header>\n",
+ " <font size=\"+1\"><b>",Heading,"</b></font>\n",
+ " </td>\n",
+ " </tr>\n",
+ subst_apps(Apps),
+ " <tr>\n",
+ " <td colspan=2><font size=1>&nbsp;</font></td>\n",
+ " </tr>\n"
+ ].
+
+% Count and split the applications in half to get the right sort
+% order in the table.
+
+subst_apps([{App,VersionInfo} | Apps]) ->
+ [subst_app(App, VersionInfo) | subst_apps(Apps)];
+subst_apps([]) ->
+ [].
+
+
+subst_app(App, [{VSN,_Path,Link,Text}]) ->
+ [
+ " <tr class=app>\n",
+ " <td align=left valign=top>\n",
+ " <table border=0 width=\"100%\" cellspacing=0 cellpadding=0>\n",
+ " <tr class=app>\n",
+ " <td align=left valign=top>\n",
+ " <a href=\"",Link,"\" target=\"_top\">",uc(App),"</a>\n",
+ " <a href=\"",Link,"\" target=\"_top\">",VSN,"</a>\n",
+ " </td>\n",
+ " </tr>\n",
+ " </table>\n"
+ " </td>\n",
+ " <td align=left valign=top>\n",
+ Text,"\n",
+ " </td>\n",
+ " </tr>\n"
+ ];
+subst_app(App, [{VSN,_Path,Link,Text} | VerInfos]) ->
+ [
+ " <tr class=app>\n",
+ " <td align=left valign=top>\n",
+ " <table border=0 width=\"100%\" cellspacing=0 cellpadding=0>\n",
+ " <tr class=app>\n",
+ " <td align=left valign=top>\n",
+ " <a href=\"",Link,"\" target=\"_top\">",uc(App),
+ "</a>&nbsp;&nbsp;<br>\n",
+ " <a href=\"",Link,"\" target=\"_top\">",VSN,"</a>\n",
+ " </td>\n",
+ " <td align=right valign=top width=50>\n",
+ " <table border=0 width=40 cellspacing=0 cellpadding=0>\n",
+ " <tr class=app>\n",
+ " <td align=left valign=top class=appnums>\n",
+ subst_vsn(VerInfos),
+ " </td>\n",
+ " </tr>\n",
+ " </table>\n"
+ " </td>\n",
+ " </tr>\n",
+ " </table>\n"
+ " </td>\n",
+ " <td align=left valign=top>\n",
+ Text,"\n",
+ " </td>\n",
+ " </tr>\n"
+ ].
+
+
+subst_vsn([{VSN,_Path,Link,_Text} | VSNs]) ->
+ [
+ " <font size=\"2\"><a class=anum href=\"",Link,"\" target=\"_top\">",
+ VSN,
+ "</a></font><br>\n",
+ subst_vsn(VSNs)
+ ];
+subst_vsn([]) ->
+ "".
+
+
+% Yes, this is very inefficient an is done for every comarision
+% in the sort but it doesn't matter in this case.
+
+vsncmp({Vsn1,_,_,_}, {Vsn2,_,_,_}) ->
+ L1 = [list_to_integer(N1) || N1 <- string:tokens(Vsn1, ".")],
+ L2 = [list_to_integer(N2) || N2 <- string:tokens(Vsn2, ".")],
+ L1 > L2.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GENERIC FUNCTIONS, NOT SPECIFIC FOR GENERATING INDEX.HTML
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Read the "info" file into a list of Key/Value pairs
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+read_info(File) ->
+ case file:open(File, read) of
+ {ok,Stream} ->
+ Res =
+ case file:read(Stream,10000) of
+ {ok, Text} ->
+ Lines = string:tokens(Text, "\n\r"),
+ KeyValues0 = lines_to_key_value(Lines),
+ combine_key_value(KeyValues0);
+ {error, Reason} ->
+ {error, Reason}
+ end,
+ file:close(Stream),
+ Res;
+ {error,Reason} ->
+ {error,Reason}
+ end.
+
+combine_key_value([{Key,Value1},{Key,Value2} | KeyValues]) ->
+ combine_key_value([{Key,Value1 ++ "\n" ++ Value2} | KeyValues]);
+combine_key_value([KeyValue | KeyValues]) ->
+ [KeyValue | combine_key_value(KeyValues)];
+combine_key_value([]) ->
+ [].
+
+lines_to_key_value([]) ->
+ [];
+lines_to_key_value([Line | Lines]) ->
+ case regexp:first_match(Line, "^[a-zA-Z_\\-]+:") of
+ nomatch ->
+ case regexp:first_match(Line, "[\041-\377]") of
+ nomatch ->
+ lines_to_key_value(Lines);
+ _ ->
+ warning("skipping line \"~s\"",[Line]),
+ lines_to_key_value(Lines)
+ end;
+ {match, _, Length} ->
+ Value0 = lists:sublist(Line, Length+1, length(Line) - Length),
+ {ok, Value1, _} = regexp:sub(Value0, "^[ \t]*", ""),
+ {ok, Value, _} = regexp:sub(Value1, "[ \t]*$", ""),
+ Key = lists:sublist(Line, Length-1),
+ [{Key,Value} | lines_to_key_value(Lines)]
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Extensions to the 'regexp' module.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+is_match(Ex, Re) ->
+ case regexp:first_match(Ex, Re) of
+ {match, _, _} ->
+ true;
+ nomatch ->
+ false
+ end.
+
+%% -type gsub(String, RegExp, Fun, Acc) -> subres().
+%% Substitute every match of the regular expression RegExp with the
+%% string returned from the function Fun(Match, Acc). Accept pre-parsed
+%% regular expressions. Acc is an argument to the Fun. The Fun should return
+%% a tuple {Replacement, NewAcc}.
+
+gsub(String, RegExp, Fun, Acc) when list(RegExp) ->
+ case regexp:parse(RegExp) of
+ {ok,RE} -> gsub(String, RE, Fun, Acc);
+ {error,E} -> {error,E}
+ end;
+gsub(String, RE, Fun, Acc) ->
+ {match,Ss} = regexp:matches(String, RE),
+ {NewString, NewAcc} = sub_repl(Ss, Fun, Acc, String, 1),
+ {ok,NewString,NewAcc}.
+
+
+% New code that uses fun for finding the replacement. Also uses accumulator
+% to pass argument between the calls to the fun.
+sub_repl([{St,L}|Ss], Fun, Acc0, S, Pos) ->
+ Match = string:substr(S, St, L),
+ {Rep, Acc} = Fun(Match, Acc0),
+ {Rs, NewAcc} = sub_repl(Ss, Fun, Acc, S, St+L),
+ {string:substr(S, Pos, St-Pos) ++ Rep ++ Rs, NewAcc};
+sub_repl([], _Fun, Acc, S, Pos) -> {string:substr(S, Pos), Acc}.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Error and warnings
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+error(Format, Args) ->
+ io:format("ERROR: " ++ Format ++ "\n", Args),
+ exit(1).
+
+warning(Format, Args) ->
+ case get(silent) of
+ true -> ok;
+ _ -> io:format("WARNING: " ++ Format ++ "\n", Args)
+ end.
+
+report(Format, Args) ->
+ case get(silent) of
+ true -> ok;
+ _ -> io:format(Format ++ "\n", Args)
+ end.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Extensions to the 'string' module.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+uc(String) ->
+ lists:reverse(uc(String, [])).
+
+uc([], Acc) ->
+ Acc;
+uc([H | T], Acc) when is_integer(H), [97] =< H, H =< $z ->
+ uc(T, [H - 32 | Acc]);
+uc([H | T], Acc) ->
+ uc(T, [H | Acc]).
diff --git a/system/doc/top/src/erlresolvelinks.erl b/system/doc/top/src/erlresolvelinks.erl
index 8d277ad17a..a891b67421 120000..100644
--- a/system/doc/top/src/erlresolvelinks.erl
+++ b/system/doc/top/src/erlresolvelinks.erl
@@ -1 +1,144 @@
-../../../../internal_tools/integration/scripts/resolve_links/erlresolvelinks.erl \ No newline at end of file
+-module(erlresolvelinks).
+
+%% ------ VERY IMPORTANT ------
+%%
+%% Original location for this file:
+%% /clearcase/otp/internal_tools/integration/scripts/resolve_links/
+%% When updating this file, copy the source to
+%% /usr/local/otp/patch/share/program/
+%% and place .beam files (compiled with correct release) in all
+%% /usr/local/otp/patch/share/program/<release>
+%% for releases >= R10B
+%%
+%% ----------------------------
+
+-export([make/1, do_make/1, do_make/2, do_make/3]).
+-include_lib("kernel/include/file.hrl").
+
+-define(JAVASCRIPT_NAME, "erlresolvelinks.js").
+
+make([RootDir]) ->
+ do_make(RootDir);
+make([RootDir, DestDir]) ->
+ do_make(RootDir, DestDir);
+make([RootDir, DestDir, Name]) ->
+ do_make(RootDir, DestDir, Name).
+
+do_make(RootDir) ->
+ DestDir = filename:join(RootDir, "doc"),
+ do_make(RootDir, DestDir).
+
+do_make(RootDir, DestDir) ->
+ do_make(RootDir, DestDir, ?JAVASCRIPT_NAME).
+
+do_make(RootDir, DestDir, Name) ->
+ %% doc/Dir
+ %% erts-Vsn
+ %% lib/App-Vsn
+ DocDirs0 = get_dirs(filename:join([RootDir, "doc"])),
+ DocDirs = lists:map(fun(Dir) ->
+ D = filename:join(["doc", Dir]),
+ {D, D} end, DocDirs0),
+
+ ErtsDirs = latest_app_dirs(RootDir, ""),
+ AppDirs = latest_app_dirs(RootDir, "lib"),
+
+ AllAppDirs =
+ lists:map(
+ fun({App, AppVsn}) -> {App, filename:join([AppVsn, "doc", "html"])}
+ end, ErtsDirs ++ AppDirs),
+
+ AllDirs = DocDirs ++ AllAppDirs,
+ {ok, Fd} = file:open(filename:join([DestDir, Name]), [write]),
+ UTC = calendar:universal_time(),
+ io:fwrite(Fd, "/* Generated by ~s at ~w UTC */\n",
+ [atom_to_list(?MODULE), UTC]),
+ io:fwrite(Fd, "function erlhref(ups, app, rest) {\n", []),
+ io:fwrite(Fd, " switch(app) {\n", []),
+ lists:foreach(
+ fun({Tag, Dir}) ->
+ io:fwrite(Fd, " case ~p:\n", [Tag]),
+ io:fwrite(Fd, " location.href=ups + \"~s/\" + rest;\n",
+ [Dir]),
+ io:fwrite(Fd, " break;\n", [])
+ end, AllDirs),
+ io:fwrite(Fd, " default:\n", []),
+ io:fwrite(Fd, " location.href=ups + \"Unresolved\";\n", []),
+ io:fwrite(Fd, " }\n", []),
+ io:fwrite(Fd, "}\n", []),
+ file:close(Fd),
+ ok.
+
+get_dirs(Dir) ->
+ {ok, Files} = file:list_dir(Dir),
+ AFiles =
+ lists:map(fun(File) -> {File, filename:join([Dir, File])} end, Files),
+ lists:zf(fun is_dir/1, AFiles).
+
+is_dir({File, AFile}) ->
+ {ok, FileInfo} = file:read_file_info(AFile),
+ case FileInfo#file_info.type of
+ directory ->
+ {true, File};
+ _ ->
+ false
+ end.
+
+latest_app_dirs(RootDir, Dir) ->
+ ADir = filename:join(RootDir, Dir),
+ RDirs0 = get_dirs(ADir),
+ RDirs1 = lists:filter(fun is_app_dir/1, RDirs0),
+ %% Build a list of {{App, VsnNumList}, AppVsn}
+ SDirs0 =
+ lists:map(fun(AppVsn) ->
+ [App, VsnStr] = string:tokens(AppVsn, "-"),
+ VsnNumList = vsnstr_to_numlist(VsnStr),
+ {{App, VsnNumList}, AppVsn} end,
+ RDirs1),
+ SDirs1 = lists:keysort(1, SDirs0),
+ App2Dirs = lists:foldr(fun({{App, _VsnNumList}, AppVsn}, Acc) ->
+ case lists:keymember(App, 1, Acc) of
+ true ->
+ Acc;
+ false ->
+ [{App, AppVsn}| Acc]
+ end
+ end, [], SDirs1),
+ lists:map(fun({App, AppVsn}) -> {App, filename:join([Dir, AppVsn])} end,
+ App2Dirs).
+
+is_app_dir(Dir) ->
+ case string:tokens(Dir, "-") of
+ [_Name, Rest] ->
+ is_vsnstr(Rest);
+ _ ->
+ false
+ end.
+
+is_vsnstr(Str) ->
+ case string:tokens(Str, ".") of
+ [_] ->
+ false;
+ Toks ->
+ lists:all(fun is_numstr/1, Toks)
+ end.
+
+is_numstr(Cs) ->
+ lists:all(fun(C) when $0 =< C, C =< $9 ->
+ true;
+ (_) ->
+ false
+ end, Cs).
+
+%% We know:
+
+vsnstr_to_numlist(VsnStr) ->
+ lists:map(fun(NumStr) -> list_to_integer(NumStr) end,
+ string:tokens(VsnStr, ".")).
+
+
+
+
+
+
+
diff --git a/system/doc/top/src/permuted_index.erl b/system/doc/top/src/permuted_index.erl
deleted file mode 120000
index e65338a517..0000000000
--- a/system/doc/top/src/permuted_index.erl
+++ /dev/null
@@ -1 +0,0 @@
-../../../../internal_tools/integration/scripts/make_index/permuted_index.erl \ No newline at end of file
diff --git a/system/doc/top/templates/erlang.gif b/system/doc/top/templates/erlang.gif
deleted file mode 100644
index 91fd4b9647..0000000000
--- a/system/doc/top/templates/erlang.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/top/templates/first.html.src b/system/doc/top/templates/first.html.src
deleted file mode 100644
index edef1c0e5c..0000000000
--- a/system/doc/top/templates/first.html.src
+++ /dev/null
@@ -1,104 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>Erlang/OTP #release# Documentation</title>
- <style type="text/css">
-<!--
- BODY { background: white }
-
- BODY { font-family: Verdana, Arial, Helvetica, sans-serif }
- TH { font-family: Verdana, Arial, Helvetica, sans-serif }
- TD { font-family: Verdana, Arial, Helvetica, sans-serif }
- P { font-family: Verdana, Arial, Helvetica, sans-serif }
-
- .header { background: #222; color: #fff }
- .app { background: #ccc }
--->
- </style>
-</head>
-<body bgcolor=white text="#000000" link="#0000ff" vlink="#ff00ff"
- alink="#ff0000">
-<center>
-<p>
-<font size="+1">Welcome to Erlang/OTP, a complete<br>
-development environment<br>
-for concurrent programming.</font>
-</p>
-</center>
-<br>
-<br>
-<br>
-<p><b>
-<font size"+1">
-Some hints that may get you started faster
-</font>
-</b></p>
-
-<ul>
-
-<li>In addition the the documentation here Erlang is described in the book
-<a href="http://www.pragprog.com/titles/jaerlang" target="_top">"Programming Erlang"</a>, ISBN 978-1-934356-00-5 which we really recommend as a start.<br/ >
-The complete language is also described in the <a href="reference_manual/part_frame.html" target="_top">Erlang Reference Manual</a>. An Erlang tutorial can be found in <a href="getting_started/part_frame.html" target="_top">Getting Started With Erlang</a>.
-</li>
-<li>Erlang/OTP is divided into a number of OTP <a
-href="applications.html">applications</a>. An application normally contains
-Erlang <a href="man_index.html">modules</a>. Some OTP applications,
-such as the C interface <em>Erl_Interface</em>, are written in other languages and have no Erlang
-modules.
-
-<p>
-Note that functions that are not imported or prefixed with a module
-name belong to the module
-<a href="#kernel#/erlang.html" target="_top">erlang</a>
-(in the <em>Kernel</em> application).
-</p>
-<p>
-<li>On a Unix system you can view the manual pages from the command
-line using
-<pre>
- % erl -man &lt;module&gt;
-</pre>
-<p>
-
-<li> You can of course use any editor you like to write Erlang
-programs, but if you use Emacs there exists editing support such as
-indentation, syntax highlighting, electric commands, module name
-verification, comment support including paragraph filling, skeletons,
-tags support and more. See the <a href="#tools#/index.html"
-target="_top">Tools</a> application for details.
-<p>
-There is also an
-<a href="http://erlide.sourceforge.net" target="_top">
-Erlang plugin (ErlIde) for Eclipse</a> if you prefer a more graphical
-environment. ErlIde is under development and should at the time
-of writing this be quite stable and useful.
-<li>When developing with Erlang/OTP you usually test your programs
-from the interactive shell (see <a href="getting_started/part_frame.html"
-target="_top">Getting Started With Erlang</a>) where you can call individual
-functions. There is also a number of tools available, such as the graphical <a
-href="#debugger#/index.html" target="_top">Debugger</a>, the process
-manager <a href="#pman#/index.html" target="_top">Pman</a> and table
-viewer <a href="#tv#/index.html" target="_top">TV</a>.
-<p> Also note that there are some shell features like history list
-(control-p and control-n), inline editing (emacs key bindings) and
-module and function name completion (tab) if the module is loaded.
-<p>
-
-<li>OpenSource users can ask questions
-and share experiences on the <a href="http://www.erlang.org/faq.html"
-target="_top">Erlang questions mailing list</a>. <p>
-
-<li>Before asking a question you can browse the <a
-href="http://www.erlang.org/pipermail/erlang-questions/"
-target="_top">mailing list archive</a> and read the <a
-href="http://www.erlang.org/faq/faq.html" target="_top">Frequently
-Asked Questions</a>. <p>
-
-<li>Additional information and links of interest for Erlang programmers can be found on the Erlang Open Source site
-<a href="http://www.erlang.org/" target="_top">http://www.erlang.org</a>.
-<p>
-
-</ul>
-
-</body>
-</html>
diff --git a/system/doc/top/templates/flip_closed.gif b/system/doc/top/templates/flip_closed.gif
deleted file mode 100755
index 9a27c7c25d..0000000000
--- a/system/doc/top/templates/flip_closed.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/top/templates/flip_google.gif b/system/doc/top/templates/flip_google.gif
deleted file mode 100755
index 3f0543c2bb..0000000000
--- a/system/doc/top/templates/flip_google.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/top/templates/flip_open.gif b/system/doc/top/templates/flip_open.gif
deleted file mode 100755
index 9dda60e73a..0000000000
--- a/system/doc/top/templates/flip_open.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/top/templates/flip_static.gif b/system/doc/top/templates/flip_static.gif
deleted file mode 100755
index 2b3ddb5382..0000000000
--- a/system/doc/top/templates/flip_static.gif
+++ /dev/null
Binary files differ
diff --git a/system/doc/top/templates/flipmenu.js b/system/doc/top/templates/flipmenu.js
deleted file mode 100755
index 92a5a58a06..0000000000
--- a/system/doc/top/templates/flipmenu.js
+++ /dev/null
@@ -1,342 +0,0 @@
-// ######################################################################
-
-// ## flipMenu 5.0.0 (c) J. Reijers
-// ## Last modifications: 23 March 2007
-
-// ######################################################################
-
-// ## Degree of indentation from the left.
- flipIndentation = "5px";
-
-// ## Padding inbetween menu items.
- flipVerticalPadding = "4px";
-
-// ## Margin between the left of the browser and the menu.
- flipLeftMargin = "16px";
-
-// ## Margin between the top of the browser and the menu.
- flipTopMargin = "10px";
-
-// ## Allow multiple menus to fold out without closing all the other open ones.
- flipOpenMultipleMenus = false;
-
-// ## Preserve the current state of the menu (requires cookies).
- flipSaveMenuState = true;
-
-// ## Use custom images for bullets
- flipImages = true;
-
-// ## Images to use (specify full path)
- flipImg_open = "flip_open.gif";
- flipImg_closed = "flip_closed.gif";
- flipImg_static = "flip_static.gif";
-
-// ## Initialise all flipMenus onload
- flipInitOnLoad = true;
-
-// ## Message to display in status bar while loading
- flipLoadingMessage = "Loading...";
-
-// ######################################################################
-
-function alterSize(someSize, alterAmount) {
- someSize = String(someSize);
- var tmpNr = parseFloat(someSize.replace(/\D/g, ""));
- var tmpChar = someSize.replace(/\d/g, "");
- return isNaN(tmpNr) ? someSize : ((tmpNr + alterAmount) + tmpChar);
-}
-
-isIE = (String(navigator.appVersion).indexOf("MSIE") > -1);
-if (!isIE) flipIndentation = alterSize(flipIndentation, -16);
-if (!isIE) flipLeftMargin = alterSize(flipLeftMargin, -16);
-
-document.write(
- "<style type=\"text/css\">" +
-
- "ul.flipMenu { margin-top: " + flipTopMargin + "; margin-left: " + flipLeftMargin + "; " + (flipImages ? "" : "list-style-type: none;") + " }" +
- "ul.flipMenu ul, ul.flipMenu li { padding-top: " + flipVerticalPadding + "; margin-left: " + flipIndentation + "; margin-right: 0px; " + (flipImages ? "" : "list-style-type: none;") + " }" +
-
- "li.flipFolderOpen { cursor: pointer; " + (flipImages ? "list-style-image: url(" + flipImg_open + ");" : "") + " }" +
- "li.flipFolderClosed { cursor: pointer; " + (flipImages ? "list-style-image: url(" + flipImg_closed + ");" : "") + " }" +
-
- "</style>"
-);
-
-if (flipImages) {
- aFlipPreloads = [];
- aFlipPreloads[0] = new Image;
- aFlipPreloads[0].src = flipImg_open;
- aFlipPreloads[1] = new Image;
- aFlipPreloads[1].src = flipImg_closed;
- aFlipPreloads[2] = new Image;
- aFlipPreloads[2].src = flipImg_static;
-}
-
-function addEvent(someObj, someEvent, someFunction) {
- if (someObj.addEventListener) { someObj.addEventListener(someEvent, someFunction, true); return true; } else if (someObj.attachEvent) return someObj.attachEvent("on" + someEvent, someFunction); else return false;
-}
-
-function openCloseFlip(theItem, newSetting, openParents) {
- if (theItem.flipID) {
- if (openParents) {
- var tmpItem = theItem;
- while (tmpItem.parentElement || tmpItem.parentNode) {
- tmpItem = (tmpItem.parentElement) ? tmpItem.parentElement : tmpItem.parentNode;
- openCloseFlip(tmpItem, newSetting);
- }
- }
- if ((theItem.className == "flipFolderOpen" && newSetting == "closed") || (theItem.className == "flipFolderClosed" && newSetting == "open")) {
- if (!theItem.childrenInitialised) {
- for (var j = 0; j < theItem.childNodes.length; j++) if (theItem.childNodes[j].nodeName == "UL" && !theItem.childNodes[j].initialised) initFlip(theItem.childNodes[j]);
- theItem.childrenInitialised = true;
- }
- theItem.getElementsByTagName("UL")[0].style.display = (newSetting == "open") ? "" : "none";
- theItem.className = newSetting == "open" ? "flipFolderOpen" : "flipFolderClosed";
- }
- }
-}
-
-function openFlip(theItem, openParents) {
- openCloseFlip(theItem, "open", openParents);
-}
-
-function closeFlip(theItem, closeParents) {
- openCloseFlip(theItem, "closed", closeParents);
-}
-
-function toggleFlip(theElement) {
- if (theElement.flipID) {
- var theItem = theElement;
- var isContained = true;
- } else {
- if (theElement && theElement.button > 0) return false;
- var theItem = (isIE) ? event.srcElement : theElement.target;
-
- var isContained = false;
- if (theItem.className == "flipFolderOpen" || theItem.className == "flipFolderClosed") isContained = true; else while (theItem.parentElement || theItem.parentNode) {
- if (theItem.className == "flipStatic" || theItem.className == "flipFolderOpen" || theItem.className == "flipFolderClosed") {
- isContained = (theItem.className == "flipFolderOpen" || theItem.className == "flipFolderClosed");
- break;
- }
- theItem = (theItem.parentElement) ? theItem.parentElement : theItem.parentNode;
- }
- }
-
- var toOpenFlip = (isContained && theItem.className == "flipFolderClosed");
-
- if (!flipOpenMultipleMenus && (toOpenFlip || theItem.className == "flipStatic")) {
- if (theItem.parentElement || theItem.parentNode) {
- var parentUL = (theItem.parentElement) ? theItem.parentElement : theItem.parentNode;
- for (var i = 0; i < parentUL.childNodes.length; i++) closeFlip(parentUL.childNodes[i]);
- }
- }
-
- if (isContained) {
- if (toOpenFlip) openFlip(theItem); else closeFlip(theItem);
- }
-}
-
-function setAllFlips(startElement, newSetting) {
- if (typeof startElement == "undefined") var startElement = document;
- if (typeof newSetting == "undefined") var newSetting = "closed";
-
- var aUL = startElement.getElementsByTagName("UL");
- for (var i = 0; i < aUL.length; i++) {
- var parentFlip = aUL[i].parentElement ? aUL[i].parentElement : aUL[i].parentNode;
- openCloseFlip(parentFlip, newSetting);
- }
-}
-
-function openAllFlips(startElement) {
- setAllFlips(startElement, "open");
-}
-
-function closeAllFlips(startElement) {
- setAllFlips(startElement, "closed");
-}
-
-function initFlip(startElement) {
- if (!document.createElement) return false;
-
- if (!startElement || !startElement.nodeName) {
- var aUL = document.getElementsByTagName("UL");
- for (var i = 0; i < aUL.length; i++) {
- if (flipLoadingMessage != "") window.status = flipLoadingMessage + " " + parseInt((i / (aUL.length - 1)) * 100, 10) + "%";
- var curUL = aUL[i];
- if (curUL.className == "flipMenu") {
- initFlip(curUL);
-
- // ## Fix text selecting problem in Mozilla
- curUL.onselectstart = new Function("return false");
- curUL.onmousedown = new Function("return false");
- curUL.onclick = new Function("return true");
- }
- }
-
- if (flipSaveMenuState) loadMenuState();
-
- if (flipLoadingMessage != "") window.status = "";
- return true;
- }
-
- if (startElement.className == "flipMenu") startElement.style.display = "";
-
- if (!startElement.childNodes || startElement.childNodes.length == 0) return false;
-
- if (typeof flipIDCur == "undefined") flipIDCur = 0;
- if (!startElement.initialised) {
- var aUL = startElement.getElementsByTagName("UL");
- for (var i = 0; i < aUL.length; i++) aUL[i].style.display = "none";
- }
-
- for (var i = 0; i < startElement.childNodes.length; i++) {
- var curNode = startElement.childNodes[i];
- if (curNode.nodeName == "LI") {
- flipIDCur++;
- curNode.flipID = flipIDCur;
-
- var nodeHasChildren = curNode.getElementsByTagName("UL").length > 0;
- if (nodeHasChildren) {
- if (flipImages && curNode.flipClosed) curNode.style.listStyleImage = "url(" + curNode.flipClosed + ")";
-
- if (curNode.className == null || curNode.className == "") curNode.className = "flipFolderClosed";
- } else {
- curNode.className = "flipStatic";
- if (flipImages && !curNode.style.listStyleImage) {
- if (!curNode.flipStatic) curNode.flipStatic = flipImg_static;
- curNode.style.listStyleImage = "url(" + curNode.flipStatic + ")";
- }
- }
-
- if (!curNode.flipOpen) curNode.flipOpen = flipImg_open;
- if (!curNode.flipClosed) curNode.flipClosed = flipImg_closed;
-
- if (curNode.flipIsOpen) openFlip(curNode);
- }
- }
-
- startElement.initialised = true;
-}
-
-function rootOfFlip(flipID, startElement) {
-
- function containsFlip(startElement, flipID) {
- var flipFound = false;
- var i = 0;
- while (i < startElement.childNodes.length && !flipFound) {
- var curNode = startElement.childNodes[i];
- flipFound = (curNode.flipID == flipID) ? true : containsFlip(curNode, flipID);
- i++;
- }
- return flipFound;
- }
-
- var rootFlip = null;
-
- if (!startElement || !startElement.nodeName) {
- var aUL = document.getElementsByTagName("UL");
- var i = 0;
- while (rootFlip == null && i < aUL.length) {
- var curUL = aUL[i];
- if (curUL.nodeName == "UL" && curUL.className == "flipMenu") rootFlip = rootOfFlip(flipID, curUL);
- i++;
- }
- return rootFlip;
- }
-
- if (startElement.childNodes) for (var i = 0; i < startElement.childNodes.length; i++) {
- var curNode = startElement.childNodes[i];
- if (curNode.flipID == flipID || containsFlip(curNode, flipID)) rootFlip = curNode;
- }
-
- return rootFlip;
-}
-
-function getCookie(cookieName) {
- var allCookies = document.cookie;
- var indexStr = allCookies.indexOf(cookieName + "=");
- if (indexStr == -1) return "";
- indexStr = allCookies.indexOf("=", indexStr) + 1;
- var endStr = allCookies.indexOf(";", indexStr);
- if (endStr == -1) endStr = allCookies.length;
- return unescape(allCookies.substring(indexStr, endStr));
-}
-
-function inArray(someID, someArray) {
- for (var i = 0; i < someArray.length; i++) if (someArray[i] == someID) return true;
- return false;
-}
-
-function getMenuState(startElement) {
- if (!startElement.childNodes || startElement.childNodes.length == 0) return "";
-
- var openItems = "";
- var aUL = startElement.getElementsByTagName("UL");
- for (var i = 0; i < aUL.length; i++) {
- var curNode = aUL[i];
- var parentFlip = (curNode.parentElement) ? curNode.parentElement : curNode.parentNode;
- if (curNode.style.display == "" && parentFlip.flipID) openItems += " " + parentFlip.flipID;
- }
- return openItems;
-}
-
-function putMenuState(startElement) {
- if (!startElement.childNodes || startElement.childNodes.length == 0) return false;
-
- var aUL = startElement.getElementsByTagName("UL");
- for (var i = 0; i < aUL.length; i++) {
- var curNode = aUL[i];
- var parentFlip = (curNode.parentElement) ? curNode.parentElement : curNode.parentNode;
- if (inArray(parentFlip.flipID, aOpenItems)) {
- openFlip(parentFlip);
- if (typeof prevFlipRoot == "undefined") {
- var testRoot = rootOfFlip(parentFlip.flipID);
- if (testRoot.flipID == parentFlip.flipID) prevFlipRoot = testRoot;
- }
- }
- }
-}
-
-function saveMenuState() {
- if (flipSaveMenuState) {
- var aUL = document.getElementsByTagName("UL");
- for (var i = 0; i < aUL.length; i++) {
- var curUL = aUL[i];
- var curID = curUL.id ? curUL.id : i;
- if (curUL.className == "flipMenu") document.cookie = cookiePrefix + curID + "=" + getMenuState(curUL) + ";";
- }
- }
-}
-
-function loadMenuState() {
- var aUL = document.getElementsByTagName("UL");
- for (var i = 0; i < aUL.length; i++) {
- var curUL = aUL[i];
- var curID = curUL.id ? curUL.id : i;
- if (curUL.className == "flipMenu") {
- var savedState = String(getCookie(cookiePrefix + curID));
- if (savedState != "") {
- aOpenItems = savedState.split(" ");
- putMenuState(curUL);
- }
- }
- }
-
- addEvent(window, "unload", saveMenuState);
-}
-
-function clearMenuState(flipMenuID) {
- if (typeof flipMenuID == "undefined") {
- var aUL = document.getElementsByTagName("UL");
- for (var i = 0; i < aUL.length; i++) {
- var curUL = aUL[i];
- var curID = curUL.id ? curUL.id : i;
- if (curUL.className == "flipMenu") document.cookie = cookiePrefix + curID + "=;";
- }
- } else document.cookie = cookiePrefix + flipMenuID + "=;";
-}
-
-cookiePrefix = document.location.pathname + "_";
-
-addEvent(document, "click", toggleFlip);
-if (flipInitOnLoad) addEvent(window, "load", initFlip);
diff --git a/system/doc/top/templates/index.html.src b/system/doc/top/templates/index.html.src
index 935bb11c80..257a656316 100644
--- a/system/doc/top/templates/index.html.src
+++ b/system/doc/top/templates/index.html.src
@@ -2,7 +2,7 @@
<!--
%CopyrightBegin%
-Copyright Ericsson AB 2001-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
@@ -169,7 +169,7 @@ Asked Questions</a>. <p>
<center>
<small>
-Copyright &copy; 1999-2009
+Copyright &copy; 1999-2010
<a href="http://www.ericsson.com">Ericsson AB</a>
</small>
</center>
diff --git a/system/doc/top/templates/otp_top.css b/system/doc/top/templates/otp_top.css
deleted file mode 100644
index 1c6d27bd8d..0000000000
--- a/system/doc/top/templates/otp_top.css
+++ /dev/null
@@ -1,53 +0,0 @@
- BODY { background: white }
-
- BODY { font-family: Verdana, Arial, Helvetica, sans-serif }
- TH { font-family: Verdana, Arial, Helvetica, sans-serif }
- TD { font-family: Verdana, Arial, Helvetica, sans-serif }
- P { font-family: Verdana, Arial, Helvetica, sans-serif }
-
- .header { background: #222; color: #fff }
- .top { background: #efe }
- .otp { background: #efe }
- .erlang { background: #ffe }
- .otp2 { background: #efe }
- .app { background: #ffe }
-
- a:link { color: blue; text-decoration: none }
- a:active { color: blue; text-decoration: none }
- a:visited { color: blue; text-decoration: none }
- body {
- margin: 0;
- padding: 0;
- border: 0;
- overflow: scroll;
- height: 100%;
- max-height: 100%
- }
- #container {
- width: 100%;
- margin: 10px auto;
- background-color: #fff;
- }
- #leftnav {
- float: left;
- width: 200px;
- margin: 0;
- padding: 1em;
- }
- #content {
- margin-left: 220px; /* set left value to WidthOfFrameDiv */
- border-left: 1px solid red;
- }
-
- .innertube {
- margin: 15px; /* Magins for inner DIV inside each DIV (to provide padding) */
- }
-
- * html body{ /* IE6 hack */
- padding: 0 0 0 200px; /* Set value to (0 0 0 WidthOfFrameDiv)*/
- }
- * html #maincontent{ /* IE6 hack*/
- height: 100%;
- width: 100%;
- }
-
diff --git a/system/doc/top/templates/system.html.src b/system/doc/top/templates/system.html.src
deleted file mode 100644
index 761bc96ed0..0000000000
--- a/system/doc/top/templates/system.html.src
+++ /dev/null
@@ -1,281 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>Erlang/OTP #release#</title>
- <style type="text/css">
-<!--
- BODY { background: white }
-
- BODY { font-family: Verdana, Arial, Helvetica, sans-serif }
- TH { font-family: Verdana, Arial, Helvetica, sans-serif }
- TD { font-family: Verdana, Arial, Helvetica, sans-serif }
- P { font-family: Verdana, Arial, Helvetica, sans-serif }
-
- .header { background: #222; color: #fff }
- .app { background: #ccc }
-
- a.anum:link { color: green; text-decoration: none }
- a.anum:active { color: green; text-decoration: none }
- a.anum:visited { color: green; text-decoration: none }
-
- a:link { text-decoration: none }
- a:active { text-decoration: none }
- a:visited { text-decoration: none }
--->
- </style>
-</head>
-
-<body bgcolor=white text="#000000" link="#0000ff" vlink="#ff00ff"
- alink="#ff0000">
-<center>
-<table border=0 width="90%" cellspacing=3 cellpadding=5>
-
- <tr>
- <td colspan=2 class=header>
- <font size="+1"><b>General</b></font>
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="system_architecture_intro/part_frame.html" target="_top"
- name=system_architecture_intro>
- Introduction
- </a>
- </td>
- <td align=right valign=top width=50>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-About Erlang, OTP, Erlang/OTP and this documentation
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="installation_guide/part_frame.html" target="_top"
- name=installation_guide>
- Installation Guide
- </a>
- </td>
- <td align=right valign=top width=50>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-The Erlang/OTP Installation Guide
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="system_principles/part_frame.html" target="_top"
- name=system_principles>
- System Principles
- </a>
- </td>
- <td align=right valign=top width=20>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-Starting, stopping and configuring the Erlang runtime system
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="embedded/part_frame.html" target="_top" name=embedded>
- Embedded System
- </a>
- </td>
- <td align=right valign=top width=50>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-Erlang in an Embedded System
- </td>
- </tr>
-
- <tr>
- <td colspan=2><font size=1>&nbsp;</font></td>
- </tr>
-
-<!-- ====================================================================== -->
-
- <tr>
- <td colspan=2 class=header>
- <font size="+1"><b>Programming in Erlang</b></font>
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="reference_manual/part_frame.html" target="_top" name=reference_manual>
- Erlang Reference Manual
- </a>
- </td>
- <td align=right valign=top width=50>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-Description of data types, language constructs and more
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="getting_started/part_frame.html" target="_top" name=getting_started>
- Getting Started
- </a>
- </td>
- <td align=right valign=top width=50>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-Getting started with Erlang
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="programming_examples/part_frame.html" target="_top" name=programming_examples>
- Programming Examples
- </a>
- </td>
- <td align=right valign=top width=50>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-Examples of using records, funs, list comprehensions and the bit syntax
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="efficiency_guide/part_frame.html" target="_top" name=efficiency_guide>Efficiency Guide</a>
- </td>
- <td align=right valign=top width=20>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-Learn how to write efficient programs in Erlang
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="tutorial/part_frame.html" target="_top" name=tutorial>Interoperability Tutorial</a>
- </td>
- <td align=right valign=top width=20>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-About interoperating with programs written in other programming languages
- </td>
- </tr>
-
- <tr>
- <td colspan=2><font size=1>&nbsp;</font></td>
- </tr>
-
-<!-- ====================================================================== -->
-
- <tr>
- <td colspan=2 class=header>
- <font size="+1"><b>Working with OTP</b></font>
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="design_principles/part_frame.html" target="_top"
- name=design_principles>
- Design Principles
- </a>
- </td>
- <td align=right valign=top width=20>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-Structure your programs with applications, supervisors and generic behaviors (gen_server, gen_event and gen_fsm).
-Also use the built in error logger.
- </td>
- </tr>
-
- <tr class=app>
- <td align=left valign=top>
- <table border=0 width="100%" cellspacing=0 cellpadding=0>
- <tr class=app>
- <td align=left valign=top>
- <a href="oam/part_frame.html" target="_top" name=oam>OAM Principles</a>
- </td>
- <td align=right valign=top width=20>
- </td>
- </tr>
- </table>
- </td>
- <td align=left valign=top>
-OTP Operation and Management Principles
- </td>
- </tr>
-
- <tr>
- <td colspan=2><font size=1>&nbsp;</font></td>
- </tr>
-
-</table>
-
-</center>
-</body>
-</html>
-
-
diff --git a/system/doc/top/templates/toc_.html.src b/system/doc/top/templates/toc_.html.src
deleted file mode 100644
index 5e79bc0ac8..0000000000
--- a/system/doc/top/templates/toc_.html.src
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>Erlang/OTP #release#</title>
- <style type="text/css">
-<!--
- BODY { background: white }
-
- BODY { font-family: Verdana, Arial, Helvetica, sans-serif }
- TH { font-family: Verdana, Arial, Helvetica, sans-serif }
- TD { font-family: Verdana, Arial, Helvetica, sans-serif }
- P { font-family: Verdana, Arial, Helvetica, sans-serif }
-
- .header { background: #222; color: #fff }
- .top { background: #efe }
- .otp { background: #efe }
- .erlang { background: #ffe }
- .otp2 { background: #efe }
- .app { background: #ffe }
-
- a:link { color: blue; text-decoration: none }
- a:active { color: blue; text-decoration: none }
- a:visited { color: blue; text-decoration: none }
--->
- </style>
-</head>
-
-<body bgcolor=white text="#000000" link="#0000ff" vlink="#ff00ff"
- alink="#ff0000">
-<center>
-<font size="+1"><b>Erlang/OTP #release#</b></font><br>
-</center>
-
-<div class=top>
-<small><a href="glossary.html" target=body>Glossary</a> |
-<a href="man_index.html" target=body>Modules</a> |
-<a href="permuted_index/pidxa.html" target=body>Index</a></small>
-<p>
-<small><a href="highlights.html" target=body>Release highlights</a><br>
-<a href="incompatible.html" target=body>Potential incompatibilities</a>
-</small>
-</div>
-
-<p>
-<div class=otp>
-Erlang/OTP
-<br>
-&middot;<small><a href="installation_guide/part_frame.html" target="_top"
- name=installation_guide>Installation Guide</a></small>
-
-<br>
-&middot;<small><a href="system_principles/part_frame.html" target="_top"
- name=system_principles>System Principles</a></small>
-
-<br>
-&middot;<small><a href="embedded/part_frame.html" target="_top" name=embedded>Embedded System</a></small>
-
-</div>
-
-<p>
-<div class=erlang>
-Erlang Programming
-<br>
-&middot;<small><a href="getting_started/part_frame.html" target="_top" name=getting_started>Getting
-Started</a></small>
-
-<br>
-&middot;<small><a href="reference_manual/part_frame.html" target="_top" name=reference_manual>Erlang
-Reference Manual</a></small>
-
-<br>
-&middot;<small><a href="programming_examples/part_frame.html" target="_top" name=programming_examples>Programming
-Examples</a></small>
-
-<br>
-&middot;<small><a href="efficiency_guide/part_frame.html" target="_top" name=efficiency_guide>Efficiency Guide</a></small>
-
-<br>
-&middot;<small><a href="tutorial/part_frame.html" target="_top" name=tutorial>Interoperability Tutorial</a></small>
-</div>
-
-<p>
-<div class=otp2>
-Working with OTP
-<br>
-&middot;<small><a href="design_principles/part_frame.html" target="_top"
- name=design_principles>Design Principles</a>
-</small>
-
-<br>
-&middot;<small><a href="oam/part_frame.html" target="_top" name=oam>OAM Principles</a></small>
-
-</div>
-
-<p>
-<div class=app>
-Applications
-<small>#applinks#</small>
-</div>
-
-<p>
-<a href="http://www.erlang.se/" target=body>http://www.erlang.se</a>
-
-</body>
-</html>